Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dep: drop ruby 2.7 support #3040

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .cross_rubies
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
2.7.0:aarch64-linux
2.7.0:arm-linux
2.7.0:arm64-darwin
2.7.0:x64-mingw32
2.7.0:x86-linux
2.7.0:x86-mingw32
2.7.0:x86_64-darwin
2.7.0:x86_64-linux
3.0.0:aarch64-linux
3.0.0:arm-linux
3.0.0:arm64-darwin
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: ["ubuntu", "ubuntu32"]
image: ["ubuntu"]
sys: ["enable"]
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3-rc"]
ruby: ["3.0", "3.1", "3.2", "3.3-rc"]
runs-on: ubuntu-latest
container:
image: ghcr.io/sparklemotion/nokogiri-test:mri-${{matrix.ruby}}
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"]
ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -263,7 +263,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.7", "3.0", "3.1", "3.2", "head", "mingw"]
ruby: ["3.0", "3.1", "3.2", "head", "mingw"]
runs-on: windows-2022
steps:
- name: configure git crlf
Expand Down Expand Up @@ -431,7 +431,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
ruby: ["3.0", "3.1", "3.2", "head"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -453,7 +453,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
ruby: ["3.0", "3.1", "3.2", "head"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -474,7 +474,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.7", "3.0"]
ruby: ["3.0"]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -556,7 +556,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"]
ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -578,7 +578,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"]
ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -600,7 +600,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"]
ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -622,7 +622,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
ruby: ["3.0", "3.1", "3.2", "head"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -659,7 +659,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "head"]
ruby: ["3.0", "3.1", "3.2", "head"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -679,7 +679,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0"]
ruby: ["3.0"]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-ci-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tag: ["alpine", "mri-2.7", "mri-3.0", "mri-3.1", "mri-3.2", "mri-3.3-rc", "truffle-nightly", "ubuntu", "ubuntu32"]
tag: ["alpine", "mri-3.0", "mri-3.1", "mri-3.2", "mri-3.3-rc", "truffle-nightly", "ubuntu"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AllCops:
- 'lib/nokogiri/css/tokenizer.rb' # generated by rex
- 'lib/nokogiri/jruby/nokogiri_jars.rb' # generated by jar-dependencies
- 'test/_test_pattern_matching.rb' # until TargetRubyVersion >= 3.0
TargetRubyVersion: "2.7"
TargetRubyVersion: "3.0"

Metrics/BlockNesting:
Exclude:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [REA

## next / unreleased

#### Ruby

This release introduces native gem support for Ruby 3.3.

This release ends support for Ruby 2.7, for which [upstream support ended 2023-03-31](https://www.ruby-lang.org/en/downloads/branches/).


### Notable Changes

#### Pattern matching
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ You can help sponsor the maintainers of this software through one of these organ

Requirements:

- Ruby >= 2.7
- Ruby >= 3.0
- JRuby >= 9.4.0.0


Expand Down
79 changes: 0 additions & 79 deletions Vagrantfile

This file was deleted.

4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ environment:
INSTALL_PACKAGES: "mingw-w64-i686-libxslt mingw-w64-i686-libyaml"
EXTCONF_PARAMS: "--use-system-libraries"

- ruby_version: 27
- ruby_version: 30
INSTALL_PACKAGES: "mingw-w64-i686-libyaml"
- ruby_version: 27
- ruby_version: 30
INSTALL_PACKAGES: "mingw-w64-i686-libxslt mingw-w64-i686-libyaml"
EXTCONF_PARAMS: "--use-system-libraries"
1 change: 0 additions & 1 deletion ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,6 @@ def compile
have_func("xmlRelaxNGSetValidStructuredErrors") # introduced in libxml 2.6.21
have_func("xmlSchemaSetValidStructuredErrors") # introduced in libxml 2.6.23
have_func("xmlSchemaSetParserStructuredErrors") # introduced in libxml 2.6.23
have_func("rb_gc_location") # introduced in Ruby 2.7
have_func("rb_category_warning") # introduced in Ruby 3.0

other_library_versions_string = OTHER_LIBRARY_VERSIONS.map { |k, v| [k, v].join(":") }.join(",")
Expand Down
4 changes: 0 additions & 4 deletions ext/nokogiri/xml_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ _xml_namespace_dealloc(void *ptr)
xmlFree(ns);
}

#ifdef HAVE_RB_GC_LOCATION
static void
_xml_namespace_update_references(void *ptr)
{
Expand All @@ -51,9 +50,6 @@ _xml_namespace_update_references(void *ptr)
ns->_private = (void *)rb_gc_location((VALUE)ns->_private);
}
}
#else
# define _xml_namespace_update_references 0
#endif

static const rb_data_type_t nokogiri_xml_namespace_type_with_dealloc = {
.wrap_struct_name = "Nokogiri::XML::Namespace#with_dealloc",
Expand Down
4 changes: 0 additions & 4 deletions ext/nokogiri/xml_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ _xml_node_mark(void *ptr)
}
}

#ifdef HAVE_RB_GC_LOCATION
static void
_xml_node_update_references(void *ptr)
{
Expand All @@ -38,9 +37,6 @@ _xml_node_update_references(void *ptr)
node->_private = (void *)rb_gc_location((VALUE)node->_private);
}
}
#else
# define _xml_node_update_references 0
#endif

static const rb_data_type_t nokogiri_node_type = {
.wrap_struct_name = "Nokogiri::XML::Node",
Expand Down
2 changes: 1 addition & 1 deletion nokogiri.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Gem::Specification.new do |spec|

spec.license = "MIT"

spec.required_ruby_version = ">= 2.7.0"
spec.required_ruby_version = ">= 3.0.0"

spec.homepage = "https://nokogiri.org"
spec.metadata = {
Expand Down
40 changes: 0 additions & 40 deletions oci-images/nokogiri-test/mri-2.7.dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion oci-images/nokogiri-test/ubuntu.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy

# include_file debian-prelude.step
# -*- dockerfile -*-
Expand Down
2 changes: 1 addition & 1 deletion oci-images/nokogiri-test/ubuntu.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy

<%= include_file "debian-prelude.step" %>

Expand Down
Loading