Skip to content

Commit afbf9a0

Browse files
committed
Bump min Python version from 3.5.4 to 3.7.2
1 parent f61a574 commit afbf9a0

File tree

7 files changed

+17
-28
lines changed

7 files changed

+17
-28
lines changed

.travis.yml

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

33
language: python
4-
dist: bionic # VirtualEnv is too old on xenial
4+
dist: focal
55

66
matrix:
77
include:
8-
- python: "3.6"
98
- python: "3.7"
109
- python: "3.8"
11-
- python: "pypy3"
10+
# - python: "pypy3" travis doesn't support pypy on Python 3.7 yet
1211
- python: "3.8"
1312
env: IPFS_VERSION=compat
1413
- python: "3.8"
1514
env: TOXENV=py3-httpx
15+
dist: bionic
1616
- python: "3.8"
1717
env: TOXENV=styleck
1818
before_install: ":"
1919
- python: "3.8"
2020
env: TOXENV=typeck
2121
before_install: ":"
22-
22+
2323
# Testing on macOS/Darwin tends to be much slower so only test the bare minimum
2424
#
2525
# When changing any version here also update the relevant checksum below with
2626
# the values found on the https://python.org/ website.
2727
- os: osx
2828
language: shell
29-
env: PYTHON_VERSION=3.6.8-macosx10.9
29+
env: PYTHON_VERSION=3.7.9-macosx10.9
3030
- os: osx
3131
language: shell
3232
env: PYTHON_VERSION=3.8.2-macosx10.9
@@ -109,7 +109,7 @@ install:
109109
110110
### ====== MODIFY THIS WHEN CHANGING MACOS PYTHON TEST VERSIONS ====== ###
111111
case "${PYTHON_VERSION}" in
112-
3.6.8-macosx10.9) MD5_MACOS="786c4d9183c754f58751d52f509bc971" ;;
112+
3.7.9-macosx10.9) MD5_MACOS="4b544fc0ac8c3cffdb67dede23ddb79e" ;;
113113
3.8.2-macosx10.9) MD5_MACOS="f12203128b5c639dc08e5a43a2812cc7" ;;
114114
esac
115115
### ------------------------------ END ------------------------------- ###

ipfshttpclient/client/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
VERSION_BLACKLIST = []
1919
VERSION_MAXIMUM = "0.8.0"
2020

21+
from . import base
2122
from . import bitswap
2223
from . import block
2324
from . import bootstrap

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)

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

ipfshttpclient/http_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def download(
676676
args
677677
Positional parameters to be sent along with the HTTP request
678678
opts
679-
Query string paramters to be sent along with the HTTP request
679+
Query string parameters to be sent along with the HTTP request
680680
compress
681681
Whether the downloaded file should be GZip compressed by the
682682
daemon before being sent to the client

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

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,11 +41,9 @@ 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
]
5047

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

0 commit comments

Comments
 (0)