Skip to content

Commit c05e008

Browse files
committed
Monkey patch "typing" only for Python 3.5.0, 3.5.1 and 3.5.2
1 parent a23ca95 commit c05e008

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pyrogram/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818

1919
import sys
2020

21-
from .vendor import typing
21+
if sys.version_info[:3] in [(3, 5, 0), (3, 5, 1), (3, 5, 2)]:
22+
from .vendor import typing
2223

23-
# Monkey patch the standard "typing" module because Python versions from 3.5.0 to 3.5.2 have a broken one.
24-
sys.modules["typing"] = typing
24+
# Monkey patch the standard "typing" module because Python versions from 3.5.0 to 3.5.2 have a broken one.
25+
sys.modules["typing"] = typing
2526

2627
__copyright__ = "Copyright (C) 2017-2019 Dan Tès <https://github.com/delivrance>".replace(
2728
"\xe8",

0 commit comments

Comments
 (0)