Skip to content

Commit 2b3941a

Browse files
authored
installer: improve support of Python pre-releases (#10516)
1 parent 576016f commit 2b3941a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/poetry/puzzle/provider.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,12 @@ def use_environment(self, env: Env) -> Iterator[Provider]:
202202
original_python_constraint = self._package_python_constraint
203203

204204
self._env = env
205+
# We use the stable version here to improve support of environments of Python pre-release
206+
# versions, e.g. Python 3.14rc2. Without using the stable version here, a dependency with
207+
# a marker like `python_version >= "3.14"` would not be installed.
205208
self._package_python_constraint = Version.parse(
206209
env.marker_env["python_full_version"]
207-
)
210+
).stable
208211

209212
try:
210213
yield self

0 commit comments

Comments
 (0)