We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32eaaed commit 783af28Copy full SHA for 783af28
pandas/compat/__init__.py
@@ -41,7 +41,7 @@
41
42
PY2 = sys.version_info[0] == 2
43
PY3 = (sys.version_info[0] >= 3)
44
-PY35 = (sys.version_info >= (3, 5))
+PY35 = (sys.version_info >= (3, 5, 4))
45
PY36 = (sys.version_info >= (3, 6))
46
PYPY = (platform.python_implementation() == 'PyPy')
47
@@ -424,7 +424,12 @@ def raise_with_traceback(exc, traceback=Ellipsis):
424
425
426
# In Python 3.7, the private re._pattern_type is removed.
427
-re_type = type(re.compile(''))
+# Python 3.5+ have typing.re.Pattern
428
+if PY35:
429
+ import typing
430
+ re_type = typing.re.Pattern
431
+else:
432
+ re_type = type(re.compile(''))
433
434
# https://github.com/pandas-dev/pandas/pull/9123
435
def is_platform_little_endian():
0 commit comments