Define Entry Point in pyproject.toml#1598
Merged
aaugustin merged 1 commit intopython-websockets:mainfrom Feb 25, 2025
Merged
Conversation
Member
|
Contributor
Author
|
I am running on macOS Sequoia 15.3.1. I experienced the issue by forking the main branch, so it should be latest version. I compared to an environment where I had version 10.4 installed. But I assumed that I had messed something up with the way of running the script. Anyway, I tried now creating a fresh environment where I installed websockets from PyPI. Had the same issue with v15 but v14.2 worked. So I guess the issue is actually v15. I will do some more testing and maybe submit a PR if I find a good solution 😇 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for this amazing package!
I find my self using the interactive client tool often, which is a great way to quickly test out my websocket server.
Currently I would need to have activated an environment with websockets installed to be able to run the interactive client.
I would love the ability to run the client as a global tool, and think this workflow is now more mainstream with tools like uv and pipx.
Defining an entry point in pyproject.toml will enable use of the interactive client with both uv tool/uvx and pipx.
One issue though:
I tested it out locally and it works with uv. However it does not handle keyboard interrupts properly and does not close the connection gracefully. I can't seem to figure out where the issue is, since there is an exception handler for keyboard interrupts. Would love any input on what is wrong.
This is not specific to the way the interactive client is run (happens with both uvx and python -m), but specific to my local version of websockets.