Skip to content

Commit 5579b19

Browse files
authored
Migrate to uv and update python version support (#221)
* Migrate to uv * Update changelog * Update and format pyproject metadata * update email
1 parent a301c99 commit 5579b19

8 files changed

Lines changed: 557 additions & 55 deletions

File tree

.github/dependabot.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
version: 2
22
updates:
3-
- package-ecosystem: pip
3+
- package-ecosystem: uv
44
directory: "/"
55
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
6+
interval: monthly
7+
groups:
8+
all-dependencies:
9+
patterns: ["*"]
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "monthly"
14+
groups:
15+
all-actions:
16+
patterns: ["*"]

.github/workflows/build-release.yml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,30 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
- { name: "3.9", python: "3.9", tox: py39-marshmallow3 }
17-
- { name: "3.13", python: "3.13", tox: py313-marshmallow3 }
18-
- { name: "3.9", python: "3.9", tox: py39-marshmallow4 }
19-
- { name: "3.13", python: "3.13", tox: py313-marshmallow4 }
20-
- { name: "lowest", python: "3.9", tox: py39-lowest }
21-
- { name: "dev", python: "3.13", tox: py313-marshmallowdev }
16+
- { name: "3.10-ma3", tox: py310-marshmallow3 }
17+
- { name: "3.14-ma3", tox: py314-marshmallow3 }
18+
- { name: "3.10-ma4", tox: py310-marshmallow4 }
19+
- { name: "3.14-ma4", tox: py314-marshmallow4 }
20+
- { name: "lowest", tox: py310-lowest }
21+
- { name: "dev", tox: py314-marshmallowdev }
2222
steps:
23-
- uses: actions/checkout@v4.0.0
24-
- uses: actions/setup-python@v5
23+
- uses: actions/checkout@v6
24+
- uses: astral-sh/setup-uv@v7
2525
with:
26-
python-version: ${{ matrix.python }}
27-
- run: python -m pip install tox
28-
- run: python -m tox -e${{ matrix.tox }}
26+
enable-cache: true
27+
- run: uv run tox -e${{ matrix.tox }}
2928
build:
3029
name: Build package
3130
runs-on: ubuntu-latest
3231
steps:
33-
- uses: actions/checkout@v4
34-
- uses: actions/setup-python@v5
32+
- uses: actions/checkout@v6
33+
- uses: astral-sh/setup-uv@v7
3534
with:
36-
python-version: "3.13"
37-
- name: Install pypa/build
38-
run: python -m pip install build
39-
- name: Build a binary wheel and a source tarball
40-
run: python -m build
41-
- name: Install twine
42-
run: python -m pip install twine
43-
- name: Check build
44-
run: python -m twine check --strict dist/*
35+
enable-cache: true
36+
- run: uv build
37+
- run: uvx twine check --strict dist/*
4538
- name: Store the distribution packages
46-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@v7
4740
with:
4841
name: python-package-distributions
4942
path: dist/
@@ -53,13 +46,11 @@ jobs:
5346
if: startsWith(github.ref, 'refs/tags')
5447
runs-on: ubuntu-latest
5548
steps:
56-
- uses: actions/checkout@v4.0.0
57-
- uses: actions/setup-python@v5
49+
- uses: actions/checkout@v6
50+
- uses: astral-sh/setup-uv@v7
5851
with:
59-
python-version: "3.13"
60-
- run: python -m pip install --upgrade pip
61-
- run: python -m pip install tox
62-
- run: python -m tox -e lint
52+
enable-cache: true
53+
- run: uv run tox -e lint
6354
publish-to-pypi:
6455
name: PyPI release
6556
if: startsWith(github.ref, 'refs/tags/')
@@ -72,7 +63,7 @@ jobs:
7263
id-token: write
7364
steps:
7465
- name: Download all the dists
75-
uses: actions/download-artifact@v4
66+
uses: actions/download-artifact@v7
7667
with:
7768
name: python-package-distributions
7869
path: dist/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ coverage.xml
2626
.mypy_cache
2727
.ruff_cache
2828

29+
.venv
2930
.python-version

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ repos:
2020
hooks:
2121
- id: mypy
2222
additional_dependencies: ["marshmallow>=3,<4"]
23+
- repo: https://github.com/astral-sh/uv-pre-commit
24+
rev: 0.10.9
25+
hooks:
26+
- id: uv-lock

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
---------
33

4+
unreleased
5+
**********
6+
7+
Support:
8+
9+
- Support Python 3.10-3.14.
10+
411
3.2.0 (2025-05-08)
512
******************
613

pyproject.toml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@ name = "marshmallow-oneofschema"
33
version = "3.2.0"
44
description = "marshmallow multiplexing schema"
55
readme = "README.rst"
6-
license = { file = "LICENSE" }
6+
license = "MIT"
77
authors = [{ name = "Maxim Kulkin", email = "maxim.kulkin@gmail.com" }]
8-
maintainers = [{ name = "Steven Loria", email = "sloria1@gmail.com" }]
8+
maintainers = [{ name = "Steven Loria", email = "oss@stevenloria.com" }]
99
classifiers = [
10-
"Intended Audience :: Developers",
11-
"License :: OSI Approved :: MIT License",
12-
"Programming Language :: Python :: 3",
13-
"Programming Language :: Python :: 3.9",
14-
"Programming Language :: Python :: 3.10",
15-
"Programming Language :: Python :: 3.11",
16-
"Programming Language :: Python :: 3.12",
17-
"Programming Language :: Python :: 3.13",
10+
"Intended Audience :: Developers",
11+
"Programming Language :: Python :: 3",
12+
"Programming Language :: Python :: 3.10",
13+
"Programming Language :: Python :: 3.11",
14+
"Programming Language :: Python :: 3.12",
15+
"Programming Language :: Python :: 3.13",
16+
"Programming Language :: Python :: 3.14",
1817
]
19-
requires-python = ">=3.9"
18+
requires-python = ">=3.10"
2019
dependencies = ["marshmallow>=3.0.0,<5.0.0"]
2120

2221
[project.urls]
@@ -26,7 +25,10 @@ Source = "https://github.com/marshmallow-code/marshmallow-oneofschema"
2625

2726
[dependency-groups]
2827
tests = ["pytest"]
29-
dev = [{include-group = "tests"}, "tox", "pre-commit>=3.5,<5.0"]
28+
dev = [{ include-group = "tests" }, "tox", "tox-uv", "pre-commit>=3.5,<5.0"]
29+
30+
[tool.uv]
31+
default-groups = ["dev"]
3032

3133

3234
[build-system]
@@ -48,12 +50,12 @@ docstring-code-format = true
4850
[tool.ruff.lint]
4951
ignore = ["E203", "E266", "E501", "E731"]
5052
select = [
51-
"B", # flake8-bugbear
52-
"E", # pycodestyle error
53-
"F", # pyflakes
54-
"I", # isort
55-
"UP", # pyupgrade
56-
"W", # pycodestyle warning
53+
"B", # flake8-bugbear
54+
"E", # pycodestyle error
55+
"F", # pyflakes
56+
"I", # isort
57+
"UP", # pyupgrade
58+
"W", # pycodestyle warning
5759
]
5860

5961
[tool.mypy]

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[tox]
22
envlist=
33
lint
4-
py{39,313}-marshmallow3
5-
py{39,310,311,312,313}-marshmallow4
6-
py313-marshmallowdev
7-
py39-lowest
4+
py{310,314}-marshmallow3
5+
py{310,311,312,313,314}-marshmallow4
6+
py314-marshmallowdev
7+
py310-lowest
88

99
[testenv]
1010
dependency_groups = tests

0 commit comments

Comments
 (0)