chore: remove the upper restrictions on the websockets dependency#1007
chore: remove the upper restrictions on the websockets dependency#1007jujubot merged 2 commits intojuju:masterfrom
Conversation
1 similar comment
|
Yeah testing with those lines removed (and replaced by just Note that this is in I'd be happy to run more tests after the PR is updated to make sure nothing else blows up (with ops etc), then we can land it 👍 thanks for working on this! <3 |
Ah, thanks, I missed that
Thanks! Let me know if there's anything more I should do. |
|
/build |
|
/merge |
#1024 ## What's Changed * Remove paramiko upper-bound by @gboutry in #1005 * Remove explicit passing of event_loop into tests by @cderici in #1006 * chore: remove the upper restrictions on the websockets dependency by @tonyandrewmeyer in #1007 * Target ceiling version by @cderici in #1008 * Make it easier to run tests using `make` by @cderici in #1012 * Avoid installing signal handlers to the event loop by @cderici in #1014 * feat: remove app block until done by @yanksyoon in #1017 * feat: remove app timeout by @yanksyoon in #1018 * Forward port latest changes from 2.9 onto 3.x by @cderici in #1022 #### Notes & Discussion JUJU-5414
Description
With the way that the
websocketsdependency is currently specified, it's impossible to use the same version of the library with Python 3.8, 3.9, and 3.10 - even though thewebsocketslibrary does have many versions that work with all those versions. This means that if a dependency that usespython-libjujuis tightly pinned (e.g. a lock file) then different locks are required for each Python version. This can be done, but it's inconvenient, and doesn't seem to be required.This PR simply removes the upper restriction, so that Python 3.8 can use
websockets8.1 and above (the current latest version still supports 3.8), Python 3.9 can usewebsockets9.0 and above, and Python 3.10+ can usewebsockets10.0 and above.QA Steps
py3 in the above is 3.12 - that's not in the tox list so (if I understand correctly) not yet supported, so the failure is expected (if the issue is related to
websocketsI'm happy to try to address it in this PR too).Notes & Discussion
Generally, this sort of "per Python version" specification should not be required, because the dependency itself should specify the supported Python versions, and
pip(or whatever dependency resolver you're using) should handle that automatically.The main branch of
websocketsdoes have 3.8 specified as the minimum version in pyproject.toml, as does the 12.0 tag, and all the 11.x tags have 3.7 in pyproject.toml. All the 8.x, 9.x, and 10.x have an appropriate (according to the changelog) Python minimum version specified in setup.py. This means that the three lines really shouldn't be necessary and it should be able to be justwebsockets>=8.1(orwebsockets>=8.1,<13to avoid breakage when 13 is released) without any Python version specification. I'm happy to change the PR to that.It's possible that there were some issues with specific
websocketsversion and specific Python version combinations, but reading over thewebsocketschangelog there isn't mention of anything that indicates that entire sets would need to be excluded like this.The commit that introduced this practice says:
I wasn't around at that time, so I'm not sure what was happening (and there's no linked bug/issue) but it seems odd that was required. Even 8.x
websocketscorrectly specifies the minimum Python version, so whatever dependency resolver was being used should have automatically handled everything required above.In any case, it seems like the commit was not meaning to put an upper limit, and that was perhaps accidental?
If there are specific checks I can do to verify that the various
websocketsversions are ok in the various Python versions, please me know and I'm happy to do that.