Skip to content

Commit c46cb77

Browse files
committed
Drop Python 3.9
1 parent 536f8b5 commit c46cb77

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

.github/workflows/build-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
- { name: "3.9-ma3", python: "3.9", tox: py39-marshmallow3 }
18+
- { name: "3.10-ma3", python: "3.10", tox: py310-marshmallow3 }
1919
- { name: "3.13-ma3", python: "3.13", tox: py313-marshmallow3 }
20-
- { name: "3.9-ma4", python: "3.9", tox: py39-marshmallow4 }
20+
- { name: "3.10-ma4", python: "3.10", tox: py310-marshmallow4 }
2121
- { name: "3.13-ma4", python: "3.13", tox: py313-marshmallow4 }
22-
- { name: "lowest", python: "3.9", tox: py39-lowest }
22+
- { name: "lowest", python: "3.10", tox: py310-lowest }
2323
- { name: "3.13-madev", python: "3.13", tox: py313-marshmallowdev }
2424
steps:
2525
- uses: actions/checkout@v5.0.0

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ classifiers = [
1414
"Intended Audience :: Developers",
1515
"License :: OSI Approved :: MIT License",
1616
"Programming Language :: Python :: 3",
17-
"Programming Language :: Python :: 3.9",
1817
"Programming Language :: Python :: 3.10",
1918
"Programming Language :: Python :: 3.11",
2019
"Programming Language :: Python :: 3.12",
@@ -31,7 +30,7 @@ keywords = [
3130
"rest",
3231
"api",
3332
]
34-
requires-python = ">=3.9"
33+
requires-python = ">=3.10"
3534
dependencies = ["packaging>=21.3"]
3635

3736
[project.urls]

tests/test_ext_marshmallow.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import importlib.metadata
12
import json
2-
import sys
33

44
import pytest
55
from marshmallow import Schema
@@ -13,6 +13,7 @@
1313
String,
1414
TimeDelta,
1515
)
16+
from packaging.version import Version
1617

1718
from apispec import APISpec
1819
from apispec.exceptions import APISpecError
@@ -37,6 +38,8 @@
3738
get_schemas,
3839
)
3940

41+
MA_VERSION = Version(importlib.metadata.version("marshmallow"))
42+
4043

4144
class TestDefinitionHelper:
4245
@pytest.mark.parametrize("schema", [PetSchema, PetSchema()])
@@ -1258,15 +1261,16 @@ def test_self_referencing_field_many(self, spec):
12581261
class TestFieldOrdering:
12591262
def test_field_order_preserved(self, spec):
12601263
class OrderedSchema(Schema):
1264+
if (MA_VERSION.major == 3) and (MA_VERSION.minor < 26):
1265+
1266+
class Meta:
1267+
ordered = True
1268+
12611269
field1 = Int()
12621270
field2 = Int()
12631271
field3 = Int()
12641272
field4 = Int()
12651273
field5 = Int()
1266-
if sys.version_info < (3, 10):
1267-
1268-
class Meta:
1269-
ordered = True
12701274

12711275
spec.components.schema("Ordered", schema=OrderedSchema)
12721276
result = get_schemas(spec)["Ordered"]["properties"]

tox.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
[tox]
22
envlist=
33
lint
4-
py{39,310,311,312,313}-marshmallow3
5-
py{39,313}-marshmallow4
4+
py{310,311,312,313}-marshmallow{3,4}
65
py313-marshmallowdev
7-
py39-lowest
6+
py310-lowest
87
docs
98

109
[testenv]
1110
extras = tests
1211
deps =
13-
marshmallow3: marshmallow>=3.10.0,<4.0.0
12+
marshmallow3: marshmallow>=3.18.0,<4.0.0
1413
marshmallowdev: https://github.com/marshmallow-code/marshmallow/archive/dev.tar.gz
1514
lowest: marshmallow==3.18.0
1615
commands = pytest {posargs}

0 commit comments

Comments
 (0)