Skip to content

Commit 8023aa5

Browse files
authored
Attempting solution to why pyrogram breaks
1 parent 17d3a5b commit 8023aa5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pyrogram/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818

1919
import sys
2020

21+
if sys.version_info[:3] in [(3, 5, 0), (3, 5, 1), (3, 5, 2)]:
22+
from .vendor import typing
23+
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
26+
27+
2128
__version__ = "0.12.0.develop"
2229
__license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)"
2330
__copyright__ = "Copyright (C) 2017-2019 Dan Tès <https://github.com/delivrance>".replace(
@@ -28,9 +35,3 @@
2835
from .client import *
2936
from .client.handlers import *
3037
from .client.types import *
31-
32-
if sys.version_info[:3] in [(3, 5, 0), (3, 5, 1), (3, 5, 2)]:
33-
from .vendor import typing
34-
35-
# Monkey patch the standard "typing" module because Python versions from 3.5.0 to 3.5.2 have a broken one.
36-
sys.modules["typing"] = typing

0 commit comments

Comments
 (0)