Skip to content

Commit f3c0818

Browse files
pschellekannappanr
authored andcommitted
Fix Py3.7 warnings (#767)
dist: xenial # required for Python >= 3.7 see https://docs.travis-ci.com/user/languages/python/
1 parent 095c4f2 commit f3c0818

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
dist: xenial # required for Python >= 3.7
12
language: python
23

34
python:
45
- '2.7'
56
- '3.4'
67
- '3.5'
78
- '3.6'
9+
- '3.7'
810

911
os:
1012
- linux

minio/copy_conditions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"""
2626

2727
import collections
28+
try:
29+
collectionsAbc = collections.abc
30+
except AttributeError:
31+
collectionsAbc = collections
2832
from .helpers import is_non_empty_string
2933

3034
# CopyCondition explanation:
@@ -36,7 +40,7 @@
3640
# key: "x-amz-copy-if-modified-since",
3741
# value: "Tue, 15 Nov 1994 12:45:26 GMT",
3842
#
39-
class CopyConditions(collections.MutableMapping):
43+
class CopyConditions(collectionsAbc.MutableMapping):
4044
"""
4145
A :class:`CopyConditions <CopyConditions>` collection of
4246
supported CopyObject conditions.

minio/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
_VALID_BUCKETNAME_REGEX = re.compile('^[a-z0-9][a-z0-9\\.\\-]+[a-z0-9]$')
5555
_ALLOWED_HOSTNAME_REGEX = re.compile(
56-
'^((?!-)(?!_)[A-Z\_\\d-]{1,63}(?<!-)(?<!_)\\.)*((?!_)(?!-)[A-Z\_\\d-]{1,63}(?<!-)(?<!_))$',
56+
'^((?!-)(?!_)[A-Z_\\d-]{1,63}(?<!-)(?<!_)\\.)*((?!_)(?!-)[A-Z_\\d-]{1,63}(?<!-)(?<!_))$',
5757
re.IGNORECASE)
5858

5959
_EXTRACT_REGION_REGEX = re.compile('s3[.-]?(.+?).amazonaws.com')

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
'Programming Language :: Python :: 3.4',
7878
'Programming Language :: Python :: 3.5',
7979
'Programming Language :: Python :: 3.6',
80+
'Programming Language :: Python :: 3.7',
8081
'Topic :: Software Development :: Libraries :: Python Modules',
8182
],
8283
long_description=readme,

0 commit comments

Comments
 (0)