Comments (6)
Hi Marc,
This all sounds fantastic. I was just thinking about Python 3 the other day and realising that I'd made no effort to support it. The section stuff sounds interesting as well.
I'd like to see them both. A patch file or diff would be absolutely fine. You can post it here maybe or send it to my email [email protected]. If you did get the source by doing a git clone then you can commit your changes with:
git commit -a -m "Python 3 & section changes"
And then create a git-style patch with:
git format-patch "HEAD^"
Which will write out a file called something like: 0000-Python-3-&-section-changes.patch
There are other ways as well. If you don't want to bother committing but you still have a git repository then you can do:
git diff > python-3.patch
And send my python-3.patch.
Otherwise maybe you'll be able to figure something else out :)
Cheers,
Michael
from breathe.
Ok, I commited my changes and created the patch like described above.
Here is the result:
http://speedy.sh/a6VqR/0001-Python-3-option-sections-added-for-classes.patch
Unfortunately, the python 3 and python 2 version is not compatible and I don't know how it is possible to keep both versions in one branch. I also added the new :sections: member for classes in the documentation.
I merged by update with the newest version in the git. In my environment, the python 3 version works, however I don't run sphinx from the command-line, since we are using embedded python in a C++ software, such that sphinx is also run in this embedded environment in order to generate our user documentation. Until now, only the breathe-subfolder is python 3 ready, I did not test the setup.py and testsuite. However, I try to do that if I find some time.
Cheers
Marc
from breathe.
OK. setup.py runs with python 3 and installs breathe in the python site-packages folder. Additionally there has been a syntax-error in conf.py due to string-problems, since python 3 is now unicode. The patch for this can be found here:
http://speedy.sh/yj24x/0001-Python-3-compatibility-fixed-syntax-errors.patch
Cheers
Marc
from breathe.
Hi Marc,
It is very interesting to see, thank you for taking the time. I'm personally keen to keep compatibility with 2.x so I'll have to look closer into ways to achieve that. I think some combination of the 2to3 tool and the six
module which can abstract some of the differences.
The :sections:
member looks good to me; I'll definitely include that. Glad you seemed to find the Filter object stuff reasonably usable. I quite like it but I find bits of it tricky to come back to and understand.
I'm curious about the name change from finder -> myfinder
in a few of the files. I'm might change that back, if you don't mind.
Sounds like you've got an interesting setup with embedded Python3 interpreters!
Thanks again, I'll hopefully get a chance to look into the 2to3 support further over the next week.
Michael
from breathe.
Hi Michael,
I understand your thoughts about splitting the project into two branches. I also try to find a solution how it might be possible to keep both versions in one branch.
Acutally the rename of finder to myfinder has been necessary since Python 3 is a little bit more strict with identical names and I guess finder is also an alias for a module, therefore Python 3 resulted in a syntax error if this name is used for two different purposes. Myfinder is not the best variable name, however if it does not bother you, rename it to whatever you want to besides "finder" ;)
I really like to get python modules ready for python 3, since this makes the module more interesting for a growing community changing to version 3.
Cheers
Marc
from breathe.
Closing as I'm pretty sure we now support Python 3.
from breathe.
Related Issues (20)
- Sphinx 7.2 support HOT 2
- AttributeError: 'PosixPath' object has no attribute 'rstrip' in breathe/project.py HOT 4
- Drop EOL python 3.7?
- Missing `python` version for dependency management
- Wrong required python version 3.6+
- GH Actions: broken unit test
- Issue with dispaly of notes in sphinx documentation HOT 1
- Support Sphinx ToC generation with `_toc_name` and `_toc_parts` attribute
- Provide some diagnostic warnings if references to functions are missing parentheses HOT 1
- En-dash in @return renders incorrectly
- Duplicate declaration/description warnings HOT 1
- Add make.bat for building breathe's documentation on Windows HOT 1
- Duplicate C++ declaration with nested anonymous structure
- `RemovedInSphinx80Warning` in `ProjectInfoFactory.__init__`
- Test suite does not pass against Sphinx 7.2.6
- Automatic way to generate `.rst` files from doxygen xml HOT 1
- `Doxygenclass` is empty
- Breathe breaks with sphinx 7.3.X HOT 3
- Referencing a ```doxygengroup```
- Sphinx 8 will drop support for representing paths as strings. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from breathe.