Skip to content

Commit

Permalink
[FIX] suitablt for the high vresion python. (dpkp#2394)
Browse files Browse the repository at this point in the history
* [FIX] suitablt for the high vresion python.

it won't import Mapping from collections at python3.11.
tested it worked from python3.6 to 3.11.2.

* Update selectors34.py to have conditional importing of Mapping from collections

---------

Co-authored-by: William Barnhart <[email protected]>
  • Loading branch information
rootlulu and wbarnha authored Nov 4, 2023
1 parent a1d268a commit 364397c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kafka/vendor/selectors34.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
from __future__ import absolute_import

from abc import ABCMeta, abstractmethod
from collections import namedtuple, Mapping
from collections import namedtuple
try:
from collections.abc import Mapping
except ImportError:
from collections import Mapping
from errno import EINTR
import math
import select
Expand Down

0 comments on commit 364397c

Please sign in to comment.