Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit d3e0dee

Browse files
authored
Python 3.10 compatibility (#97)
1 parent e060d44 commit d3e0dee

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: [ 3.6, 3.7, 3.8 ]
15+
python-version: [ 3.7, 3.8, 3.9, '3.10' ]
1616

1717
steps:
1818
- name: Checkout repository

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
extras_require={
2727
"test": [
28-
'pytest==6.2.1',
28+
'pytest==6.2.5',
2929
'pylint==2.6.0',
3030
'pytest-cov==2.10.1',
3131
]

target_postgres/db_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import sys
33
import psycopg2
44
import psycopg2.extras
5-
import collections
65
import inflection
76
import re
87
import uuid
98
import itertools
109
import time
10+
from collections.abc import MutableMapping
1111
from singer import get_logger
1212

1313

@@ -147,7 +147,7 @@ def flatten_record(d, flatten_schema=None, parent_key=[], sep='__', level=0, max
147147
items = []
148148
for k, v in d.items():
149149
new_key = flatten_key(k, parent_key, sep)
150-
if isinstance(v, collections.MutableMapping) and level < max_level:
150+
if isinstance(v, MutableMapping) and level < max_level:
151151
items.extend(flatten_record(v, flatten_schema, parent_key + [k], sep=sep, level=level + 1,
152152
max_level=max_level).items())
153153
else:

0 commit comments

Comments
 (0)