From cb942f0ce1b37d958266585aee7ce0b459cb7f9e Mon Sep 17 00:00:00 2001 From: samypr100 <3933065+samypr100@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:34:25 +0000 Subject: [PATCH] fix: add missing environment and resolver_options (#226) https://github.com/astral-sh/packse/pull/211#issuecomment-2453676905 Adds missing `resolver_options` and `environment` lost from json to toml conversion --- scenarios/prereleases/package-prereleases-boundary.toml | 3 +++ .../prereleases/package-prereleases-global-boundary.toml | 3 +++ ...es-package-only-prereleases-in-range-global-opt-in.toml | 3 +++ .../compatible-python-incompatible-override.toml | 6 ++++++ ...ble-python-compatible-override-available-no-wheels.toml | 7 +++++++ ...le-python-compatible-override-no-compatible-wheels.toml | 6 ++++++ ...ncompatible-python-compatible-override-other-wheel.toml | 6 ++++++ ...e-python-compatible-override-unavailable-no-wheels.toml | 6 ++++++ .../incompatible-python-compatible-override.toml | 6 ++++++ .../python-greater-than-current-backtrack.toml | 3 +++ .../python-greater-than-current-excluded.toml | 3 +++ .../requires_python/python-greater-than-current-many.toml | 3 +++ .../requires_python/python-greater-than-current-patch.toml | 3 +++ scenarios/requires_python/python-greater-than-current.toml | 3 +++ scenarios/requires_python/python-less-than-current.toml | 3 +++ .../requires_python/python-patch-override-no-patch.toml | 6 ++++++ .../python-patch-override-patch-compatible.toml | 6 ++++++ scenarios/tag_and_markers/requires-python-wheels.toml | 6 ++++++ scenarios/tag_and_markers/unreachable-package.toml | 3 +++ scenarios/tag_and_markers/unreachable-wheels.toml | 3 +++ scenarios/wheels/no-binary.toml | 3 +++ scenarios/wheels/no-build.toml | 3 +++ scenarios/wheels/no-wheels-no-build.toml | 3 +++ scenarios/wheels/only-wheels-no-binary.toml | 3 +++ 24 files changed, 100 insertions(+) diff --git a/scenarios/prereleases/package-prereleases-boundary.toml b/scenarios/prereleases/package-prereleases-boundary.toml index a91b0b6e..063c7949 100644 --- a/scenarios/prereleases/package-prereleases-boundary.toml +++ b/scenarios/prereleases/package-prereleases-boundary.toml @@ -16,3 +16,6 @@ a = "0.1.0" [packages.a.versions."0.2.0a1"] [packages.a.versions."0.3.0"] + +[resolver_options] +prereleases = true diff --git a/scenarios/prereleases/package-prereleases-global-boundary.toml b/scenarios/prereleases/package-prereleases-global-boundary.toml index 2c808100..0fba514a 100644 --- a/scenarios/prereleases/package-prereleases-global-boundary.toml +++ b/scenarios/prereleases/package-prereleases-global-boundary.toml @@ -16,3 +16,6 @@ a = "0.1.0" [packages.a.versions."0.2.0a1"] [packages.a.versions."0.3.0"] + +[resolver_options] +prereleases = true diff --git a/scenarios/prereleases/requires-package-only-prereleases-in-range-global-opt-in.toml b/scenarios/prereleases/requires-package-only-prereleases-in-range-global-opt-in.toml index 0f7921e1..10a4874c 100644 --- a/scenarios/prereleases/requires-package-only-prereleases-in-range-global-opt-in.toml +++ b/scenarios/prereleases/requires-package-only-prereleases-in-range-global-opt-in.toml @@ -13,3 +13,6 @@ a = "1.0.0a1" [packages.a.versions."0.1.0"] [packages.a.versions."1.0.0a1"] + +[resolver_options] +prereleases = true diff --git a/scenarios/requires_python/compatible-python-incompatible-override.toml b/scenarios/requires_python/compatible-python-incompatible-override.toml index 48e30bf5..6f26a62d 100644 --- a/scenarios/requires_python/compatible-python-incompatible-override.toml +++ b/scenarios/requires_python/compatible-python-incompatible-override.toml @@ -9,3 +9,9 @@ satisfiable = false [packages.a.versions."1.0.0"] requires_python = ">=3.10" + +[resolver_options] +python = "3.9" + +[environment] +python = "3.11" diff --git a/scenarios/requires_python/incompatible-python-compatible-override-available-no-wheels.toml b/scenarios/requires_python/incompatible-python-compatible-override-available-no-wheels.toml index 5817b6bd..dc08e4bc 100644 --- a/scenarios/requires_python/incompatible-python-compatible-override-available-no-wheels.toml +++ b/scenarios/requires_python/incompatible-python-compatible-override-available-no-wheels.toml @@ -14,3 +14,10 @@ a = "1.0.0" [packages.a.versions."1.0.0"] requires_python = ">=3.10" wheel = false + +[resolver_options] +python = "3.11" + +[environment] +python = "3.9" +additional_python = ["3.11"] diff --git a/scenarios/requires_python/incompatible-python-compatible-override-no-compatible-wheels.toml b/scenarios/requires_python/incompatible-python-compatible-override-no-compatible-wheels.toml index 173b6919..77359d79 100644 --- a/scenarios/requires_python/incompatible-python-compatible-override-no-compatible-wheels.toml +++ b/scenarios/requires_python/incompatible-python-compatible-override-no-compatible-wheels.toml @@ -11,3 +11,9 @@ explanation = "Since there are no compatible wheels for the package and it is no [packages.a.versions."1.0.0"] requires_python = ">=3.10" wheel_tags = ["foo-none-any"] + +[resolver_options] +python = "3.11" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/incompatible-python-compatible-override-other-wheel.toml b/scenarios/requires_python/incompatible-python-compatible-override-other-wheel.toml index 77518a2b..26988918 100644 --- a/scenarios/requires_python/incompatible-python-compatible-override-other-wheel.toml +++ b/scenarios/requires_python/incompatible-python-compatible-override-other-wheel.toml @@ -14,3 +14,9 @@ wheel = false [packages.a.versions."2.0.0"] requires_python = ">=3.12" + +[resolver_options] +python = "3.11" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/incompatible-python-compatible-override-unavailable-no-wheels.toml b/scenarios/requires_python/incompatible-python-compatible-override-unavailable-no-wheels.toml index 8f17a5a1..24d81314 100644 --- a/scenarios/requires_python/incompatible-python-compatible-override-unavailable-no-wheels.toml +++ b/scenarios/requires_python/incompatible-python-compatible-override-unavailable-no-wheels.toml @@ -11,3 +11,9 @@ explanation = "Since there are no wheels for the package and it is not compatibl [packages.a.versions."1.0.0"] requires_python = ">=3.10" wheel = false + +[resolver_options] +python = "3.11" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/incompatible-python-compatible-override.toml b/scenarios/requires_python/incompatible-python-compatible-override.toml index 5095adea..9f4481fe 100644 --- a/scenarios/requires_python/incompatible-python-compatible-override.toml +++ b/scenarios/requires_python/incompatible-python-compatible-override.toml @@ -12,3 +12,9 @@ a = "1.0.0" [packages.a.versions."1.0.0"] requires_python = ">=3.10" + +[resolver_options] +python = "3.11" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/python-greater-than-current-backtrack.toml b/scenarios/requires_python/python-greater-than-current-backtrack.toml index d3c3cf2e..492fabc6 100644 --- a/scenarios/requires_python/python-greater-than-current-backtrack.toml +++ b/scenarios/requires_python/python-greater-than-current-backtrack.toml @@ -21,3 +21,6 @@ requires_python = ">=3.11" [packages.a.versions."4.0.0"] requires_python = ">=3.12" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/python-greater-than-current-excluded.toml b/scenarios/requires_python/python-greater-than-current-excluded.toml index e57e322d..97e3a1e3 100644 --- a/scenarios/requires_python/python-greater-than-current-excluded.toml +++ b/scenarios/requires_python/python-greater-than-current-excluded.toml @@ -18,3 +18,6 @@ requires_python = ">=3.11" [packages.a.versions."4.0.0"] requires_python = ">=3.12" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/python-greater-than-current-many.toml b/scenarios/requires_python/python-greater-than-current-many.toml index cf8ffecf..1d5661e6 100644 --- a/scenarios/requires_python/python-greater-than-current-many.toml +++ b/scenarios/requires_python/python-greater-than-current-many.toml @@ -42,3 +42,6 @@ requires_python = ">=3.11" [packages.a.versions."3.5.0"] requires_python = ">=3.11" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/python-greater-than-current-patch.toml b/scenarios/requires_python/python-greater-than-current-patch.toml index 8d8eeaac..ce111bfe 100644 --- a/scenarios/requires_python/python-greater-than-current-patch.toml +++ b/scenarios/requires_python/python-greater-than-current-patch.toml @@ -9,3 +9,6 @@ satisfiable = false [packages.a.versions."1.0.0"] requires_python = ">=3.8.14" + +[environment] +python = "3.8.12" diff --git a/scenarios/requires_python/python-greater-than-current.toml b/scenarios/requires_python/python-greater-than-current.toml index d61fee21..d3e0c00a 100644 --- a/scenarios/requires_python/python-greater-than-current.toml +++ b/scenarios/requires_python/python-greater-than-current.toml @@ -9,3 +9,6 @@ satisfiable = false [packages.a.versions."1.0.0"] requires_python = ">=3.10" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/python-less-than-current.toml b/scenarios/requires_python/python-less-than-current.toml index c948c787..80c34bab 100644 --- a/scenarios/requires_python/python-less-than-current.toml +++ b/scenarios/requires_python/python-less-than-current.toml @@ -10,3 +10,6 @@ explanation = "We ignore the upper bound on Python requirements" [packages.a.versions."1.0.0"] requires_python = "<=3.8" + +[environment] +python = "3.9" diff --git a/scenarios/requires_python/python-patch-override-no-patch.toml b/scenarios/requires_python/python-patch-override-no-patch.toml index 68bb099c..0ebc79fc 100644 --- a/scenarios/requires_python/python-patch-override-no-patch.toml +++ b/scenarios/requires_python/python-patch-override-no-patch.toml @@ -10,3 +10,9 @@ explanation = "Since the resolver is asked to solve with 3.8, the minimum compat [packages.a.versions."1.0.0"] requires_python = ">=3.8.4" + +[resolver_options] +python = "3.8" + +[environment] +python = "3.8.18" diff --git a/scenarios/requires_python/python-patch-override-patch-compatible.toml b/scenarios/requires_python/python-patch-override-patch-compatible.toml index 8956840a..c13d7e09 100644 --- a/scenarios/requires_python/python-patch-override-patch-compatible.toml +++ b/scenarios/requires_python/python-patch-override-patch-compatible.toml @@ -12,3 +12,9 @@ a = "1.0.0" [packages.a.versions."1.0.0"] requires_python = ">=3.8.0" + +[resolver_options] +python = "3.8.0" + +[environment] +python = "3.8.18" diff --git a/scenarios/tag_and_markers/requires-python-wheels.toml b/scenarios/tag_and_markers/requires-python-wheels.toml index 45b96ddc..4f389bc5 100644 --- a/scenarios/tag_and_markers/requires-python-wheels.toml +++ b/scenarios/tag_and_markers/requires-python-wheels.toml @@ -10,3 +10,9 @@ satisfiable = true [packages.a.versions."1.0.0"] wheel_tags = ["cp311-cp311-any", "cp310-cp310-any", "cp39-cp39-any"] + +[resolver_options] +universal = true + +[environment] +python = "3.12" diff --git a/scenarios/tag_and_markers/unreachable-package.toml b/scenarios/tag_and_markers/unreachable-package.toml index 943de1c1..6554650c 100644 --- a/scenarios/tag_and_markers/unreachable-package.toml +++ b/scenarios/tag_and_markers/unreachable-package.toml @@ -11,3 +11,6 @@ satisfiable = true requires = ["b==1.0.0; sys_platform == 'linux'"] [packages.b.versions."1.0.0"] + +[resolver_options] +universal = true diff --git a/scenarios/tag_and_markers/unreachable-wheels.toml b/scenarios/tag_and_markers/unreachable-wheels.toml index b4461ffb..1c727920 100644 --- a/scenarios/tag_and_markers/unreachable-wheels.toml +++ b/scenarios/tag_and_markers/unreachable-wheels.toml @@ -34,3 +34,6 @@ wheel_tags = [ "cp312-cp312-win_amd64", "cp312-cp312-macosx_14_0_x86_64", ] + +[resolver_options] +universal = true diff --git a/scenarios/wheels/no-binary.toml b/scenarios/wheels/no-binary.toml index b9f672f0..375b1308 100644 --- a/scenarios/wheels/no-binary.toml +++ b/scenarios/wheels/no-binary.toml @@ -9,3 +9,6 @@ satisfiable = true explanation = "The source distribution should be used for install" [packages.a.versions."1.0.0"] + +[resolver_options] +no_binary = ["a"] diff --git a/scenarios/wheels/no-build.toml b/scenarios/wheels/no-build.toml index d72d4550..f1a082fa 100644 --- a/scenarios/wheels/no-build.toml +++ b/scenarios/wheels/no-build.toml @@ -9,3 +9,6 @@ satisfiable = true explanation = "The wheel should be used for install" [packages.a.versions."1.0.0"] + +[resolver_options] +no_build = ["a"] diff --git a/scenarios/wheels/no-wheels-no-build.toml b/scenarios/wheels/no-wheels-no-build.toml index 74f2c56a..ac07da46 100644 --- a/scenarios/wheels/no-wheels-no-build.toml +++ b/scenarios/wheels/no-wheels-no-build.toml @@ -9,3 +9,6 @@ satisfiable = false [packages.a.versions."1.0.0"] wheel = false + +[resolver_options] +no_build = ["a"] diff --git a/scenarios/wheels/only-wheels-no-binary.toml b/scenarios/wheels/only-wheels-no-binary.toml index 3d255cd8..1076721a 100644 --- a/scenarios/wheels/only-wheels-no-binary.toml +++ b/scenarios/wheels/only-wheels-no-binary.toml @@ -9,3 +9,6 @@ satisfiable = false [packages.a.versions."1.0.0"] sdist = false + +[resolver_options] +no_binary = ["a"]