Changeset 965 for trunk


Ignore:
Timestamp:
Jan 5, 2019, 10:42:17 AM (9 months ago)
Author:
cito
Message:

Avoid warning in Python 3.7 (and error later in 3.8)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pgdb.py

    r945 r965  
    7575from uuid import UUID as Uuid
    7676from math import isnan, isinf
    77 from collections import namedtuple, Iterable
     77try:
     78    from collections.abc import Iterable
     79except ImportError:  # Python < 3.3
     80    from collections import Iterable
     81from collections import namedtuple
    7882from keyword import iskeyword
    7983from functools import partial
  • trunk/tests/test_dbapi20_copy.py

    r823 r965  
    1616    import unittest
    1717
    18 from collections import Iterable
     18try:
     19    from collections.abc import Iterable
     20except ImportError:  # Python < 3.3
     21    from collections import Iterable
    1922
    2023import pgdb  # the module under test
Note: See TracChangeset for help on using the changeset viewer.