Skip to content

Commit a80aae6

Browse files
committed
Bump min Python version from 3.5.4 to 3.7.2
1 parent 09cae76 commit a80aae6

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

.travis.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Config file for automatic testing at travis-ci.com
22

33
language: python
4-
dist: bionic
4+
dist: focal
55

66
matrix:
77
include:
8-
- python: "3.6"
98
- python: "3.7"
109
- python: "3.8"
1110
- python: "3.9"
12-
- python: "pypy3" # Python 3.6.12-7.3.3 as of April 2021
11+
# - python: "pypy3" travis doesn't support pypy on Python 3.7 yet
1312
- python: "3.9"
1413
env: IPFS_VERSION=compat
1514
- python: "3.9"
@@ -20,14 +19,14 @@ matrix:
2019
- python: "3.9"
2120
env: TOXENV=typeck
2221
before_install: ":"
23-
22+
2423
# Testing on macOS/Darwin tends to be much slower so only test the bare minimum
2524
#
2625
# When changing any version here also update the relevant checksum below with
2726
# the values found on the https://python.org/ website.
2827
- os: osx
2928
language: shell
30-
env: PYTHON_VERSION=3.6.8-macosx10.9
29+
env: PYTHON_VERSION=3.7.9-macosx10.9
3130
- os: osx
3231
language: shell
3332
env: PYTHON_VERSION=3.9.0-macosx10.9
@@ -110,7 +109,7 @@ install:
110109
111110
### ====== MODIFY THIS WHEN CHANGING MACOS PYTHON TEST VERSIONS ====== ###
112111
case "${PYTHON_VERSION}" in
113-
3.6.8-macosx10.9) MD5_MACOS="786c4d9183c754f58751d52f509bc971" ;;
112+
3.7.9-macosx10.9) MD5_MACOS="4b544fc0ac8c3cffdb67dede23ddb79e" ;;
114113
3.9.0-macosx10.9) MD5_MACOS="16ca86fa3467e75bade26b8a9703c27f" ;;
115114
esac
116115
### ------------------------------ END ------------------------------- ###

ipfshttpclient/filescanner.py

+5-11
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,10 @@
1818
# This will get inlined if/when PyCharm no longer flags typing.AnyStr.
1919
AnyStr = ty.TypeVar('AnyStr', bytes, str)
2020

21-
if sys.version_info >= (3, 7): #PY37+
22-
re_pattern_type = re.Pattern
23-
if ty.TYPE_CHECKING:
24-
re_pattern_t = re.Pattern[AnyStr]
25-
else:
26-
re_pattern_t = re.Pattern
27-
else: #PY36-
28-
re_pattern_t = re_pattern_type = type(re.compile(""))
21+
if ty.TYPE_CHECKING:
22+
re_pattern_t = re.Pattern[AnyStr]
23+
else:
24+
re_pattern_t = re.Pattern
2925

3026
# Windows does not have os.O_DIRECTORY
3127
O_DIRECTORY: int = getattr(os, "O_DIRECTORY", 0)
@@ -481,7 +477,7 @@ def _matcher_from_spec(spec: match_spec_t[AnyStr], *,
481477

482478
def _recursive_matcher_from_spec(spec: match_spec_t[AnyStr], *,
483479
period_special: bool = True) -> Matcher[AnyStr]:
484-
if isinstance(spec, re_pattern_type):
480+
if isinstance(spec, re.Pattern):
485481
return ReMatcher(spec)
486482
elif isinstance(spec, (str, bytes)):
487483
return GlobMatcher(spec, period_special=period_special)
@@ -582,8 +578,6 @@ def __init__(
582578
os.stat(directory_str)
583579

584580
# … and possibly open it as a FD if this is supported by the platform
585-
#
586-
# Note: `os.fwalk` support for binary paths was only added in 3.7+.
587581
directory_str_or_fd: ty.Union[AnyStr, int] = directory_str
588582
if HAVE_FWALK and (not isinstance(directory_str, bytes) or HAVE_FWALK_BYTES):
589583
fd = os.open(directory_str, os.O_RDONLY | O_DIRECTORY)

pyproject.toml

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ description-file = "README.md"
1515
# Notes: `typing.NoReturn` was introduced post-release in Python 3.5.4 and 3.6.2 and had
1616
# a critical bug (https://bugs.python.org/issue34921) in 3.7.0 to 3.7.1. So the
1717
# compatible versions below reflect the range of Python versions with working
18-
# `typing.NoReturn` function signature support. (Also, many other `typing` module
19-
# items were only introduced post-release in 3.6 and version restrictions on these
20-
# versions ensure that those are all available as well.)
21-
requires-python = ">=3.6.2,!=3.7.0,!=3.7.1"
18+
# `typing.NoReturn` function signature support.
19+
requires-python = ">=3.7.2"
2220
requires = [
2321
"multiaddr (>=0.0.7)",
2422
"requests (>=2.11)"
@@ -43,7 +41,6 @@ classifiers = [
4341
# Specify the Python versions you support here. In particular, ensure
4442
# that you indicate whether you support Python 2, Python 3 or both.
4543
"Programming Language :: Python :: 3 :: Only",
46-
"Programming Language :: Python :: 3.6",
4744
"Programming Language :: Python :: 3.7",
4845
"Programming Language :: Python :: 3.8",
4946
"Programming Language :: Python :: 3.9",

0 commit comments

Comments
 (0)