mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-28 20:03:43 +03:00
35ec7ad9c1
Previous one didn't refresh by last use. Use the stdlib version for py3 and one of our own for py2. Max size set to 512, which should be fine for everyone (tweaking is still possible by monkeypatching, as the tests do, but I don't want to make an interface of it).
16 lines
305 B
Python
16 lines
305 B
Python
import sys
|
|
|
|
__all__ = ['string_types', 'text_type', 'lru_cache']
|
|
|
|
if sys.version_info[0] == 2:
|
|
# Python 2
|
|
string_types = basestring,
|
|
text_type = unicode
|
|
from ._lru_cache import lru_cache
|
|
|
|
else:
|
|
# Python 3
|
|
string_types = str,
|
|
text_type = str
|
|
from functools import lru_cache
|