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

Include most recent upload metadata when uploading to PyPI #1381

Closed
pganssle opened this issue May 23, 2018 · 8 comments · Fixed by #1576
Closed

Include most recent upload metadata when uploading to PyPI #1381

pganssle opened this issue May 23, 2018 · 8 comments · Fixed by #1576
Labels
bug critical help wanted Needs Implementation Issues that are ready to be implemented.

Comments

@pganssle
Copy link
Member

It seems that for the upload command, we're delegating entirely to distutils, which has metadata_version hard-coded as "1.0", and only uploads the 1.0 metadata. I think this is one reason that Requires-Python data isn't showing up on PyPI.

Although setup.py upload is basically deprecated, I think we should probably still make these improvements, even if as part of this we also add DeprecationWarning telling people to start using twine.

@di
Copy link
Sponsor Member

di commented Jun 11, 2018

It seems that for the upload command, we're delegating entirely to distutils, which has metadata_version hard-coded as "1.0", and only uploads the 1.0 metadata. I think this is one reason that Requires-Python data isn't showing up on PyPI.

Indeed, this is true.

However, I'm not sure it's worth doing what it would take to support Metadata 2.1 on upload. I think it makes more sense just to deprecate setup.py upload entirely and direct folks to use twine instead.

@pganssle
Copy link
Member Author

pganssle commented Jun 12, 2018

I'll take a look at how difficult it would be to do next week. One big problem is that this is creating a lot of bad and immutable data on PyPI and a lot of people are just running scripts they wrote a long time ago or copying from some old "how to make a release" guide someone made.

If we're going to say that the new upload metadata is just not supported in setuptools, we should probably start throwing an actual error rather than a warning.

I think the options are:

  1. Decide we don't support this and throw an error whenever >1.0 metadata is detected on upload.
  2. Build whatever basic support for it we can and start raising a warning that you should really be using twine.
  3. Try shelling out to twine and raising a warning if successful ("Hey, use twine directly!") and throwing an error if unsucccessful.

I think 3 is too clever and from the cursory look I made at the code before I created this issue, I think 2 is a feasible path forward.

@benoit-pierre
Copy link
Member

I'm for 1: we should deprecate and remove support for upload, sooner rather than later. Same with a bunch of other stuff.

@di
Copy link
Sponsor Member

di commented Sep 25, 2018

#1410 is merged/released, I think this issue can be closed.

@benoit-pierre
Copy link
Member

I think we should keep this open until the upload/register commands are completely removed.

@di
Copy link
Sponsor Member

di commented Sep 25, 2018

Fair enough, we should probably revise the original issue in that case.

@pganssle
Copy link
Member Author

I'm actually planning on fixing this at some point, because it's currently polluting PyPI with bad packages in a very insidious way, as a major driver of this issue.

If we proactively remove the upload command, a lot of people will just pin to an older version of setuptools rather than take the time to fix their build system, and unless pypi/warehouse#3889 is actually implemented, that will continue to cause problems.

The patch was decently simple last time I checked, it's just that the bug is in distutils, which complicates things slightly. Even after deprecation, I'd like to have a version that works properly to avoid the python-requires problem.

@pganssle pganssle added Needs Triage Issues that need to be evaluated for severity and status. bug help wanted critical Needs Implementation Issues that are ready to be implemented. and removed Needs Triage Issues that need to be evaluated for severity and status. labels Oct 19, 2018
@jpurviance
Copy link

looking at this

pganssle added a commit to pganssle/setuptools that referenced this issue Oct 28, 2018
@pganssle pganssle mentioned this issue Oct 28, 2018
2 tasks
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 5, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 5, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
@pganssle pganssle mentioned this issue Nov 5, 2018
2 tasks
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 5, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 5, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 5, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 6, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 6, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 6, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 6, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 6, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 6, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 7, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 7, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 7, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 7, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 7, 2018
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 7, 2018
Previously this value was hard-coded to '1.0', which was inaccurate for
many packages.

Fixes pypa#1381
pganssle added a commit to pganssle/setuptools that referenced this issue Oct 31, 2019
The upload and register commands were deprecated over a year ago, in
July 2019 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
pganssle added a commit to pganssle/setuptools that referenced this issue Oct 31, 2019
The upload and register commands were deprecated over a year ago, in
July 2019 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 1, 2019
The upload and register commands were deprecated over a year ago, in
July 2019 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 1, 2019
The upload and register commands were deprecated over a year ago, in
July 2018 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 1, 2019
The upload and register commands were deprecated over a year ago, in
July 2018 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 2, 2019
The upload and register commands were deprecated over a year ago, in
July 2018 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 2, 2019
The upload and register commands were deprecated over a year ago, in
July 2018 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
pganssle added a commit to pganssle/setuptools that referenced this issue Nov 2, 2019
The upload and register commands were deprecated over a year ago, in
July 2018 (PR pypaGH-1410, discussed in issue pypaGH-1381). It is time to
actively remove them in favor of twine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug critical help wanted Needs Implementation Issues that are ready to be implemented.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants