Skip to content

chore: migrate Python to 3.13 (Debian Trixie / TKL v19)#23

Open
marcos-mendez wants to merge 4 commits intoturnkeylinux:masterfrom
popsolutions:migrate-python-3.13
Open

chore: migrate Python to 3.13 (Debian Trixie / TKL v19)#23
marcos-mendez wants to merge 4 commits intoturnkeylinux:masterfrom
popsolutions:migrate-python-3.13

Conversation

@marcos-mendez
Copy link
Copy Markdown
Member

Automated migration of Python code to 3.13 for TurnKey Linux v19 (Debian Trixie).

Changes:

  • pyupgrade --py313-plus applied
  • Removed deprecated modules (commands, imp, cgi, lib2to3)
  • Fixed syntax incompatibilities
  • All Python files compile cleanly on Python 3.13.5

Tested: Successfully built turnkey-core v19 ISO (406MB) on TKL DEV Trixie.
Webmin, SSH, systemd all operational in LXC test container.

Generated by: PopSolutions Cooperative (pop.coop)

navigator and others added 4 commits March 20, 2026 22:43
@JedMeister
Copy link
Copy Markdown
Member

Thanks so much mate!

Although as I think I mentioned offline, we've actually already (re)built TKLBAM "as-is" on top of pypy2 for our v19.x/Trixie release. PyPy upsteam still maintain their python2 runtime and we've built it from source and packaged it for Trixie.

Apologies that we haven't been very good at communicating the work we've been doing behind the scenes. I'm sure it would have made life easier for you - and all other contributors and potential contributors.

FWIW updating TKLBAM to Python3 has been an ongoing PITA for us. We've had a few false starts and progress has stalled on multiple occasions. TBH if we'd put all the hours we've spent trying to patch up the py2 build plus the time we've spent working on py3 updates, we could have just rewritten the whole thing from scratch - probably multiple times. But benefit of hindsight I guess...

Regardless, because we've already done the work for a Trixie pypy2 build with the existing py2 code, I don't really want to revisit TKLBAM ATM.

However, I will leave this PR here because I really do want to circle back to a TKLBAM py3 update. As I said, I have already done a fair bit of the work myself (although manually) but it would be great to be able to compare against this updated code. It's likely that some of the ways you've resolved the tricky bits are worth comparing to the way that we've done it. And perhaps there's bits we've missed that you have taken care of.

TL;DR thanks but I'll this here for now. It won't go to waste (although I probably won't merge it as is).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants