Commit Graph

46 Commits

Author SHA1 Message Date
Dan
9bd9d7797b Replace "with await" with "async with" 2019-06-05 11:58:29 +02:00
Dan
84fb959c8c Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/client.py
#	pyrogram/client/methods/bots/answer_callback_query.py
#	pyrogram/client/methods/bots/get_game_high_scores.py
#	pyrogram/client/methods/bots/get_inline_bot_results.py
#	pyrogram/client/methods/bots/request_callback_answer.py
#	pyrogram/client/methods/bots/send_game.py
#	pyrogram/client/methods/bots/send_inline_bot_result.py
#	pyrogram/client/methods/bots/set_game_score.py
#	pyrogram/client/methods/chats/delete_chat_photo.py
#	pyrogram/client/methods/chats/export_chat_invite_link.py
#	pyrogram/client/methods/chats/get_chat.py
#	pyrogram/client/methods/chats/get_chat_member.py
#	pyrogram/client/methods/chats/get_chat_members.py
#	pyrogram/client/methods/chats/get_chat_members_count.py
#	pyrogram/client/methods/chats/get_dialogs.py
#	pyrogram/client/methods/chats/iter_chat_members.py
#	pyrogram/client/methods/chats/iter_dialogs.py
#	pyrogram/client/methods/chats/join_chat.py
#	pyrogram/client/methods/chats/kick_chat_member.py
#	pyrogram/client/methods/chats/leave_chat.py
#	pyrogram/client/methods/chats/pin_chat_message.py
#	pyrogram/client/methods/chats/promote_chat_member.py
#	pyrogram/client/methods/chats/restrict_chat_member.py
#	pyrogram/client/methods/chats/set_chat_description.py
#	pyrogram/client/methods/chats/set_chat_photo.py
#	pyrogram/client/methods/chats/set_chat_title.py
#	pyrogram/client/methods/chats/unban_chat_member.py
#	pyrogram/client/methods/chats/unpin_chat_message.py
#	pyrogram/client/methods/contacts/add_contacts.py
#	pyrogram/client/methods/contacts/delete_contacts.py
#	pyrogram/client/methods/contacts/get_contacts.py
#	pyrogram/client/methods/messages/delete_messages.py
#	pyrogram/client/methods/messages/download_media.py
#	pyrogram/client/methods/messages/edit_message_caption.py
#	pyrogram/client/methods/messages/edit_message_media.py
#	pyrogram/client/methods/messages/edit_message_reply_markup.py
#	pyrogram/client/methods/messages/edit_message_text.py
#	pyrogram/client/methods/messages/forward_messages.py
#	pyrogram/client/methods/messages/get_history.py
#	pyrogram/client/methods/messages/get_messages.py
#	pyrogram/client/methods/messages/iter_history.py
#	pyrogram/client/methods/messages/send_animation.py
#	pyrogram/client/methods/messages/send_audio.py
#	pyrogram/client/methods/messages/send_cached_media.py
#	pyrogram/client/methods/messages/send_chat_action.py
#	pyrogram/client/methods/messages/send_contact.py
#	pyrogram/client/methods/messages/send_document.py
#	pyrogram/client/methods/messages/send_location.py
#	pyrogram/client/methods/messages/send_media_group.py
#	pyrogram/client/methods/messages/send_message.py
#	pyrogram/client/methods/messages/send_photo.py
#	pyrogram/client/methods/messages/send_sticker.py
#	pyrogram/client/methods/messages/send_venue.py
#	pyrogram/client/methods/messages/send_video.py
#	pyrogram/client/methods/messages/send_video_note.py
#	pyrogram/client/methods/messages/send_voice.py
#	pyrogram/client/methods/password/change_cloud_password.py
#	pyrogram/client/methods/password/enable_cloud_password.py
#	pyrogram/client/methods/password/remove_cloud_password.py
#	pyrogram/client/methods/users/delete_user_profile_photos.py
#	pyrogram/client/methods/users/get_user_profile_photos.py
#	pyrogram/client/methods/users/get_users.py
#	pyrogram/session/auth.py
#	pyrogram/session/session.py
2019-03-16 19:49:38 +01:00
Dan
def3bdaa63 Reformat code 2019-03-16 17:51:37 +01:00
Dan
7f79210ba3 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/dispatcher/dispatcher.py
#	requirements.txt
2019-01-02 19:55:45 +01:00
Dan
4d7b1bafac Update copyright year 2019-01-01 12:36:16 +01:00
Dan
0c76774283 Reformat code 2018-11-02 10:26:59 +01:00
Dan
1fc160c566 Make TCPIntermediateO async 2018-10-08 20:17:31 +02:00
Dan
78a768f52c Make TCPAbridgedO async 2018-10-08 20:17:04 +02:00
Dan
1bf0d93140 Make TCPFull async 2018-10-08 20:16:44 +02:00
Dan
ee06907bda Make TCPAbridged async 2018-10-08 20:16:04 +02:00
Dan
8070bf4cd4 Fix bad merge after editing tcp.py 2018-09-22 19:41:33 +02:00
Dan
41acdd4d63 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/connection/transport/tcp/tcp.py
2018-09-22 14:49:35 +02:00
Dan
8ea556b65f Fix handling proxies with domain names 2018-09-22 14:44:12 +02:00
Dan
28abcaac50 Fix ipv6 with ipv4 proxies 2018-09-22 14:31:28 +02:00
Dan
b588b55358 Remove old commented (non-async) code from tcp.py 2018-09-07 00:44:31 +02:00
Dan
10f3829c93 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/connection/connection.py
#	pyrogram/connection/transport/tcp/tcp.py
#	pyrogram/connection/transport/tcp/tcp_intermediate.py
#	pyrogram/session/session.py
2018-09-01 01:05:25 +02:00
Dan
43483a1ccd Remove info logs from protocol impls 2018-08-29 22:20:32 +02:00
Dan
aa800c3ebc Reformat code 2018-06-30 11:04:17 +02:00
Dan
984e989a4b Lock TCP send() 2018-06-30 11:03:55 +02:00
Dan
1bc599e26c Delegate timeout to TCP 2018-06-17 19:20:22 +02:00
Dan
56748ff390 Make the underlying TCP protocol accept ipv6 addresses 2018-06-13 13:36:26 +02:00
Dan
d64337bf90 Implement Intermediate protocol using asyncio 2018-06-11 12:25:30 +02:00
Dan
dc322ddf1a Expose TCP class 2018-06-10 16:14:30 +02:00
Dan
7a6d7d0037 Implement async TCP protocol 2018-06-09 19:36:23 +02:00
Dan
98ebad3428 Add TCP Intermediate obfuscated protocol 2018-05-30 19:29:03 +02:00
Dan
0866dfa1dd Make TCPAbridgedO importable 2018-05-28 19:58:36 +02:00
Dan
78aa7aea2a Add TCP Abridged obfuscated protocol 2018-05-28 19:57:57 +02:00
Dan
65c209000c Connection refactoring 2018-05-24 21:19:57 +02:00
Dan
1cd7e28b50 Rename TCP protocol impl files 2018-05-19 15:50:10 +02:00
Dan
c531e6d146 Rename protocol impl files 2018-05-18 13:47:47 +02:00
Dan
5f414626ef Refactor tcp_intermediate 2018-05-16 21:14:05 +02:00
Dan
64fe9163d2 Refactor tcp_abridged 2018-05-15 19:17:22 +02:00
Dan
6dcdeda244 Make proxy loading simpler 2018-04-13 12:30:13 +02:00
Dan
42a2878842 Don't use sys.exit(), re-raise ImportError instead 2018-03-26 03:39:30 +02:00
Dan
52c482f1e4 Use a better error message 2018-03-26 02:03:36 +02:00
Dan
8e538199ea Log info when using a proxy 2018-02-21 13:34:27 +01:00
Dan
5e6361defc Set socket timeout to 10s 2018-02-15 21:06:04 +01:00
Dan
4784ba53e1 Remove redundant code 2018-01-18 12:22:16 +01:00
Dan
ba21430512 Add SOCKS5 proxy support 2018-01-16 22:05:19 +01:00
Dan
e9f6bce579 Reformat connection classes to accommodate proxy settings 2018-01-16 16:33:28 +01:00
Dan
0aed7bf24a Use socks socket to allow enabling a proxy 2018-01-16 16:26:20 +01:00
Dan
d70c2bb564 Update copyright year 2018-01-01 13:24:07 +01:00
Dan
b23b41bc7d Lock the send method for every tcp mode, not only for tcp_full 2017-12-18 14:14:44 +01:00
Dan
dde01cc9b9 Fix unhandled exception in case the connection is already closed 2017-12-18 13:50:00 +01:00
Dan
c83daf8771 Correctly shutdown the socket 2017-12-17 13:50:43 +01:00
Dan
981d644288 Add connection package 2017-12-05 12:37:30 +01:00