Skip to content

Cannot reuse a deleted package name #188

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

Closed
akatrevorjay opened this issue Aug 2, 2018 · 14 comments
Closed

Cannot reuse a deleted package name #188

akatrevorjay opened this issue Aug 2, 2018 · 14 comments

Comments

@akatrevorjay
Copy link

Hi wonderful PyPA maintainers!

I created a package, tensorflow-detect, which has a rather strange requirement: it's version must match the tensorflow version it installs.

I initially uploaded this about a week ago, but quickly realized I had made a mistake, so I deleted the entire package and recreated it. I did this right after I initially uploaded it, and again today, but what I'm seeing is that I cannot upload a version I had previously uploaded, so now I'm stuck at v1.3.0 on the web interface, and cannot replace the broken versions I uploaded for the previous package (the one I deleted). They also do not show in the web interface, but those releases are still indexed and instalable as well:

https://pypi.org/manage/project/tensorflow-detect/releases/

May I (pretty please) request a one time full on deletion including previous releases?

I know why this is why it is, but if the versions do not match exactly, then the package's purpose is broken..

Thanks and sorry for the bother.
Trevor

@di
Copy link
Member

di commented Aug 2, 2018

Hi @akatrevorjay, apologies, but we can't make an exception here.

As such, I'm going to close this as a duplicate of #74 (which has much more discussion about why we have this policy).

That said, there is a bit of a workaround you can take advantage of here: since all the previous releases were .tar.gz source distributions, you can make .zip source distributions (only difference is the means of compression, they are otherwise interchangeable) which will be accepted as a distribution for the release (as the filename has not previously been used).

@di di closed this as completed Aug 2, 2018
@akatrevorjay
Copy link
Author

akatrevorjay commented Aug 4, 2018

The zip workaround only works for non-wheel installs though, doesn't it?

@ncoghlan
Copy link
Member

ncoghlan commented Aug 4, 2018

Note that if you make a <version>.postX release, all the installation tools will accept it as equivalent to <version>. If there's something tensorflow specific that isn't supporting post-releases properly, then that really needs to be fixed, since post-releases (and their equivalence behaviour) are a key part of meeting the otherwise conflicting requirements of not allowing the hashes of previously published artifacts to change, while also allowing folks to replace broken artifacts with fixed ones without having to bump the main version number.

@njsmith
Copy link
Member

njsmith commented Aug 4, 2018

You say this was a one time request, but what's your plan going forward? Just "never make a mistake ever again"? That seems like a risky plan :-). The requirement that the version number match is very unusual; I can't think of a good reason for doing things that way, and it's not really how version numbers are designed to work. I'd try hard to find a way to get out of this requirement.

@akatrevorjay
Copy link
Author

akatrevorjay commented Aug 6, 2018 via email

@akatrevorjay
Copy link
Author

akatrevorjay commented Aug 6, 2018 via email

@njsmith
Copy link
Member

njsmith commented Aug 6, 2018

All that this package does is auto depend on tensorflow-gpu if you have cudas in your pkgconfig list, with a fallback to tensorflow.

Sounds like you're trying to do something pretty clever with python packaging tools here. You should talk to distutils-sig about what you're trying to do – maybe someone will have a better idea, or it might inform new changes in how python packaging works.

@akatrevorjay
Copy link
Author

akatrevorjay commented Aug 6, 2018 via email

@njsmith
Copy link
Member

njsmith commented Aug 6, 2018

there's no better way afaik

Right, that's why I'm suggesting explaining your problem and solution to distutils-sig, because the experts there will be able to tell you for sure if there's a better way, and if there isn't they might create one :-)

@akatrevorjay
Copy link
Author

akatrevorjay commented Aug 7, 2018 via email

@ncoghlan
Copy link
Member

ncoghlan commented Aug 7, 2018

An exact pin on == 1.1 will ignore the post release, but a compatible release check (~= 1.1) or a prefix match (== 1.1.*) will accept it.

Details at https://www.python.org/dev/peps/pep-0440/#version-matching

@merwok
Copy link

merwok commented Aug 7, 2018

(Drive-by comment: thanks for the info about == X.Y.*, I was using ~= X.Y to achieve that and got surprised by tools matching X.Y+1. I think versioning specs think that Y+1 is compatible with Y but as a paranoid human I want to decide when I switch from X.4 to X.5!)

@njsmith
Copy link
Member

njsmith commented Aug 7, 2018

@merwok This is a subtlety of the ~= operator actually (that also bit me this week!). Whatever version you give it, it assumes that you're ok with the last piece increasing, but not the others. So if you give it two pieces, like ~= 1.2, that accepts 1.2.0, 1.2.5, 1.3.0, ... but not 1.1 or 2.0. If you give it three pieces, like ~= 1.2.2, now it accepts 1.2.5, but not 1.3.0 or 1.2.0.

@akatrevorjay
Copy link
Author

akatrevorjay commented Aug 25, 2018

Can I request one other thing then perhaps?

My deleted releases are no longer linked with my package, but are still downloadable.

Could you (please) re-link those files with my package again by chance?

(I renamed the package in the middle of all of this thinking it was maybe a problem with the first package before hearing from you guys)

https://pypi.org/project/tensorflow-auto-detect-cpugpu/

(Missing ~15 releases that are still available and I cannot re-upload them)

Also, I appreciate the info. It wasn't too bad of a thing I renamed it as I got to change how it worked -- it no longer relies on development headers, instead interrogating your list of libraries per ldconfig, which works on minimal systems and even dynamic ld paths, so I'm happy about that part!

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

No branches or pull requests

5 participants