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

default python requirement to >= #9558

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading