Skip to content

Commit 7d6e063

Browse files
committed
Python 3.10 compatibility
1 parent 34ecb80 commit 7d6e063

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
include:
15+
include:
1616
- python-version: "2.7"
1717
env:
1818
TOXENV: "msgpack"
@@ -50,7 +50,13 @@ jobs:
5050
- python-version: "3.9"
5151
env:
5252
TOXENV: "json"
53-
53+
- python-version: "3.10"
54+
env:
55+
TOXENV: "msgpack"
56+
- python-version: "3.10"
57+
env:
58+
TOXENV: "json"
59+
5460
steps:
5561
- uses: actions/checkout@v2
5662
- name: Set up Python ${{ matrix.python-version }}
@@ -65,4 +71,4 @@ jobs:
6571
tox
6672
6773
- name: Upload to codecov
68-
uses: codecov/codecov-action@v2
74+
uses: codecov/codecov-action@v2

scrapinghub/hubstorage/resourcetype.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
import time
21
import json
3-
import socket
42
import logging
5-
from collections import MutableMapping
3+
import socket
4+
import time
5+
try:
6+
from collections.abc import MutableMapping
7+
except ImportError:
8+
from collections import MutableMapping
69

710
import six
8-
from six.moves import range
911
import requests.exceptions as rexc
12+
from six.moves import range
1013

1114
from .utils import urlpathjoin, xauth
1215
from .serialization import jlencode, jldecode, mpdecode

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
'Programming Language :: Python :: 3.5',
4141
'Programming Language :: Python :: 3.6',
4242
'Programming Language :: Python :: 3.7',
43+
'Programming Language :: Python :: 3.8',
44+
'Programming Language :: Python :: 3.9',
45+
'Programming Language :: Python :: 3.10',
4346
'Programming Language :: Python :: Implementation :: CPython',
4447
'Programming Language :: Python :: Implementation :: PyPy',
4548
'Topic :: Internet :: WWW/HTTP',

0 commit comments

Comments
 (0)