Commit Graph

32 Commits

Author SHA1 Message Date
Scott Talbert
bb35bcd9d9 Fix bugs in Python2 / six removal 2025-02-03 20:13:56 -05:00
Alexandre Detiste
0257f755cf remove most of Python2 compatibility code 2025-02-02 20:17:45 -05:00
Alexandre Detiste
beb9932241 remove usage of six.print_() 2025-02-02 20:10:38 -05:00
Scott Talbert
9986a0d5c2 pypubsub: Replace deprecated inspect.getargspec
inspect.getargspec was removed in Python 3.11.  This is a backport of:
089c7a73f8
2022-08-08 22:35:58 -04:00
Scott Talbert
2871c46d33 Fix a bunch of DeprecationWarnings due to invalid escape sequences
Fixes #1454.
2022-01-11 11:23:06 -05:00
Christian Clauss
25ba122168 Fix typos discovered by codespell 2021-08-07 18:55:49 +02:00
Robin Dunn
732ff6752b Revert "Spelling fixes in wx.lib"
This reverts commit c00b8950da.
The spelling changes were a bit too aggressive.
2020-08-31 13:01:31 -07:00
Robin Dunn
c00b8950da Spelling fixes in wx.lib 2020-07-14 12:53:31 -07:00
Per A. Brodtkorb
426258b7b7 Adding missing close for open and replaced "fid=open(filename) fid.close()"
statements with the safer "with open(filename) as fid:" blocks.

Also removed unnecessary "try: ... finally: pass" statements
and refactored code from img2py function into _write_image and _replace_non_alphanumeric_with_underscore

Fixes #1574
2020-03-25 10:36:38 +01:00
Per A. Brodtkorb
e4e8bf8317 Fixes issue 1571:
Adding missing close for open.
If the "close()" call is missing after a "open(filename)" call, the filename isn't guaranteed to be closed before the interpreter exits.
This is generally a bad practice as explained here: https://stackoverflow.com/questions/7395542/is-explicitly-closing-files-important

Also replaced "fid=open(filename) fid.close()" statements for files with the safer
"with open(filename) as fid:" blocks. See https://www.python.org/dev/peps/pep-0343/
2020-03-23 17:16:44 +01:00
Per A. Brodtkorb
033c18fd9f Fixes issue #1556
Replaced XXX.keys() calls with idiomatic python 3 calls that are compatible with python 2 such as eg:
 * replaced "y = xxx.keys()" or "y = list(xxx.keys())" with just "y = list(xxx)"
 * replaced "sorted(xxx.keys())" or "sorted(list(xxx.keys()))" with just "sorted(xxx)"
 * replaced "if not A in B.keys():" with "if A not in B:"
 * replaced "for A in B.keys():"  with "for A in B:"

See also https://python-future.org/compatible_idioms.html
https://python-future.org/compatible_idioms.html#dict-keys-values-items-as-a-list
2020-03-20 18:51:19 +01:00
Robin Dunn
4b6ee40a14 Merge pull request #938 from RobinD42/fix-issue932-b
Restore wx.lib.pubsub, and officially deprecate
(cherry picked from commit 8fad2231a0)
2018-07-20 16:45:05 -07:00
Robin Dunn
77cc3d0971 Changed Pypubsub --> PyPubSub, and added a changelog entry 2018-03-20 12:55:33 -07:00
David Hughes
f91a644866 Added a ReST formatted docstring in __init__.py 2018-03-13 11:47:06 +00:00
David Hughes
5ac3eab051 Remove local pubsub 3.3.0 code and import 4.0.0 from external package 2018-03-12 11:06:21 +00:00
Metallicow
99834ab3ec ⁉️ Trim trailing whitespace misc files
All these files seem like legit trailing whitespace that can be removed.
2018-01-16 09:37:04 -06:00
Metallicow
c76384d458 Trim trailing whitespace *.py files 2018-01-16 08:47:07 -06:00
Metallicow
53c1f4f119 Trim Whitespace pubsub directory 2016-10-12 22:50:27 -05:00
Scott Talbert
cf59ae09fb Fix TopicTreeTraverser when doing breadth traversal on Python 3
Python 3 orders maps differently from Python 2, so sort the subtopics before
traversing them like is done with depth traversal.
2016-08-16 00:15:36 -04:00
Robin Dunn
a1492d304b Merge pull request #51 from Metallicow/pubsub-branch-master2014
PY3 pubsub Fixs
2016-02-29 21:43:02 -08:00
Oliver Schoenborn
cedf2ecb4e v3.3.0 at sf.net/projects/pubsub
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 22:36:11 +00:00
Metallicow
0496c8b610 prefer str not tuple for print statements 2014-01-14 05:30:19 -06:00
Robin Dunn
700f95c632 PR 50: Py3 fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-14 03:09:16 +00:00
Metallicow
af329545fb PY3 pubsub Fixs 2014-01-12 10:28:54 -06:00
Oliver Schoenborn
db399def0e Updated for latest pubsub release v3.3.0rc1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 20:57:01 +00:00
Oliver Schoenborn
ea0f874a40 Update from r343 of pubsub trunk/src/pubsub on SF.net
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-27 05:45:26 +00:00
Oliver Schoenborn
6a1bbb55f5 CHG: update to latest pypubsub (3.3.dev1)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-27 05:10:22 +00:00
Robin Dunn
9f24505715 Merge of PR 11 with the whitespace-only changes omitted.
See https://github.com/RobinD42/Phoenix/pull/11

Mostly phoenix-port changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 01:15:34 +00:00
Robin Dunn
7905b1bcb1 Switch setup.py to use build.py for the actual building,
and set things up so commands like install or bdist_egg are
able to use the build as-is without having to build it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 19:17:08 +00:00
Robin Dunn
6ffb7c6737 Port some changes from Classic
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-19 21:27:32 +00:00
Robin Dunn
d888f0d24d Set eol type to native
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-14 19:47:15 +00:00
Robin Dunn
247673201b Copy (branch) wx.lib, wx.py and wx.tools from Classic, and include subpackages branched from 3rdParty
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 01:36:07 +00:00