Porting to python3
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Porting to python3
Note all that the python3 branch still builds with python2 too. It supports both (until py2 becomes obsolete then we can remove it)
Re: Porting to python3
I am trying hard to rebase but I have some difficult conflicts:
this line: https://github.com/FreeCAD/FreeCAD/blob ... p.inl#L145 is renamed from getattr to getattro. What is the reason? This is done for python2 and 3... why was the change from char to Pyobject necessary? B= py3, C=master
this line: https://github.com/FreeCAD/FreeCAD/blob ... p.inl#L145 is renamed from getattr to getattro. What is the reason? This is done for python2 and 3... why was the change from char to Pyobject necessary? B= py3, C=master
Re: Porting to python3
ok the rebase has finished.
But I have encountered some problems:
I used this:
There were many merge-conflicts to resolve. I maybe have destroyed some things, but with the kdiff3-tool solving merge conflicts is really a lot easier. Some conflicts were automatically solved by the merge tool.
stuff that should be avoided in python2: And finally after all that work, github tells me, that the branch isn't merge-able and again has conflicts everywhere!?
https://github.com/FreeCAD/FreeCAD/pull/384
But I have encountered some problems:
I used this:
Code: Select all
git checkout FreeCAD/master
git checkout -b py3_21
git rebase yorik/py3-20
stuff that should be avoided in python2: And finally after all that work, github tells me, that the branch isn't merge-able and again has conflicts everywhere!?
https://github.com/FreeCAD/FreeCAD/pull/384
Re: Porting to python3
I tried rebasing again, and this time it worked much better. This time I tried the other way:
I couldn't resolve one mergeconflict in src/App/FeaturePythonPyImp.inl which had quite some differences. I simple used the current master file, so this file will need some love to get python3 ready again.
I haven't compiled this branch yet.
The link to the rebased branch: https://github.com/looooo/FreeCAD/tree/py3-21
Code: Select all
git checkout py3_20
git checkout -b py3_21
git rebase FreeCAD/master
I haven't compiled this branch yet.
The link to the rebased branch: https://github.com/looooo/FreeCAD/tree/py3-21
Re: Porting to python3
https://travis-ci.org/sasobadovinac/Fre ... /186075159looo wrote:I haven't compiled this branch yet.
The link to the rebased branch: https://github.com/looooo/FreeCAD/tree/py3-21
https://ci.appveyor.com/project/sasobad ... ld/1.0.533
Re: Porting to python3
thanks for setting this up.
The error reported by windows/linux ci's can be found in this thread. I think it was a bug, but was solved some time ago.
The mac-builds fail with the file I have mentioned aboth. I have tried to repair this. It does work now on my local machine.
The error reported by windows/linux ci's can be found in this thread. I think it was a bug, but was solved some time ago.
The mac-builds fail with the file I have mentioned aboth. I have tried to repair this. It does work now on my local machine.
Re: Porting to python3
I see, VTK6 should be updated to VTK7?looo wrote:The error reported by windows/linux ci's can be found in this thread. I think it was a bug, but was solved some time ago.
viewtopic.php?f=10&t=12534&start=170#p135032
Edit: but windows builds should be using VTK7 ?
Re: Porting to python3
The error is something about a missing spreadsheet-file. I think I had this error with the last rebased branch from yorik (py3_20) too. But this was solved in master. So after rebasing on master again, my py3-21 branch should have the fix. No idea what is wrong here. Maybe the ci's started before I made the push?
Re: Porting to python3
Ok, silly me... I guess the error showed up because this were build with python 2.7
Re: Porting to python3
no, that shouldn't be a problem. The branch should work with both (python2 and 3). I am also trying to compile with python2.