Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Python version dependency in pyproject.toml breaks poetry for modified Python versions #183

Closed
gcbirzan opened this issue Feb 9, 2021 · 2 comments
Labels

Comments

@gcbirzan
Copy link

gcbirzan commented Feb 9, 2021

Describe the bug
Trying to create a new interpreter on Debian with python3.9 generates invalid pyproject.toml

To Reproduce
Steps to reproduce the behavior:

  1. Install python3.9 on Debian.
  2. Try to generate a virtualenv based on that
  3. Error:
ParseConstraintError

  Could not parse version constraint: ^3.9.1+

  at ~/.poetry/lib/poetry/_vendor/py3.6/poetry/core/semver/__init__.py:164 in parse_single_constraint
      160│         else:
      161│             return version
      162│ 
      163│     raise ParseConstraintError(
    → 164│         "Could not parse version constraint: {}".format(constraint)
      165│     )
      166│ 

This is because the version of the Debian Python is 3.9.1+ and that gets put in the deps:

[tool.poetry.dependencies]
python = "^3.9.1+"

Expected behavior
poetry init suggests ^3.9, that's probably a more sensible value.

Environments (please complete the following information):
Python 3.9 is only available on testing/sid, but it should still work.

@koxudaxi
Copy link
Owner

koxudaxi commented Feb 9, 2021

@gcbirzan
Thank you for posting this problem.
I understand the problem.
I don't expect the version type.
I will fix it.

@koxudaxi
Copy link
Owner

@gcbirzan
The latest version 1.0.7 has been published in the market.
The version only picks a major and minor version like 3.6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants