From f8ce8768f296717c72b3910eee7bd5ac5223cdb9 Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 31 May 2024 07:37:09 +0200 Subject: [PATCH] fix(pypi): exclude python3.12 from candidate list (#1722) Support for python3.12 among pypi packages is pretty poor, this limits the upper bound to python3.11 instead. --- lua/mason-core/installer/managers/pypi.lua | 1 - tests/mason-core/installer/managers/pypi_spec.lua | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/mason-core/installer/managers/pypi.lua b/lua/mason-core/installer/managers/pypi.lua index d596028e5..9cd40ea3f 100644 --- a/lua/mason-core/installer/managers/pypi.lua +++ b/lua/mason-core/installer/managers/pypi.lua @@ -41,7 +41,6 @@ local function get_versioned_candidates(min_version) return Optional.empty() end end, { - { semver.new "3.12.0", "python3.12" }, { semver.new "3.11.0", "python3.11" }, { semver.new "3.10.0", "python3.10" }, { semver.new "3.9.0", "python3.9" }, diff --git a/tests/mason-core/installer/managers/pypi_spec.lua b/tests/mason-core/installer/managers/pypi_spec.lua index 4eff40928..df979fe97 100644 --- a/tests/mason-core/installer/managers/pypi_spec.lua +++ b/tests/mason-core/installer/managers/pypi_spec.lua @@ -20,7 +20,7 @@ end describe("pypi manager", function() before_each(function() stub(spawn, "python3", mockx.returns(Result.success())) - spawn.python3.on_call_with({ "--version" }).returns(Result.success { stdout = "Python 3.12.0" }) + spawn.python3.on_call_with({ "--version" }).returns(Result.success { stdout = "Python 3.11.0" }) end) it("should init venv without upgrading pip", function()