Skip to content

Commit bc93c76

Browse files
authored
Revert "Fix python incorrect version selection issue (#13862)"
This reverts commit 01af0e5.
1 parent 436c320 commit bc93c76

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

python/lib/dependabot/python/language.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ class Language < Dependabot::Ecosystem::VersionManager
2727
PRE_INSTALLED_PYTHON_VERSIONS = T.let(
2828
PRE_INSTALLED_PYTHON_VERSIONS_RAW.map do |v|
2929
Version.new(v)
30-
end.sort.reverse, # installed versions is sorted in descending order as highest available version is preferred
31-
# over the lower ones
30+
end.sort,
3231
T::Array[Dependabot::Python::Version]
3332
)
3433

python/spec/dependabot/python/language_spec.rb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,6 @@
1616
let(:detected_version) { "3.11" }
1717
let(:raw_version) { "3.13.1" }
1818

19-
describe "PRE_INSTALLED_PYTHON_VERSIONS" do
20-
it "is sorted in descending order" do
21-
versions = described_class::PRE_INSTALLED_PYTHON_VERSIONS
22-
expect(versions).to eq(versions.sort.reverse)
23-
end
24-
25-
it "has the highest version first" do
26-
versions = described_class::PRE_INSTALLED_PYTHON_VERSIONS
27-
expect(versions.first).to eq(versions.max)
28-
end
29-
30-
it "has the lowest version last" do
31-
versions = described_class::PRE_INSTALLED_PYTHON_VERSIONS
32-
expect(versions.last).to eq(versions.min)
33-
end
34-
35-
it "matches PRE_INSTALLED_HIGHEST_VERSION with the first element" do
36-
expect(described_class::PRE_INSTALLED_PYTHON_VERSIONS.first)
37-
.to eq(described_class::PRE_INSTALLED_HIGHEST_VERSION)
38-
end
39-
end
40-
4119
describe "#deprecated?" do
4220
it "returns false" do
4321
expect(language.deprecated?).to be false

0 commit comments

Comments
 (0)