Skip to content

Commit 9eaee7b

Browse files
committed
Making PY35 to only be applicable to 3.5.4 and newer
1 parent 32eaaed commit 9eaee7b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/compat/__init__.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
PY2 = sys.version_info[0] == 2
4343
PY3 = (sys.version_info[0] >= 3)
44-
PY35 = (sys.version_info >= (3, 5))
44+
PY35 = (sys.version_info >= (3, 5, 4))
4545
PY36 = (sys.version_info >= (3, 6))
4646
PYPY = (platform.python_implementation() == 'PyPy')
4747

@@ -424,7 +424,11 @@ def raise_with_traceback(exc, traceback=Ellipsis):
424424

425425

426426
# In Python 3.7, the private re._pattern_type is removed.
427-
re_type = type(re.compile(''))
427+
if PY35:
428+
import typing
429+
re_type = typing.re.Pattern
430+
else:
431+
re_type = type(re.compile(''))
428432

429433
# https://github.com/pandas-dev/pandas/pull/9123
430434
def is_platform_little_endian():

0 commit comments

Comments
 (0)