From 10f490c592923901263b9e04f225052ceaf7f778 Mon Sep 17 00:00:00 2001 From: jasle Date: Fri, 10 May 2024 01:21:16 +0200 Subject: [PATCH] Changed supported python versions to 3.8-3.12 --- .github/workflows/python-package.yml | 5 +---- README.md | 3 +-- setup.py | 26 ++++++++------------------ tests/test_union.py | 4 ---- 4 files changed, 10 insertions(+), 28 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 90b6f7e..4b3f4c4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -12,10 +12,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python_version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.10"] - include: - - os: "ubuntu-20.04" - python_version: "3.6" + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10"] runs-on: ${{ matrix.os }} steps: diff --git a/README.md b/README.md index cbc7bea..3cca3f0 100644 --- a/README.md +++ b/README.md @@ -56,11 +56,10 @@ pip3 install marshmallow-dataclass You may optionally install the following extras: -- `enum` : enum support for marshmallow versions <3.18 [marshmallow-enum](https://github.com/justanr/marshmallow_enum). - `union` : for translating python [`Union` types](https://docs.python.org/3/library/typing.html#typing.Union) to union fields. ```shell -pip3 install "marshmallow-dataclass[enum,union]" +pip3 install "marshmallow-dataclass[union]" ``` ### marshmallow 2 support diff --git a/setup.py b/setup.py index 0d34ddd..243ccd2 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = "8.6.1" +VERSION = "9.0.0" CLASSIFIERS = [ "Development Status :: 4 - Beta", @@ -8,23 +8,17 @@ "Operating System :: OS Independent", "License :: OSI Approved :: MIT License", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", ] EXTRAS_REQUIRE = { - "enum": [ - "marshmallow-enum; python_version < '3.7'", - "marshmallow>=3.18.0,<4.0; python_version >= '3.7'", - ], - "union": ["typeguard>=2.4.1,<5.0.0"], + "union": ["typeguard~=4.0.0"], "lint": ["pre-commit~=2.17"], - ':python_version == "3.6"': ["dataclasses", "types-dataclasses<0.6.4"], "docs": ["sphinx"], "tests": [ "pytest>=5.4", @@ -34,8 +28,7 @@ ], } EXTRAS_REQUIRE["dev"] = ( - EXTRAS_REQUIRE["enum"] - + EXTRAS_REQUIRE["union"] + EXTRAS_REQUIRE["union"] + EXTRAS_REQUIRE["lint"] + EXTRAS_REQUIRE["docs"] + EXTRAS_REQUIRE["tests"] @@ -56,15 +49,12 @@ keywords=["marshmallow", "dataclass", "serialization"], classifiers=CLASSIFIERS, license="MIT", - python_requires=">=3.6", + python_requires=">=3.8", install_requires=[ - "marshmallow>=3.13.0,<4.0", - "typing-inspect>=0.8.0,<1.0", - # Need `Literal` - "typing-extensions>=3.7.2; python_version < '3.8'", + "marshmallow>=3.18.0,", + "typing-inspect~=0.9.0", # Need `dataclass_transform(field_specifiers)` - # NB: typing-extensions>=4.2.0 conflicts with python 3.6 - "typing-extensions>=4.2.0; python_version<'3.11' and python_version>='3.7'", + "typing-extensions>=4.2.0; python_version<'3.11'", ], extras_require=EXTRAS_REQUIRE, package_data={"marshmallow_dataclass": ["py.typed"]}, diff --git a/tests/test_union.py b/tests/test_union.py index 888d78c..20026ca 100644 --- a/tests/test_union.py +++ b/tests/test_union.py @@ -197,10 +197,6 @@ class PEP604IntOrStr: data_in = {"value": 42} self.assertEqual(schema.dump(schema.load(data_in)), data_in) - @unittest.skipIf( - sys.version_info < (3, 7, 4), - "Requires typeguard >=4.0.0 not available for py<3.7.4", - ) def test_union_with_generics(self): IntList = NewType("IntList", List[int])