Skip to content
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
10 changes: 2 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.10"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.11"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -29,13 +29,7 @@ jobs:
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
# FIXME: Make tox.ini compatible with newer versions of tox
python -m pip install --upgrade virtualenv 'tox<4' tox-gh-actions
run: python -m pip install --upgrade pip tox tox-gh
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox"

Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ repos:
rev: "7.3.0"
hooks:
- id: flake8
additional_dependencies: [flake8-pyproject]
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py36-plus]
args: [--py310-plus]
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


Reg: Clever Dispatch
====================
********************

Reg is a Python library that provides generic function support to
Python. It help you build powerful registration and configuration APIs
Expand Down
5 changes: 2 additions & 3 deletions develop_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# development
-e '.[test,coverage,pep8,docs]'
-e '.[test,coverage,lint,docs]'
pre-commit
# FIXME: Make tox.ini compatible with newer versions of tox
tox >= 2.4.1, < 4
tox >= 4
radon

# releaser
Expand Down
4 changes: 2 additions & 2 deletions doc/developing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ You can run all tox tests with::

You can also specify a test environment to run e.g.::

$ tox -e py37
$ tox -e pep8
$ tox -e py311
$ tox -e lint
$ tox -e docs

To run a simple performance test you can use::
Expand Down
121 changes: 121 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "reg"
version = "0.13.dev0"
dynamic = ["readme"]
description = "Clever dispatch"
license = "BSD-3-Clause"
license-files = ["LICENSE.txt"]
authors = [{name = "Martijn Faassen", email = "faassen@startifact.com"}]
maintainers = [{name = "Henri Hulski", email = "henri@sancode.it"}]
classifiers = [
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: PyPy",
"Development Status :: 5 - Production/Stable",
]
requires-python = ">= 3.10"
dependencies = ["repoze.lru"]

[project.urls]
Documentation = "https://reg.readthedocs.io"
Repository = "https://github.com/morepath/reg"
Issues = "https://github.com/morepath/reg/issues"
Changelog = "https://github.com/morepath/reg/blob/master/CHANGES.txt"

[project.optional-dependencies]
test = ["pytest >= 8", "pytest-env", "sphinx"]
docs = ["sphinx"]
coverage = ["pytest-cov"]
lint = ["black", "flake8", "flake8-pyproject"]

[tool.setuptools.packages]
find = {}

[tool.setuptools.dynamic]
readme = {file = ["README.rst", "CHANGES.txt"]}

[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["reg"]
addopts = ["-vv"]
env = ["RUN_ENV=test"]

[tool.coverage.run]
omit = ["reg/tests/*"]
source = ["reg"]

[tool.coverage.report]
show_missing = true

[tool.flake8]
show-source = true
ignore = ["E203", "E731", "W503"]
max-line-length = 88

[tool.tox]
requires = ["tox>=4"]
env_list = [
"py310",
"py311",
"py312",
"py313",
"py314",
"pypy3",
"coverage",
"pre-commit",
"docs",
"perf",
]
skip_missing_interpreters = true

[tool.tox.gh.python]
"3.10" = ["py310", "perf"]
"3.11" = ["py311"]
"3.12" = ["py312"]
"3.13" = ["py313"]
"3.14" = ["py314", "pre-commit", "coverage"]
"pypy-3.11" = ["pypy3"]

[tool.tox.env_run_base]
package = "editable"
extras = ["test"]
commands = [["pytest", "{posargs:reg}"]]

[tool.tox.env.coverage]
base_python = ["python3"]
extras = ["test", "coverage"]
commands = [
["pytest", "--cov", "--cov-fail-under=100", "{posargs:reg}"],
]

[tool.tox.env.pre-commit]
base_python = ["python3"]
package = "skip"
deps = ["pre-commit"]
commands = [
["pre-commit", "run", "--all-files"],
]

[tool.tox.env.docs]
base_python = ["python3"]
extras = ["docs"]
commands = [
["sphinx-build", "-b", "doctest", "doc", "{env_tmp_dir}"],
]

[tool.tox.env.perf]
base_python = ["python3"]
extras = []
commands = [
["python", "{toxinidir}/tox_perf.py"],
]
2 changes: 1 addition & 1 deletion reg/arginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def get_signature(callable): # pragma: no cover
return inspect.signature(callable)

else:
from annotationlib import Format
from annotationlib import Format # pragma: no cover

def get_signature(callable): # pragma: no cover
"""A compatibility wrapper for `inspect.signature`."""
Expand Down
20 changes: 0 additions & 20 deletions setup.cfg

This file was deleted.

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

48 changes: 0 additions & 48 deletions tox.ini

This file was deleted.