Code Monkey home page Code Monkey logo

Comments (6)

michaeljones avatar michaeljones commented on June 12, 2024

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.

magro11 avatar magro11 commented on June 12, 2024

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.

magro11 avatar magro11 commented on June 12, 2024

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.

michaeljones avatar michaeljones commented on June 12, 2024

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.

magro11 avatar magro11 commented on June 12, 2024

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.

michaeljones avatar michaeljones commented on June 12, 2024

Closing as I'm pretty sure we now support Python 3.

from breathe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.