File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed
Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ If no error shows up you are good to go.
8282
8383 >> > import pyrogram
8484 >> > pyrogram.__version__
85- ' 0.10.1 '
85+ ' 0.10.2 '
8686
8787 .. _TgCrypto : https://docs.pyrogram.ml/resources/TgCrypto
8888.. _develop : http://github.com/pyrogram/pyrogram
Original file line number Diff line number Diff line change 2323 "e" if sys .getfilesystemencoding () != "utf-8" else "\xe8 "
2424)
2525__license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)"
26- __version__ = "0.10.1 "
26+ __version__ = "0.10.2 "
2727
2828from .api .errors import Error
2929from .client .types import (
Original file line number Diff line number Diff line change 1717# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818
1919import re
20+ from collections import OrderedDict
2021
2122from pyrogram .api .types import (
2223 MessageEntityBold as Bold ,
@@ -75,10 +76,11 @@ def parse(self, text):
7576 text = text .replace (match .group (), body )
7677 offset += len (style ) * 2 + 5 + (len (url ) + 8 if url else 0 )
7778
78- return dict (
79- message = utils .remove_surrogates (text ),
80- entities = entities
81- )
79+ # TODO: OrderedDict to be removed in Python3.6
80+ return OrderedDict ([
81+ ("message" , utils .remove_surrogates (text )),
82+ ("entities" , entities )
83+ ])
8284
8385 def unparse (self , message : str , entities : list ):
8486 message = utils .add_surrogates (message ).strip ()
Original file line number Diff line number Diff line change 1717# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818
1919import re
20+ from collections import OrderedDict
2021
2122from pyrogram .api .types import (
2223 MessageEntityBold as Bold ,
@@ -97,10 +98,11 @@ def parse(self, message: str):
9798 entities .append (entity )
9899 message = message .replace (match .group (), body )
99100
100- return dict (
101- message = utils .remove_surrogates (message ),
102- entities = entities
103- )
101+ # TODO: OrderedDict to be removed in Python3.6
102+ return OrderedDict ([
103+ ("message" , utils .remove_surrogates (message )),
104+ ("entities" , entities )
105+ ])
104106
105107 def unparse (self , message : str , entities : list ):
106108 message = utils .add_surrogates (message ).strip ()
You can’t perform that action at this time.
0 commit comments