Skip to content

Commit

Permalink
Remove replacement of plus with dot in python latest version (#10838)
Browse files Browse the repository at this point in the history
* Remove replacement of + with .

* Remove feature flag
  • Loading branch information
amazimbe authored Oct 24, 2024
1 parent 8775e1d commit 6bfc298
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ def filter_out_of_range_versions(versions_array)
end

def wants_prerelease?
if dependency.version
version = version_class.new(dependency.version.tr("+", "."))
return version.prerelease?
end
return version_class.new(dependency.version).prerelease? if dependency.version

dependency.requirements.any? do |req|
reqs = (req.fetch(:requirement) || "").split(",").map(&:strip)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@
end

it { is_expected.to eq(Gem::Version.new("2.7.0b1")) }

context "with a local version" do
let(:dependency_version) { "2.6.0a1+local.1" }

it { is_expected.to eq(Gem::Version.new("2.7.0b1")) }
end
end

context "when raise_on_ignored is enabled and later versions are allowed" do
Expand Down

0 comments on commit 6bfc298

Please sign in to comment.