Repository navigation
Drop support for Ruby < 2.7 - #617
Merged
Merged
Conversation
Ruby 2.4, 2.5, and 2.6 reached end of life between 2020 and 2022. - Set required_ruby_version to >= 2.7 so Bundler won't resolve the gem on older Rubies - Remove 2.4, 2.5, and 2.6 from the Docker and Podman CI matrices - Call URI.open directly in Image.import. The Kernel#open fallback was only needed before URI.open existed (Ruby 2.5) Signed-off-by: Tim Smith <tsmith84@proton.me>
ls-todd-lunter
force-pushed
the
drop-ruby-before-2-7
branch
from
October 27, 2026 02:05
a57d02f to
2408849
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drops support for Ruby 2.4, 2.5, and 2.6, all of which reached end of life between 2020 and 2022. Keeping them in CI has started to hold back changes; #610, for example, had to avoid
Kernel#yield_selffor 2.4.required_ruby_version = '>= 2.7'in the gemspec, so Bundler refuses to resolve the gem on older Rubies instead of letting it fail at runtime.Docker::Image.importto callURI.opendirectly. The old branch fell back toKernel#openfor Rubies withoutURI.open, which was added in 2.5.URI.openstill handles local file paths, because open-uri passes non-URI strings through toKernel#open.Because this drops supported Ruby versions, the next release should probably be a major version bump. I've left
VERSIONalone for the maintainers to decide.This also unblocks a follow-up to #613: requiring
json >= 2.10, whose rewritten parser needs Ruby 2.7+, would give every supported Ruby the fast parser.Testing
image_spec.import,util_spec, anddocker_specagainst Docker 29.9: 67 examples, 0 failures on both Ruby 2.7 and Ruby 4.0.bundle installnow fails as intended:Could not find gem 'ruby (>= 2.7)', which is required by gem 'docker-api'.