Add Python 3.5 compatibility

This commit is contained in:
Tulir Asokan
2018-02-11 22:40:21 +02:00
parent 0e56592966
commit e1e9ba80fa
16 changed files with 23 additions and 5 deletions
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# matrix-appservice-python - A Matrix Application Service framework written in Python.
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# matrix-appservice-python - A Matrix Application Service framework written in Python.
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+6 -3
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
@@ -564,12 +565,14 @@ class Portal:
elif self.tgid:
raise ValueError("Can't create Telegram chat for portal with existing Telegram chat.")
invites = await self._get_telegram_users_in_matrix_room()
if len(invites) < 2:
invite_ids = await self._get_telegram_users_in_matrix_room()
if len(invite_ids) < 2:
# TODO[waiting-for-bots] This won't happen when the bot is enabled
raise ValueError("Not enough Telegram users to create a chat")
invites = [await source.client.get_input_entity(id) for id in invites]
invites = []
for id in invite_ids:
invites.append(await source.client.get_input_entity(id))
if self.peer_type == "chat":
updates = await source.client(CreateChatRequest(title=self.title, users=invites))
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: future_fstrings -*-
# mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2018 Tulir Asokan
#
+2 -1
View File
@@ -3,6 +3,7 @@ ruamel.yaml
python-magic
SQLAlchemy
alembic
-e git+https://github.com/LonamiWebs/Telethon@asyncio#egg=Telethon
-e git+https://github.com/tulir/Telethon@asyncio-3.5#egg=Telethon
Markdown
Pillow
future-fstrings
+2 -1
View File
@@ -21,10 +21,11 @@ setuptools.setup(
"Markdown>=2.6.11,<3",
"ruamel.yaml>=0.15.35,<0.16",
"Pillow>=5.0.0,<6",
"future-fstrings>=0.4.1",
"python-magic>=0.4.15,<0.5",
],
dependency_links=[
"https://github.com/LonamiWebs/Telethon/tarball/7da092894b306d720cc60c04daa2bfba58f81946#egg=Telethon"
"https://github.com/tulir/Telethon/tarball/ac46abc9680c5a74897fe6dbe9e585ad2577b1fa#egg=Telethon"
],
classifiers=[