diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0837335..7ed807b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10"] + python_version: ["3.9", "3.10", "3.11", "3.12", "pypy3.10"] runs-on: ${{ matrix.os }} steps: diff --git a/README.md b/README.md index 9fe6858..556ea08 100644 --- a/README.md +++ b/README.md @@ -270,16 +270,6 @@ For convenience, some custom types are provided: from marshmallow_dataclass.typing import Email, Url ``` -When using Python 3.8, you must import `Annotated` from the typing_extensions package - -```python -# Version agnostic import code: -if sys.version_info >= (3, 9): - from typing import Annotated -else: - from typing_extensions import Annotated -``` - ### Custom NewType declarations [__deprecated__] > NewType is deprecated in favor or type aliases using Annotated, as described above. diff --git a/pyproject.toml b/pyproject.toml index 49e683c..f9a8cd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 88 -target-version = ['py36', 'py37', 'py38', 'py39', 'py310', 'py310'] +target-version = ['py39', 'py310', 'py310'] [tool.pytest.ini_options] filterwarnings = [ diff --git a/setup.py b/setup.py index 6aba575..9a17731 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,6 @@ "Operating System :: OS Independent", "License :: OSI Approved :: MIT License", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -45,7 +44,7 @@ keywords=["marshmallow", "dataclass", "serialization"], classifiers=CLASSIFIERS, license="MIT", - python_requires=">=3.8", + python_requires=">=3.9", install_requires=[ "marshmallow>=3.18.0,", "typing-inspect>=0.9.0", diff --git a/tests/test_mypy.yml b/tests/test_mypy.yml index 479abd5..4767319 100644 --- a/tests/test_mypy.yml +++ b/tests/test_mypy.yml @@ -6,7 +6,7 @@ follow_imports = silent plugins = marshmallow_dataclass.mypy show_error_codes = true - python_version = 3.8 + python_version = 3.9 env: - PYTHONPATH=. main: | @@ -27,7 +27,7 @@ reveal_type(user.email) # N: Revealed type is "builtins.str" User(id=42, email="user@email.com") # E: Argument "id" to "User" has incompatible type "int"; expected "str" [arg-type] - User(id="a"*32, email=["not", "a", "string"]) # E: Argument "email" to "User" has incompatible type "List[str]"; expected "str" [arg-type] + User(id="a"*32, email=["not", "a", "string"]) # E: Argument "email" to "User" has incompatible type "list[str]"; expected "str" [arg-type] - case: marshmallow_dataclass_keyword_arguments mypy_config: | follow_imports = silent