Skip to content

Commit c0be6be

Browse files
Drop python 3.8 and 3.9 support (#1770)
Drops python 3.8 and 3.9 support for the next major version. Removes specific code and version constraints for those versions.
1 parent 52ec547 commit c0be6be

24 files changed

Lines changed: 28 additions & 112 deletions

File tree

.github/workflows/general.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
push:
55
branches:
66
- main
7+
- next
78
tags:
89
- v*.*.*
910
pull_request:
1011
branches:
1112
- main
13+
- next
1214
# schedule:
1315
# - cron: "0 3 * * *"
1416

@@ -21,7 +23,7 @@ jobs:
2123
strategy:
2224
fail-fast: false
2325
matrix:
24-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
26+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2527
steps:
2628
- name: Checkout repository
2729
uses: actions/checkout@v5
@@ -30,8 +32,7 @@ jobs:
3032
with:
3133
python-version: ${{ matrix.python-version }}
3234
- name: Prepare environment
33-
# https://github.com/pypa/hatch/issues/2193
34-
run: pip3 install hatch 'virtualenv<21'
35+
run: pip3 install hatch
3536
- name: Prepare variables
3637
run: cp .env.example .env
3738
- name: Prepare secrets
@@ -116,7 +117,7 @@ jobs:
116117
# Deploy
117118

118119
deploy:
119-
if: github.event_name == 'push'
120+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
120121
runs-on: ubuntu-latest
121122
steps:
122123
- name: Checkout repository

docs/getting-started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Let's get started with Frictionless! We will learn how to install and use the fr
99

1010
## Installation
1111

12-
> The framework requires Python3.8+. Versioning follows the [SemVer Standard](https://semver.org/).
12+
> The framework requires Python3.10+. Versioning follows the [SemVer
13+
Standard](https://semver.org/).
1314

1415
```bash tabs=CLI
1516
pip install frictionless

frictionless/conftest.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@
88
# TODO: stop using the Bugs section in the tests and split them among themed categories?
99

1010

11-
# Cleanups
12-
13-
try:
14-
# For python 3.8 only, that does not support pytest_cov v7
15-
from pytest_cov.embed import cleanup_on_sigterm # type: ignore
16-
17-
cleanup_on_sigterm()
18-
except ImportError:
19-
pass
20-
21-
2211
# Fixtures
2312

2413

frictionless/formats/csv/__spec__/test_parser.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import pytest
42

53
from frictionless import Detector, Dialect, formats, platform
@@ -108,7 +106,6 @@ def test_csv_parser_buffer():
108106

109107

110108
@pytest.mark.vcr
111-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
112109
def test_csv_parser_remote():
113110
with TableResource(path=BASEURL % "data/table.csv") as resource:
114111
assert resource.header == ["id", "name"]

frictionless/formats/json/parsers/__spec__/test_json.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import json
2-
import sys
32

43
import pytest
54

@@ -67,7 +66,6 @@ def test_json_parser_from_buffer_keyed():
6766

6867

6968
@pytest.mark.vcr
70-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
7169
def test_json_parser_from_remote():
7270
with TableResource(path=BASEURL % "data/table.json") as resource:
7371
assert resource.header == ["id", "name"]
@@ -78,7 +76,6 @@ def test_json_parser_from_remote():
7876

7977

8078
@pytest.mark.vcr
81-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
8279
def test_json_parser_from_remote_keyed():
8380
with TableResource(path=BASEURL % "data/table.keyed.json") as resource:
8481
assert resource.dialect.to_descriptor() == {"json": {"keyed": True}}

frictionless/formats/zip/__spec__/test_adapter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import sys
32
import zipfile
43

54
import pytest
@@ -40,7 +39,6 @@ def test_zip_adapter_to_zip_resource_path(tmpdir):
4039

4140

4241
@pytest.mark.vcr
43-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
4442
def test_zip_adapter_to_zip_resource_remote_path(tmpdir):
4543
path = os.path.join(tmpdir, "package.zip")
4644
source = Package(resources=[Resource(path=BASEURL % "data/table.csv")])

frictionless/package/__spec__/test_general.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
import textwrap
32
from collections.abc import Mapping
43
from importlib import import_module
@@ -127,7 +126,6 @@ def test_package_from_path_error_bad_json_not_dict():
127126

128127

129128
@pytest.mark.vcr
130-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
131129
def test_package_from_path_remote():
132130
package = Package.from_descriptor(BASEURL % "data/package.json")
133131
assert package.basepath == BASEURL % "data"
@@ -316,7 +314,6 @@ def test_package_validation_duplicate_resource_names_issue_942():
316314

317315

318316
@pytest.mark.vcr
319-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
320317
def test_package_remote_scheme_regression_for_resources_issue_1388():
321318
package = Package.from_descriptor(
322319
"https://raw.githubusercontent.com/fdtester/test-write-package-with-dialect/main/datapackage.json"
@@ -326,7 +323,6 @@ def test_package_remote_scheme_regression_for_resources_issue_1388():
326323

327324

328325
@pytest.mark.vcr
329-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
330326
def test_package_remote_windows_1505():
331327
url = "https://raw.githubusercontent.com/transparencia-mg/datapackage-reprex/foreign-key-constraint/datapackage.json"
332328
package = Package(url)

frictionless/package/__spec__/test_profile.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import pytest
42
import yaml
53

@@ -9,7 +7,6 @@
97

108

119
@pytest.mark.vcr
12-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
1310
def test_package_profiles_invalid_local():
1411
profile = "data/profiles/camtrap.json"
1512
resource = Resource(name="table", path="data/table.csv")
@@ -23,7 +20,6 @@ def test_package_profiles_invalid_local():
2320

2421

2522
@pytest.mark.vcr
26-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
2723
def test_package_profiles_invalid_local_from_descriptor():
2824
profile = "data/profiles/camtrap.json"
2925
resource = Resource(name="table", path="data/table.csv")
@@ -84,7 +80,6 @@ def test_package_profile_type(profile):
8480

8581

8682
@pytest.mark.vcr
87-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
8883
def test_package_profiles_from_descriptor_standards_v1():
8984
profile = "data/profiles/camtrap.json"
9085
resource = Resource(name="table", path="data/table.csv")
@@ -114,8 +109,7 @@ def test_package_profiles_to_descriptor_standards_v1():
114109

115110

116111
def test_package_preserver_profile_issue_1480():
117-
descriptor = yaml.safe_load(
118-
"""
112+
descriptor = yaml.safe_load("""
119113
profile: tabular-data-package
120114
resources:
121115
-
@@ -126,16 +120,14 @@ def test_package_preserver_profile_issue_1480():
126120
mediatype: text/csv
127121
encoding: utf-8
128122
schema: schema.json
129-
"""
130-
)
123+
""")
131124
package = Package(descriptor)
132125
assert package.profile == "tabular-data-package"
133126
assert package.get_resource("some-table").profile == "tabular-data-resource"
134127

135128

136129
def test_package_profile_tabular_requirements_issue_1484():
137-
descriptor = yaml.safe_load(
138-
"""
130+
descriptor = yaml.safe_load("""
139131
profile: tabular-data-package
140132
resources:
141133
-
@@ -145,8 +137,7 @@ def test_package_profile_tabular_requirements_issue_1484():
145137
mediatype: text/csv
146138
encoding: utf-8
147139
schema: schema.json
148-
"""
149-
)
140+
""")
150141
report = Package.validate_descriptor(descriptor)
151142
assert report.flatten(["type", "note"]) == [
152143
[
@@ -157,8 +148,7 @@ def test_package_profile_tabular_requirements_issue_1484():
157148

158149

159150
def test_package_profile_tabular_requirements_schema_issue_1484():
160-
descriptor = yaml.safe_load(
161-
"""
151+
descriptor = yaml.safe_load("""
162152
profile: tabular-data-package
163153
resources:
164154
-
@@ -168,8 +158,7 @@ def test_package_profile_tabular_requirements_schema_issue_1484():
168158
format: csv
169159
mediatype: text/csv
170160
encoding: utf-8
171-
"""
172-
)
161+
""")
173162
report = Package.validate_descriptor(descriptor)
174163
assert report.flatten(["type", "note"]) == [
175164
[

frictionless/package/__spec__/test_security.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import pytest
42

53
from frictionless import FrictionlessException, Package, Resource, platform, system
@@ -46,7 +44,6 @@ def test_package_external_profile_invalid_local_from_descriptor_unsafe():
4644

4745

4846
@pytest.mark.vcr
49-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
5047
def test_package_external_profile_invalid_local_from_descriptor_unsafe_trusted():
5148
profile = "data/../data/profiles/camtrap.json"
5249
resource = Resource(name="table", path="data/table.csv")

frictionless/resource/__spec__/test_dereference.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import pytest
42

53
from frictionless import Resource, platform
@@ -61,7 +59,6 @@ def test_resource_dialect_schema_from_path():
6159

6260

6361
@pytest.mark.vcr
64-
@pytest.mark.skipif(sys.version_info < (3, 10), reason="pytest-vcr bug in Python3.8/9")
6562
@pytest.mark.skipif(platform.type == "windows", reason="Fix on Windows")
6663
def test_resource_dialect_schema_from_path_remote():
6764
resource = Resource(BASEURL % "data/resource-with-dereferencing.json")

0 commit comments

Comments
 (0)