Skip to content

PEP 639 compliance#7394

Closed
DimitriPapadopoulos wants to merge 1 commit intopsf:mainfrom
DimitriPapadopoulos:PEP639
Closed

PEP 639 compliance#7394
DimitriPapadopoulos wants to merge 1 commit intopsf:mainfrom
DimitriPapadopoulos:PEP639

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor

@nateprewitt
Copy link
Copy Markdown
Member

Thanks for the PR, @DimitriPapadopoulos. This was an intentional decision recorded here, we'll revisit this later.

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

DimitriPapadopoulos commented Apr 27, 2026

It doesn't make sense to keep compatibility with Setuptools < 77. From the Setuptools documentation:

You can install the latest version of setuptools using pip:

pip install --upgrade setuptools[core]

Most of the times, however, you don’t have to…

Instead, when creating new Python packages, it is recommended to use a command line tool called build. This tool will automatically download setuptools and any other build-time dependencies that your project might have. You just need to specify them in a pyproject.toml file at the root of your package, as indicated in the following section.

You can also install build using pip:

pip install --upgrade build

This will allow you to run the command: python -m build.

@nateprewitt
Copy link
Copy Markdown
Member

nateprewitt commented Apr 27, 2026

I think you may be looking at the issue through a narrow lens. Anyone who's installing Requests with pinned dependencies or a static local install can't necessarily "just update" or change their install tooling immediately.

This change is entirely cosmetic for PyPI, there's no real end-user benefit. I don't think that warrants the breakage risk or constraining users to only build tools released in the last year. Almost every other major project has deferred this pin move and we're not interested in pioneering that unnecessarily.

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

I wasn't aware of major projects that have deferred this update, but I must admit I'm more interested in scientific Python, where the community might be updating more aggressively.

@nateprewitt
Copy link
Copy Markdown
Member

I would take a look at major scientific Python projects because they largely share the same build system (meson) which has their setuptools pin even lower than ours. Requests is not the outlier here for a project of this size.

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

I have already taken a look at major scientific Python projects such as NumPy or scikit-learn.

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

But it's true that PEP 639 is especially interesting for projects with multiple licences (using SPDX expressions typically involving AND or OR).

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