Changeset 1734:4052933a7485


Ignore:
Timestamp:
Dec 28, 2018, 9:42:48 PM (11 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Remove Python 2 support
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/lrucache.py

    r1728 r1734  
    4848# The suffix after the hyphen denotes modifications by the
    4949# ftputil project with respect to the original version.
    50 __version__ = "0.2-14"
     50__version__ = "0.2-15"
    5151__all__ = ['CacheKeyError', 'LRUCache', 'DEFAULT_SIZE']
    5252__docformat__ = 'reStructuredText en'
     
    5454# Default size of a new LRUCache object, if no 'size' argument is given.
    5555DEFAULT_SIZE = 16
    56 
    57 # For Python 2/3 compatibility
    58 try:
    59     long
    60     int_types = (int, long)
    61 except NameError:
    62     int_types = (int,)
    6356
    6457
     
    255248        if name == 'size':
    256249            size = value
    257             if not isinstance(size, int_types):
     250            if not isinstance(size, int):
    258251                raise TypeError("cache size (%r) must be an integer" % size)
    259252            if size <= 0:
Note: See TracChangeset for help on using the changeset viewer.