22 Commits

Author SHA1 Message Date
Alexandre Detiste
323e78c085 remove more Python2 hybridation 2025-02-02 20:29:49 -05:00
lojack5
07de1d515e [etgtools] Disable text wrapping for specific lines in docstrings
The line-wrapping causes issues once the python signatures become too long,
as textwrap isn't smart enough to split the lines on valid continuation points
for code. I had one instance of splitting a line in the middle of a string ->
SyntaxError on next run of etg due to the generated PYI file having an
unterminated string.

Specificially, disable splitting for lines that start (ignoring spaces) with
a specific string - in this case any line starting with the name of the
function or method this is a docstring for.
2023-10-18 12:18:48 -06:00
Robin Dunn
9f2cc54b48 Update copyright years 2020-03-10 11:41:39 -07:00
Robin Dunn
b77c88a280 Merge tag 'wxPython-4.0.2' into wxPy-4.0.x
(cherry picked from commit 4c56c39e52)
2018-06-17 22:04:22 -07:00
Robin Dunn
9d172ddc8a Update copyright in etgtools 2017-02-13 16:18:47 -08:00
Metallicow
067569d785 Trim trailing space etgtools directory 2016-12-05 16:26:04 -06:00
Robin Dunn
24e2b78806 Lots more docs changes.
Add a generator that updates a persistent mapping of item (functions, classes, etc.) to the module names they are a member of.

Remove the NO_MODULE dictionary as we're tracking all the item --> module names now.

Consolidate the 2 removeWxPrefix implementations to just one.

Fix taking out too much space in the class index when removing the :ref: for unknown items, which caused ReST problems.

Use pyName if it is set

When renaming classes we also need to change the className in the method objects

Properly deal with nested classes
2016-05-22 23:39:40 -07:00
Robin Dunn
35fd2e16bf Update copyright year
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 02:13:03 +00:00
Robin Dunn
5b8bc4fe17 Use textfile_open when loading core.pi to avoid encoding errors in Python3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-16 01:15:21 +00:00
Robin Dunn
d472962864 Wordwrap the text used for docstrings.
Put the signatures for the ctors before the text, just like the other functions, methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 05:13:28 +00:00
Robin Dunn
787cfb858e Add and use the wxPyThreadBlocker class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 03:24:34 +00:00
Robin Dunn
1d3fc8dad2 remove the 't' mode for codecs.open
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 21:35:14 +00:00
Robin Dunn
2011586fa0 Use codecs.open in textfile_open() for Py2.7 so it can work more like open() in Py3, auto-converting to/from utf-8 and unicode. Use textfile_open in parts of the sphinx command that were having encoding errors and also in writeIfChanged().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 20:43:48 +00:00
Robin Dunn
b41df0b779 Many, many (many!) changes needed to build and run the Phoenix extension modules with Python 3. Where possible changes were made such that the code works with both Python 2.7 and 3.2 without conditionals. In general the following types of changes were made:
* Changed imports to use either absolute or explicit relative imports.  Implicit relative imports are no longer allowed.

 * Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely.

 * Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues.

 * Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.)

 * Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc.

 * Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:28:02 +00:00
Robin Dunn
1d54d41e7b Encode generator output as utf-8 in case there is any non-ascii text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 19:22:19 +00:00
Andrea Gavana
ca4746f13c - Initial commit of the Python scripts to ReSTify the XML documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-30 19:17:09 +00:00
Robin Dunn
470c088a85 * Add the pi generator (for "Python Interface" files used by WingIDE and maybe others.)
* Some improvements in docstring generation
* refactor and shuffle some code around

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-21 08:09:26 +00:00
Robin Dunn
04f10c5868 Update Phoenix copyright statements to 2011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 01:52:23 +00:00
Robin Dunn
833fa43787 A bit of refactoring
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-28 03:43:30 +00:00
Robin Dunn
548d52253c minor fix in the file header
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-18 08:19:45 +00:00
Robin Dunn
2c4ebc512e Add file headers to the rest of the source files, don't bother with cvs keywords, fix some typos, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-11 00:54:15 +00:00
Robin Dunn
ab37739a9b initial commit of experimental Phoenix code
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-11 00:08:20 +00:00