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

pip install jdcal==1.0 fails #5

Open
ghost opened this issue Nov 9, 2015 · 15 comments
Open

pip install jdcal==1.0 fails #5

ghost opened this issue Nov 9, 2015 · 15 comments

Comments

@ghost
Copy link

ghost commented Nov 9, 2015

Hello,

After jdcal version 1.0.1 appeared I can't install jdcal version 1.0 anymore using pip:

$ pip install jdcal==1.0
Collecting jdcal==1.0
  Could not find a version that satisfies the requirement jdcal==1.0 (from versions: 1.0.1)
No matching distribution found for jdcal==1.0

Is it possible to also keep jdcal version 1.0 on the pypi?

@phn
Copy link
Owner

phn commented Nov 9, 2015

Hello,

This is my mistake.

I wanted to replace existing jdcal-1.0.tar.gz on pypi with new file that has LICENSE.txt in it. So I deleted the existing file and tried to upload new one, but pypi refused to accept the new file saying that the file name was already used.

I googled but couldn't find a solution to it.

So, under version 1.0, I uploaded a new file jdcal-1.0.1.tar.gz that contains exactly the same code as in jdcal1.0 but with LICENSE.txt added to it. (While trying many thingsI also ended up uploading jdcal-1.1.tar.gz which is identical to jdcal-1.0.1.tar.gz except for version.)

So the solution for your case would be to say pip install jdcal==1.0.1.

Sorry for the trouble. I remembered doing this deleting business a few years ago, and didn't run into any problems. Apparently pypi changed their policy.

Thank you for raising this issue. I will keep it open so that others can find this information.

Once again sorry for the trouble.

Regards,
Prasanth

Bjwebb added a commit to OpenDataServices/cove that referenced this issue Nov 10, 2015
Required to ensure new installs are possible (including Travis running
our tests).
See phn/jdcal#5
@saily
Copy link

saily commented Nov 10, 2015

This is a very bad idea, because many people might have pinned their version. Old versions should always persist on pypi! I'd recommend to upload 1.0 again, hide it and add a new release 1.0.1. See below:

hide-old-versions

@chrislococo-wf
Copy link

pypi is a write once, read many system. I don't know if he can re-upload the old 1.0 release or not, but agreed in the future, never delete a version on pypi unless it is known to be directly harmful.

@saily
Copy link

saily commented Nov 10, 2015

of course we can re-upload it, click on files and add the new file, remove the old one. but leave the version there! 1.0.1 != 1.0

@chrislococo-wf
Copy link

Also, @phn, you should tag a new release of 1.0.1 too

@phn
Copy link
Owner

phn commented Nov 11, 2015

Hello,

Thanks @chrislococo-wf @saily for your comments.

I remember successfully deleting and uploading files with same name when I first used pypi (in 2011). Between then and now pypi have apparently changed their policy, and I wasn't aware of it until too late (as I wasn't making any changes on pypi).

@saily I can't upload 1.0 again because as @chrislococo-wf mentions pypi won't allow me to upload a file name that has already been used, even if I delete it. I know this creates problems and the only solution I have now is to keep this issue open so that people will at-least know how to solve the issue.

@chrislococo-wf I can't tag 1.0.1 on pypi since I won't be able to upload jdcal-1.0.1.tar.gz under that tag. I already used that file name!

Thanks again!

Regards,
Prasanth

@phn
Copy link
Owner

phn commented Nov 11, 2015

Hello,

I have released a new version 1.2 on pypi and uploaded jdcal-1.2.tar.gz to pypi. This doesn't solve the issue of "pinned version 1.0" but thought I would note this here.

No change in functionality but added test_jdcal.py and removed test functions from file jdcal.py.

Contents of CHANGELOG.txt:

jdcal 1.2

    No change in functionalities.

    Added test_jdcal.py; removed test functions from jdcal.py. 

   Added CHANGELOG.txt.

   Minor changes to README.rst.


jdcal 1.0.1

    This version has exactly the same code as in jdcal 1.0, except the 
    tar file has LICENSE.txt in it.

    See issue #5 (https://github.com/phn/jdcal/issues/5) for why version this 
    was created.

Regards,
Prasanth

@chrislococo-wf
Copy link

Perfect, thank you @phn

I also alerted openpyxl, which is who is consuming your library and where we interface with it. I made an issue for them on their project over on bitbucket here.

@nsh87
Copy link

nsh87 commented Nov 12, 2015

This was a useful find...thanks for keeping open.

@phn
Copy link
Owner

phn commented Nov 12, 2015

@chrislococo-wf Thanks for opening the issue with openpyxl. I think that project is the reason why jdcal gets installed a lot.

@nsh87 Great! And sorry again for the inconvenience.

@chrislococo-wf
Copy link

No problem, sorry for the friction over there! 😀

@stefanfoulis
Copy link

This is still causing problems for us. We have an automatic build system for wheels and it trips over the misleading versions saved on pypi:

at https://pypi.python.org/pypi/jdcal/json

"1.0": [
            {
                "has_sig": false, 
                "upload_time": "2015-11-09T07:56:53", 
                "comment_text": "", 
                "python_version": "source", 
                "url": "https://pypi.python.org/packages/16/54/5ab2901a05af49534c80f849f6246b80632276079b1df84ff2b5c54e79a3/jdcal-1.0.1.tar.gz", 
                "md5_digest": "2da586a80d149a5de4a246985f1bfb87", 
                "downloads": 19454, 
                "filename": "jdcal-1.0.1.tar.gz", 
                "packagetype": "sdist", 
                "path": "16/54/5ab2901a05af49534c80f849f6246b80632276079b1df84ff2b5c54e79a3/jdcal-1.0.1.tar.gz", 
                "size": 6425
            }
        ], 

The key says 1.0 but it is actually 1.0.1.

@phn
Copy link
Owner

phn commented Oct 29, 2016

Hello,

As you can see from the comments above, I have managed to get the tag 1.0 and associated file on pypi messed up in such a way that there doesn't seem to be any way of fixing version 1.0.

Is it possible for you to change the version in your automated script to use jdcal==1.2. There are no differences in functionality. You could also change to 1.3, but it uses setuptools instead of distutils (which is supposed to enable package managers to create Python wheels).

Sorry for the trouble.

Regards,
Prasanth

rhiaro pushed a commit to open-contracting/cove-ocds that referenced this issue Nov 20, 2019
Required to ensure new installs are possible (including Travis running
our tests).
See phn/jdcal#5
@avalentino
Copy link
Collaborator

Not sure about it, but probably uploading jdcal-1.0.zip or a whl for 1.0 could make the trick.

@phn
Copy link
Owner

phn commented Feb 26, 2022

If I remember correctly trying to load a zip file had failed. Anyway, I have kept this issue open in case anyone
runs into the problem; but I thing everyone has moved on and are using the latest version!

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

6 participants