diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7442233a..4737659b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9] + python: [2.7, 3.6, 3.7, 3.8, 3.9] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/docs/changelog.rst b/docs/changelog.rst index d8f324ef..1efa4569 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,11 @@ importlib_resources NEWS ========================== +v3.3.0 +====== + +* #107: Drop support for Python 3.5. Now requires Python 2.7 or 3.6+. + v3.2.0 ====== diff --git a/importlib_resources/_py3.py b/importlib_resources/_py3.py index 7aa2773f..ffeb616d 100644 --- a/importlib_resources/_py3.py +++ b/importlib_resources/_py3.py @@ -1,5 +1,4 @@ import os -import sys import io from . import _common @@ -12,16 +11,13 @@ from typing import cast from typing.io import BinaryIO, TextIO from collections.abc import Sequence -from ._compat import singledispatch +from functools import singledispatch if False: # TYPE_CHECKING from typing import ContextManager Package = Union[ModuleType, str] -if sys.version_info >= (3, 6): - Resource = Union[str, os.PathLike] # pragma: <=35 -else: - Resource = str # pragma: >=36 +Resource = Union[str, os.PathLike] def open_binary(package: Package, resource: Resource) -> BinaryIO: diff --git a/setup.cfg b/setup.cfg index 9eddc83e..916040f9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ project_urls = [options] packages = find: include_package_data = true -python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* +python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.* install_requires = pathlib2; python_version < '3' typing; python_version < '3.5'