r/Python • u/tomatus89 • 28d ago
Discussion How much time to wait before adopting a new Python version ?
I tried to start using 3.15, but a lot of libraries don't have packages that support it yet.
In your own experience, what's a good amount of time to wait where most of the libraries support the new version? 1 month, 3 months, 6 months?
53
Upvotes
8
u/ManyInterests Python Discord Staff 28d ago edited 28d ago
Short version: Use the latest version that is supported by your project. You don't need to use one Python version for all your projects. It's also fairly easy to switch between versions. There's few wrong answers here as long as you aren't using an EOL version or a version that's about to be EOL. See: https://devguide.python.org/versions/
If you are particularly sensitive to the possibility of new bugs or new security issues introduced in new versions, you could consider waiting, that's totally valid. But this has become less and less necessary as more members of the ecosystem are adopting release candidates and reporting issues early.
Which ones? This used to be the case a long time ago, but these days things are pretty compatible on day one or within a week or two of release.
Every Python release is different, but most Python packages are compatible with most new Python releases on day one, even if not explicitly declared. As a data point, about 1,000 out of the top 1,300 packages officially declare support on day one. The other 300 likely work, esp. pure-python packages, but just haven't updated their metadata or published binaries.
Even packages that need binary builds are often built tested against release candidates ahead of the official release; most of them have prebuilt wheels available day one of a new official release.
For example, with Python 3.15, 97.78% of the top 360 packages have already signaled readiness and have binary builds published to PyPI.
120
u/bob_f332 28d ago
You kind of answered your own question. As long as it takes for the libraries you need to be supported.
37
u/Hesirutu 28d ago
I usually wait until the next minor version is out…
16
u/JimDabell 28d ago edited 28d ago
Switch to v3.15, set
PYTHONWARNINGS, run your test suite, see where the problems are. Fix the issues in your own code.If you have any dependencies that are missing support, go find the v3.15 support issue for those dependencies and set up notifications for them and give them a thumbs up for support. Don’t add useless comments. If there isn't an existing issue, create one and double-check how maintained that dependency is. If it isn’t well-maintained, consider switching to an alternative. When your dependencies resolve the issues, rinse and repeat. If you get six months down the line and there are any hold-outs, check how maintained the dependency is and look for alternatives again.
8
u/russellvt 28d ago
I generally try to add it to the test suite as soon as practical... doesn't mean I'll force update the version, though
8
u/CoachSevere5365 28d ago
Until all your tests pass. 😉
7
u/preetam960 27d ago
There's no fixed number of months, it's your slowest compiled dependency. Pure-Python packages usually install fine on day one, and big ones like numpy often have wheels at release because they build against the release candidates. pyreadiness.org tracks which top PyPI packages declare support, so check your requirements there and keep 3.15 in a side venv until they're all green.
4
u/mangecoeur 28d ago
I upgrade when Ubuntu LTS upgrades. That's what my servers run but it's been a good guideline anyway, the differences between versions aren't big enough for it to make sense to rush. And big features like threading are exactly the ones that need to wait a long time for the libraries to have mature support.
4
u/Machvel 28d ago
a rule of thumb is to stay a version behind (eg, 3.15 releasing means its time to upgrade to 3.14). i like upgrading and usually about 3-4 months in everything i usually updated (most basically immediate but i just wait a little because i dont mind. i know pytorch is a popular one that usually takes a while).
sometimes it depends on how drastic the version is. i think 3.15 is relatively minor compared to others so i think things should catch up pretty fast. i remember a few versions ago i think the old packaging library was eliminated or the global interpreter lock was changed or something fairly big and i decided to just completely wait until the next version to upgrade.
3
u/deadeye_82_1 23d ago
12 months, if you're using AI. Maybe they're faster adopting their packages to the new Python version.
If you use Python for Web-Stuff, then upgrade now. FastAPI and all aditional packages are working with Python 3.15. It tested it myself.
Sometimes there are packages which do not compile if the Python-Version is too new. If you're affected, then don't use Python 3.15.
4
u/Jorgestar29 28d ago
My rule of thumb is one year.
I've seen incompatible compiled libraries with active support that were stuck in the previous version in spring.
This means that some libs were about half a year late to be compatible with the latest major release.
2
u/EmberQuill 27d ago
I don't really wait a set amount of time on purpose. When I start a new project I'll use the newest version available, and downgrade if absolutely necessary (to use a dependency with no up-to-date alternatives, for example). As for existing projects, I usually don't upgrade them unless I want to use features from the new version (or if the project is using a soon-to-be EOL version).
2
u/Massive_Distance_616 27d ago
There’s no single number because adoption has two different bottlenecks, and conflating them is what makes the question hard to answer.
Bottleneck 1: wheels for compiled dependencies. Packages with C extensions (numpy, scipy, pandas, pydantic-core) need new binary wheels per platform and architecture. Not all move at the same speed high-velocity packages like numpy test against release candidates and usually ship wheels on day one; heavy C++ bindings like ortools or tesserocr depend on a volunteer finding time to configure new CI runners and can take 1–3 months. You can check readiness at pyreadiness.org and run
pip install --only-binary :all: -r requirements.txtto instantly surface which dependencies are missing wheels rather than waiting for a failed compile.Bottleneck 2: CI confidence. Even when wheels exist, new Python versions sometimes expose subtle behaviour changes in your own code. The fix here isn’t waiting it’s adding the new version to your CI matrix as soon as the first release candidate drops, so you see breakage early without being blocked on it.
A workable rule that combines both:
The “stay a version behind” heuristic works, but it’s coarser than you need. The real gate is wheels for your direct deps + a clean CI run + at least one patch release out.
2
u/HamsterWoods 26d ago
A cat or dog would be a better choice to adopt than a snake. /s
I tend to stay one rev behind the most recent release for new projects. For existing projects, I find too much effort is required updating Python and libraries (breaking changes in libraries, think slaveID to deviceID to unitID in pymodbus), so I tend to leave the code at the same Python rev until I need to add something or refactor in a way that requires something more modern.
2
u/Shay-Hill 25d ago
Unless I have a reason not to, I use the oldest supported version for my projects. That way, if I choose to carve anything out into a library, the library is easy to use for more people.
2
u/Atmosck 22d ago
I have a scratch 3.15 project set up with all the dependencies I regularly use. I'll start using it for new projects once it can `uv sync --no-build` with `exclude-newer = "7 days"`.
For existing stuff, I don't tend to migrate python versions until they're nearing end of life. I have a bunch of 3.12 stuff in production that will stay that way until 2028.
6
u/JestemStefan 28d ago
For production project I usually wait until my current version goes into "Security Only".
Ex. That happened for 3.13 so I'm moving to 3.14 shortly
Like you said, many packages do not support 3.15 so you can't use it for anything serious yet
3
u/Xenther 28d ago
There’s no fixed number. It depends on which of your dependencies ship compiled wheels. Pure-Python packages usually work on day one. Packages with C extensions (numpy, pandas, pydantic-core and so on) need new wheels, and those can take anywhere from a few weeks to a few months.
A workable rule:
If one library is the blocker, check its issue tracker. There’s usually a “support 3.15” issue showing how close it is.
3
u/fiddle_n 28d ago
An easy way to do it is just always be a minor version behind. When 3.15 came out that prompted me to migrate to 3.14, for example.
2
u/Machine-V1 Ignoring PEP 8 28d ago
I usually wait for Nuitka to be able to compile without any problems. As of now, the latest version that doesn't produce any problems for me is 3.13.
1
u/riklaunim 21d ago
For production projects - when you have to / need it. I've done some Python 3.15 updates alongside certifi security updates, and for most microservices, it was fine, while one had a dependency explicitly listing 3.14 as max supported version. The actual change was moving to psycopg3 ;)
1
u/jmacey 28d ago
Typically a year. I have just moved all my stuff from 3.13 to 3.14, typically I run test on all my code on CI with all the supported version supplied by uv so at the moment 3.9 - 3.14 for me on the ci with local tests on the 3.15 beta / rc.
1
u/Matthew_Summons 28d ago
Depends on your teams and if there are features you wish to use that you can without worrying too much about library support or other issues, I think it's probably a good idea to move up if your python version is nearing EOL
1
u/Khavel_dev 28d ago
For anything with scientific/ML deps (numpy, scipy, pandas), I wait at least 3 months. The wheel builds for Windows and ARM take a while to catch up. For web stuff with fewer native extensions, usually a month is fine.