Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to python 3.11 #7282

Open
2 of 3 tasks
drew2a opened this issue Jan 20, 2023 · 13 comments
Open
2 of 3 tasks

Migration to python 3.11 #7282

drew2a opened this issue Jan 20, 2023 · 13 comments

Comments

@drew2a
Copy link
Contributor

drew2a commented Jan 20, 2023

Python 3.11 offers some performance improvements that are good to have: https://docs.python.org/3/whatsnew/3.11.html#faster-runtime.

Python 3.11 also is a must-have for all Apple Silicone owners if they want to build Tribler easily: #7252 #7281

Currently, the following libraries from Tribler's dependencies are not ready for this migration:

@drew2a drew2a added this to the 7.14.0 milestone Jan 20, 2023
@drew2a drew2a self-assigned this Jan 20, 2023
@ichorid
Copy link
Contributor

ichorid commented Jan 21, 2023

The real problem is Libtorrent: building it with Python 3.11 requires Boost 1.81, which was published only recently. However, the PIP version of Libtorrent is pretty old and does not support 3.11.

Related discussions:
Instructions for building Libtorrent with Python 3.11 bindings

"update pypi libtorrent"

"Who is responsible for which Python PIP package?"

@drew2a
Copy link
Contributor Author

drew2a commented Jan 23, 2023

@ichorid thank you for the information! I've updated the issue's description.

@Solomon1732
Copy link
Contributor

I'll add that Python 3.10 added match statements: What's new in python 3.10, specification, motivations and rationale, tutorial. It can negate the need for many if-elif chains when writing code.

@Solomon1732
Copy link
Contributor

There looks to be a difference between this somewhat older libtorrent version and this 2.0 branch. Namely, python 3.11 isn't skipped anymore. That said, I don't know if said branch is a stable release or a release candidate. Its release page isn't clear about it:
https://github.com/arvidn/libtorrent/releases

@ichorid
Copy link
Contributor

ichorid commented Jul 7, 2023

I don't know if said branch is a stable release or a release candidate. Its release page isn't clear about it: https://github.com/arvidn/libtorrent/releases

Just go ask Arvid directly at Libtrorrent github page (e.g. discussions of Issue) 😉

@Solomon1732
Copy link
Contributor

Done. Hopefully I'll be answered Soon:tm:: arvidn/libtorrent#7265 (comment)

@Solomon1732
Copy link
Contributor

Solomon1732 commented Jul 14, 2023

Yes, it's stable:

Anything with a release version is stable

arvidn/libtorrent#7265 (comment)
I hope it'll help the migration efforts?

@drew2a
Copy link
Contributor Author

drew2a commented Sep 11, 2023

From what I see, Python 3.11 support isn't available in either v2.0.9 or v1.2.19.

Support for Python 3.11 is only present in RC_2_0.

You can find the specific commit here.

@Solomon1732
Copy link
Contributor

I missed it. Thanks. It's a shame. Hopefully it'll be be supported soon.

@kozlovsky
Copy link
Contributor

PonyORM 0.7.17 with Python 3.11 support is out! So, what's left is libtorrent

@drew2a drew2a removed their assignment Jan 18, 2024
@drew2a drew2a removed this from the 7.14.0 milestone Jan 18, 2024
@Solomon1732
Copy link
Contributor

Solomon1732 commented Apr 21, 2024

libtorrent version 2.0.10 came out in February 2024. It looks like it supports Python 3.11 now? I am wondering tentatively. Here's the release: https://github.com/arvidn/libtorrent/releases/tag/v2.0.10

One of the notes says this:

Bump boost version to enable Python 3.11 package builds by @cas-- in arvidn/libtorrent#7445

Also, if tribler migrates to Python 3.11, does it mean issues like #7869 can be closed, if only to tidy things up?

@drew2a
Copy link
Contributor Author

drew2a commented Apr 22, 2024

@Solomon1732, thank you for noticing this and keeping us informed.

Currently, we use libtorrent 1.2.x in Tribler. Switching to 2.x is still under debate. For more information, please check:

@RealJosephKnapp
Copy link

Perhaps it is time to upgrade to Libtorrent 2.0.10, and to upgrade its dependencies to Boost 1.86, zlib 1.3.1 and OpenSSL 3.3.2.

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

No branches or pull requests

6 participants