Skip to content

Commit 71bf0d7

Browse files
committed
Bump min Python version from 3.6.2 to 3.7.2
1 parent e02a95f commit 71bf0d7

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
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
@@ -19,14 +19,10 @@
1919
# This will get inlined if/when PyCharm no longer flags typing.AnyStr.
2020
AnyStr = ty.TypeVar('AnyStr', bytes, str)
2121

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

3127
# Windows does not have os.O_DIRECTORY
3228
O_DIRECTORY: int = getattr(os, "O_DIRECTORY", 0)
@@ -475,7 +471,7 @@ def _matcher_from_spec(spec: match_spec_t[AnyStr], *,
475471

476472
def _recursive_matcher_from_spec(spec: match_spec_t[AnyStr], *,
477473
period_special: bool = True) -> Matcher[AnyStr]:
478-
if isinstance(spec, re_pattern_type):
474+
if isinstance(spec, re.Pattern):
479475
return ReMatcher(spec)
480476
elif isinstance(spec, (str, bytes)):
481477
return GlobMatcher(spec, period_special=period_special)
@@ -576,8 +572,6 @@ def __init__(
576572
os.stat(directory_str)
577573

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

pyproject.toml

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ 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.)
18+
# `typing.NoReturn` function signature support.
2119
#
2220
# Maintain this concurrently with verify.sh
23-
requires-python = ">=3.6.2,!=3.7.0,!=3.7.1"
21+
requires-python = ">=3.7.2"
2422
requires = [
2523
"multiaddr (>=0.0.7)",
2624
"requests (>=2.11)"
@@ -45,7 +43,6 @@ classifiers = [
4543
# Specify the Python versions you support here. In particular, ensure
4644
# that you indicate whether you support Python 2, Python 3 or both.
4745
"Programming Language :: Python :: 3 :: Only",
48-
"Programming Language :: Python :: 3.6",
4946
"Programming Language :: Python :: 3.7",
5047
"Programming Language :: Python :: 3.8",
5148
"Programming Language :: Python :: 3.9",

verify.sh

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ if [ -z "$1" ]; then
1010
echo "Validating minimum point release of each supported minor version..."
1111

1212
# Maintain this concurrently with [tool.flit.metadata].requires-python in pyproject.toml.
13-
validate 3.6.2
1413
validate 3.7.2
1514
validate 3.8.0
1615
validate 3.9.0

0 commit comments

Comments
 (0)