Skip to content

Conversation

@chrispbailey
Copy link
Contributor

If you specify a python version, then hashin filters the releases but can't parse the win binary for the nltk package.

hashin --python-version 3.6 nltk==3.2.4
https://pypi.org/pypi/nltk/json
Unrecognizable url: https://files.pythonhosted.org/packages/26/01/0330e3ba13628827f10fcd6c3c8d778a5aa3e4d0a09d05619f074ba2d87e/nltk-3.2.4.win32.exe

They've published nltk-3.2.4.win32.exe which hashin can't parse
@peterbe
Copy link
Owner

peterbe commented Aug 8, 2018

Can you please add a unit test?

self.assertEqual(hashin.release_url_metadata(url), {
'package': 'nltk',
'version': '3.2.4',
'python_version': mock.ANY,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The structure of nltk-3.2.4.win32.exe does not contain a python version so technically the release_url_metadata returns python_version=win32. I'm not going to change the regex any further because I don't know what the consequences of making the python_version optional are (there are not enough tests here to ensure this doesn't break anything).

@peterbe
Copy link
Owner

peterbe commented Aug 8, 2018

So this change made it possible for you to install nltk on windows with hashin and that was not possible before. I think that's good enough. THANKS!

@peterbe peterbe merged commit 9572761 into peterbe:master Aug 8, 2018
@peterbe
Copy link
Owner

peterbe commented Aug 8, 2018

Version 0.13.3 pushed to pypi.

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.

2 participants