poetry
poetry copied to clipboard
test_isolated_env_install_discards_requirements_not_needed_by_env fails with python 3.14.0a6
Description
I tried to debug the failing test and I've noticed a different behaviour with python 3.14.0a6 compared to python 3.13.2.
With 3.13.2, env.install installs poetry-core.
(Pdb) InstalledRepository.load(venv).packages
[Package('poetry-core', '2.0.1')]
This is empty with 3.14.0a6.
(Pdb) InstalledRepository.load(venv).packages
[]
=================================== FAILURES ===================================
______ test_isolated_env_install_discards_requirements_not_needed_by_env _______
[gw1] linux -- Python 3.14.0 /usr/bin/python3
pool = <poetry.repositories.repository_pool.RepositoryPool object at 0x7f12f49bd5b0>
def test_isolated_env_install_discards_requirements_not_needed_by_env(
pool: RepositoryPool,
) -> None:
with ephemeral_environment(Path(sys.executable)) as venv:
env = IsolatedEnv(venv, pool)
assert not InstalledRepository.load(venv).find_packages(
get_dependency("poetry-core")
)
venv_python_version = venv.get_marker_env().get("python_version")
package_one = uuid.uuid4().hex
package_two = uuid.uuid4().hex
env.install(
{
f"poetry-core; python_version=='{venv_python_version}'",
f"{package_one}>=1.0.0; python_version=='0.0'",
f"{package_two}>=2.0.0; platform_system=='Mirrors'",
}
)
> assert InstalledRepository.load(venv).find_packages(
get_dependency("poetry-core")
)
E assert []
E + where [] = find_packages(<Dependency poetry-core>)
E + where find_packages = <poetry.repositories.installed_repository.InstalledRepository object at 0x7f12f06571d0>.find_packages
E + where <poetry.repositories.installed_repository.InstalledRepository object at 0x7f12f06571d0> = load(VirtualEnv("/tmp/tmp1_ok99vc/.venv"))
E + where load = InstalledRepository.load
E + and <Dependency poetry-core> = get_dependency('poetry-core')
/builddir/build/BUILD/poetry-2.1.1-build/poetry-2.1.1/tests/utils/test_isolated_build.py:80: AssertionError
Workarounds
N/A
Poetry Installation Method
system package manager (eg: dnf, apt etc.)
Operating System
Fedora 43
Poetry Version
2.1.1
Poetry Configuration
N/A
Python Sysconfig
No response
Example pyproject.toml
Poetry Runtime Logs
N/A
This is still happening also with python3.14-b1.
This should be fixed since we are testing with Python 3.14 now.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.