Python3 migration
Moderator: Committer
Re: Python3 migration
I've opened PR https://github.com/freeorion/freeorion/pull/2653
AI doesn't think but can send orders and with dirty hack unit tests are passed.
AI doesn't think but can send orders and with dirty hack unit tests are passed.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
- adrian_broher
- Programmer
- Posts: 1156
- Joined: Fri Mar 01, 2013 9:52 am
- Location: Germany
Re: Python3 migration
What prevents you from doing a release so far?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Re: Python3 migration
Vezzra makes releases. I suppose he is going to make FreeOrion release first.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Python3 migration
I want to join the python3 migration.
Can someone provie me a python3 build for windows?
My throughts about: https://github.com/freeorion/freeorion/pull/2653
I want to split it to smaller PRs.
Do as much I can to make python2 code compatiable with python3 (print, iteritems, etc.).
This will reduce diff and simplify feature branch maintance.
Can someone provie me a python3 build for windows?
My throughts about: https://github.com/freeorion/freeorion/pull/2653
I want to split it to smaller PRs.
Do as much I can to make python2 code compatiable with python3 (print, iteritems, etc.).
This will reduce diff and simplify feature branch maintance.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Python3 migration
I didn't work on this on Windows later so I don't have one. You can try to build it with latest SDK: https://ci.appveyor.com/project/freeorion/freeorion-sdk
I've already extracted some little things about python which don't leave game in a broken state and they are merged already, but switching from python2 to 3 is big either way.Cjkjvfnby wrote: ↑Sat Jan 11, 2020 9:42 am My throughts about: https://github.com/freeorion/freeorion/pull/2653
I want to split it to smaller PRs.
It would be nice if you could extract some compatible changes into master without switching to python3
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Python3 migration
I will add https://six.readthedocs.io/ library to the code.
Workflow:
Workflow:
- copy library file to the project code
- use it to archive compatibility
- remove it and all usage after the migration is done
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Python3 migration
Do we need to maintain Python2 compatibility? If so C++ code must be altered to support both version as well.Cjkjvfnby wrote: ↑Sat Jan 11, 2020 11:22 am I will add https://six.readthedocs.io/ library to the code.
Workflow:
- copy library file to the project code
- use it to archive compatibility
- remove it and all usage after the migration is done
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Python3 migration
It depends how fast we want to add python3.
How far we from merging https://github.com/freeorion/freeorion/pull/2653?
Can you produce a list of steps what should be done? Is it just press merge or we need more actions?
We have 2 python libraries inside a game: one for AI and one for universe generation and turn events.
Do we plan to port them simultaneously of can do it in separate steps?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Python3 migration
There WIP list I maintains in PR description:Cjkjvfnby wrote: ↑Sun Jan 12, 2020 10:39 amIt depends how fast we want to add python3.
How far we from merging https://github.com/freeorion/freeorion/pull/2653?
Can you produce a list of steps what should be done? Is it just press merge or we need more actions?
- First of all I'm waiting your PR and AI unit tests to be merged.
- Do something with ReadOnlyDict. Maybe we don't need it at all.
- Port charts script you found.
- And release SDK so python3 version can be built and tested with CI.
They are use many common code so I think it should be ported simultaneously.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Python3 migration
Charts is a standalone script, let's exclude it from migration scope. It can be migrated when It will be needed.o01eg wrote: ↑Sun Jan 12, 2020 10:49 am There WIP list I maintains in PR description:
- First of all I'm waiting your PR and AI unit tests to be merged.
- Do something with ReadOnlyDict. Maybe we don't need it at all.
- Port charts script you found.
- And release SDK so python3 version can be built and tested with CI.
I will look into ReadOnlyDicts problem.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Python3 migration
Well, actually I've been doing the releases of the game, not the (cmake powered) SDKs, those have been maintained by Marcel (adrian_broher). He withdrew from the project some time ago, so I did plan to try to take care of SDK releases after 0.4.9 is out, however, seeing as he seems to be back, I'd prefer to leave that to him.
If that's ok with him - Marcel?
Re: Python3 migration
Yep. Which means the entire universe generation and turn event Python scripts must be made Python3 compliant like the AI scripts.
And it absolutely needs to be done within the next release cycle, as Python2 support is fading out. So, whatever else is going on the next release cycle, migration to Python3 must be given topmost priority.
- adrian_broher
- Programmer
- Posts: 1156
- Joined: Fri Mar 01, 2013 9:52 am
- Location: Germany
Re: Python3 migration
Lolnotin1kyears. :3
But the release mechanism is idiot proof. Update the release versions in the cmake file, create an annotated tag and wait until the build was successful (assuming any of you didn't fuck up the setup).
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
- adrian_broher
- Programmer
- Posts: 1156
- Joined: Fri Mar 01, 2013 9:52 am
- Location: Germany
Re: Python3 migration
FYI the majority of Linux Platforms are dropping Python2 with their next release. MacOS will drop support with 10.16.
Some FO related bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1787241
https://bugs.debian.org/cgi-bin/bugrepo ... bug=936557
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Re: Python3 migration
Considering https://fedorapeople.org/groups/schedul ... tasks.html looks like freeorion will be missed in Fedora 32.adrian_broher wrote: ↑Tue Jan 14, 2020 8:27 amFYI the majority of Linux Platforms are dropping Python2 with their next release. MacOS will drop support with 10.16.
Some FO related bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1787241
https://bugs.debian.org/cgi-bin/bugrepo ... bug=936557
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm