Skip to content

Commit ede87a5

Browse files
authored
Merge pull request #1 from armanawn/develop
Fix problem with `collections` module in Python >= 3.10
2 parents 77fc7c3 + a0003d2 commit ede87a5

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

github3/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import requests
33

4-
from collections import Callable
4+
from collections.abc import Callable
55
from . import __version__
66
from logging import getLogger
77
from contextlib import contextmanager

github3/structs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from . import models
99

1010

11-
class GitHubIterator(models.GitHubCore, collections.Iterator):
11+
class GitHubIterator(models.GitHubCore, collections.abc.Iterator):
1212
"""The :class:`GitHubIterator` class powers all of the iter_* methods."""
1313
def __init__(self, count, url, cls, session, params=None, etag=None,
1414
headers=None):

github3/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def stream_response_to_file(response, path=None):
8181
fd = None
8282
filename = None
8383
if path:
84-
if isinstance(getattr(path, 'write', None), collections.Callable):
84+
if isinstance(getattr(path, 'write', None), collections.abc.Callable):
8585
pre_opened = True
8686
fd = path
8787
filename = getattr(fd, 'name', None)

0 commit comments

Comments
 (0)