Skip to content

Commit

Permalink
Merge pull request #128 from life4/py312
Browse files Browse the repository at this point in the history
Drop Python 3.7 support
  • Loading branch information
orsinium authored Aug 18, 2023
2 parents e39f52c + 54cfb28 commit ee3a6bc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
# - "3.12.0-rc.1"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
40 changes: 17 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ author = "Gram"
author-email = "[email protected]"
home-page = "https://github.com/life4/deal"
description-file = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
keywords = "deal,contracts,pre,post,invariant,decorators,validation,pythonic,functional"
requires = []
classifiers=[
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Plugins",
"Intended Audience :: Developers",
Expand All @@ -25,19 +25,19 @@ classifiers=[

[tool.flit.metadata.requires-extra]
all = [
"astroid>=2.11.0",
"deal-solver",
"hypothesis",
"pygments",
"typeguard>=3.0.0",
"vaa>=0.2.1",
"astroid>=2.11.0", # for tyupe inference in linter
"deal-solver", # for formal verification
"hypothesis", # for test generation
"pygments", # for syntax highlighting in exceptions
"typeguard>=3.0.0", # for runtime type checking in tests
"vaa>=0.2.1", # for supporting schemes (like marshmallow) as validators
]
integration = [ # integration tests
integration = [ # integration tests
"astroid>=2.11.0",
"deal-solver",
"hypothesis",
"pygments",
"typeguard",
"typeguard<4.0.0",
"vaa>=0.2.1",
"sphinx>=4.5.0",
"flake8",
Expand All @@ -64,12 +64,12 @@ lint = [
"deal-solver",
"hypothesis",
"pygments",
"typeguard",
"typeguard<4.0.0",
]
docs = [
"m2r2",
"myst-parser",
"sphinx==3.5.*",
"m2r2", # markdown support in docstrings for sphinx
"myst-parser", # markdown support for dcs in sphinx
"sphinx==3.5.*", # documentation
"sphinx-rtd-theme==0.5.*",
]

Expand All @@ -87,13 +87,8 @@ addopts = [

[tool.coverage.run]
branch = true
omit = [
"deal/linter/_template.py",
"deal/mypy.py",
]
plugins = [
"coverage_conditional_plugin",
]
omit = ["deal/linter/_template.py", "deal/mypy.py"]
plugins = ["coverage_conditional_plugin"]

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

[tool.mypy]
files = ["deal"]
python_version = 3.7
python_version = 3.8
plugins = ["deal.mypy"]
ignore_missing_imports = true
show_error_codes = true
Expand All @@ -136,4 +131,3 @@ lines_after_imports = 2
skip = ".venvs/"
multi_line_output = 5
include_trailing_comma = true

6 changes: 4 additions & 2 deletions tests/test_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
except ImportError:
vaa = None

MarshMallowScheme = None
if vaa is not None:
MarshMallowScheme: object | None
if vaa is None:
MarshMallowScheme = None
else:
import marshmallow

@vaa.marshmallow
Expand Down

0 comments on commit ee3a6bc

Please sign in to comment.