Page MenuHomeWildfire Games

Port scripts to python 3 before doomsday
ClosedPublic

Authored by Itms on Dec 22 2019, 8:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 13, 12:50 PM
Unknown Object (File)
Sun, Sep 8, 2:19 PM
Unknown Object (File)
Sun, Sep 8, 2:19 PM
Unknown Object (File)
Sat, Sep 7, 5:10 AM
Unknown Object (File)
Fri, Sep 6, 4:51 PM
Unknown Object (File)
Fri, Sep 6, 12:01 AM
Unknown Object (File)
Thu, Sep 5, 11:48 PM
Unknown Object (File)
Wed, Sep 4, 6:22 PM
Subscribers
Tokens
"Like" token, awarded by Stan.

Details

Summary

Python 2 will reach its end of life on the new year. We don't have a lot of work to port scripts.

Attached is a patch updating what is needed. I used the opportunity to fix the bugs that I found.

What is missing:

  • I didn't bother with the userreport server which is completely outdated. @vladislavbelov will upload the current code for the server at some point.
  • I should use the opportunity to set svn:executable on some files.
Test Plan

Test the updated scripts.

I noticed that the fontbuilder (with or without the patch) produces slightly different output from what is currently versioned. Maybe we should update the built fonts.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/866/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1382/display/redirect

See also D506?

Yes indeed! As mentioned above updating the translation scripts depends on the pology devs. So when I know more, I'll commit this and then I'll commandeer and commit D506 to port the translation scripts.

Stan added inline comments.
source/tools/fontbuilder2/fontbuilder.py
114 ↗(On Diff #10743)

Trailing ';'

Stan added inline comments.
source/tools/selectiontexgen/selectiontexgen.py
1 ↗(On Diff #10743)

I had no idea this file existed... Refs D2503 by @Nescio
Not sure we need it anymore.

About Pology, the port to Python 3 will take some time (seeing how the last commit is mine). So, if you find any kind of replacement, you might want to consider porting away from Pology, at least for the time being.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 12 2021, 10:25 PM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Feb 12 2021, 10:25 PM