Opened 7 years ago
Closed 7 years ago
#1100 closed defect (fixed)
ToolShed fails on non-integer version numbers
Reported by: | Tristan Croll | Owned by: | Conrad Huang |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | Tool Shed | Version: | |
Keywords: | Cc: | Tom Goddard | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
I uploaded ISOLDE 1.0b1 (which should be valid according to https://www.python.org/dev/peps/pep-0440/#pre-release-spelling). Now ISOLDE's page on the ToolShed is inaccessible (traceback below). I'm happy to switch my version number to 1.0.0 instead (actually, I already have) - but I need to get the bundle out ASAP (I'm teaching people how to use it this week).
Traceback: File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 112. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/projects/chimerax/www/production/cxtoolshed/apps/views.py" in app_page 251. return _mk_app_page(app, user, request) File "/usr/local/projects/chimerax/www/production/cxtoolshed/apps/views.py" in _mk_app_page 222. 'cx_latest_releases': _latest_releases(app, platform, cx_version), File "/usr/local/projects/chimerax/www/production/cxtoolshed/apps/views.py" in _latest_releases 207. v = to_version(r.version) File "/usr/local/projects/chimerax/www/production/cxtoolshed/apps/views.py" in to_version 200. return [int(n) for n in s.split('.')] Exception Type: ValueError at /apps/chimeraxisolde Exception Value: invalid literal for int() with base 10: '0b1'
Change History (4)
comment:1 by , 7 years ago
follow-up: 2 comment:2 by , 7 years ago
The only version of ChimeraX that 0.9.3.1 would work with is so ancient that nobody in their right mind should still be using it. Feel free to go ahead and remove it. But I’m also happy to drop the b1 designation and run with 1.0.0. Whatever lets me get it up there tonight. Tristan Croll Research Fellow Cambridge Institute for Medical Research University of Cambridge CB2 0XY
follow-up: 3 comment:3 by , 7 years ago
For now, is it possible for you to just delete the 1.0b1 package I uploaded today? Once I can get through to ISOLDE's ToolShed page again I'll re-upload as 1.0.0. On 2018-04-30 19:54, ChimeraX wrote:
comment:4 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I changed the code to handle any number of dot-separated integers followed by a leading-alphabetic string. So both 0.9.3.1 and 1.0.0b1 work. The case where this fails is if you get to 1.0.0b10, which will be sorted between 1.0.0b1 and 1.0.0b2. We'll cross that bridge if we ever come to one.
Hi, Tristan.
This is actually partly your fault :-)
We used to use
distutils.version.StrictVersion
for parsing version numbers, but we changed it when ISOLDE 0.9.3.1 broke that.StrictVersion
allows for up to 3 dot-separated integers, optionally followed by one label plus version number. To make "0.9.3.1" acceptable, we changed the code to parse version numbers as any number of dot-separated integers with no trailing label. So we need to make a choice. Should we go with StrictVersion or dot-separated integers. The former would probably require removing ISOLDE 0.9.3.1 from the toolshed (which I assume should not be an issue for users). What do you think?Conrad