sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
951 stars 405 forks source link

Python 3.13 support #2608

Open SnoopJ opened 1 month ago

SnoopJ commented 1 month ago

Requested Feature

Sopel should support Python 3.13 when possible. 3.13 entered beta on 7 May and is now feature complete, so it's a good time to start tracking what's needed for support. 3.13.0 final is scheduled for October 2024, and release candidates are scheduled for late July and early September.

Problems Solved

No response

Alternatives

No response

Notes

Known problems:

SnoopJ commented 1 month ago

It may merit a separate issue, but making a note while it's fresh in my mind from PyCon US where the steering council solicited maintainer help:

It would also be helpful to evaluate the impact of free threading on Sopel. Of course we cannot do this until we can run on 3.13 at all, so it's follow-up work.

dgw commented 1 month ago

I don't think it should break anything, but what we need to do depends on what kind of help they want. Benchmark comparisons of our package running on GIL-enabled and GIL-disabled builds?

For our own purposes, testing on no-GIL Python would be good to expose any operations that are technically thread-unsafe but blocked by the GIL in current CPython builds. (But I think we already have Locks and such around those places. Probably.)

SnoopJ commented 1 month ago

Mostly I think it's a good stress test for upstream's benefit just to see if any wheels fall off the wagon. I doubt they will, but it's easy enough to give it a go.

I guess it would be nice to do a perf comparison (the build with --disable-gil can still have the GIL turned back on, so it's only one build to juggle), but that does almost certainly require some thought about what we would even measure (and how). I'd say perf eval is well worth splitting into a separate ticket if we end up wanting to see what the impact is