Changeset 1712:1b17d07f3a88


Ignore:
Timestamp:
Dec 25, 2018, 10:20:39 PM (4 weeks ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
histedit_source:
6ba1c871114f5caf203f0ee08ad4939d0def9c55
Message:
Access `Callable` from `collections.abc`

Honor `DeprecationWarning` from Python 3.7:

  DeprecationWarning: Using or importing the ABCs from 'collections'
  instead of from 'collections.abc' is deprecated, and in 3.8 it will
  stop working
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mock_ftplib.py

    r1682 r1712  
    1515
    1616import io
    17 import collections
     17import collections.abc
    1818import ftplib
    1919import posixpath
     
    155155        """
    156156        # The callback comes last in `ftplib.FTP.dir`.
    157         if isinstance(args[-1], collections.Callable):
     157        if isinstance(args[-1], collections.abc.Callable):
    158158            # Get `args[-1]` _before_ removing it in the line after.
    159159            callback = args[-1]
Note: See TracChangeset for help on using the changeset viewer.