Skip to content

Commit af66802

Browse files
committed
Bump min Python version from 3.5.4 to 3.7.2
1 parent 331bcb9 commit af66802

File tree

7 files changed

+16
-27
lines changed

7 files changed

+16
-27
lines changed

Diff for: .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 ------------------------------- ###

Diff for: ipfshttpclient/client/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
VERSION_BLACKLIST = []
2222
VERSION_MAXIMUM = "0.9.0"
2323

24+
from . import base
2425
from . import bitswap
2526
from . import block
2627
from . import bootstrap

Diff for: ipfshttpclient/filescanner.py

+5-13
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@
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(""))
29-
21+
if ty.TYPE_CHECKING:
22+
re_pattern_t = re.Pattern[AnyStr]
23+
else:
24+
re_pattern_t = re.Pattern
3025

3126
# Windows does not have os.O_DIRECTORY
3227
O_DIRECTORY: int = getattr(os, "O_DIRECTORY", 0)
3328

34-
3529
# Neither Windows nor MacOS have os.fwalk even through Python 3.9
3630
HAVE_FWALK: bool = hasattr(os, "fwalk")
3731
HAVE_FWALK_BYTES = HAVE_FWALK and sys.version_info >= (3, 7)
@@ -483,7 +477,7 @@ def _matcher_from_spec(spec: match_spec_t[AnyStr], *,
483477

484478
def _recursive_matcher_from_spec(spec: match_spec_t[AnyStr], *,
485479
period_special: bool = True) -> Matcher[AnyStr]:
486-
if isinstance(spec, re_pattern_type):
480+
if isinstance(spec, re.Pattern):
487481
return ReMatcher(spec)
488482
elif isinstance(spec, (str, bytes)):
489483
return GlobMatcher(spec, period_special=period_special)
@@ -584,8 +578,6 @@ def __init__(
584578
os.stat(directory_str)
585579

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

Diff for: ipfshttpclient/http.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
except ImportError: # pragma: no cover
3131
from . import http_httpx as _backend
3232

33-
ClientSync = _backend.ClientSync
33+
ClientSync = _backend.ClientSync

Diff for: ipfshttpclient/http_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def download(
639639
args
640640
Positional parameters to be sent along with the HTTP request
641641
opts
642-
Query string paramters to be sent along with the HTTP request
642+
Query string parameters to be sent along with the HTTP request
643643
compress
644644
Whether the downloaded file should be GZip compressed by the
645645
daemon before being sent to the client

Diff for: ipfshttpclient/multipart.py

+1
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ def __init__(self, directory: ty.Union[ty.AnyStr, utils.PathLike[ty.AnyStr], int
397397

398398
# Figure out the absolute path of the directory added
399399
self.abspath = None
400+
400401
if not isinstance(directory, int):
401402
self.abspath = os.path.abspath(directory)
402403

Diff for: pyproject.toml

+2-6
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,12 +41,10 @@ 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",
5047
]
5148

5249
[tool.flit.metadata.urls]
5350
Documentation = "https://ipfs.io/ipns/12D3KooWEqnTdgqHnkkwarSrJjeMP2ZJiADWLYADaNvUb6SQNyPF/docs/"
54-

0 commit comments

Comments
 (0)