Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching for pygame results in ValueError #1345

Closed
3 tasks done
sztomi opened this issue Sep 1, 2019 · 3 comments · Fixed by #1346
Closed
3 tasks done

Searching for pygame results in ValueError #1345

sztomi opened this issue Sep 1, 2019 · 3 comments · Fixed by #1346
Labels
kind/bug Something isn't working as expected

Comments

@sztomi
Copy link
Contributor

sztomi commented Sep 1, 2019

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Ubuntu 19.04
  • Poetry version: 0.12.17
  • Link of a Gist with the contents of your pyproject.toml file: n/a (the error is not related to pyproject.toml contents and happens even without one)

Issue

Steps

  1. Run poetry search pygame

The following exception raised:

[ParseVersionError]  
Unable to parse ".9".             
                                    
Exception trace:
 /home/tamas/.poetry/lib/poetry/_vendor/py3.6/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /home/tamas/.poetry/lib/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /home/tamas/.poetry/lib/poetry/_vendor/py3.6/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /home/tamas/.poetry/lib/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /home/tamas/.poetry/lib/poetry/_vendor/py3.6/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /home/tamas/.poetry/lib/poetry/_vendor/py3.6/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /home/tamas/.poetry/lib/poetry/console/commands/search.py in handle() at line 20
   results = PyPiRepository().search(self.argument("tokens"), flags)
 /home/tamas/.poetry/lib/poetry/repositories/pypi_repository.py in search() at line 224
   result = Package(hit["name"], hit["version"], hit["version"])
 /home/tamas/.poetry/lib/poetry/packages/package.py in __init__() at line 40
   self._version = Version.parse(version)
 /home/tamas/.poetry/lib/poetry/semver/version.py in parse() at line 205
   raise ParseVersionError('Unable to parse "{}".'.format(text))

This issue was reported before, but closed by the author later: #432

@sztomi
Copy link
Contributor Author

sztomi commented Sep 1, 2019

After some debugging, I found that the culprit is the pygame-music-grid package (which is one of the search results). Its version is .9 which semver can't parse.

@sztomi
Copy link
Contributor Author

sztomi commented Sep 1, 2019

pip simply ignore the invalid version, so I think it's reasonable for poetry to do the same in these cases.

sztomi added a commit to sztomi/poetry that referenced this issue Sep 1, 2019
Some packages (like `pygame-music-grid`) have unparseable metadata.
This resulted in a ValueError. pip ignores packages like these, so it's reasonable
to do the same in poetry itself and only display the well-formed ones.

Fixes python-poetry#1345.
@brycedrennan brycedrennan added the kind/bug Something isn't working as expected label Sep 1, 2019
sztomi added a commit to sztomi/poetry that referenced this issue Sep 8, 2019
Some packages (like `pygame-music-grid`) have unparseable metadata.
This resulted in a ValueError. pip ignores packages like these, so it's reasonable
to do the same in poetry itself and only display the well-formed ones.

Fixes python-poetry#1345.
Fixes python-poetry#637.
sdispater pushed a commit that referenced this issue Sep 13, 2019
Some packages (like `pygame-music-grid`) have unparseable metadata.
This resulted in a ValueError. pip ignores packages like these, so it's reasonable
to do the same in poetry itself and only display the well-formed ones.

Fixes #1345.
Fixes #637.
Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants