get: virtualenv fails
drnic opened this issue · 3 comments
drnic commented
https://pypi.python.org/pypi/virtualenv
$ fly -t sw check-resource -r sample-python-flask-app-boshrelease/virtualenv
error: check failed with exit status '1':
Traceback (most recent call last):
File "/opt/resource/check", line 9, in <module>
load_entry_point('concourse-pypi-resource==0.1.0', 'console_scripts', 'check')()
File "/usr/local/lib/python3.5/site-packages/pypi_resource/check.py", line 40, in main
print(check(sys.stdin))
File "/usr/local/lib/python3.5/site-packages/pypi_resource/check.py", line 32, in check
versions = pypi.get_versions_from_pypi(input)
File "/usr/local/lib/python3.5/site-packages/pypi_resource/pypi.py", line 39, in get_versions_from_pypi
versions = sorted(versions, key=LooseVersion)
File "/usr/local/lib/python3.5/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
File "/usr/local/lib/python3.5/distutils/version.py", line 337, in _cmp
if self.version < other.version:
TypeError: unorderable types: str() < int()
I'll investigate possible causes.
mboldt commented
Digging in a little...here's the gist of it:
>>> LooseVersion('1.4.4') < LooseVersion('1.4rc1')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/version.py", line 337, in _cmp
if self.version < other.version:
TypeError: unorderable types: int() < str()
I think we can fix this by moving the dev release filtering (cf. #6) to before we do the version comparisons.
mboldt commented
Should be set here. Again, let me know if you have a need for not filtering out the dev releases and we can look into making the filtering optional.
drnic commented
Thanks!
…________________________________
From: Michael William Boldt <notifications@github.com>
Sent: Wednesday, September 27, 2017 1:28:27 PM
To: cf-platform-eng/concourse-pypi-resource
Cc: Dr Nic Williams; Author
Subject: Re: [cf-platform-eng/concourse-pypi-resource] get: virtualenv fails (#5)
Should be set here. Again, let me know if you have a need for not filtering out the dev releases and we can look into making the filtering optional.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#5 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAAAbJDK1DHjfBXTpkfZkspbYXXf9vN8ks5smcDagaJpZM4PYWL6>.