From e8c5b465ea0b930c1a2f5e0b19ec8339d53f4425 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Wed, 5 Feb 2025 15:16:48 +0000 Subject: [PATCH] add maturin as a dev dependency --- pyproject.toml | 57 +++++++++++++++++++------------------------------- uv.lock | 10 +++++++-- 2 files changed, 29 insertions(+), 38 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 521c110df..aa1f29011 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,17 +1,12 @@ [build-system] -requires = [ - 'maturin>=1,<2', - 'typing-extensions >=4.6.0,!=4.7.0' -] +requires = ['maturin>=1,<2', 'typing-extensions >=4.6.0,!=4.7.0'] build-backend = 'maturin' [project] name = 'pydantic_core' description = "Core functionality for Pydantic validation and serialization" requires-python = '>=3.9' -authors = [ - {name = 'Samuel Colvin', email = 's@muelcolvin.com'} -] +authors = [{ name = 'Samuel Colvin', email = 's@muelcolvin.com' }] classifiers = [ 'Development Status :: 3 - Alpha', 'Programming Language :: Python', @@ -32,15 +27,8 @@ classifiers = [ 'Operating System :: MacOS', 'Typing :: Typed', ] -dependencies = [ - 'typing-extensions >=4.6.0,!=4.7.0' -] -dynamic = [ - 'description', - 'license', - 'readme', - 'version' -] +dependencies = ['typing-extensions >=4.6.0,!=4.7.0'] +dynamic = ['description', 'license', 'readme', 'version'] [project.urls] Homepage = 'https://github.com/pydantic/pydantic-core' @@ -48,7 +36,9 @@ Funding = 'https://github.com/sponsors/samuelcolvin' Source = 'https://github.com/pydantic/pydantic-core' [dependency-groups] +dev = ["maturin"] testing = [ + { include-group = "dev" }, 'backports.zoneinfo; python_version < "3.9"', 'coverage', 'dirty-equals', @@ -70,26 +60,18 @@ testing = [ 'tzdata', 'typing_extensions', ] -linting = [ - 'griffe', - 'pyright', - 'ruff', - 'mypy', -] -wasm = [ - 'typing_extensions', - 'maturin>=1,<2', - 'ruff', -] +linting = [{ include-group = "dev" }, 'griffe', 'pyright', 'ruff', 'mypy'] +wasm = [{ include-group = "dev" }, 'typing_extensions', 'ruff'] codspeed = [ # codspeed is only run on CI, with latest version of CPython 'pytest-codspeed; python_version == "3.13" and implementation_name == "cpython"', ] all = [ - { include-group = 'testing' }, - { include-group = 'linting' }, - { include-group = 'wasm' }, + { include-group = "dev" }, + { include-group = 'testing' }, + { include-group = 'linting' }, + { include-group = 'wasm' }, ] [tool.maturin] @@ -105,9 +87,9 @@ target-version = 'py39' [tool.ruff.lint] extend-select = ['Q', 'RUF100', 'C90', 'I', 'UP'] extend-ignore = [ - 'E721', # using type() instead of isinstance() - we use this in tests + 'E721', # using type() instead of isinstance() - we use this in tests ] -flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'} +flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' } mccabe = { max-complexity = 13 } isort = { known-first-party = ['pydantic_core', 'tests'] } @@ -130,10 +112,13 @@ timeout = 30 xfail_strict = true # min, max, mean, stddev, median, iqr, outliers, ops, rounds, iterations addopts = [ - '--benchmark-columns', 'min,mean,stddev,outliers,rounds,iterations', - '--benchmark-group-by', 'group', - '--benchmark-warmup', 'on', - '--benchmark-disable', # this is enable by `make benchmark` when you actually want to run benchmarks + '--benchmark-columns', + 'min,mean,stddev,outliers,rounds,iterations', + '--benchmark-group-by', + 'group', + '--benchmark-warmup', + 'on', + '--benchmark-disable', # this is enable by `make benchmark` when you actually want to run benchmarks ] [tool.coverage.run] diff --git a/uv.lock b/uv.lock index c6b53ad7c..3e936fef1 100644 --- a/uv.lock +++ b/uv.lock @@ -596,6 +596,9 @@ all = [ codspeed = [ { name = "pytest-codspeed", marker = "python_full_version == '3.13.*' and implementation_name == 'cpython'" }, ] +dev = [ + { name = "maturin" }, +] linting = [ { name = "griffe" }, { name = "mypy" }, @@ -608,6 +611,7 @@ testing = [ { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, { name = "hypothesis" }, { name = "inline-snapshot" }, + { name = "maturin" }, { name = "numpy", version = "2.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10' and implementation_name == 'cpython' and platform_machine == 'x86_64'" }, { name = "numpy", version = "2.2.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10' and python_full_version < '3.13' and implementation_name == 'cpython' and platform_machine == 'x86_64'" }, { name = "pandas", marker = "python_full_version < '3.13' and implementation_name == 'cpython' and platform_machine == 'x86_64'" }, @@ -639,7 +643,7 @@ all = [ { name = "griffe" }, { name = "hypothesis" }, { name = "inline-snapshot" }, - { name = "maturin", specifier = ">=1,<2" }, + { name = "maturin" }, { name = "mypy" }, { name = "numpy", marker = "python_full_version >= '3.9' and python_full_version < '3.13' and implementation_name == 'cpython' and platform_machine == 'x86_64'" }, { name = "pandas", marker = "python_full_version >= '3.9' and python_full_version < '3.13' and implementation_name == 'cpython' and platform_machine == 'x86_64'" }, @@ -656,6 +660,7 @@ all = [ { name = "tzdata" }, ] codspeed = [{ name = "pytest-codspeed", marker = "python_full_version == '3.13.*' and implementation_name == 'cpython'" }] +dev = [{ name = "maturin" }] linting = [ { name = "griffe" }, { name = "mypy" }, @@ -669,6 +674,7 @@ testing = [ { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, { name = "hypothesis" }, { name = "inline-snapshot" }, + { name = "maturin" }, { name = "numpy", marker = "python_full_version >= '3.9' and python_full_version < '3.13' and implementation_name == 'cpython' and platform_machine == 'x86_64'" }, { name = "pandas", marker = "python_full_version >= '3.9' and python_full_version < '3.13' and implementation_name == 'cpython' and platform_machine == 'x86_64'" }, { name = "pytest" }, @@ -682,7 +688,7 @@ testing = [ { name = "tzdata" }, ] wasm = [ - { name = "maturin", specifier = ">=1,<2" }, + { name = "maturin" }, { name = "ruff" }, { name = "typing-extensions" }, ]