-
Notifications
You must be signed in to change notification settings - Fork 987
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
Support PEP 625 (Filename of a Source Distribution) #12245
Comments
This is likely blocked on pypa/packaging#527. |
This is probably also blocked on finding a good migration path that isn't too obtrusive for users. Right now, there are a lot of files being uploaded that would fail to upload once this change is implemented, and IMO this would break too many users for us to enable this right now:
I think a good migration path would be:
|
The other thing we could do, is forcibly normalize ourselves, though we hadn't done that in the past and I know that would break at least twine's checks if a file has been uploaded already. |
Blocked on #14156 as well. |
Until the version in the sdist filename is verified as described in this issue, it's possible to create multiple sdists per release (as seen from the filename point of view). Example: upload This does not seem to be in the spirit of PEP 527:
|
Probably also blocked on pypa/setuptools#3593 as the predominant builder of source distributions. |
There doesn't seem to be any real progress here towards builders producing normalized source distribution filenames:
|
pypa/setuptools#3593 has been closed (implemented) for a little while now, would be interesting to see if it is yet making a dent in that graph |
PR to start warning uploaders of non-PEP 625 compliant filenames is here: #17110 |
Hi, This change is creating some confusion in the Django project (unsurprisingly, considering the non-standard capitalization of our package and build files historically), especially around the timeline and extent of the deprecation: https://code.djangoproject.com/ticket/35980. Could you clarify what you meant in the comment above with "[...] probably by EOY we could fully support PEP 625."? Does that mean that non-pep625 build files could start being rejected, or is that just a prediction about the progress towards the goal of all newly uploaded build files being pep625-compliant? The warning email from PyPI that Django received with our latest release also mentions that "In the future, PyPI will require all newly uploaded source distribution filenames to comply with PEP 625.". Is there a clearer timeline for this? Will there be a mechanism where maintainers will be given advance notice of that change, or is there a specific GH issue one could subscribe to for example? Thanks for all the work you do on PyPI, we're big fans 🎉 |
Hi @bmispelon, thanks for your comment here, sorry this is causing confusion for the Django project.
By "fully support PEP 625" I meant that PyPI would be in compliance with PEP 625, and reject uploads of filenames that are invalid per PEP 625. I think it's unlikely that we actually will do this by EOY, though.
We don't currently have a timeline other than "eventually". If it's helpful, I can commit to having the warning emails include a clear deadline at a minimum of 6 months before said deadline, and share that deadline on this issue as well. Would that suffice? That also means this wouldn't be enforced before Django's release in April. FWIW, I think this change should be unnecessary -- the actual project name shouldn't need to change, just the underlying build tooling that is producing the source distribution. In this case, upgrading |
To add more context to this, the project name is used in different places with different normalizations: There is the human-readable name, and there is the dist-info name (
Afaik the only blocker here is pypa/setuptools#3777 |
I do not think that even pypa/setuptools#3777 is a blocker here, though it might take a slightly pedantic reading to agree with this. As I understand it, this issue is specifically about PEP 625 and source distribution names: so though it seems to be true that setuptools is producing wheels whose naming is not PEP-491 compliant - that would be out of scope. There probably should be an analogous issue here for wheels: "support [enforce] PEP491". But I think that is not what this issue says, and I guess it is unlikely that warehouse would insist on PEP-491 while setuptools produces non-compliant wheels. |
Hi! This is Natalia, one of the current Django Fellows. Thank you David for your feedback! For Django, the release process uses a unified workflow that relies on As a workaround, we’ve been pinning |
Ah, then I guess pypa/setuptools#3777 is a blocker specifically for django - but still not, strictly speaking, a blocker here... setuptools sounds open to pull requests fixing this and I assume that it must be not very difficult once the relevant bit of code is identified, perhaps you are motivated to make that happen. |
Ish :-) I believe this inconsistency (which goes beyond just name casing) could affect more packages than just Django, for similar reasons. It’s problematic and likely complicates tooling to have release artifacts with varying casing or punctuation.
👍 |
I swear to god. Every 6 months every single one of my python packages breaks for publishing. Do you even runs tests on your publishing pipeline? Every single publishing error I get is unbelievably mystifying. AI has no comprehension of what's going wrong. I really hope the astral-sh guys come in here and fix this for you. This is the 3rd breakage for a legacy package this week of a completely different. Get some unit tests going. It's like you want the python ecosystem to just break constantly. |
Hey @zackees, sorry you're having trouble here. Our support for PEP 625 here shouldn't have resulted in any failure to publish, as we're currently only sending advisory emails when a user is attempting to publish a non-compliant source filename, as part of a long deprecation period. A non-compliant file should still upload with no issue, and if that's not the case, it's a bug and not intended. If publishing currently isn't working for you, it'd be helpful to know the exact issue you're seeing that's preventing you from uploading. |
It's not just a specific error, most of my projects now fail, which used previous acceptable methods. This is what unit tests are for. Just take a package and see if you can publish it. It's the simplest github action ever. One of my most popular packages, transcribe-anything seems to have multiple issues now. The tool is complaining that i have two sdist. But here's the thing, it still publishes. It's just doesn't show up on your pypi index. It just fails on the next publish because the file is already there. What is the number of unit tests that pypi is running? This is the library i manage https://github.com/fastled/fastled Please, just add more tests for package install ability. I volunteer transcribe-anything, which used to install just fine. You fix this for me you fix it for many other people |
another issues include the entire repo being included in the tar.gz I've explicitly declared the project files. Doesn't matter. Root is getting archived in the tar gz file - trying to include venv directories. |
@zackees PyPI runs over 4000 tests as part of the test suite, you are more than welcome to examine any of them - see the tests/ subdirectory. You still have yet to provide concrete context of your failure scenario, which makes providing any kind of support harder. The tone you have adopted in your messages is also not very kind to others, and while recognizing that it can be frustrating to experience confusing failures when attempting to accomplish a task, there's no call for taking that out on others. |
Repro:
|
This is a strange time and place to complain about it! |
It continued to work until jan 15th of this year. It still works in fact. My tar.gz uploads and is stored on the pypi server and prevents any other uploads with the same version from being upload. However, the version never appears on the pypi server. |
@zackees I see that version 2.3.0 was released on Jan 22nd: https://pypi.org/project/transcribe-anything/2.3.0/, is this the missing version you are talking about? I also see that your project is currently set to version 2.3.7, which you already released on Oct 19, 2023: https://pypi.org/project/transcribe-anything/2.3.7/. Is this the missing version you are talking about? I still don't see what this has to do with PEP 625 but please let us know how that's related here. |
Interesting, looks like a 2 got swapped for a 7 in a previous version. That may have been the reason why what I thought was the new versions weren't show up. I re-wrote the project to use pyproject.toml and corrected the version, now the sbin issue isn't happening anymore. Undesired directories like everything in tests, .github and other directories outside of src beingupload with the distribution despite explicit inclusions and exclusion attributes, but that's a lesser problem: pyproject.toml
|
@zackees You show usage of None of the problems you've shared appear to be problems with PyPI or uploading files - these are all within your build tools and control. Let's leave this issue for the folks that are discussing the topic of PEP 625 support on PyPI. |
What's the problem this feature will solve?
PEP 625 has been accepted, PyPI should be updated to support the PEP.
Describe the solution you'd like
PyPI needs to implement some changes to support the PEP:
The text was updated successfully, but these errors were encountered: