Skip to content

Modernize Python SDK packaging#274

Merged
michaelsilver merged 1 commit into
mainfrom
michael/dis-2672-modernize-y-sweet-python-sdk-packaging
Sep 17, 2024
Merged

Modernize Python SDK packaging#274
michaelsilver merged 1 commit into
mainfrom
michael/dis-2672-modernize-y-sweet-python-sdk-packaging

Conversation

@michaelsilver

Copy link
Copy Markdown
Contributor

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.

@vercel

vercel Bot commented Sep 16, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
y-sweet-debugger ⬜️ Ignored (Inspect) Visit Preview Sep 16, 2024 9:54pm
y-sweet-demos ⬜️ Ignored (Inspect) Visit Preview Sep 16, 2024 9:54pm
y-sweet-gendocs ⬜️ Ignored (Inspect) Visit Preview Sep 16, 2024 9:54pm

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.
@michaelsilver michaelsilver force-pushed the michael/dis-2672-modernize-y-sweet-python-sdk-packaging branch from 7d86e9b to 7e8e625 Compare September 16, 2024 21:53

@paulgb paulgb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I followed the install/test instructions and they worked.

@michaelsilver michaelsilver merged commit 08db2e2 into main Sep 17, 2024
@michaelsilver michaelsilver deleted the michael/dis-2672-modernize-y-sweet-python-sdk-packaging branch September 17, 2024 01:27
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants