Kazuya O'moto
636dab57b8
Add a few more dunders
...
Clean up comments
2025-03-30 02:53:06 +09:00
Kazuya O'moto
fbd25d56fc
Change special_attrs from PY2 to PY3
...
Change deprecated variables in PY2 to new ones in PY3
2025-03-30 02:53:06 +09:00
Kazuya O'moto
d6b6c3c0fd
Add NL token type check to getRoot
...
little tweaks to if statements.
2025-03-30 02:52:48 +09:00
Alexandre Detiste
0257f755cf
remove most of Python2 compatibility code
2025-02-02 20:17:45 -05:00
Kazuya O'moto
1fb1e84012
Use unwrap before isbuiltin check
...
`inspect.isbuiltin` does not unwrap obj, but `inspect.signature` does,
which can result in a ValueError.
>>> wx.Bell
<built-in function Bell>
>>> bell #= dcor(wx.Bell)
<function Bell at 0x0000015E53D92B60>
>>> inspect.isbuiltin(bell)
False
>>> inspect.signature(bell)
... (snip) ...
ValueError: no signature found for builtin <built-in function Bell>
2023-11-26 16:32:57 +09:00
Kazuya O'moto
e0a71625e2
Extract argspec inside paren using re
...
ex.
argspec = '(x, /, y, z=3, *args, value: int = 0, **kwargs) -> int'
--> 'x, /, y, z=3, *args, value: int = 0, **kwargs'
2023-02-24 23:21:59 +09:00
Kazuya O'moto
8e98e8b442
Use inspect.signature instead of formatargspec
...
inspect.formatargspec has been deprecated since Python 3.5,
and removed in Python 3.11.
2023-02-24 23:02:48 +09: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
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
jensgoe
714a9a222d
ignore newline added by Tokenize module since Python 3.6 ( fixes #1109 )
2018-12-12 16:00:46 +01:00
Mesalu
0f1861990d
Update introspect.py
...
Adds a check to determine if getfullargspec should be used. This is added in Py3 to get elements like type annotations.
2018-07-25 13:52:29 -07:00
Robin Dunn
ce6f585444
Merge pull request #894 from tianzhuqiao/py
...
Fix a bug in py.introspect.getTokens
(cherry picked from commit 4b43671746 )
2018-06-23 18:26:36 -07:00
Robin Dunn
0c75ee6277
Merge pull request #867 from RobinD42/fix-issue855
...
im_func --> __func__
(cherry picked from commit 6b858b5966 )
2018-05-30 21:07:53 -07:00
Tianzhu Qiao
8b8bd630f2
Fix a python3 compatibility issue to get class instance and function objects
2018-04-21 08:51:28 -07:00
Metallicow
6e0ec5421f
Trim Whitespace py directory
2016-10-12 22:12:43 -05:00
Robin Dunn
ed4756b902
Remove wx.lib.six and use the stock six module instead,
...
and add it as an installation dependency.
2016-06-30 20:07:57 -07:00
Robin Dunn
283152cff0
Adapt to Py3 changes in tokenizer, method & function attribute names, etc.
...
Some general cleanup too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@76356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-16 03:02:36 +00:00
Robin Dunn
801682c786
Some Py3 fixes for PyCrust
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@76040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 07:48:20 +00:00
Robin Dunn
bcbdcd9631
Remove more CVS $Id$ and $Revision$ tags, and a bit of code that uses them.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-11 03:35:32 +00:00
Robin Dunn
c1beea6cfa
PR 39 from Metallicow. Py3 and Phoenix updates, Pen and Brush style updates
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 23:12:35 +00:00
Robin Dunn
2e30a88173
Some Py3 and various other fixes from wxGuru.
...
Merged and squashed from https://github.com/RobinD42/Phoenix/pull/15 ,
with additional edits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-05 20:54:22 +00:00
Robin Dunn
ede298e62e
Modified patch from Maxim Kolosov for Py3 fixes in wx.py
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-04 02:00:13 +00:00
Robin Dunn
c5bcdfe844
Various changes for PyCrust and other py classes to get them working with Phoenix and also avoid deprecation warnings.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 03:16:59 +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