Skip to content

[FIX] Update checker: LooseVersion doesn't handle str parts#2401

Merged
lanzagar merged 1 commit intobiolab:masterfrom
kernc:update-checker
Jun 16, 2017
Merged

[FIX] Update checker: LooseVersion doesn't handle str parts#2401
lanzagar merged 1 commit intobiolab:masterfrom
kernc:update-checker

Conversation

@kernc
Copy link
Copy Markdown
Contributor

@kernc kernc commented Jun 13, 2017

Issue
>>> from distutils.version import LooseVersion
>>> LooseVersion('3.4.dev') <= LooseVersion('3.4.1')
--------------------------------------------------------------------------------
TypeError: unorderable types: str() < int()
Description of changes

Use newer package_resources.SetuptoolsVersion which doesn't exhibit this problem.

Includes
  • Code changes
  • Tests
  • Documentation

@kernc
Copy link
Copy Markdown
Contributor Author

kernc commented Jun 13, 2017

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 13, 2017

Codecov Report

Merging #2401 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2401      +/-   ##
==========================================
- Coverage   73.88%   73.88%   -0.01%     
==========================================
  Files         322      322              
  Lines       55843    55843              
==========================================
- Hits        41262    41257       -5     
- Misses      14581    14586       +5

@astaric
Copy link
Copy Markdown
Member

astaric commented Jun 14, 2017

Are you sure this one handles everything? Would it be possilble to add some tests?

@astaric
Copy link
Copy Markdown
Member

astaric commented Jun 14, 2017

PS. Could you also add a trailing / to the URL used to check the version (to avoid unnecessary redirects)?

E.g., '3.4.1' vs '3.4.dev' crashes on 'dev' with TypeError and
unorderable types.
@kernc kernc added this to the 3.4.4 milestone Jun 16, 2017
@lanzagar lanzagar merged commit 3e17a5c into biolab:master Jun 16, 2017
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

Successfully merging this pull request may close these issues.

5 participants