Skip to content
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

uv work: implement oldest dependencies into pyproject.toml #810

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

clintonsteiner
Copy link
Collaborator

@clintonsteiner clintonsteiner commented Jan 18, 2025

Fixes #806

@@ -24,7 +24,9 @@ jobs:
uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v5
- name: Build wheel distribution
run: uv build --wheel
run: |
uv sync --all-packages
Copy link
Owner

Choose a reason for hiding this comment

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

Why is uv sync --all-packages needed before running uv build?

Seems unrelated to testing with oldest dependencies?

uv.lock Outdated Show resolved Hide resolved
Copy link
Owner

@akaihola akaihola left a comment

Choose a reason for hiding this comment

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

I ran uv build in this branch, and now the long description in PKG_INFO in the source distribution contains the HTML table for contributors. This is not desired since PyPI is not able to render raw HTML (see build #2766):

Checking dist/darker-2.1.1-py3-none-any.whl: FAILED
ERROR    `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         line 974: Warning: "raw" directive disabled.                           
Checking dist/darker-2.1.1.tar.gz: FAILED
ERROR    `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         line 974: Warning: "raw" directive disabled. 

When migrating from setup.cfg to pyproject.toml, we need ensure setup.py still gets run, reads README.rst, removes the contributor table, and uses the result as the long description.

The solution is to remove [tool.setuptools.dynamic] section and the readme = definition inside it. See this comment for details.

(This PR essentially fixes #806 which also explains the README issue.)

pyproject.toml Outdated Show resolved Hide resolved
@akaihola akaihola assigned akaihola and clintonsteiner and unassigned akaihola Feb 3, 2025
@akaihola akaihola added this to the Darker 3.1.0 milestone Feb 3, 2025
@akaihola akaihola added enhancement New feature or request CI labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Migrate from setup.cfg to pyproject.toml
2 participants