From 20de3fccdf8048e53401777f7c7e07c83f0b4edb Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Sat, 2 May 2020 15:01:15 +0200
Subject: [PATCH 1/2] Fix Match objects not being properly printed in Python
3.6
---
pyrogram/client/types/object.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyrogram/client/types/object.py b/pyrogram/client/types/object.py
index adafc8a0..750e0be7 100644
--- a/pyrogram/client/types/object.py
+++ b/pyrogram/client/types/object.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-import re
+import typing
from collections import OrderedDict
from datetime import datetime
from json import dumps
@@ -48,7 +48,9 @@ class Object(metaclass=Meta):
if isinstance(obj, bytes):
return repr(obj)
- if isinstance(obj, re.Match):
+ # https://t.me/pyrogramchat/167281
+ # Instead of re.Match, which breaks for python <=3.6
+ if isinstance(obj, typing.Match):
return repr(obj)
return OrderedDict(
From dd9423bbb1825770385d69e4a25cb9bae18b075f Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Sat, 2 May 2020 21:02:06 +0200
Subject: [PATCH 2/2] Update Pyrogram to v0.17.1
---
pyrogram/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 13ea5ce5..301e4e64 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "0.17.0"
+__version__ = "0.17.1"
__license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)"
__copyright__ = "Copyright (C) 2017-2020 Dan "