Skip to content

Commit ee3a6bc

Browse files
authored
Merge pull request #128 from life4/py312
Drop Python 3.7 support
2 parents e39f52c + 54cfb28 commit ee3a6bc

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
32+
python-version:
33+
- "3.8"
34+
- "3.9"
35+
- "3.10"
36+
- "3.11"
37+
# - "3.12.0-rc.1"
3338
steps:
3439
- uses: actions/checkout@v3
3540
- uses: actions/setup-python@v4

pyproject.toml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ author = "Gram"
99
author-email = "gram@orsinium.dev"
1010
home-page = "https://github.com/life4/deal"
1111
description-file = "README.md"
12-
requires-python = ">=3.7"
12+
requires-python = ">=3.8"
1313
keywords = "deal,contracts,pre,post,invariant,decorators,validation,pythonic,functional"
1414
requires = []
15-
classifiers=[
15+
classifiers = [
1616
"Development Status :: 5 - Production/Stable",
1717
"Environment :: Plugins",
1818
"Intended Audience :: Developers",
@@ -25,19 +25,19 @@ classifiers=[
2525

2626
[tool.flit.metadata.requires-extra]
2727
all = [
28-
"astroid>=2.11.0",
29-
"deal-solver",
30-
"hypothesis",
31-
"pygments",
32-
"typeguard>=3.0.0",
33-
"vaa>=0.2.1",
28+
"astroid>=2.11.0", # for tyupe inference in linter
29+
"deal-solver", # for formal verification
30+
"hypothesis", # for test generation
31+
"pygments", # for syntax highlighting in exceptions
32+
"typeguard>=3.0.0", # for runtime type checking in tests
33+
"vaa>=0.2.1", # for supporting schemes (like marshmallow) as validators
3434
]
35-
integration = [ # integration tests
35+
integration = [ # integration tests
3636
"astroid>=2.11.0",
3737
"deal-solver",
3838
"hypothesis",
3939
"pygments",
40-
"typeguard",
40+
"typeguard<4.0.0",
4141
"vaa>=0.2.1",
4242
"sphinx>=4.5.0",
4343
"flake8",
@@ -64,12 +64,12 @@ lint = [
6464
"deal-solver",
6565
"hypothesis",
6666
"pygments",
67-
"typeguard",
67+
"typeguard<4.0.0",
6868
]
6969
docs = [
70-
"m2r2",
71-
"myst-parser",
72-
"sphinx==3.5.*",
70+
"m2r2", # markdown support in docstrings for sphinx
71+
"myst-parser", # markdown support for dcs in sphinx
72+
"sphinx==3.5.*", # documentation
7373
"sphinx-rtd-theme==0.5.*",
7474
]
7575

@@ -87,13 +87,8 @@ addopts = [
8787

8888
[tool.coverage.run]
8989
branch = true
90-
omit = [
91-
"deal/linter/_template.py",
92-
"deal/mypy.py",
93-
]
94-
plugins = [
95-
"coverage_conditional_plugin",
96-
]
90+
omit = ["deal/linter/_template.py", "deal/mypy.py"]
91+
plugins = ["coverage_conditional_plugin"]
9792

9893
[tool.coverage.report]
9994
exclude_lines = [
@@ -111,7 +106,7 @@ has-astroid = "not is_installed('astroid')"
111106

112107
[tool.mypy]
113108
files = ["deal"]
114-
python_version = 3.7
109+
python_version = 3.8
115110
plugins = ["deal.mypy"]
116111
ignore_missing_imports = true
117112
show_error_codes = true
@@ -136,4 +131,3 @@ lines_after_imports = 2
136131
skip = ".venvs/"
137132
multi_line_output = 5
138133
include_trailing_comma = true
139-

tests/test_schemes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
except ImportError:
1111
vaa = None
1212

13-
MarshMallowScheme = None
14-
if vaa is not None:
13+
MarshMallowScheme: object | None
14+
if vaa is None:
15+
MarshMallowScheme = None
16+
else:
1517
import marshmallow
1618

1719
@vaa.marshmallow

0 commit comments

Comments
 (0)