[Postponed to after 0.16] Preliminary Python3 cleanup

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
plaes
Posts: 24
Joined: Tue Dec 15, 2015 10:35 am

[Postponed to after 0.16] Preliminary Python3 cleanup

Post by plaes »

Hi!

Recent Qt5 progress pushed me to investigate the state of Python3 support in FreeCAD repository. I found some issues which I fixed in this pull request: https://github.com/FreeCAD/FreeCAD/pull/116

Now, there's still some work left to be done:
  • src/Tools - these weren't runtime-specific.
  • src/Import/App - contains some autogenerated code (which also seems to be somewhat bitrotted)
  • src/Mod/Path/libarea - should be fixed upstream?
I also disabled all the other python 2.x versions except 2.7, because it's the only upstream supported version.

I used following command to check for syntax errors:

Code: Select all

find -iname '*.py' | xargs pyflakes3 |egrep -v '(undefined|unused|assigned)
plaes
Posts: 24
Joined: Tue Dec 15, 2015 10:35 am

Re: Preliminary Python3 cleanup

Post by plaes »

Well, (insert random curse word here)...

Mateusz (f3nix) pointed me to Yorick's repo which already contains all these + many more Py3 goodies.

Fortunately I didn't spend too much time on my branch.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Preliminary Python3 cleanup

Post by wmayer »

Well, these are all changes that are Python neutral and maybe it's worth to think about including these changes into master too and do some cleanup on the Py3-port branch.
The point is that for some time we have to support Py2 and Py3 in order to find any issues and therefore the less differences they have the easier the work.

But anyway, this is something that should be done after the release of 0.16.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Preliminary Python3 cleanup

Post by jmaustpc »

plaes wrote:Well, (insert random curse word here)...

Mateusz (f3nix) pointed me to Yorick's repo which already contains all these + many more Py3 goodies.

Fortunately I didn't spend too much time on my branch.
It best to discuss you plans in the developers forum before starting, if you want to save duplication of effort and make sure your ideas are heading in the right direction to end up being pulled into master.

If you are interested in Python 3 porting, there is a topic (now 12 pages) here
viewtopic.php?f=10&t=12534&start=90
where Yorik, Werner and others have been working on Python 3 porting.

I hope you hang around and help out, FreeCAD can always use more coders! :)
Post Reply