jdcal icon indicating copy to clipboard operation
jdcal copied to clipboard

pip install jdcal==1.0 fails

Open ghost opened this issue 10 years ago • 15 comments

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?

ghost avatar Nov 09 '15 11:11 ghost

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

phn avatar Nov 09 '15 13:11 phn

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

saily avatar Nov 10 '15 22:11 saily

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.

chrislococo-wf avatar Nov 10 '15 23:11 chrislococo-wf

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

saily avatar Nov 10 '15 23:11 saily

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

chrislococo-wf avatar Nov 10 '15 23:11 chrislococo-wf

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 avatar Nov 11 '15 02:11 phn

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

phn avatar Nov 11 '15 03:11 phn

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.

chrislococo-wf avatar Nov 11 '15 18:11 chrislococo-wf

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

nsh87 avatar Nov 12 '15 03:11 nsh87

@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.

phn avatar Nov 12 '15 06:11 phn

No problem, sorry for the friction over there! :grinning:

chrislococo-wf avatar Nov 12 '15 19:11 chrislococo-wf

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.

stefanfoulis avatar Oct 28 '16 21:10 stefanfoulis

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

phn avatar Oct 29 '16 04:10 phn

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

avalentino avatar Feb 26 '22 08:02 avalentino

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!

phn avatar Feb 26 '22 09:02 phn