question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry is incompatible with unstable-tagged Python builds (Invalid PEP 440 version: '3.Y.Z+')

See original GitHub issue

I’v just installed Python3.11 from deadsnakes/nightly.

Poetry can’t use it, because the Python version has a + in it.

Invalid PEP 440 version: '3.11.0+' is all I get 😭

P.S. if the wise men declare that deadsnakes is at fault here, I’ll happily bug dead snakes.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:28 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
neersightedcommented, Dec 1, 2022

My thinking is we should centralize it using a parse_python_version() variant that encapsulates the stripping of the + so we don’t randomly proliferate it in the codebase and get burned by a future omission. The parse_python_version() code can just be a preprocessing before we hand it to our regular version parsing code, and can be unit tested; we should also end-to-end test the main usage (in env.py).

2reactions
eamanucommented, Dec 1, 2022

Hi, what about something like this? (it works in my local tests in Debian)

Index: src/poetry/utils/env.py
===================================================================
--- src/poetry/utils/env.py	2022-11-30 20:30:11.425524136 -0300
+++ src/poetry/utils/env.py	2022-11-30 20:30:31.829803450 -0300
@@ -1618,7 +1618,7 @@
             "platform_release": platform.release(),
             "platform_system": platform.system(),
             "platform_version": platform.version(),
-            "python_full_version": platform.python_version(),
+            "python_full_version": platform.python_version().rstrip("+"),
             "platform_python_implementation": platform.python_implementation(),
             "python_version": ".".join(platform.python_version().split(".")[:2]),
             "sys_platform": sys.platform,
Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade poetry 1.2.0 tox.ini error Invalide PEP440 version
It might be a dependency that has Python version 3.8.13+ set as a dependency. So you could comment out all (dev) dependencies, then...
Read more >
PEP 621 – Storing project metadata in pyproject.toml
Encourage users to specify core metadata statically for speed, ease of specification, unambiguity, and deterministic consumption by build back-ends; Provide a ...
Read more >
poetry-dynamic-versioning - PyPI
This is a Python 3.7+ plugin for Poetry 1.2.0+ and Poetry Core 1.0.0+ to enable dynamic versioning based on tags in your version...
Read more >
Invalid PEP 440 version: '0.16.0~ynh1' - YunoHost Forum
A YunoHost package version like: 0.16.0~ynh1 is not Python PEP 440 conform :frowning: and newer version of Poetry will not accept it any ......
Read more >
The pyproject.toml file | Documentation | Poetry
Required This should be a valid name as defined by PEP 508. name = "my-package" version The version of the package. Required This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found