Skip to content

Commit

Permalink
default python requirement to >= (#9558)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby authored Jul 18, 2024
1 parent b661c1a commit a74d3a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/poetry/console/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _init_pyproject(
if not python:
config = Config.create()
python = (
"^"
">="
+ EnvManager.get_python_version(
precision=2,
prefer_active_python=config.get("virtualenvs.prefer-active-python"),
Expand Down
4 changes: 2 additions & 2 deletions tests/console/commands/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def test_empty_license(tester: CommandTester) -> None:
readme = "README.md"
[tool.poetry.dependencies]
python = "^{python}"
python = ">={python}"
"""
assert expected in tester.io.fetch_output()

Expand Down Expand Up @@ -1066,7 +1066,7 @@ def mock_check_output(cmd: str, *_: Any, **__: Any) -> str:

expected = f"""\
[tool.poetry.dependencies]
python = "^{python}"
python = ">={python}"
"""

assert expected in pyproject_file.read_text()
Expand Down
2 changes: 1 addition & 1 deletion tests/console/commands/test_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def mock_check_output(cmd: str, *_: Any, **__: Any) -> str:

expected = f"""\
[tool.poetry.dependencies]
python = "^{python}"
python = ">={python}"
"""

assert expected in pyproject_file.read_text()
Expand Down

0 comments on commit a74d3a7

Please sign in to comment.