-
-
Notifications
You must be signed in to change notification settings - Fork 549
Fix from websockets.(asyncio|sync).router import *
without werkzeug
#1639
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
Conversation
Thank you. At first sight this looks correct. I'll take a closer look and merge ASAP. |
Amended to also skip the test for the sync variant. |
The failed test run above is unrelated to your changes; it's backwards-incompatible changes in mypy :-( |
This is a followup for 3128f56 Also, skip test_router_supports_unix_sockets without werkzeug.
mypy doesn't like the override :-( I see at least two options:
|
Which one do you prefer? |
Skipping tests that depend on werkzeug when werkzeug isn't installed is clearly correct. I'm less clear about what needs to be done for the
Note that it would not solve the problem described in fedora-eln/eln#276 because the dependency on werkzeug was explicitly declared and it will still be there regardless of the changes we're discussing here. While we're discussing packaging, if Fedora wants to package websockets officially, it would be good to follow these guidelines e.g. to make sure that the code you're packaging is actually the code that I'm releasing: https://websockets.readthedocs.io/en/stable/project/contributing.html#packaging I am also puzzled by the decision to run a random subset of tests — why run the asyncio tests but not the sync tests? — and to skip failing tests — this defeats the point of running tests in the first place, doesn't it? It's burning CPU and creating manual work to add arbitrary tests to the list of failing tests when a build server gets a load spike while running the tests and a test fails randomly; I don't see how that creates value. |
|
My change fixes the issue but breaks the typing check. Always defining the class but raising from
That's why I proposed to remove that declaration together with this change, see https://src.fedoraproject.org/rpms/python-websockets/pull-request/12 (churchyard is my username in Fedora).
I am here as an innocent drive-by contributor; the Fedora websockets package is not packaged by me. I merely wanted to drop the dependency declared by the Fedora maintainer.
I agree, and I also proposed to run them all: https://src.fedoraproject.org/rpms/python-websockets/pull-request/14 Also, run them on all architectures: https://src.fedoraproject.org/rpms/python-websockets/pull-request/13 |
I don't think it makes sense for Fedora to run the tests but I've gotten used to disagreeing with distro maintainers on this :-) |
What sort of verification would we run instead? E.g. when we update to a new Python version before you add it to your CI, how do we verify websockets isn't entirely broken? |
Fair point. I don't have a better answer to this than "run the tests". This allows you to validate automatically. |
In the case of Python 3.14, interestingly, the code is fine but the tests need a fix to pass without warnings :-) |
Indeed, there is:
|
Fixed in main now :-) |
Thanks. |
This is a followup for 3128f56
Also, skip test_router_supports_unix_sockets without werkzeug.