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

Drop Python 3.7 (up to 3.9?) support #275

Closed
5 of 6 tasks
chrysn opened this issue Feb 27, 2022 · 2 comments
Closed
5 of 6 tasks

Drop Python 3.7 (up to 3.9?) support #275

chrysn opened this issue Feb 27, 2022 · 2 comments

Comments

@chrysn
Copy link
Owner

chrysn commented Feb 27, 2022

The next round of Python required-version bumps is not too promising in terms of new features, but there are some:

  • New in 3.8:
    • Positional-only parameters could help keep the API evolvable.
    • Happy Eyeballs is available in asyncio
    • Named tasks are available in asyncio (they're already used but with a workaround to make it no-op in earlier versions)
    • f-strings support {var=} (would be a reason to finally move some % code over)
  • New in 3.9:
    • The new dict and string methods are nice, but not nice enough I'd start to redo old code, and are only a minor annoyance when CI says "no" to them.
    • ipaddress scope handling are improved.

None of the other changes appear to be very helpful to aiocoap (or they are, but are automatically useful to users of the new version, or are useful already by being in any version like the stabilization of asyncio.run); so it would seem that the earliest Python 3.7 removal is due is when dependencies start becoming hard to get by on that platform, when the CI images generally become problematic, or when the CI list of platforms is just getting too long.

Still, I'd like to check which user groups have concrete timelines:

  • Debian has 3.9 already in bullseye (buster / ucrrent oldstable has 3.7)
  • pypy already has a 3.9 out (beta, yet to be added to CI but clearly not the stopper this time)
  • FIT IoT Lab probably still has 3.7 around.
  • Ubuntu focal (current LTS) has 3.8; next LTS with 3.9 coming up 2022.04 (jammy).
  • RIOT images: will be a while until it advances to jammy (WIP in riotdocker-base: bump to 2022.04 (Jammy Jellyfish) RIOT-OS/riotdocker#189)
  • HomeAssistant is running on 3.9/3.10 currently

As outlined above, I'm in no hurry to bump the Python dependency, but if anyone needs aiocoap supporting 3.8 for longer than any of those listed, please speak up.

@chrysn chrysn changed the title Drop Python 3.7 (and 3.8?) support Drop Python 3.7 (up to 3.9?) support Dec 1, 2023
@chrysn
Copy link
Owner Author

chrysn commented Dec 1, 2023

Seems IoT Lab won't be updating soon; users can use own Python installations instead.

By now,

  • Debian stable has 3.11
  • Ubuntu 2023.04 has 3.11
  • PyPy has 3.10
  • RIOT images also have 3.10
  • Home assistant already has 3.10 at least

so in the next go I'll probably even drop 3.9 support as well.

Python 3.10 has some interesting stuff, but off my head there aren't any places in the code that would profit from structural pattern matching. aiter and anext could be helpful for readability (but don't allow big simplifications), and there are no major enhancements in asyncio, socket, urllib or other networking related stuff -- it'll just trim down the test matrix.

@chrysn
Copy link
Owner Author

chrysn commented Mar 6, 2024

Updated report given riotdocker will update sooner this time:

  • Debian stable has 3.11
  • Ubuntu 2024.04 LTS has 3.12
  • PyPy has 3.10
  • RIOT images also have 3.12
  • Home assistant is on Python 3.11

Which means PyPy becomes the critical component against a 3.11 upgrade (but then again, 3.11 primarily enhances typing, and while toml is attractive for transport descriptions, it's also available as an external module)

@chrysn chrysn closed this as completed in 38af05c May 6, 2024
chrysn added a commit that referenced this issue Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant