Skip to content

Be robust towards invalid versions like "0.3.2d" (fixes #190) - #196

Merged
peterbe merged 1 commit into
peterbe:masterfrom
hartwork:issue-190-be-robust-towards-past-releases-with-invalid-versions
Oct 21, 2024
Merged

Be robust towards invalid versions like "0.3.2d" (fixes #190)#196
peterbe merged 1 commit into
peterbe:masterfrom
hartwork:issue-190-be-robust-towards-past-releases-with-invalid-versions

Conversation

@hartwork

Copy link
Copy Markdown
Collaborator

.. in past releases when trying to find the latest release

Fixes #190

CC @peterbe

Comment thread hashin.py
v = parse(version)
try:
v = parse(version)
except InvalidVersion:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a code-comment to explain why it's doing this.
I think you can take the title of this PR.

By the way, should it print a warning when it happens?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a code-comment to explain why it's doing this. I think you can take the title of this PR.

@peterbe I can sure add an in-code comment: done.

By the way, should it print a warning when it happens?

I'm producing some output now. How do you feel about the new approach?

@hartwork
hartwork force-pushed the issue-190-be-robust-towards-past-releases-with-invalid-versions branch 3 times, most recently from 941c10b to 8e9d68f Compare October 21, 2024 13:07
.. in past releases when trying to find the latest release
@hartwork
hartwork force-pushed the issue-190-be-robust-towards-past-releases-with-invalid-versions branch from 8e9d68f to f451e09 Compare October 21, 2024 13:20
@peterbe
peterbe merged commit 59c0a8b into peterbe:master Oct 21, 2024
@hartwork
hartwork deleted the issue-190-be-robust-towards-past-releases-with-invalid-versions branch October 21, 2024 17:09
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.

[1.0.2] hashin joblib crashes with traceback packaging.version.InvalidVersion: Invalid version: '0.3.2d'

2 participants