Commit b3980622 by Sébastien Eustace Committed by GitHub

Fix handling of markers in old files (#2482)

parent d4be652c
......@@ -446,6 +446,10 @@ class Installer:
if op.job_type == "uninstall":
continue
if not self._env.is_valid_for_marker(package.marker):
op.skip("Not needed for the current environment")
continue
if self._update:
extras = {}
for extra, deps in self._package.extras.items():
......
......@@ -1627,7 +1627,8 @@ def test_installer_can_handle_old_lock_files(
package.add_dependency("pytest", "^3.5", category="dev")
locker.mock_lock_data(fixture("with-pypi-repository"))
locker.locked()
locker.mock_lock_data(fixture("old-lock"))
installer = Installer(
NullIO(), MockEnv(), package, locker, pool, installed=installed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment