Skip to content

Commit d5ad5e8

Browse files
committed
Bump min Python version from 3.5.4 to 3.7.2
1 parent 6b35fe8 commit d5ad5e8

File tree

7 files changed

+16
-28
lines changed

7 files changed

+16
-28
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-14
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,14 @@
1010

1111
from . import utils
1212

13-
14-
if sys.version_info >= (3, 7): #PY37+
15-
re_pattern_type = re.Pattern
16-
if ty.TYPE_CHECKING:
17-
re_pattern_t = re.Pattern[ty.AnyStr]
18-
else:
19-
re_pattern_t = re.Pattern
20-
else: #PY36-
21-
re_pattern_t = re_pattern_type = type(re.compile(""))
22-
13+
if ty.TYPE_CHECKING:
14+
re_pattern_t = re.Pattern[ty.AnyStr]
15+
else:
16+
re_pattern_t = re.Pattern
2317

2418
# Windows does not have os.O_DIRECTORY
2519
O_DIRECTORY: int = getattr(os, "O_DIRECTORY", 0)
2620

27-
2821
# Neither Windows nor MacOS have os.fwalk even through Python 3.9
2922
HAVE_FWALK: bool = hasattr(os, "fwalk")
3023
HAVE_FWALK_BYTES = HAVE_FWALK and sys.version_info >= (3, 7)
@@ -394,7 +387,7 @@ def matcher_from_spec(spec: match_spec_t[ty.AnyStr], *, # type: ignore[misc] #
394387

395388
if spec is None:
396389
return MATCH_ALL # mypy bug: This should cause a type error but does not?
397-
elif isinstance(spec, re_pattern_type):
390+
elif isinstance(spec, re.Pattern):
398391
return ReMatcher(spec)
399392
elif isinstance(spec, (str, bytes)):
400393
return GlobMatcher(spec, period_special=period_special)
@@ -510,8 +503,6 @@ def __init__(
510503
os.stat(directory_str)
511504

512505
# … and possibly open it as a FD if this is supported by the platform
513-
#
514-
# Note: `os.fwalk` support for binary paths was only added in 3.7+.
515506
directory_str_or_fd: ty.Union[ty.AnyStr, int] = directory_str
516507
if HAVE_FWALK and (not isinstance(directory_str, bytes) or HAVE_FWALK_BYTES):
517508
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)