Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #366 from ltworf/removeobsolete
Browse files Browse the repository at this point in the history
Microsoft decided I must drop support for Python 3.5 and 3.6
  • Loading branch information
ltworf authored Dec 11, 2022
2 parents e5d111e + f43f074 commit b6008d4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Install dependencies
run: pip install mypy types-dataclasses attrs
- name: mypy
run: make MINIMUM_PYTHON_VERSION=3.5 mypy
run: make MINIMUM_PYTHON_VERSION=3.7 mypy
2 changes: 1 addition & 1 deletion .github/workflows/test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12.0-alpha.1']
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12.0-alpha.1']

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.21
====
* Drop support to Python 3.5 and 3.6

2.20
====
* Switch to setuptools
Expand Down
4 changes: 2 additions & 2 deletions docs/comparisons.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In general, the advantages of typedload over competing libraries are:
* Easy to extend, even with objects from 3rd party libraries
* Stable API, breaking changes only happen on major releases (it has happened once since 2018)
* Supports Union properly
* Works on python 3.5
* Works on python 3.5 (typedload <= 2.20)
* Mypy and similar work without plugins
* Can use and convert camelCase and snake_case
* Functional approach
Expand All @@ -26,7 +26,7 @@ It also means that mypy will just work out of the box, rather than requiring plu

Instead, typedload works fine with the type annotations from the `typing` module and will work without requiring any changes to the datatypes.

It also works on python 3.5, so projects running on LTS distributions can use it.
It also works on python 3.5 (until version 2.20), so projects running on LTS distributions can use it.

### It is easy to extend

Expand Down
4 changes: 1 addition & 3 deletions gensetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ def load_version():
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Typing :: Typed',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand Down Expand Up @@ -120,7 +118,7 @@ def load_version():
]
description = "{DESCRIPTION}"
readme = "README.md"
requires-python = ">=3.5"
requires-python = ">=3.7"
classifiers = {CLASSIFIERS!r}
keywords = {KEYWORDS.split(' ')!r}
license = {{file = "LICENSE"}}
Expand Down
5 changes: 2 additions & 3 deletions tests/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@
import sys

print('Running tests using %s' % sys.version)
if sys.version_info.major != 3 or sys.version_info.minor < 5:
if sys.version_info.major != 3 or sys.version_info.minor < 7:
raise Exception('Only version 3.5 and above supported')

if sys.version_info.minor > 5:
if sys.version_info.minor >= 7:
from .test_dataloader import *
from .test_datadumper import *
from .test_dumpload import *
from .test_exceptions import *
if sys.version_info.minor >= 7:
from .test_dataclass import *
from .test_deferred import *
if sys.version_info.minor >= 8:
Expand Down
7 changes: 1 addition & 6 deletions typedload/typechecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,7 @@
]


try:
# Since 3.7
from typing import ForwardRef # type: ignore
except ImportError:
from typing import _ForwardRef as ForwardRef # type: ignore

from typing import ForwardRef

Literal = None # type: Any
_TypedDictMeta = None # type: Any
Expand Down

0 comments on commit b6008d4

Please sign in to comment.