Commit graph

1455 commits

Author SHA1 Message Date
Alex
1f0f6a8d3d
Add Application.post_shutdown (#3126)
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-07-03 15:22:50 +02:00
Bibo-Joshi
2ecb8d5413
Fix ConversationHandler.check_update not respecting per_user (#3128) 2022-07-03 15:21:04 +02:00
Bibo-Joshi
f1d03393de
Change Default Values for concurrent_updates and connection_pool_size (#3127) 2022-06-29 21:38:03 +02:00
Hinrich Mahler
df07148e2d Bump version to v20.0a2 2022-06-27 19:19:54 +02:00
Bibo-Joshi
2d2cede442
Documentation Improvements (#3103, #3121, #3098)
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: David <dsb321mp@gmail.com>
Co-authored-by: Harshil Mehta <37377066+harshil21@users.noreply.github.com>
Co-authored-by: poolitzer <github@poolitzer.eu>
Co-authored-by: Alex <53974096+ExalFabu@users.noreply.github.com>
2022-06-27 18:58:51 +02:00
Poolitzer
08e223ba90
API 6.1 (#3112)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
2022-06-27 18:54:11 +02:00
Aditya Yadav
755945172d
Add Additional Shortcut Methods to Chat (#3115) 2022-06-27 18:45:30 +02:00
Hinrich Mahler
e25c523b69 Bump version to v20.0a1 2022-06-09 19:07:15 +02:00
Bibo-Joshi
67e7468366
Move Examples To Documentation (#3089) 2022-06-09 17:22:32 +02:00
Bibo-Joshi
11007c1715
Documentation Improvements (#3010, #3007, #3012, #3067, #3081, #3082)
Co-authored-by: KnorpelSenf <shtrog@gmail.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Poolitzer <github@poolitzer.eu>
Co-authored-by: Adi <71205439+Aditya-Rajgor@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-09 17:08:54 +02:00
Bibo-Joshi
63104ac0b3
Add Application.post_init (#3078) 2022-06-08 07:44:22 +02:00
Bibo-Joshi
22419c0464
Fix Non-Blocking Entry Point in ConversationHandler (#3068) 2022-06-07 17:48:26 +02:00
Bibo-Joshi
42276338b1
Add Arguments chat/user_id to CallbackContext And Example On Custom Webhook Setups (#3059)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-06-03 16:55:36 +02:00
dependabot[bot]
977d56ab43
Bump mypy from 0.950 to 0.960 (#3070)
* Bump mypy from 0.950 to 0.960

Bumps [mypy](https://github.com/python/mypy) from 0.950 to 0.960.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.950...v0.960)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update pre-commit as well

* fix type hint for CIRHandler.collect_additional_context

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-06-02 10:08:15 +02:00
Poolitzer
306cc64170
Don't Set Signal Handlers On Windows By Default (#3065) 2022-06-02 09:43:03 +02:00
dglitxh
42955ecddf
Add Convenience Property Message.id (#3077) 2022-06-01 21:29:46 +02:00
Bibo-Joshi
67869693a7
Expose BaseRequest.parse_json_payload (#3072) 2022-06-01 21:26:18 +02:00
Bibo-Joshi
6ded9cc25c
Drop InputFile.is_image (#3053) 2022-05-29 14:35:26 +02:00
Bibo-Joshi
5e0bcfbcc6
Drop Explicit Type conversions in __init__ s (#3056)
* Drop explicit type conversions in `__init__` s

* missed one
2022-05-26 19:16:30 +02:00
Bibo-Joshi
a17a4c6c8f
Handle List-Valued Attributes More Consistently (#3057) 2022-05-26 19:15:54 +02:00
Bibo-Joshi
dc13b69dac
Split {Command, Prefix}Handler And Make Attributes Immutable (#3045) 2022-05-26 11:10:00 +02:00
James Carl Necio
349baa0202
Align Behavior Of JobQueue.run_daily With cron (#3046) 2022-05-25 10:02:00 +02:00
Bibo-Joshi
5e24765bbc
Escape Backslashes in escape_markdown (#3055) 2022-05-21 16:54:11 +02:00
Bibo-Joshi
2175af6abc
Apply isort and Update pre-commit.ci Configuration (#3049) 2022-05-19 15:10:08 +02:00
Bibo-Joshi
ca4e4c6280
Drop Support for ujson (#3037) 2022-05-19 12:47:53 +02:00
Bibo-Joshi
d2cabcaa74
Adjust pre-commit Settings for isort (#3043) 2022-05-18 17:23:00 +02:00
tal66
076955d04d
Make PTB Specific Keyword-Only Arguments for PTB Specific in Bot methods (#3035)
* Introduce keyword-only arguments in Bot methods

* partial code review fix

* tests, code rev changes

* flake8

* tests, code rev, more shortcut methods

* One more iteration on `check_shortcut_signature`

* Update tests/conftest.py

Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>

Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-18 17:18:44 +02:00
Bibo-Joshi
c1041655f6
Adjust Equality Comparisons to Fit Bot API 6.0 (#3033) 2022-05-18 07:48:20 +02:00
Harshil
3013870c1f
Add Version Check to Examples (#3036) 2022-05-15 14:08:40 +02:00
Bibo-Joshi
5e924014de
Add Tuple Based Version Info and Rename telegram.bot_api_version to telegram.__bot_api_version__ (#3030) 2022-05-14 15:50:12 +02:00
Bibo-Joshi
f792102212
Use Collection Instead of List and Tuple (#3025) 2022-05-13 16:41:34 +02:00
Harshil
72c3eb857b
Improve Type Annotations for CallbackContext and Move Default Type Alias to ContextTypes.DEFAULT_TYPE (#3017, #3023)
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-12 19:36:25 +02:00
Aditya Yadav
1f7efe4519
Rename Job.context to Job.data (#3028) 2022-05-12 19:26:03 +02:00
Bibo-Joshi
e47d18c9ec
Remove Client-Side Parameter Validation (#3024) 2022-05-12 19:20:24 +02:00
Bibo-Joshi
65bbea780a
Rename Handler to BaseHandler (#3019) 2022-05-12 18:18:40 +02:00
Bibo-Joshi
a299867b1b
Stabilize Application.run_* on Python 3.7 (#3009) 2022-05-10 18:35:20 +02:00
Harshil
be8f4f7aad
Don't Pass Default Values of Optional Parameters to Telegram (#2978) 2022-05-09 19:30:46 +02:00
Hinrich Mahler
95d6272d20 Bump version to v20.0a0 2022-05-06 19:03:54 +02:00
Bibo-Joshi
a10bf3241e Documentation Fixes & Improvements (#2969)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-06 18:22:36 +02:00
Bibo-Joshi
950d9a0751 Extend Code Formatting With Black (#2972) 2022-05-06 18:22:35 +02:00
Harshil
335772568f Update and Expand Tests & pre-commit Settings and Improve Code Quality (#2925)
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:22:34 +02:00
Harshil
e10f9164fe API 6.0 (#2956)
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:22:34 +02:00
Bibo-Joshi
823d030c2c Use enums for dynamic types & rename two attributes in ChatMember (#2817) 2022-05-06 18:21:36 +02:00
Bibo-Joshi
36888a7c47 Fix a Bug in ChatMemberUpdated.difference (#2947) 2022-05-06 18:21:36 +02:00
Poolitzer
97281da351 Add Convenience Shortcuts ChatPermissions.{all, no}_permissions (#2948) 2022-05-06 18:20:58 +02:00
Harshil
7c113f5c75 Expand and Adjust filters.{Document, Sticker} (#2922)
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:19:15 +02:00
Bibo-Joshi
42eaa67fd5 Switch to asyncio (#2731)
Co-authored-by: tsnoam <tsnoam@gmail.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2022-05-06 18:19:15 +02:00
Harshil
a743726b08 Persistence of Bots: Refactor Automatic Replacement and Integration with TelegramObject (#2893) 2022-05-06 18:19:15 +02:00
Bibo-Joshi
7b37f9a6fa Documentation Improvements (#2856, #2798, #2854, #2841)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-06 18:19:15 +02:00
Harshil
835434c12f Return Plain Dicts from BasePersistence.get_*_data (#2873) 2022-05-06 18:19:15 +02:00
murugu-21
778eadbe7c Replace git.io Links (#2872)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:19:15 +02:00
DonalDuck004
9c9b133ed2 Add Dispatcher.migrate_chat_data (#2848)
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-06 18:19:14 +02:00
Harshil
8560af9c4f Remove telegram.ReplyMarkup (#2870) 2022-05-06 18:19:14 +02:00
Harshil
0ccd7d40ac Add Method drop_chat/user_data to Dispatcher and Persistence (#2852) 2022-05-06 18:19:14 +02:00
Harshil
f4147fb583 Improve Code Quality & Test Suite (#2843) 2022-05-06 18:19:14 +02:00
Harshil
9354db7c19 Defaults.protect_content (#2840) 2022-05-06 18:19:14 +02:00
Bibo-Joshi
0a6cc7f722 Documentation Fixes & Improvements (#2822)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-06 18:19:14 +02:00
Bibo-Joshi
6382361161 Improve Job.__getattr__ (#2832) 2022-05-06 18:19:14 +02:00
Harshil
5891db2f6b Add Dispatcher.add_handlers (#2823)
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:19:14 +02:00
Bibo-Joshi
9a8c76fc2b Improve Error Messages in CommandHandler.__init__ (#2837) 2022-05-06 18:19:14 +02:00
Bibo-Joshi
ced58b790e Documentation Improvements (#2693, #2691, #2739) 2022-05-06 18:19:14 +02:00
Harshil
89d5310504 Use __all__ Consistently (#2805) 2022-05-06 18:19:13 +02:00
Bibo-Joshi
de85eec674 Convenience Functionality for ChatInviteLinks (#2782) 2022-05-06 18:19:13 +02:00
Harshil
9b56be44b4 Update pre-commit Settings & Improve a Test (#2796) 2022-05-06 18:19:13 +02:00
Simon Damberg
28c8c155ce Improve Subscription of TelegramObject (#2719)
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-06 18:19:13 +02:00
Bibo-Joshi
55e8c38e50 Improve Code Quality (#2783) 2022-05-06 18:19:13 +02:00
Harshil
145d04230b Overhaul of Filters (#2759) 2022-05-06 18:19:13 +02:00
Poolitzer
b852a6866d Refactor Warnings in ConversationHandler (#2755, #2784) 2022-05-06 18:19:13 +02:00
Harshil
44f1ce3784 Update Code Quality Dependencies (#2748) 2022-05-06 18:19:13 +02:00
Harshil
42df3f471d Update Exceptions for Immutable Attributes (#2749) 2022-05-06 18:19:13 +02:00
Zisis Pavloudis
6f9e733f58 Introduce TelegramObject.set/get_bot (#2712) 2022-05-06 18:19:13 +02:00
Bibo-Joshi
0e60d56f53 Introduce Enums for telegram.constants (#2708) 2022-05-06 18:19:13 +02:00
eldbud
7e51901d51 Refactor MRO of InputMedia* and Some File-Like Classes (#2717) 2022-05-06 18:19:13 +02:00
Bibo-Joshi
0cb8d50aea Accept File Paths for Updater/DispatcherBuilder.private_key (#2724) 2022-05-06 18:19:12 +02:00
Kenneth Cheo
5275c45199 Mark Internal Modules As Private (#2687)
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:19:12 +02:00
Bibo-Joshi
7afce46d9f Introduce Builder Pattern for Updater and Dispatcher (#2646) 2022-05-06 18:19:12 +02:00
Piraty
edb30cf342 Use Error Messages for Pylint Instead of Codes (#2700) 2022-05-06 18:19:12 +02:00
Philipp
99581abe05 Add Filters.update.edited (#2705) 2022-05-06 18:19:11 +02:00
eldbud
1edfa1504c Handle Filepaths via the Pathlib Module (#2688) 2022-05-06 18:19:11 +02:00
Harshil
267d4e8191 Improve Signature Inspection for Bot Methods (#2686) 2022-05-06 18:19:11 +02:00
Bibo-Joshi
90b82eed99 Pass Failing Jobs to Error Handlers (#2692) 2022-05-06 18:19:11 +02:00
Bibo-Joshi
f0efb14e6d Move Defaults to telegram.ext (#2648) 2022-05-06 18:19:11 +02:00
Bibo-Joshi
c486c396da Doc Fixes (#2597)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
2022-05-06 18:19:11 +02:00
Bibo-Joshi
ce94651490 Make InlineQuery.answer Raise ValueError (#2675) 2022-05-06 18:19:11 +02:00
Bibo-Joshi
c440c255a7 Clear Up Import Policy (#2671)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-06 18:19:11 +02:00
Harshil
f6497093ce Warnings Overhaul (#2662) 2022-05-06 18:19:11 +02:00
Bibo-Joshi
7528503794 Refine Dispatcher.dispatch_error (#2660)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2022-05-06 18:19:11 +02:00
Harshil
afcff83ebc Add User Friendly Type Check For Init Of {Inline, Reply}KeyboardMarkup (#2657) 2022-05-06 18:19:10 +02:00
Bibo-Joshi
8f0031e9c8 Remove Deprecated Functionality (#2644, #2740, #2745) 2022-05-06 18:19:10 +02:00
Harshil
5c500fb6fd Fix Signatures and Improve test_official (#2643) 2022-05-06 18:19:10 +02:00
Poolitzer
641f931f19 Drop Non-CallbackContext API (#2617) 2022-05-06 18:19:10 +02:00
Ankit Raibole
4d493aff16 Remove day_is_strict argument of JobQueue.run_monthly (#2634)
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:19:10 +02:00
Harshil
b4ea5557ac Remove __dict__ from __slots__ and drop Python 3.6 (#2619, #2636) 2022-05-06 18:19:10 +02:00
Bibo-Joshi
be441d56f9 Refactor Initialization of Persistence Classes (#2604) 2022-05-06 18:19:09 +02:00
Stɑrry Shivɑm
633b7e7762 Make BasePersistence Methods Abstract (#2624)
Signed-off-by: starry69 <starry369126@outlook.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:19:09 +02:00
Iulian Onofrei
8a7aeaf86f Improve Type Hinting for CallbackContext (#2587)
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
2022-05-06 18:19:09 +02:00
Harshil
4a329aa4da Move and Rename TelegramDecryptionError to telegram.error.PassportDecryptionError (#2621) 2022-05-06 18:19:09 +02:00
Hinrich Mahler
92cb6f3ae8 Bump version to v13.11 2022-02-02 21:16:36 +01:00
Harshil
a35ecf4065
API 5.7 (#2881) 2022-02-02 21:05:46 +01:00
Hinrich Mahler
ade1529986 Bump version to v13.10 2022-01-03 08:36:27 +01:00