Modernize Python SDK packaging#274
Merged
michaelsilver merged 1 commit intoSep 17, 2024
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
I was looking for a way to replace `python -m unittest discover -s tests` with something like `python setup.py test`. As it turns out, python packaging has changed a ton over the last few years; `python setup.py test` is no longer supported: ``` ******************************************************************************** Please remove any references to `setuptools.command.test` in all supported versions of the affected package. By 2024-Nov-15, you need to update your project and remove deprecated calls or your builds will no longer be supported. ******************************************************************************** ``` So, what is the modern approach to python packaging? Turns out the answer is `pyproject.toml`, summarized here: https://venthur.de/2022-12-18-python-packaging.html Even though this might not be the most beautiful thing, it's apparently the path the python community's taken with packaging. As a result, we can now run tests with simply `pytest`, and keep test/dev deps separate from core deps. I see this change as a step towards making the Python SDK more maintainable for the long term.
7d86e9b to
7e8e625
Compare
paulgb
approved these changes
Sep 17, 2024
paulgb
left a comment
Member
There was a problem hiding this comment.
Nice! I followed the install/test instructions and they worked.
abyssparanoia
added a commit
to arcterus-jp/y-sweet
that referenced
this pull request
May 21, 2026
…bilities (#49) - Bump openssl 0.10.66 → 0.10.79 in releaser/ (resolves jamsocket#272, jamsocket#273, jamsocket#274, jamsocket#276, jamsocket#286) - Bump quinn-proto 0.11.8 → 0.11.14 in crates/ and y-sweet-worker/ (resolves jamsocket#191, jamsocket#192) npr
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.
I was looking for a way to replace
python -m unittest discover -s testswith something likepython setup.py test. As it turns out, python packaging has changed a ton over the last few years;python setup.py testis no longer supported:So, what is the modern approach to python packaging? Turns out the answer is
pyproject.toml, summarized here:https://venthur.de/2022-12-18-python-packaging.html
Even though this might not be the most beautiful thing, it's apparently the path the python community's taken with packaging.
As a result, we can now run tests with simply
pytest, and keep test/dev deps separate from core deps. I see this change as a step towards making the Python SDK more maintainable for the long term.