Compare commits

...

129 Commits

Author SHA1 Message Date
Hinrich Mahler 51a4a6664c Bump version to v13.8 2021-11-08 19:12:10 +01:00
Bibo-Joshi e4dc80f41d API 5.4 (#2767)
Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
2021-11-08 19:02:20 +01:00
Abshar Mohammed Aslam bc7c422a11 Create Issue Template Forms (#2689) 2021-10-03 20:08:04 +02:00
Yan c3e3bb77e5 Fix camelCase Functions in ExtBot (#2659)
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
2021-09-15 17:07:11 +02:00
DonalDuck004 a25c76e6a3 Fix Empty Captions not Being Passed by Bot.copy_message (#2651) 2021-09-09 07:50:04 +02:00
Mehdi 0c5085022c Fix Setting Thumbs When Uploading A Single File (#2583)
* Update request.py

If the media has a thumb, we also need to attach it to the data.

* Add test

* Editing syntax

* Debug test

* update request.py

* Update test_inputmedia.py

* Update test_inputmedia.py

* Update test_inputmedia.py

Fix test.

* Update AUTHORS.rst

Adding my name!

* Update AUTHORS.rst
2021-08-11 08:34:47 +02:00
Bibo-Joshi 1fdaaac809 Fix Bug in BasePersistence.insert/replace_bot for Objects with __dict__ not in __slots__ (#2603)
* More special cases with slots

* Fix failing tests
2021-07-24 17:17:25 +02:00
Hinrich Mahler bcec6f03cb Bump version to v13.7 2021-07-01 18:03:38 +02:00
Bibo-Joshi ed147813ab API 5.3 (#2572)
* BotCommandScopes

* pre-commit

* typo

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

* rename kickChatMember & getChatMembersCount method

Signed-off-by: starry69 <starry369126@outlook.com>

* add `language_code` and `scope` to `get/set_my_commands`

and add `delete_my_commands()`

* add `input_field_placeholder` to replykeyboardmarkup.py and forcereply.py

also improved/fixed docs along the way

* showcase `input_field_placeholder` in conversationbot.py

* review 1

'i will not go away' has gone away 😢

* deprecate `Bot.commands` and make sure its only used for default scope

* review 2 (use constants for scope)

* Review

Signed-off-by: starry69 <starry369126@outlook.com>

* doc updates

* New ChatMember classes

Signed-off-by: starry69 <starry369126@outlook.com>

* Address review

Signed-off-by: starry69 <starry369126@outlook.com>

* add versionadded tags again

Signed-off-by: starry69 <starry369126@outlook.com>

* Improve tests & add a deprecation note to ChatMember

* test_official

* Documentation tweaks

* Bump bot api version number

* but bot

* Rename chat shortcuts

Signed-off-by: starry69 <starry369126@outlook.com>

* deepsource

Signed-off-by: starry69 <starry369126@outlook.com>

* add missing slot in botcommandscope & missing slot tests

Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: starry69 <starry369126@outlook.com>
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-07-01 17:45:19 +02:00
Bibo-Joshi 4315225642 Type Hinting Fixes (#2552)
* Fixe overload signatures for ContextTypes

* more fixing for contexttypes
2021-07-01 17:43:59 +02:00
Bibo-Joshi a75dffd4a8 Doc Fixes (#2551)
* Document ExtBot.insert_callbakc_data

* fix duplicate object descriptions

Fixed by removing `:undoc-members:` in the affected classes.
Closes https://github.com/sphinx-doc/sphinx/issues/9294

* fix incorrect shortcut docstrings in user.py

* fix object type in forcereply.py

* fix discuss bot link in loginurl.py

* document that message is None for (my)_chat_member

in `effective_message`

* numerous persistence rendering fixes

* move docstring from property setter to property

* Revert "fix object type in forcereply.py"

This reverts commit 012663e0c3.

* Document comparison of jobs

* Update min python version to 3.6.8

* remove old note from chat.py + some return msg fixes

* fix colon placement

Co-authored-by: Harshil <ilovebhagwan@gmail.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2021-07-01 17:34:23 +02:00
Harshil fce2993d21 Improve Deprecation Warning for __slots__ (#2574)
* add stacklevel to `set_new_attribute_deprecated`

* detail warning message and change stacklevel
2021-06-29 18:10:08 +02:00
Harshil 9aec8deec6 Stabilize CI (#2575)
* attempt 'surely this one' on fixing test_idle and test_depr_warnings

* remove unused filterwarnings
2021-06-26 22:19:59 +02:00
Bibo-Joshi ec3026673b Fix Coverage Configuration (#2571)
* remove possibly malicious line from config

* exclude overload signatures from coverage
2021-06-25 09:02:46 +02:00
zeroone2numeral2 105f1ccdb5 Better Exception-Handling for BasePersistence.replace/insert_bot (#2564)
* Catch exceptions raised while copying __dict__/__slots__ in BasePersistence.replace/insert_bot()

Also updated the docstrings to reflect the changes in behavior with unexpected errors

* Tests: added to CustomClass immutable object that would trigger a setattr() exception

* Tests: added new uuid_ property to own CustomClass methods

* Updated AUTHORS.rst

* Revert "Tests: added new uuid_ property to own CustomClass methods"

This reverts commit 9e67463cf7.

* Revert "Tests: added to CustomClass immutable object that would trigger a setattr() exception"

This reverts commit 1c258304

* Removed unneeded Exception cast to string

f-string will perform the string-ification on their own

* Removed another unneeded Exception cast to string

* Added test to parse unparsable objects in __dict__ or __slots__

* Applied black and pylint style suggestions

All lint tests passed

* Fix typo

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

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2021-06-20 22:14:05 +02:00
Bibo-Joshi 52ce03929b Fix Bug in BasePersistence.insert/replace_bot for Objects with __dict__ in their slots (#2561)
* Handle objects with __dict__ in __slots__

* Rework
2021-06-13 15:07:40 +02:00
Bibo-Joshi ac4768155f Remove Incorrect Warning About Defaults and ExtBot (#2553)
* Don't throw warning when passing defaults to ExtBot

* Review
2021-06-10 12:03:44 +02:00
Harshil d08172b4b0 Remove Deprecated pass_args from Deeplinking Example (#2550) 2021-06-07 09:05:17 +02:00
Hinrich Mahler e982a5a567 Bump version to v13.6 2021-06-06 12:28:01 +02:00
Bibo-Joshi cf4d3cae01 Doc Fixes (#2495)
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Bas ten Berge <bas+github@tenberge-ict.nl>
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-06-06 12:16:23 +02:00
Bibo-Joshi 8531a7a40c Arbitrary callback_data (#1844) 2021-06-06 11:48:48 +02:00
Bibo-Joshi fce7cc903c Add ContextTypes & BasePersistence.refresh_user/chat/bot_data (#2262) 2021-06-06 10:37:53 +02:00
GauthamramRavichandran 5da1dd7ce9 Add max_connections Parameter to Updater.start_webhook (#2547)
* Include max_connections args

* Update docs & add test

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-06-06 09:27:45 +02:00
Stɑrry Shivɑm 46cdeb495a Fix for Promise.done_callback (#2544)
* Don't call done_cb on exceptions

Signed-off-by: starry69 <starry369126@outlook.com>

* improve docs

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>

* revert black

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2021-06-05 17:08:45 +02:00
Bibo-Joshi 653691fafb Improve Slot Tests (#2541) 2021-05-30 20:30:26 +02:00
Harshil 92ff6a8e2b Add __slots__ (#2345)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-05-29 16:18:16 +02:00
Bibo-Joshi cc43aef64b Fix Test Failing Due To Telegram Updates (#2537)
* Update TestPhoto

* try to fix test_idle again...

* fix test_send_game due to photo size changes...

Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-05-28 22:24:43 +02:00
Bibo-Joshi e2c6d60721 Improve Code Quality (#2536)
* Start fixing stuff

* More docstrings

* stabilize test_idle

Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-05-27 20:34:58 +02:00
Bibo-Joshi 8bf88c3231 Supplement Codacy with DeepSource (#2454)
* Add deepsource config

* Update Badges

* Update Badges some more

* Stupid change to trigger analysis of all files

* Try to get ignore right

* Update badges again

* Get started on fixing issues

* Fix some more issues

* Remove more plank lines

* Docs for de_json/list & to_dict/json

* Some improvements from deepcode.ai

* Some more improvements

* Some more improvements

* More docstrnigs & let's run DS on the tests just for fun

* Autofix issues in 10 files

Resolved issues in the following files via DeepSource Autofix:
1. tests/conftest.py
2. tests/test_bot.py
3. tests/test_commandhandler.py
4. tests/test_conversationhandler.py
5. tests/test_dispatcher.py
6. tests/test_filters.py
7. tests/test_inputmedia.py
8. tests/test_messagehandler.py
9. tests/test_official.py
10. tests/test_persistence.py

* Some more improvements for tests, but that shall be enough

* Some more docstrings for functions

* Some minor stuff, try to fix tests

* Update DS config

* Still more docs

* Doc fixes

* More fixes

* Fix: indent docstring

* Some fixes

* Revert "Stupid change to trigger analysis of all files"

This reverts commit dd46c260

* Review

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2021-05-27 09:38:17 +02:00
Poolitzer 1572c61063 Increase Test Coverage of CallbackQueryHandler (#2520)
* Test: let's see

* Test: let's see, now in the correct place

* Fix: Explicitly return None in else clause

also documented this behaviour clearly in the docstring

* add link in doc

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>

* Fix: remove unnecessary else statement

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2021-05-27 09:37:37 +02:00
Harshil 5ff3b76e18 Stabilize CI (#2522)
* asking the test what is wrong with them

* fix botscore_not_modified tests for good

* xfail game tests due to race conditions

* address review (add a comment)

* fix xfail marker

* address review

* simplify expression
2021-05-19 13:33:41 +02:00
Poolitzer cd69f69b28 Add Filters.attachment (#2528)
* feat: attachment filter

* fix: add versionadded statement

* Fix: small doc string changes

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2021-05-19 10:39:10 +02:00
Poolitzer 8b0d2e5f75 Add pattern Argument to ChosenInlineResultHandler (#2517)
* Feat: add pattern arg to ChosenInlineResultHandler

* Fix: remove unnecessary if clause

the attribute must be present, since it's not optional.

* Fix: wrong type documentation

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>

* Fix: Addressing code review

small documentation fixes, and moving one test.

* Fix: link to matches

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>

* Fix: also link here

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2021-05-19 10:32:11 +02:00
Nikolai Krivenko 7d0fb85c8c Fix send_phone_number_to_provider argument for Bot.send_invoice (#2527)
* [#2526] set data['send_phone_number_to_provider'] from corresponding variable

* [#2526] Add myself to AUTHORS.rst

* Add unit test

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-05-16 20:56:28 +02:00
Bibo-Joshi 08ba7c7793 Handle Classes as Input for BasePersistence.replace/insert_bot (#2523)
* Ignore classes on replace/insert_bot

* Review
2021-05-16 20:02:35 +02:00
Bibo-Joshi 9737b1d3c7 Bump Tornado Version and Remove Workaround from #2067 (#2494) 2021-05-05 20:59:06 +02:00
Hinrich Mahler 94a9b7f983 Bump version to v13.5 2021-04-30 11:15:38 +02:00
Bibo-Joshi bae57c7f8f Doc Fixes (#2437)
Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2021-04-30 10:47:41 +02:00
Harshil b20265819b Stabilize CI (#2480)
* mark some occasionally failing tests as flaky

* fix test which was failing locally for some reason

* Don't fail tests if they've exceeded the timeout

* This reverts commit 1d0f982e95.

* remove flaky on two tests as per review

* the end of timeout failures, hopefully.

* first run successful. Fixing pre-commit to trigger 2nd run.
2021-04-30 10:43:52 +02:00
Bibo-Joshi 3938a57542 Convenience Utilities & Example for Handling ChatMemberUpdated (#2490)
* ChatMemberUpdate.difference

* constants for update types

* Add an example for ChatMemberHandler

* Update examples/chatmemberbot.py

* Review

* Review
2021-04-30 10:14:41 +02:00
Bibo-Joshi 4645d0e32a Improve Type Hints of Data Filters (#2456) 2021-04-30 10:12:18 +02:00
Stɑrry Shivɑm 7e554584b1 Improve Timeouts in ConversationHandler (#2417)
* Handle promise states in conversation timeout

Signed-off-by: starry69 <starry369126@outlook.com>

* warn if nested conversation & timeout

Signed-off-by: starry69 <starry369126@outlook.com>

* Add notes and test for conversation_timeout

Signed-off-by: starry69 <starry369126@outlook.com>

* Try to fix pre-commit

Signed-off-by: starry69 <starry369126@outlook.com>

* Test promise exception

Signed-off-by: starry69 <starry369126@outlook.com>

* Welp

Signed-off-by: starry69 <starry369126@outlook.com>

* improve docs

Signed-off-by: starry69 <starry369126@outlook.com>

* typo

Signed-off-by: starry69 <starry369126@outlook.com>

* try to fix codecov

Signed-off-by: starry69 <starry369126@outlook.com>

* refactor timeout logic with promise.add_done_cb

Signed-off-by: starry69 <starry369126@outlook.com>

* small fix

Signed-off-by: starry69 <starry369126@outlook.com>

* Address review

Signed-off-by: starry69 <starry369126@outlook.com>

* Fix some type hinting

* Few fixes

Signed-off-by: starry69 <starry369126@outlook.com>

* fix tests

Signed-off-by: starry69 <starry369126@outlook.com>

* minor nitpick

Signed-off-by: starry69 <starry369126@outlook.com>

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-04-30 10:10:46 +02:00
Bibo-Joshi b6a6d7f872 Api 5.2 (#2489)
* Bump API Version to v5.2

* InputInvoiceMessageContent & simplify *Markup.__eq__ on the fly

* Updates to send_invoice

* InlineQuery updatees and new parameter for InlineQueryhandler

* VCScheduled - not integrated into Message yet

* Bump requirements-dev.txt versions

* Message.voice_chat_scheduled & new Filters.status_update.vcs

* Some doc updates

* Review

* All praise harshil, the god of finding typos :)

* Review

* More warnings
2021-04-30 10:09:21 +02:00
Bibo-Joshi 3b92901892 Update ChatActions (#2460)
* deprecate CA.upload/record_audio in favor of ca.u/r_voice

* tests

* tests

* Fix test
2021-04-22 08:57:56 +02:00
Stɑrry Shivɑm b63877b1f2 Add Two UserWarnings (#2464)
* Warn if number of workers < one

Signed-off-by: starry69 <starry369126@outlook.com>

* improve warning message

Signed-off-by: starry69 <starry369126@outlook.com>

* warn if converstation handler return unknown state

Signed-off-by: starry69 <starry369126@outlook.com>

* Show handler name and state aswell, in warning

Signed-off-by: starry69 <starry369126@outlook.com>

* minor nitpick

Signed-off-by: starry69 <starry369126@outlook.com>
2021-04-16 19:02:43 +02:00
Aksh Gupta 9d93417d9a Improve Code Quality (#2450)
* chore: refactor code quality issues

* Add comment for removing assert statements

* Remove deepsource config file

* Fix Coverage

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-04-05 13:25:27 +02:00
Bibo-Joshi 9949b44560 Update Fallback Test-Bots (#2451) 2021-03-30 19:28:01 +02:00
Harshil 7abacb000b Fix echobot.py Example (#2448) 2021-03-29 11:16:22 +02:00
Harshil 43f5aeaff3 Improve Examples (#2441)
* close issue, typo fixes, remove unnecessary condition, etc

* use ForceReply in example

* remove extra whitespace

* address review, handle empty inline queries.

* Cosmetics

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-03-28 18:53:44 +02:00
Harshil 9e08fa30b6 Filters.forwarded_from (#2446)
* new filter and more tests!

* document forward filter better, fix a test.

* Minor formulation nitpicking

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-03-28 11:50:45 +02:00
Hinrich Mahler ccedd3a87d Bump version to v13.4.1 2021-03-14 19:21:44 +01:00
Bibo-Joshi 0bb4be55ac Fix setup.py (#2431) 2021-03-14 19:17:08 +01:00
Hinrich Mahler 21ded420e2 Bump version to v13.4 2021-03-14 17:00:26 +01:00
Bibo-Joshi 7d893fd04b Doc Fixes (#2404)
* Improve some badges for PTB-Raw

* doc fix for add_error_handler

* Some rendering

* Bump sphinx dependency

* Change signature annotation setting

* fix: chat_id can be string, message_id only int

* feat: add RTD link to documentation

* improving sender chat docstring (#2412)

* fix: improving sender chat docstring

also adding a note to a weird edge case

* fix: words being hard

* Add note on donations

* typo

* typo in User.get_profile_pictures docstrings

* Fix: meth, not attr for meth, not attr

* filters + inlinequery doc fix

* Bump versions, update RTD config file

* Try fix build

* Revert "fix: chat_id can be string, message_id only int"

This reverts commit ba04e5aa

* Add Starry & Harshil to credits

Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-03-14 16:46:37 +01:00
Bibo-Joshi 7015f8dedc Type Hinting Fixes (#2425)
Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
2021-03-14 16:42:03 +01:00
Poolitzer ac02bce109 API 5.1 (#2424)
* Feat: New invite links

* Fix: doc strings

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>

* new dice, new admin privilege, revoke_messages, update and fix some docs

* add missing param to shortcut

* Add ChatMemberUpdated

* Add voicechat related objects

Signed-off-by: starry69 <starry369126@outlook.com>

* add versionadd tags

Signed-off-by: starry69 <starry369126@outlook.com>

* Fix filter tests

* Update tg.Update

* ChatMemberHandler

* Add versioning directives

* add can_manage_voice_chats attr and fix docs

Signed-off-by: starry69 <starry369126@outlook.com>

* fix chat shortcut

Signed-off-by: starry69 <starry369126@outlook.com>

* address review

* MADTC

* Chat.message_auto_delete_time

* Some doc fixes

* address review

Signed-off-by: starry69 <starry369126@outlook.com>

* welp

Signed-off-by: starry69 <starry369126@outlook.com>

* Add voicechat related filters

Signed-off-by: starry69 <starry369126@outlook.com>

* Fix: Addressing review

change place of version adding, added obj:True as doc string, changing how member limit is initiated

* feat: adding chat shortcuts for invite links

* fix: changing equality of chatinviteobjects

* Non-test comments

* Some test fixes

* A bit more tests

* Bump API version in both readmes

* Increase coverage

* Add Bot API Version in telegram.constants (#2429)

* add bot api version in constants

Signed-off-by: starry69 <starry369126@outlook.com>

* addressing review

Signed-off-by: starry69 <starry369126@outlook.com>

* add versioning directive

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>

* pre-commit & coverage

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
Co-authored-by: starry69 <starry369126@outlook.com>
2021-03-14 16:41:35 +01:00
Bibo-Joshi 3a9a0ab96d Update pre-commit Settings (#2415)
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-03-13 16:21:03 +01:00
Bibo-Joshi aba17cb997 Improve Updater.set_webhook (#2419)
* Get started

* tests

* Some doc fixes

* Some doc fixes
2021-03-13 15:35:26 +01:00
Bibo-Joshi 038a3b4452 Fix Logging for Vendored urllib3 (#2427) 2021-03-13 15:14:10 +01:00
Bibo-Joshi b03ebc5a65 Stabilize Tests (#2409)
* Fix Photo Tests

* Try harder

* Try stabalizing pin&unpin test

* Drop file size tests

* Fix that one failing test …
2021-03-10 16:51:56 +01:00
Hinrich Mahler e9c01c7772 Bump version to v13.3 2021-02-19 19:55:49 +01:00
Bibo-Joshi 552298595c Doc Fixes (#2359)
* Improve some badges for PTB-Raw

* doc fix for add_error_handler

* Some rendering

* Doc fixes for filters.py

* render '@' as code

Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-02-19 19:27:17 +01:00
Bibo-Joshi 2a4a0d0ccd Refactor Defaults Integration (#2363)
* Change default handling, update signatures, get existing tests to pass.

* Try running tests on ubuntu 18.04

* Roll back

* Rework check_shortcut_call tests

* Further improve check_shortcut_call tests

* Start on defaults-checks for shortcuts, get it working for test_message

* Add check_shortcut_defaults to all other shortcut tests

* Some fine tuning

* Add defaults checking for bot methods

* Missing tests for TestCallbackQuery

* Test edit_message_media with defaults & some comments

* Fix cryptography requirement

* drop debug prints

* Remove debug prints

* Another try

* Try to fix coverage & logs

* Rearrange test order

* increase coverage

* Try to fix coverage reports

* address review

* Adapt tests like in #2386

* fix CI

* fix CI
2021-02-19 19:07:48 +01:00
Harshil eb993db473 Add Missing telegram.SecureValue to init and Docs (#2398) 2021-02-19 17:46:52 +01:00
Bibo-Joshi c77ef7eef3 Deprecate MessageQueue (#2393) 2021-02-19 17:29:50 +01:00
Bibo-Joshi a34f0b9bee Make cryptography Dependency Optional & Refactor Some Tests (#2386)
* Make cryptography optional

* Try fixing CI

* Try some more

* Update pytest, mypy & pyupgrade, refactor test_meta, hope that things start to work

* Fix filterwarnings

* Mama mia! Here we go again!

* Add stupid debug prints

* A new hope
2021-02-13 22:07:37 +01:00
Bibo-Joshi eee8921598 Update cryptography Dependency (#2370) 2021-02-08 19:28:54 +01:00
Hinrich Mahler 1902c0ac36 Bump version to v13.2 2021-02-02 20:57:14 +01:00
Bibo-Joshi 544a3fbf48 ConversationHandler: Docs & edited_channel_post behavior (#2339)
* Update docs & ignore edited channel posts

* typo

* Apply suggestions from code review

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>

* Update telegram/ext/conversationhandler.py

* fix pre-commit

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2021-02-01 19:26:03 +01:00
Bibo-Joshi 36d49ea9cd Doc Fixes (#2253)
* Render-fixes for BP

* docs: fix simple typo, submition -> submission (#2260)

There is a small typo in tests/test_bot.py.

Should read `submission` rather than `submition`.

* Type on rawapibot.py docstring

* typo

* Typo: Filters.document(s)

* Typo fix

* Doc fix for messageentity (#2311)

* Add New Shortcuts to Chat (#2291)

* Add shortcuts

* Add a note

* Add run_async Parameter to ConversationHandler (#2292)

* Add run_async parameter

* Update docstring

* Update test to explicitly specify parameter

* Fix test job queue

* Add version added tag to docs

* Update docstring

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>

* Doc nitpicking

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>

* Fix rendering in messageentity

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
Co-authored-by: zeshuaro <joshuaystang@gmail.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>

* fix: type hints for TelegramError

changed :class:`telegram.TelegramError` to :class:`telegram.error.TelegramError`

* fix: the error can be more then just a Telegram error

* Doc fix for inlinekeyboardbutton.py

added missing colon which broke rendering

* fix: remove context argument and doc remark

look at us already being in post 12

* use rtd badge

* filters doc fixes

* fix some rendering

* Doc & Rendering fixes for helpers.py

Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: zeshuaro <joshuaystang@gmail.com>
Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Harshil <ilovebhagwan@gmail.com>
2021-02-01 17:59:39 +01:00
Bibo-Joshi 25506f131d python-telegram-bot-raw (#2324)
* POC

* Remove decorator dependency

* Rework setup.py & build, add separate readme

* Move utils -> ext.utils

* Move pytz dep to ext

* Try fixing timing stuff

* Add 'Typed' classifier

* Update README_RAW.rst

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

* Some wording

* Deprecation warnings for moved tg.utils

* Tests for Promise

* Test time-helpers without pytz

* Try fixing time-helper tests

* Merge master

Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2021-01-30 14:15:39 +01:00
Bibo-Joshi 70aba136e4 Reduce Usage of typing.Any (#2321)
* Use object instead of Any where possible

* Revert a lof of noise from the PR
2021-01-30 11:38:54 +01:00
Stɑrry Shivɑm 40995b19fe Extend Deeplinking Example (#2335)
* extend deeplinking example

Signed-off-by: starry69 <starry369126@outlook.com>

* use username property instead of get_me calls

Signed-off-by: starry69 <starry369126@outlook.com>
2021-01-28 17:12:13 +01:00
zeshuaro 32da6d6fce Add Missing Shortcuts to Message (#2330)
* Add shortcuts for Message

* Fix docs in Chat

* Update docs in Message

* Fix tests in request.py

* Rollback changes made to fix mypy errors
2021-01-23 13:40:19 +01:00
Bibo-Joshi f31787a8ef Add pyupgrade to pre-commit Hooks (#2301)
* Add pyupgrade to pre-commit

* update test_chat
2021-01-17 23:24:20 +01:00
Stɑrry Shivɑm b43a599e53 Rich Comparison for Bot (#2320)
* Make telegram.Bot comparable

Signed-off-by: starry69 <starry369126@outlook.com>

* Address review

Signed-off-by: starry69 <starry369126@outlook.com>

* Enhance tests & add docstring about comparison

Signed-off-by: starry69 <starry369126@outlook.com>

* Minor doc fix

* Extend tests

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-01-17 09:23:36 +01:00
Bibo-Joshi 7a3fd83570 Add PR Template (#2299)
* Add PR template

* Apply suggestions from code review

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>

* Some more

* reformulate

* Apply suggestions from code review

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2021-01-16 13:57:25 +01:00
Bibo-Joshi 9ada2a7cca Drop Nightly Tests & Update Badges (#2323) 2021-01-16 11:27:06 +01:00
Eana Hufwe be54cf4ece Fix Escaping in Nested Entities in Message Properties (#2312)
* fix: overly escape and offset error markdown v2 symbols when nested

Signed-off-by: Eana Hufwe <ilove@1a23.com>

* fix: nested entity escape for HTML parsers and tests

Signed-off-by: Eana Hufwe <ilove@1a23.com>
2021-01-12 19:33:26 +01:00
zeshuaro 0c9915243d Add run_async Parameter to ConversationHandler (#2292)
* Add run_async parameter

* Update docstring

* Update test to explicitly specify parameter

* Fix test job queue

* Add version added tag to docs

* Update docstring

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>

* Doc nitpicking

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2021-01-09 20:05:58 +01:00
Bibo-Joshi 9930725e2a Add New Shortcuts to Chat (#2291)
* Add shortcuts

* Add a note
2021-01-09 17:48:56 +01:00
Bibo-Joshi ffd675daec Adjust Calling of Dispatcher.update_persistence (#2285)
* Adjust calling of update_persistence

(cherry picked from commit 89c522d883)

* Fix tests and stuff
2021-01-07 21:31:00 +01:00
Bibo-Joshi 6a831f926b Add New Constant MAX_ANSWER_CALLBACK_QUERY_TEXT_LENGTH (#2282) 2021-01-07 21:27:51 +01:00
Bibo-Joshi 6903d58142 Update Copyright (#2289)
* Update coypright headers

* typos
2021-01-04 17:24:14 +01:00
Bibo-Joshi 07b6ee69d2 Update Copyright (#2287)
Signed-off-by: starry69 <starry369126@outlook.com>
2021-01-03 10:30:02 +01:00
starry69 c8a3c31dcc Update copyright of docs config
Signed-off-by: starry69 <starry369126@outlook.com>
2021-01-03 14:42:51 +05:30
starry69 91e0271e4c Update copyright headers
Signed-off-by: starry69 <starry369126@outlook.com>
2021-01-03 10:40:24 +05:30
Hinrich Mahler 9ddb361f76 Revert "Adjust calling of update_persistence"
This reverts commit 89c522d883.
2021-01-01 21:44:23 +01:00
Hinrich Mahler 89c522d883 Adjust calling of update_persistence 2021-01-01 21:40:42 +01:00
Bibo-Joshi 2effff8254 Change Order of Class DocStrings (#2256) 2020-12-30 15:59:50 +01:00
Bibo-Joshi 2788191657 Add macOS to Test Matrix (#2266)
* Try testing on macos

* Skip JobQueue tests on macos

* Try stabilizing tests

* Try harder
2020-12-30 15:39:38 +01:00
Bibo-Joshi aec6d3bada Explicit Signatures for Shortcuts (#2240)
* First POC

* Actually get it to work

* locals-less POC

* pre-commit

* Work on Message shortcuts, update some annotations in Bot methods

* Tippity Tappity, coding stuff

* CallbackQuery

* InlineQuery & Some other stuff

* Media Classes and PassportFile

* Fix tests

* PreCheckout- & ShippingQuery

* User

* Fix tests

* Chat

* Update rawapibot

* Update annotations for answer_inline_query
2020-12-30 13:41:07 +01:00
Bibo-Joshi 80b34811ab Handle Bytes as File Input (#2233)
* Handle bytes file input

* fix tests

* Docs, Tests & Rearrangements

* Use versioning directives

* fixing type hinting of send_photo

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2020-12-18 11:20:03 +01:00
Poolitzer 2d7a974b8f Start Using Versioning Directives in Docs (#2252)
* adding versioning in sphinx, closing #2250

* adding version requirement to contributors doc
2020-12-17 19:05:12 +01:00
Bibo-Joshi ef703d19e9 Doc Fixes (#2225)
* Fix dscr for soccer ball values

* Update docs of BasePersistence regarding abc

* elaborate run_daily docs

* Make docstring of send_document.filename more precise

* increase bot API and add Discussion link

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2020-12-17 09:29:17 +01:00
Bibo-Joshi 77a8c64f6c Improve Annotations & Docs of Handlers (#2243)
* Improve typing & docs of handlers

* Apply suggestions from code review

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>

Co-authored-by: Poolitzer <25934244+Poolitzer@users.noreply.github.com>
2020-12-16 17:34:57 +01:00
Bibo-Joshi 786762bb73 Allow Passing Custom Filename For All Media (#2249)
* Add filename arg to send_media methods and InputMedia*

* Tests
2020-12-16 14:28:53 +01:00
Bibo-Joshi e0dbb99b08 Add quote kwarg to Message.reply_copy (#2232)
* add quote kwrag to Message.reply_copy

* Add docs & update tests
2020-12-03 20:51:47 +01:00
Hinrich Mahler 73b0e29a30 Bump version to v13.1 2020-11-29 17:01:03 +01:00
Bibo-Joshi d27d1ea4d5 Correct Some Type Hints (#2204)
* Correct some reply_markup hints

* Fix type hints of effective_message_type

* fixup
2020-11-29 16:32:38 +01:00
Bibo-Joshi ca04daf782 Doc Fixes & Extensions (#2201)
* Add note on dispatcherhandlerstop to conversationhandler

* Fine tune @run_async deprecation warning

* Refine docs of JobQueue.jobs/get_jobs_by_name
2020-11-29 16:25:47 +01:00
Bibo-Joshi ae9ce60b55 API 5.0 (#2181)
Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
2020-11-29 16:20:46 +01:00
Bibo-Joshi 1cd3a0a156 Handle Non-Binary File Input (#2202)
* Don't fail if stream is not bytes

* move logger

* Refactor InputFile.is_image

* Use f-strings

* some clean up
2020-11-24 20:31:34 +01:00
Bibo-Joshi 58b9882021 Use F-Strings Where Possible (#2222) 2020-11-23 22:09:29 +01:00
Bibo-Joshi df6d5f0840 Fix bugs in replace/insert_bot (#2218)
* Fix bugs in replace/insert_bot

* Some tweaks
2020-11-22 11:08:46 +01:00
Stɑrry Shivɑm 425716f966 Add Defaults.run_async (#2210)
* Add Defaults.run_async support

Signed-off-by: starry69 <starry369126@outlook.com>

* Address some requested changes.

Signed-off-by: starry69 <starry369126@outlook.com>

* Add tests for defaults.run_async

Signed-off-by: starry69 <starry369126@outlook.com>

* Fix tests logic & add default value support for dp.add_error_handler

Signed-off-by: starry69 <starry369126@outlook.com>

* Fix tests, with requested changes

Signed-off-by: starry69 <starry369126@outlook.com>

* Add tests for error_handler

Signed-off-by: starry69 <starry369126@outlook.com>

* try to fix pre-commit

Signed-off-by: starry69 <starry369126@outlook.com>

* Enhance tests & address suggested changes

Signed-off-by: starry69 <starry369126@outlook.com>

* Improve docs

Signed-off-by: starry69 <starry369126@outlook.com>
2020-11-17 21:31:01 +01:00
Bibo-Joshi 8d9bb26cca Improve Handling of Custom Objects in BasePersistence.insert/replace_bot (#2151)
* Handle unpickable objects

* Improve coverage

* Add user warning

* make comparison to REPLACED_BOT safe

* make pre-commit happy

* Shorten warning
2020-11-14 03:08:18 +01:00
Bibo-Joshi d1438a9b23 Add XOR Filters and make Filters.name a Property (#2179)
* XOR Filters and make Filters.name a property

* add XORFilter to __all__

* Change example
2020-11-07 08:44:45 +01:00
Evgeny Denisov 27b03edc59 Expand Type Hints to Tuples (#2167)
Co-authored-by: Pranjalya <pranjalyawarrior@gmail.com>
2020-11-07 08:26:32 +01:00
Evgeny Denisov ac449deb5d Add Filters.document.file_extension (#2169)
Co-authored-by: Matheus Lemos <matheuslemosf@protonmail.com>
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2020-11-06 18:41:54 +01:00
Bibo-Joshi 3b9187ed5a Rename kwargs to _kwargs where possible (#2182) 2020-11-05 18:12:01 +01:00
Bibo-Joshi 9831458e22 Improve and Expand CallbackQuery Shortcuts (#2172)
* CallbackQuery.delete_message()

* Improve internals of CQ shortcuts
2020-11-05 17:11:35 +01:00
Marco Fincato a0cd6e8fef Add Filters.caption_regex (#2163)
* Check caption in Filters.regex

Added regex matching for message caption in Filters.regex.

* Moved caption check to Filters.caption_regex

* Added caption_regex tests

The same as for regex, with only the content of the message changed, that is now inside caption.

* Fixed pre-commit tests

Lines too long and an additional blank line

* Moved line break to comply

* Reformatted code with black

* Added docstrings
2020-11-04 20:54:24 +01:00
Bibo-Joshi 8e7c0d6976 Comply with PEP561 (#2168)
* Comply with PEP561

* Try harder

* third time's (hopefully) a charme
2020-11-01 19:33:01 +01:00
Bibo-Joshi 92b9370c23 Improve Code Quality (#2131)
* Make pre-commit more strict

* Get pylint to read setup.cfg

* Make pylint & mypy happy aka ignore all the things

* use LogRecord.getMessage() in tests

* Make noam happy

* Update both pylint & mypy while we're at it

* Bring reqs-dev and makefile up to speed

* try making pre-commit happy

* fix jobqueue tests on the fly
2020-10-31 16:33:34 +01:00
GauthamramRavichandran 237e73bfb4 Add Filters.chat_type (#2128)
* add supergroup filter

* add chat_type filter

* re-implemented ChatType

* Add deprecations, improve tests

* Fix some docs

* Fix black

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2020-10-29 19:42:08 +01:00
Bibo-Joshi ff3fd34f08 Update Credits (#2161) 2020-10-27 17:43:23 +01:00
Bibo-Joshi 83791d34e7 Fix Regex in Configuration of Black Formatter (#2159) 2020-10-23 14:46:56 +02:00
Bibo-Joshi 02cd7b642f Fix Configuration of Black Formatter (#2158)
* Fix Black in pre-commit

* Fix black some more
2020-10-23 13:40:02 +02:00
NikitaPirate 165a24e13d Add Convenience Properties for Service Chats and Anonymous Admins (#2147)
Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2020-10-18 16:15:56 +02:00
Michael K 88440079e3 Update Wheel Settings (#2142)
Wheels are only universal if they support both Python 2 and 3.
2020-10-15 21:50:25 +02:00
Bibo-Joshi 9be4c7563b Improve Type Hinting for Class Variables (#2136) 2020-10-15 18:50:47 +02:00
Timur Kushukov b554f1a85d Update timerbot.py to v13.0 (#2149)
* Update timerbot example (#2144)

* update timerbot example (suggestions from review)

Co-authored-by: Bibo-Joshi <hinrich.mahler@freenet.de>
2020-10-15 18:48:12 +02:00
NikitaPirate 3b4559dd95 Overhaul Constants (#2137)
* Move all constants to constants.py and documentation refactor.

* Move all constants to constants.py and documentation refactor.

* Overhaul constants

* Overhaul constants

* Minor docstring change

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2020-10-13 17:58:36 +02:00
Bibo-Joshi 9ae48fecfe Add Python 3.9 to Test Matrix (#2132)
* Add Py 3.9 to tests

* update setup-python action
2020-10-11 11:47:19 +02:00
Bibo-Joshi 6af6648509 Switch Codecov to GitHub Action (#2127) 2020-10-10 10:50:19 +02:00
Bibo-Joshi 264b2c9c72 Switch Code Formatting to Black (#2122)
* Swtich code formatting to Black

* Update docs

* Fix tests

* TRy fixing pre-commit
2020-10-09 17:22:07 +02:00
Nano 8efb05290a Specify Required pytz Version (#2121) 2020-10-09 09:15:34 +02:00
Harshil 83a8874bb5 Correct Some Type Hints (#2118)
* Add string type hint

* fixed type hint in send_message()

* change type hint of send_chat_action to str

* make flaky happy

* fixed another type hint in edit_message_text
2020-10-09 08:22:44 +02:00
515 changed files with 45071 additions and 12947 deletions
+20
View File
@@ -0,0 +1,20 @@
version = 1
test_patterns = ["tests/**"]
exclude_patterns = [
"tests/**",
"docs/**",
"telegram/vendor/**",
"setup.py",
"setup-raw.py"
]
[[analyzers]]
name = "python"
enabled = true
[analyzers.meta]
runtime_version = "3.x.x"
max_line_length = 99
skip_doc_coverage = ["module", "magic", "init", "nonpublic"]
+18 -20
View File
@@ -50,6 +50,8 @@ Instructions for making a code change
The central development branch is ``master``, which should be clean and ready for release at any time. In general, all changes should be done as feature branches based off of ``master``.
If you want to do solely documentation changes, base them and PR to the branch ``doc-fixes``. This branch also has its own `RTD build`_.
Here's how to make a one-off code change.
1. **Choose a descriptive branch name.** It should be lowercase, hyphen-separated, and a noun describing the change (so, ``fuzzy-rules``, but not ``implement-fuzzy-rules``). Also, it shouldn't start with ``hotfix`` or ``release``.
@@ -91,12 +93,16 @@ Here's how to make a one-off code change.
Once the process terminates, you can view the built documentation by opening ``docs/build/html/index.html`` with a browser.
- For consistency, please conform to `Google Python Style Guide`_ and `Google Python Style Docstrings`_. In addition, code should be formatted consistently with other code around it.
- Add ``.. versionadded:: version``, ``.. versionchanged:: version`` or ``.. deprecated:: version`` to the associated documentation of your changes, depending on what kind of change you made. This only applies if the change you made is visible to an end user. The directives should be added to class/method descriptions if their general behaviour changed and to the description of all arguments & attributes that changed.
- For consistency, please conform to `Google Python Style Guide`_ and `Google Python Style Docstrings`_.
- The following exceptions to the above (Google's) style guides applies:
- Documenting types of global variables and complex types of class members can be done using the Sphinx docstring convention.
- In addition, PTB uses the `Black`_ coder formatting. Plugins for Black exist for some `popular editors`_. You can use those instead of manually formatting everything.
- Please ensure that the code you write is well-tested.
- Dont break backward compatibility.
@@ -105,12 +111,6 @@ Here's how to make a one-off code change.
- Before making a commit ensure that all automated tests still pass:
.. code-block::
$ make test
If you don't have ``make``, do:
.. code-block::
$ pytest -v
@@ -123,18 +123,18 @@ Here's how to make a one-off code change.
prior to running the tests.
- To actually make the commit (this will trigger tests for yapf, lint and pep8 automatically):
- If you want run style & type checks before committing run
.. code-block::
$ pre-commit run -a
- To actually make the commit (this will trigger tests style & type checks automatically):
.. code-block:: bash
$ git add your-file-changed.py
- yapf may change code formatting, make sure to re-add them to your commit.
.. code-block:: bash
$ git commit -a -m "your-commit-message-here"
- Finally, push it to your GitHub fork, run:
.. code-block:: bash
@@ -189,15 +189,10 @@ Here's how to make a one-off code change.
Style commandments
------------------
Specific commandments
#####################
- Avoid using "double quotes" where you can reasonably use 'single quotes'.
Assert comparison order
#######################
- assert statements should compare in **actual** == **expected** order.
Assert statements should compare in **actual** == **expected** order.
For example (assuming ``test_call`` is the thing being tested):
.. code-block:: python
@@ -255,3 +250,6 @@ break the API classes. For example:
.. _AUTHORS.rst: ../AUTHORS.rst
.. _`MyPy`: https://mypy.readthedocs.io/en/stable/index.html
.. _`here`: https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html
.. _`Black`: https://black.readthedocs.io/en/stable/index.html
.. _`popular editors`: https://black.readthedocs.io/en/stable/editor_integration.html
.. _`RTD build`: https://python-telegram-bot.readthedocs.io/en/doc-fixes
+76
View File
@@ -0,0 +1,76 @@
name: Bug Report
description: Create a report to help us improve
title: "[BUG]"
labels: ["bug :bug:"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting issues of python-telegram-bot!
Use this template to notify us if you found a bug.
To make it easier for us to help you please enter detailed information below.
Please note, we only support the latest version of python-telegram-bot and master branch. Please make sure to upgrade & recreate the issue on the latest version prior to opening an issue.
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
value: |
1.
2.
3.
validations:
required: true
- type: textarea
id: expected-behaviour
attributes:
label: Expected behaviour
description: Tell us what should happen
validations:
required: true
- type: textarea
id: actual-behaviour
attributes:
label: Actual behaviour
description: Tell us what happens instead
validations:
required: true
- type: markdown
attributes:
value: "### Configuration"
- type: input
id: operating-system
attributes:
label: Operating System
validations:
required: true
- type: textarea
id: versions
attributes:
label: Version of Python, python-telegram-bot & dependencies
description: Paste the output of `$ python -m telegram` here. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Insert logs here (if necessary). This will be automatically formatted into code, so no need for backticks.
render: python
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: You may provide any other additional context to the bug here.
-43
View File
@@ -1,43 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: 'bug :bug:'
assignees: ''
---
<!--
Thanks for reporting issues of python-telegram-bot!
Use this template to notify us if you found a bug.
To make it easier for us to help you please enter detailed information below.
Please note, we only support the latest version of python-telegram-bot and
master branch. Please make sure to upgrade & recreate the issue on the latest
version prior to opening an issue.
-->
### Steps to reproduce
1.
2.
3.
### Expected behaviour
Tell us what should happen
### Actual behaviour
Tell us what happens instead
### Configuration
**Operating System:**
**Version of Python, python-telegram-bot & dependencies:**
``$ python -m telegram``
### Logs
Insert logs here (if necessary)
+3 -3
View File
@@ -3,6 +3,6 @@ contact_links:
- name: Telegram Group
url: https://telegram.me/pythontelegrambotgroup
about: Questions asked on the group usually get answered faster.
- name: IRC Channel
url: https://webchat.freenode.net/?channels=##python-telegram-bot
about: In case you are unable to join our group due to Telegram restrictions, you can use our IRC channel
- name: GitHub Discussions
url: https://github.com/python-telegram-bot/python-telegram-bot/discussions
about: For getting answers to usage on GitHub, Discussions is even better than this bug tracker :)
@@ -0,0 +1,37 @@
name: Feature Request
description: Suggest an idea for this project
title: "[FEATURE]"
labels: ["enhancement"]
body:
- type: textarea
id: related-problem
attributes:
label: "What kind of feature are you missing? Where do you notice a shortcoming of PTB?"
description: "A clear and concise description of what the problem is."
placeholder: "Example: I want to do X, but there is no way to do it."
validations:
required: true
- type: textarea
id: solution
attributes:
label: "Describe the solution you'd like"
description: "A clear and concise description of what you want to happen."
placeholder: "Example: I think it would be nice if you would add feature Y so I can do X."
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: "Describe alternatives you've considered"
description: "A clear and concise description of any alternative solutions or features you've considered."
placeholder: "Example: I considered Z to be able to do X, but that didn't work because..."
- type: textarea
id: additional-context
attributes:
label: "Additional context"
description: "Add any other context or screenshots about the feature request here."
placeholder: "Example: Here's a photo of my cat!"
-24
View File
@@ -1,24 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
labels: enhancement
assignees: ''
---
#### Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Ex. *I want to do X, but there is no way to do it.*
#### Describe the solution you'd like
A clear and concise description of what you want to happen.
Ex. *I think it would be nice if you would add feature Y so it will make it easier.*
#### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Ex. *I considered Z, but that didn't work because...*
#### Additional context
Add any other context or screenshots about the feature request here.
Ex. *Here's a photo of my cat!*
-29
View File
@@ -1,29 +0,0 @@
---
name: Question
about: Get help with errors or general questions
title: "[QUESTION]"
labels: question
assignees: ''
---
<!--
Hey there, you have a question? We are happy to answer. Please make sure no similar question was opened already.
To make it easier for us to help you, please read this article https://git.io/JURJO and try to follow the template below as closely as possible.
Please mind that there is also a users' Telegram group at https://t.me/pythontelegrambotgroup for questions about the library. Questions asked there might be answered quicker than here. In case you are unable to join our group due to Telegram restrictions, you can use our IRC channel at https://webchat.freenode.net/?channels=##python-telegram-bot to participate in the group.
-->
### Issue I am facing
Please describe the issue here in as much detail as possible
### Traceback to the issue
```
put it here
```
### Related part of your code
```python
put it here
```
+68
View File
@@ -0,0 +1,68 @@
name: Question
description: Get help with errors or general questions
title: "[QUESTION]"
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Hey there, you have a question? We are happy to answer. Please make sure no similar question was opened already.
To make it easier for us to help you, please read this [article](https://git.io/JURJO).
Please mind that there is also a users' [Telegram group](https://t.me/pythontelegrambotgroup) for questions about the library. Questions asked there might be answered quicker than here. Moreover, [GitHub Discussions](https://git.io/JG3rk) offer a slightly better format to discuss usage questions.
- type: textarea
id: issue-faced
attributes:
label: "Issue I am facing"
description: "Please describe the issue here in as much detail as possible"
validations:
required: true
- type: textarea
id: traceback
attributes:
label: "Traceback to the issue"
description: "If you are facing a specific error message, please paste the traceback here. This will be automatically formatted into python code, so no need for backticks."
placeholder: |
Traceback (most recent call last):
File "/home/bot.py", line 1, in main
foo = bar()
...
telegram.error.BadRequest: Traceback not found
render: python
- type: textarea
id: related-code
attributes:
label: "Related part of your code"
description: "This will be automatically formatted into code (python), so no need for backticks."
placeholder: |
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
)
logger = logging.getLogger(__name__)
render: python
- type: markdown
attributes:
value: "### Configuration"
- type: input
id: operating-system
attributes:
label: Operating System
validations:
required: true
- type: textarea
id: versions
attributes:
label: Version of Python, python-telegram-bot & dependencies
description: Paste the output of `$ python -m telegram` here. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
+31
View File
@@ -0,0 +1,31 @@
<!--
Hey! You're PRing? Cool! Please have a look at the below checklist. It's here to help both you and the maintainers to remember some aspects. Make sure to check out our contribution guide (https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst).
-->
### Checklist for PRs
- [ ] Added `.. versionadded:: version`, `.. versionchanged:: version` or `.. deprecated:: version` to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
- [ ] Created new or adapted existing unit tests
- [ ] Added myself alphabetically to `AUTHORS.rst` (optional)
### If the PR contains API changes (otherwise, you can delete this passage)
* New classes:
- [ ] Added `self._id_attrs` and corresponding documentation
- [ ] `__init__` accepts `**_kwargs`
* Added new shortcuts:
- [ ] In `Chat` & `User` for all methods that accept `chat/user_id`
- [ ] In `Message` for all methods that accept `chat_id` and `message_id`
- [ ] For new `Message` shortcuts: Added `quote` argument if methods accepts `reply_to_message_id`
- [ ] In `CallbackQuery` for all methods that accept either `chat_id` and `message_id` or `inline_message_id`
* If relevant:
- [ ] Added new constants at `telegram.constants` and shortcuts to them as class variables
- [ ] Added new handlers for new update types
- [ ] Added new filters for new message (sub)types
- [ ] Added or updated documentation for the changed class(es) and/or method(s)
- [ ] Updated the Bot API version number in all places: `README.rst` and `README_RAW.rst` (including the badge), as well as `telegram.constants.BOT_API_VERSION`
- [ ] Added logic for arbitrary callback data in `tg.ext.Bot` for new methods that either accept a `reply_markup` in some form or have a return type that is/contains `telegram.Message`
@@ -0,0 +1,17 @@
name: Warning maintainers
on:
pull_request:
paths:
- requirements.txt
- requirements-dev.txt
- .pre-commit-config.yaml
jobs:
job:
runs-on: ubuntu-latest
name: about pre-commit and dependency change
steps:
- name: running the check
uses: Poolitzer/notifier-action@master
with:
notify-message: Hey! Looks like you edited the (dev) requirements or the pre-commit hooks. I'm just a friendly reminder to keep the pre-commit hook versions in sync with the dev requirements and the additional dependencies for the hooks in sync with the requirements :)
repo-token: ${{ secrets.GITHUB_TOKEN }}
+16
View File
@@ -0,0 +1,16 @@
name: Warning maintainers
on:
pull_request:
paths:
- README.rst
- README_RAW.rst
jobs:
job:
runs-on: ubuntu-latest
name: about readme change
steps:
- name: running the check
uses: Poolitzer/notifier-action@master
with:
notify-message: Hey! Looks like you edited README.rst or README_RAW.rst. I'm just a friendly reminder to apply relevant changes to both of those files :)
repo-token: ${{ secrets.GITHUB_TOKEN }}
+29 -28
View File
@@ -3,8 +3,6 @@ on:
pull_request:
branches:
- master
schedule:
- cron: 7 3 * * *
push:
branches:
- master
@@ -15,15 +13,8 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
python-version: 3.7
test-build: True
- os: windows-latest
python-version: 3.7
test-build: True
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: False
steps:
- uses: actions/checkout@v2
@@ -31,7 +22,7 @@ jobs:
run:
git submodule update --init --recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -42,28 +33,38 @@ jobs:
python -W ignore -m pip install -r requirements-dev.txt
- name: Test with pytest
# We run 3 different suites here
# 1. Test just utils.helpers.py without pytz being installed
# 2. Test just test_no_passport.py without passport dependencies being installed
# 3. Test everything else
# The first & second one are achieved by mocking the corresponding import
# See test_helpers.py & test_no_passport.py for details
run: |
pytest -v -m nocoverage
nocov_exit=$?
pytest -v -m "not nocoverage" --cov
cov_exit=$?
global_exit=$(( nocov_exit > cov_exit ? nocov_exit : cov_exit ))
pytest -v --cov -k test_no_passport.py
no_passport_exit=$?
export TEST_NO_PASSPORT='false'
pytest -v --cov --cov-append -k test_helpers.py
no_pytz_exit=$?
export TEST_NO_PYTZ='false'
pytest -v --cov --cov-append
full_exit=$?
special_exit=$(( no_pytz_exit > no_passport_exit ? no_pytz_exit : no_passport_exit ))
global_exit=$(( special_exit > full_exit ? special_exit : full_exit ))
exit ${global_exit}
env:
JOB_INDEX: ${{ strategy.job-index }}
BOTS: W3sidG9rZW4iOiAiNjk2MTg4NzMyOkFBR1Z3RUtmSEhsTmpzY3hFRE5LQXdraEdzdFpfa28xbUMwIiwgInBheW1lbnRfcHJvdmlkZXJfdG9rZW4iOiAiMjg0Njg1MDYzOlRFU1Q6WldGaU1UUmxNbVF5TnpNeSIsICJib3RfbmFtZSI6ICJQVEIgdGVzdHMgb24gVHJhdmlzIHVzaW5nIENQeXRob24gMi43IiwgInN1cGVyX2dyb3VwX2lkIjogIi0xMDAxMzkwOTgzOTk3IiwgImJvdF91c2VybmFtZSI6ICJAcHRiX3RyYXZpc19jcHl0aG9uXzI3X2JvdCJ9LCB7InRva2VuIjogIjY3MTQ2ODg4NjpBQUdQR2ZjaVJJQlVORmU4MjR1SVZkcTdKZTNfWW5BVE5HdyIsICJwYXltZW50X3Byb3ZpZGVyX3Rva2VuIjogIjI4NDY4NTA2MzpURVNUOlpHWXdPVGxrTXpNeE4yWTIiLCAiYm90X25hbWUiOiAiUFRCIHRlc3RzIG9uIFRyYXZpcyB1c2luZyBDUHl0aG9uIDMuNCIsICJzdXBlcl9ncm91cF9pZCI6ICItMTAwMTQ0NjAyMjUyMiIsICJib3RfdXNlcm5hbWUiOiAiQHB0Yl90cmF2aXNfY3B5dGhvbl8zNF9ib3QifSwgeyJ0b2tlbiI6ICI2MjkzMjY1Mzg6QUFGUnJaSnJCN29CM211ekdzR0pYVXZHRTVDUXpNNUNVNG8iLCAicGF5bWVudF9wcm92aWRlcl90b2tlbiI6ICIyODQ2ODUwNjM6VEVTVDpNbU01WVdKaFl6a3hNMlUxIiwgImJvdF9uYW1lIjogIlBUQiB0ZXN0cyBvbiBUcmF2aXMgdXNpbmcgQ1B5dGhvbiAzLjUiLCAic3VwZXJfZ3JvdXBfaWQiOiAiLTEwMDE0OTY5MTc3NTAiLCAiYm90X3VzZXJuYW1lIjogIkBwdGJfdHJhdmlzX2NweXRob25fMzVfYm90In0sIHsidG9rZW4iOiAiNjQwMjA4OTQzOkFBRmhCalFwOXFtM1JUeFN6VXBZekJRakNsZS1Kano1aGNrIiwgInBheW1lbnRfcHJvdmlkZXJfdG9rZW4iOiAiMjg0Njg1MDYzOlRFU1Q6WXpoa1pUZzFOamMxWXpWbCIsICJib3RfbmFtZSI6ICJQVEIgdGVzdHMgb24gVHJhdmlzIHVzaW5nIENQeXRob24gMy42IiwgInN1cGVyX2dyb3VwX2lkIjogIi0xMDAxMzMzODcxNDYxIiwgImJvdF91c2VybmFtZSI6ICJAcHRiX3RyYXZpc19jcHl0aG9uXzM2X2JvdCJ9LCB7InRva2VuIjogIjY5NTEwNDA4ODpBQUhmenlsSU9qU0lJUy1lT25JMjB5MkUyMEhvZEhzZnotMCIsICJwYXltZW50X3Byb3ZpZGVyX3Rva2VuIjogIjI4NDY4NTA2MzpURVNUOk9HUTFNRGd3WmpJd1pqRmwiLCAiYm90X25hbWUiOiAiUFRCIHRlc3RzIG9uIFRyYXZpcyB1c2luZyBDUHl0aG9uIDMuNyIsICJzdXBlcl9ncm91cF9pZCI6ICItMTAwMTQ3ODI5MzcxNCIsICJib3RfdXNlcm5hbWUiOiAiQHB0Yl90cmF2aXNfY3B5dGhvbl8zN19ib3QifSwgeyJ0b2tlbiI6ICI2OTE0MjM1NTQ6QUFGOFdrakNaYm5IcVBfaTZHaFRZaXJGRWxackdhWU9oWDAiLCAicGF5bWVudF9wcm92aWRlcl90b2tlbiI6ICIyODQ2ODUwNjM6VEVTVDpZamM1TlRoaU1tUXlNV1ZoIiwgImJvdF9uYW1lIjogIlBUQiB0ZXN0cyBvbiBUcmF2aXMgdXNpbmcgUHlQeSAyLjciLCAic3VwZXJfZ3JvdXBfaWQiOiAiLTEwMDEzNjM5MzI1NzMiLCAiYm90X3VzZXJuYW1lIjogIkBwdGJfdHJhdmlzX3B5cHlfMjdfYm90In0sIHsidG9rZW4iOiAiNjg0MzM5OTg0OkFBRk1nRUVqcDAxcjVyQjAwN3lDZFZOc2c4QWxOc2FVLWNjIiwgInBheW1lbnRfcHJvdmlkZXJfdG9rZW4iOiAiMjg0Njg1MDYzOlRFU1Q6TVRBek1UWTNNR1V5TmpnMCIsICJib3RfbmFtZSI6ICJQVEIgdGVzdHMgb24gVHJhdmlzIHVzaW5nIFB5UHkgMy41IiwgInN1cGVyX2dyb3VwX2lkIjogIi0xMDAxNDA3ODM2NjA1IiwgImJvdF91c2VybmFtZSI6ICJAcHRiX3RyYXZpc19weXB5XzM1X2JvdCJ9LCB7InRva2VuIjogIjY5MDA5MTM0NzpBQUZMbVI1cEFCNVljcGVfbU9oN3pNNEpGQk9oMHozVDBUbyIsICJwYXltZW50X3Byb3ZpZGVyX3Rva2VuIjogIjI4NDY4NTA2MzpURVNUOlpEaGxOekU1TURrd1lXSmkiLCAiYm90X25hbWUiOiAiUFRCIHRlc3RzIG9uIEFwcFZleW9yIHVzaW5nIENQeXRob24gMy40IiwgInN1cGVyX2dyb3VwX2lkIjogIi0xMDAxMjc5NjAwMDI2IiwgImJvdF91c2VybmFtZSI6ICJAcHRiX2FwcHZleW9yX2NweXRob25fMzRfYm90In0sIHsidG9rZW4iOiAiNjk0MzA4MDUyOkFBRUIyX3NvbkNrNTVMWTlCRzlBTy1IOGp4aVBTNTVvb0JBIiwgInBheW1lbnRfcHJvdmlkZXJfdG9rZW4iOiAiMjg0Njg1MDYzOlRFU1Q6WW1aaVlXWm1NakpoWkdNeSIsICJib3RfbmFtZSI6ICJQVEIgdGVzdHMgb24gQXBwVmV5b3IgdXNpbmcgQ1B5dGhvbiAyLjciLCAic3VwZXJfZ3JvdXBfaWQiOiAiLTEwMDEyOTMwNzkxNjUiLCAiYm90X3VzZXJuYW1lIjogIkBwdGJfYXBwdmV5b3JfY3B5dGhvbl8yN19ib3QifSwgeyJ0b2tlbiI6ICIxMDU1Mzk3NDcxOkFBRzE4bkJfUzJXQXd1SjNnN29oS0JWZ1hYY2VNbklPeVNjIiwgInBheW1lbnRfcHJvdmlkZXJfdG9rZW4iOiAiMjg0Njg1MDYzOlRFU1Q6TmpBd056QXpZalZpTkdOayIsICJuYW1lIjogIlBUQiB0ZXN0cyBbMF0iLCAic3VwZXJfZ3JvdXBfaWQiOiAiLTEwMDExODU1MDk2MzYiLCAidXNlcm5hbWUiOiAicHRiXzBfYm90In0sIHsidG9rZW4iOiAiMTA0NzMyNjc3MTpBQUY4bk90ODFGcFg4bGJidno4VWV3UVF2UmZUYkZmQnZ1SSIsICJwYXltZW50X3Byb3ZpZGVyX3Rva2VuIjogIjI4NDY4NTA2MzpURVNUOllUVTFOVEk0WkdSallqbGkiLCAibmFtZSI6ICJQVEIgdGVzdHMgWzFdIiwgInN1cGVyX2dyb3VwX2lkIjogIi0xMDAxNDg0Nzk3NjEyIiwgInVzZXJuYW1lIjogInB0Yl8xX2JvdCJ9LCB7InRva2VuIjogIjk3MTk5Mjc0NTpBQUdPa09hVzBOSGpnSXY1LTlqUWJPajR2R3FkaFNGLVV1cyIsICJwYXltZW50X3Byb3ZpZGVyX3Rva2VuIjogIjI4NDY4NTA2MzpURVNUOk5XWmtNV1ZoWWpsallqVTUiLCAibmFtZSI6ICJQVEIgdGVzdHMgWzJdIiwgInN1cGVyX2dyb3VwX2lkIjogIi0xMDAxNDAyMjU1MDcwIiwgInVzZXJuYW1lIjogInB0Yl8yX2JvdCJ9XQ==
TEST_BUILD: ${{ matrix.test-build }}
TEST_PRE_COMMIT: ${{ matrix.test-pre-commit }}
TEST_NO_PYTZ : "true"
TEST_NO_PASSPORT: "true"
TEST_BUILD: "true"
shell: bash --noprofile --norc {0}
- name: Submit coverage
run: |
if [ "$CODECOV_TOKEN" != "" ]; then
codecov -F github -t $CODECOV_TOKEN --name "${{ matrix.os }}-${{ matrix.python-version }}"
fi
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
shell: bash
uses: codecov/codecov-action@v1
with:
env_vars: OS,PYTHON
name: ${{ matrix.os }}-${{ matrix.python-version }}
fail_ci_if_error: true
test_official:
name: test-official
runs-on: ${{matrix.os}}
@@ -78,7 +79,7 @@ jobs:
run:
git submodule update --init --recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -107,7 +108,7 @@ jobs:
run:
git submodule update --init --recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
+3
View File
@@ -84,3 +84,6 @@ telegram.jpg
# Exclude .exrc file for Vim
.exrc
# virtual env
venv*
+45 -11
View File
@@ -1,25 +1,59 @@
# Make sure that
# * the revs specified here match requirements-dev.txt
# * the additional_dependencies here match requirements.txt
repos:
- repo: git://github.com/python-telegram-bot/mirrors-yapf
rev: 5769e088ef6e0a0d1eb63bd6d0c1fe9f3606d6c8
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: yapf
files: ^(telegram|tests)/.*\.py$
- id: black
args:
- --diff
- --check
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.1
rev: 3.9.2
hooks:
- id: flake8
- repo: git://github.com/pre-commit/mirrors-pylint
rev: v2.5.3
- repo: https://github.com/PyCQA/pylint
rev: v2.8.3
hooks:
- id: pylint
files: ^telegram/.*\.py$
files: ^(telegram|examples)/.*\.py$
args:
- --errors-only
- --disable=import-error
- --rcfile=setup.cfg
additional_dependencies:
- certifi
- tornado>=6.1
- APScheduler==3.6.3
- cachetools==4.2.2
- . # this basically does `pip install -e .`
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.770'
rev: v0.812
hooks:
- id: mypy
name: mypy-ptb
files: ^telegram/.*\.py$
additional_dependencies:
- certifi
- tornado>=6.1
- APScheduler==3.6.3
- cachetools==4.2.2
- . # this basically does `pip install -e .`
- id: mypy
name: mypy-examples
files: ^examples/.*\.py$
args:
- --no-strict-optional
- --follow-imports=silent
additional_dependencies:
- certifi
- tornado>=6.1
- APScheduler==3.6.3
- cachetools==4.2.2
- . # this basically does `pip install -e .`
- repo: https://github.com/asottile/pyupgrade
rev: v2.19.1
hooks:
- id: pyupgrade
files: ^(telegram|examples|tests)/.*\.py$
args:
- --py36-plus
+17 -5
View File
@@ -1,10 +1,22 @@
# syntax: https://docs.readthedocs.io/en/latest/yaml-config.html
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally build your docs in additional formats such as PDF
formats:
- pdf
- pdf
# Optionally set the version of Python and requirements required to build your docs
python:
setup_py_install: true
version: 3
requirements_file: docs/requirements-docs.txt
install:
- method: pip
path: .
- requirements: docs/requirements-docs.txt
+24 -2
View File
@@ -2,9 +2,20 @@ Credits
=======
``python-telegram-bot`` was originally created by
`Leandro Toledo <https://github.com/leandrotoledo>`_ and is now maintained by
`Leandro Toledo <https://github.com/leandrotoledo>`_.
The current development team includes
- `Hinrich Mahler <https://github.com/Bibo-Joshi>`_ (maintainer)
- `Poolitzer <https://github.com/Poolitzer>`_ (community liaison)
- `Shivam <https://github.com/Starry69>`_
- `Harshil <https://github.com/harshil21>`_
Emeritus maintainers include
`Jannes Höke <https://github.com/jh0ker>`_ (`@jh0ker <https://t.me/jh0ker>`_ on Telegram),
`Noam Meltzer <https://github.com/tsnoam>`_, `Pieter Schutz <https://github.com/eldinnie>`_, `Jasmin Bom <https://github.com/jsmnbom>`_ and `Hinrich Mahler <https://github.com/Bibo-Joshi>`_.
`Noam Meltzer <https://github.com/tsnoam>`_, `Pieter Schutz <https://github.com/eldinnie>`_ and `Jasmin Bom <https://github.com/jsmnbom>`_.
Vendored packages
-----------------
We're vendoring urllib3 as part of ``python-telegram-bot`` which is distributed under the MIT
license. For more info, full credits & license terms, the sources can be found here:
@@ -15,6 +26,7 @@ Contributors
The following wonderful people contributed directly or indirectly to this project:
- `Abshar <https://github.com/abxhr>`_
- `Alateas <https://github.com/alateas>`_
- `Ales Dokshanin <https://github.com/alesdokshanin>`_
- `Ambro17 <https://github.com/Ambro17>`_
@@ -28,6 +40,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `daimajia <https://github.com/daimajia>`_
- `Daniel Reed <https://github.com/nmlorg>`_
- `D David Livingston <https://github.com/daviddl9>`_
- `DonalDuck004 <https://github.com/DonalDuck004>`_
- `Eana Hufwe <https://github.com/blueset>`_
- `Ehsan Online <https://github.com/ehsanonline>`_
- `Eli Gao <https://github.com/eligao>`_
@@ -36,9 +49,11 @@ The following wonderful people contributed directly or indirectly to this projec
- `Eugene Lisitsky <https://github.com/lisitsky>`_
- `Eugenio Panadero <https://github.com/azogue>`_
- `Evan Haberecht <https://github.com/habereet>`_
- `Evgeny Denisov <https://github.com/eIGato>`_
- `evgfilim1 <https://github.com/evgfilim1>`_
- `franciscod <https://github.com/franciscod>`_
- `gamgi <https://github.com/gamgi>`_
- `Gauthamram Ravichandran <https://github.com/GauthamramRavichandran>`_
- `Harshil <https://github.com/harshil21>`_
- `Hugo Damer <https://github.com/HakimusGIT>`_
- `ihoru <https://github.com/ihoru>`_
@@ -58,20 +73,25 @@ The following wonderful people contributed directly or indirectly to this projec
- `Loo Zheng Yuan <https://github.com/loozhengyuan>`_
- `LRezende <https://github.com/lrezende>`_
- `macrojames <https://github.com/macrojames>`_
- `Matheus Lemos <https://github.com/mlemosf>`_
- `Michael Elovskikh <https://github.com/wronglink>`_
- `Mischa Krüger <https://github.com/Makman2>`_
- `naveenvhegde <https://github.com/naveenvhegde>`_
- `neurrone <https://github.com/neurrone>`_
- `NikitaPirate <https://github.com/NikitaPirate>`_
- `Nikolai Krivenko <https://github.com/nkrivenko>`_
- `njittam <https://github.com/njittam>`_
- `Noam Meltzer <https://github.com/tsnoam>`_
- `Oleg Shlyazhko <https://github.com/ollmer>`_
- `Oleg Sushchenko <https://github.com/feuillemorte>`_
- `Or Bin <https://github.com/OrBin>`_
- `overquota <https://github.com/overquota>`_
- `Paradox <https://github.com/paradox70>`_
- `Patrick Hofmann <https://github.com/PH89>`_
- `Paul Larsen <https://github.com/PaulSonOfLars>`_
- `Pieter Schutz <https://github.com/eldinnie>`_
- `Poolitzer <https://github.com/Poolitzer>`_
- `Pranjalya Tiwari <https://github.com/Pranjalya>`_
- `Rahiel Kasim <https://github.com/rahiel>`_
- `Riko Naka <https://github.com/rikonaka>`_
- `Rizlas <https://github.com/rizlas>`_
@@ -82,12 +102,14 @@ The following wonderful people contributed directly or indirectly to this projec
- `sooyhwang <https://github.com/sooyhwang>`_
- `syntx <https://github.com/syntx>`_
- `thodnev <https://github.com/thodnev>`_
- `Timur Kushukov <https://github.com/timqsh>`_
- `Trainer Jono <https://github.com/Tr-Jono>`_
- `Valentijn <https://github.com/Faalentijn>`_
- `voider1 <https://github.com/voider1>`_
- `Vorobjev Simon <https://github.com/simonvorobjev>`_
- `Wagner Macedo <https://github.com/wagnerluis1982>`_
- `wjt <https://github.com/wjt>`_
- `zeroone2numeral2 <https://github.com/zeroone2numeral2>`_
- `zeshuaro <https://github.com/zeshuaro>`_
Please add yourself here alphabetically when you submit your first pull request.
+364
View File
@@ -2,6 +2,370 @@
Changelog
=========
Version 13.8
============
*Released 2021-11-08*
This is the technical changelog for version 13.8. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_.
**Major Changes:**
- Full support for API 5.4 (`#2767`_)
**Minor changes, CI improvements, Doc fixes and Type hinting:**
- Create Issue Template Forms (`#2689`_)
- Fix ``camelCase`` Functions in ``ExtBot`` (`#2659`_)
- Fix Empty Captions not Being Passed by ``Bot.copy_message`` (`#2651`_)
- Fix Setting Thumbs When Uploading A Single File (`#2583`_)
- Fix Bug in ``BasePersistence.insert``/``replace_bot`` for Objects with ``__dict__`` not in ``__slots__`` (`#2603`_)
.. _`#2767`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2767
.. _`#2689`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2689
.. _`#2659`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2659
.. _`#2651`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2651
.. _`#2583`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2583
.. _`#2603`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2603
Version 13.7
============
*Released 2021-07-01*
This is the technical changelog for version 13.7. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_.
**Major Changes:**
- Full support for Bot API 5.3 (`#2572`_)
**Bug Fixes:**
- Fix Bug in ``BasePersistence.insert/replace_bot`` for Objects with ``__dict__`` in their slots (`#2561`_)
- Remove Incorrect Warning About ``Defaults`` and ``ExtBot`` (`#2553`_)
**Minor changes, CI improvements, Doc fixes and Type hinting:**
- Type Hinting Fixes (`#2552`_)
- Doc Fixes (`#2551`_)
- Improve Deprecation Warning for ``__slots__`` (`#2574`_)
- Stabilize CI (`#2575`_)
- Fix Coverage Configuration (`#2571`_)
- Better Exception-Handling for ``BasePersistence.replace/insert_bot`` (`#2564`_)
- Remove Deprecated ``pass_args`` from Deeplinking Example (`#2550`_)
.. _`#2572`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2572
.. _`#2561`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2561
.. _`#2553`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2553
.. _`#2552`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2552
.. _`#2551`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2551
.. _`#2574`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2574
.. _`#2575`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2575
.. _`#2571`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2571
.. _`#2564`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2564
.. _`#2550`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2550
Version 13.6
============
*Released 2021-06-06*
New Features:
- Arbitrary ``callback_data`` (`#1844`_)
- Add ``ContextTypes`` & ``BasePersistence.refresh_user/chat/bot_data`` (`#2262`_)
- Add ``Filters.attachment`` (`#2528`_)
- Add ``pattern`` Argument to ``ChosenInlineResultHandler`` (`#2517`_)
Major Changes:
- Add ``slots`` (`#2345`_)
Minor changes, CI improvements, Doc fixes and Type hinting:
- Doc Fixes (`#2495`_, `#2510`_)
- Add ``max_connections`` Parameter to ``Updater.start_webhook`` (`#2547`_)
- Fix for ``Promise.done_callback`` (`#2544`_)
- Improve Code Quality (`#2536`_, `#2454`_)
- Increase Test Coverage of ``CallbackQueryHandler`` (`#2520`_)
- Stabilize CI (`#2522`_, `#2537`_, `#2541`_)
- Fix ``send_phone_number_to_provider`` argument for ``Bot.send_invoice`` (`#2527`_)
- Handle Classes as Input for ``BasePersistence.replace/insert_bot`` (`#2523`_)
- Bump Tornado Version and Remove Workaround from `#2067`_ (`#2494`_)
.. _`#1844`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1844
.. _`#2262`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2262
.. _`#2528`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2528
.. _`#2517`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2517
.. _`#2345`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2345
.. _`#2495`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2495
.. _`#2547`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2547
.. _`#2544`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2544
.. _`#2536`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2536
.. _`#2454`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2454
.. _`#2520`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2520
.. _`#2522`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2522
.. _`#2537`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2537
.. _`#2541`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2541
.. _`#2527`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2527
.. _`#2523`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2523
.. _`#2067`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2067
.. _`#2494`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2494
.. _`#2510`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2510
Version 13.5
============
*Released 2021-04-30*
**Major Changes:**
- Full support of Bot API 5.2 (`#2489`_).
.. note::
The ``start_parameter`` argument of ``Bot.send_invoice`` and the corresponding shortcuts is now optional, so the order of
parameters had to be changed. Make sure to update your method calls accordingly.
- Update ``ChatActions``, Deprecating ``ChatAction.RECORD_AUDIO`` and ``ChatAction.UPLOAD_AUDIO`` (`#2460`_)
**New Features:**
- Convenience Utilities & Example for Handling ``ChatMemberUpdated`` (`#2490`_)
- ``Filters.forwarded_from`` (`#2446`_)
**Minor changes, CI improvements, Doc fixes and Type hinting:**
- Improve Timeouts in ``ConversationHandler`` (`#2417`_)
- Stabilize CI (`#2480`_)
- Doc Fixes (`#2437`_)
- Improve Type Hints of Data Filters (`#2456`_)
- Add Two ``UserWarnings`` (`#2464`_)
- Improve Code Quality (`#2450`_)
- Update Fallback Test-Bots (`#2451`_)
- Improve Examples (`#2441`_, `#2448`_)
.. _`#2489`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2489
.. _`#2460`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2460
.. _`#2490`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2490
.. _`#2446`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2446
.. _`#2417`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2417
.. _`#2480`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2480
.. _`#2437`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2437
.. _`#2456`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2456
.. _`#2464`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2464
.. _`#2450`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2450
.. _`#2451`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2451
.. _`#2441`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2441
.. _`#2448`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2448
Version 13.4.1
==============
*Released 2021-03-14*
**Hot fix release:**
- Fixed a bug in ``setup.py`` (`#2431`_)
.. _`#2431`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2431
Version 13.4
============
*Released 2021-03-14*
**Major Changes:**
- Full support of Bot API 5.1 (`#2424`_)
**Minor changes, CI improvements, doc fixes and type hinting:**
- Improve ``Updater.set_webhook`` (`#2419`_)
- Doc Fixes (`#2404`_)
- Type Hinting Fixes (`#2425`_)
- Update ``pre-commit`` Settings (`#2415`_)
- Fix Logging for Vendored ``urllib3`` (`#2427`_)
- Stabilize Tests (`#2409`_)
.. _`#2424`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2424
.. _`#2419`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2419
.. _`#2404`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2404
.. _`#2425`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2425
.. _`#2415`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2415
.. _`#2427`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2427
.. _`#2409`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2409
Version 13.3
============
*Released 2021-02-19*
**Major Changes:**
- Make ``cryptography`` Dependency Optional & Refactor Some Tests (`#2386`_, `#2370`_)
- Deprecate ``MessageQueue`` (`#2393`_)
**Bug Fixes:**
- Refactor ``Defaults`` Integration (`#2363`_)
- Add Missing ``telegram.SecureValue`` to init and Docs (`#2398`_)
**Minor changes:**
- Doc Fixes (`#2359`_)
.. _`#2386`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2386
.. _`#2370`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2370
.. _`#2393`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2393
.. _`#2363`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2363
.. _`#2398`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2398
.. _`#2359`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2359
Version 13.2
============
*Released 2021-02-02*
**Major Changes:**
- Introduce ``python-telegram-bot-raw`` (`#2324`_)
- Explicit Signatures for Shortcuts (`#2240`_)
**New Features:**
- Add Missing Shortcuts to ``Message`` (`#2330`_)
- Rich Comparison for ``Bot`` (`#2320`_)
- Add ``run_async`` Parameter to ``ConversationHandler`` (`#2292`_)
- Add New Shortcuts to ``Chat`` (`#2291`_)
- Add New Constant ``MAX_ANSWER_CALLBACK_QUERY_TEXT_LENGTH`` (`#2282`_)
- Allow Passing Custom Filename For All Media (`#2249`_)
- Handle Bytes as File Input (`#2233`_)
**Bug Fixes:**
- Fix Escaping in Nested Entities in ``Message`` Properties (`#2312`_)
- Adjust Calling of ``Dispatcher.update_persistence`` (`#2285`_)
- Add ``quote`` kwarg to ``Message.reply_copy`` (`#2232`_)
- ``ConversationHandler``: Docs & ``edited_channel_post`` behavior (`#2339`_)
**Minor changes, CI improvements, doc fixes and type hinting:**
- Doc Fixes (`#2253`_, `#2225`_)
- Reduce Usage of ``typing.Any`` (`#2321`_)
- Extend Deeplinking Example (`#2335`_)
- Add pyupgrade to pre-commit Hooks (`#2301`_)
- Add PR Template (`#2299`_)
- Drop Nightly Tests & Update Badges (`#2323`_)
- Update Copyright (`#2289`_, `#2287`_)
- Change Order of Class DocStrings (`#2256`_)
- Add macOS to Test Matrix (`#2266`_)
- Start Using Versioning Directives in Docs (`#2252`_)
- Improve Annotations & Docs of Handlers (`#2243`_)
.. _`#2324`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2324
.. _`#2240`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2240
.. _`#2330`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2330
.. _`#2320`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2320
.. _`#2292`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2292
.. _`#2291`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2291
.. _`#2282`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2282
.. _`#2249`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2249
.. _`#2233`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2233
.. _`#2312`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2312
.. _`#2285`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2285
.. _`#2232`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2232
.. _`#2339`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2339
.. _`#2253`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2253
.. _`#2225`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2225
.. _`#2321`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2321
.. _`#2335`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2335
.. _`#2301`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2301
.. _`#2299`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2299
.. _`#2323`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2323
.. _`#2289`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2289
.. _`#2287`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2287
.. _`#2256`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2256
.. _`#2266`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2266
.. _`#2252`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2252
.. _`#2243`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2243
Version 13.1
============
*Released 2020-11-29*
**Major Changes:**
- Full support of Bot API 5.0 (`#2181`_, `#2186`_, `#2190`_, `#2189`_, `#2183`_, `#2184`_, `#2188`_, `#2185`_, `#2192`_, `#2196`_, `#2193`_, `#2223`_, `#2199`_, `#2187`_, `#2147`_, `#2205`_)
**New Features:**
- Add ``Defaults.run_async`` (`#2210`_)
- Improve and Expand ``CallbackQuery`` Shortcuts (`#2172`_)
- Add XOR Filters and make ``Filters.name`` a Property (`#2179`_)
- Add ``Filters.document.file_extension`` (`#2169`_)
- Add ``Filters.caption_regex`` (`#2163`_)
- Add ``Filters.chat_type`` (`#2128`_)
- Handle Non-Binary File Input (`#2202`_)
**Bug Fixes:**
- Improve Handling of Custom Objects in ``BasePersistence.insert``/``replace_bot`` (`#2151`_)
- Fix bugs in ``replace/insert_bot`` (`#2218`_)
**Minor changes, CI improvements, doc fixes and type hinting:**
- Improve Type hinting (`#2204`_, `#2118`_, `#2167`_, `#2136`_)
- Doc Fixes & Extensions (`#2201`_, `#2161`_)
- Use F-Strings Where Possible (`#2222`_)
- Rename kwargs to _kwargs where possible (`#2182`_)
- Comply with PEP561 (`#2168`_)
- Improve Code Quality (`#2131`_)
- Switch Code Formatting to Black (`#2122`_, `#2159`_, `#2158`_)
- Update Wheel Settings (`#2142`_)
- Update ``timerbot.py`` to ``v13.0`` (`#2149`_)
- Overhaul Constants (`#2137`_)
- Add Python 3.9 to Test Matrix (`#2132`_)
- Switch Codecov to ``GitHub`` Action (`#2127`_)
- Specify Required pytz Version (`#2121`_)
.. _`#2181`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2181
.. _`#2186`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2186
.. _`#2190`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2190
.. _`#2189`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2189
.. _`#2183`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2183
.. _`#2184`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2184
.. _`#2188`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2188
.. _`#2185`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2185
.. _`#2192`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2192
.. _`#2196`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2196
.. _`#2193`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2193
.. _`#2223`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2223
.. _`#2199`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2199
.. _`#2187`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2187
.. _`#2147`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2147
.. _`#2205`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2205
.. _`#2210`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2210
.. _`#2172`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2172
.. _`#2179`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2179
.. _`#2169`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2169
.. _`#2163`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2163
.. _`#2128`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2128
.. _`#2202`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2202
.. _`#2151`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2151
.. _`#2218`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2218
.. _`#2204`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2204
.. _`#2118`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2118
.. _`#2167`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2167
.. _`#2136`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2136
.. _`#2201`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2201
.. _`#2161`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2161
.. _`#2222`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2222
.. _`#2182`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2182
.. _`#2168`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2168
.. _`#2131`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2131
.. _`#2122`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2122
.. _`#2159`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2159
.. _`#2158`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2158
.. _`#2142`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2142
.. _`#2149`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2149
.. _`#2137`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2137
.. _`#2132`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2132
.. _`#2127`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2127
.. _`#2121`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2121
Version 13.0
============
*Released 2020-10-07*
+1 -1
View File
@@ -1 +1 @@
include LICENSE LICENSE.lesser Makefile requirements.txt
include LICENSE LICENSE.lesser Makefile requirements.txt README_RAW.rst telegram/py.typed
-58
View File
@@ -1,58 +0,0 @@
.DEFAULT_GOAL := help
.PHONY: clean pep257 pep8 yapf lint test install
PYLINT := pylint
PYTEST := pytest
PEP257 := pep257
PEP8 := flake8
YAPF := yapf
MYPY := mypy
PIP := pip
clean:
rm -fr build
rm -fr dist
find . -name '*.pyc' -exec rm -f {} \;
find . -name '*.pyo' -exec rm -f {} \;
find . -name '*~' -exec rm -f {} \;
find . -regex "./telegram.\(mp3\|mp4\|ogg\|png\|webp\)" -exec rm {} \;
pep257:
$(PEP257) telegram
pep8:
$(PEP8) telegram
yapf:
$(YAPF) -r telegram
lint:
$(PYLINT) -E telegram --disable=no-name-in-module,import-error
mypy:
$(MYPY) -p telegram
test:
$(PYTEST) -v
install:
$(PIP) install -r requirements.txt -r requirements-dev.txt
help:
@echo "Available targets:"
@echo "- clean Clean up the source directory"
@echo "- pep257 Check docstring style with pep257"
@echo "- pep8 Check style with flake8"
@echo "- lint Check style with pylint"
@echo "- yapf Check style with yapf"
@echo "- mypy Check type hinting with mypy"
@echo "- test Run tests using pytest"
@echo
@echo "Available variables:"
@echo "- PYLINT default: $(PYLINT)"
@echo "- PYTEST default: $(PYTEST)"
@echo "- PEP257 default: $(PEP257)"
@echo "- PEP8 default: $(PEP8)"
@echo "- YAPF default: $(YAPF)"
@echo "- MYPY default: $(MYPY)"
@echo "- PIP default: $(PIP)"
+50 -20
View File
@@ -1,3 +1,6 @@
..
Make user to apply any changes to this file to README_RAW.rst as well!
.. image:: https://github.com/python-telegram-bot/logos/blob/master/logo-text/png/ptb-logo-text_768.png?raw=true
:align: center
:target: https://python-telegram-bot.org
@@ -17,42 +20,49 @@ We have a vibrant community of developers helping each other in our `Telegram gr
:target: https://pypi.org/project/python-telegram-bot/
:alt: Supported Python versions
.. image:: https://cpu.re/static/python-telegram-bot/downloads.svg
:target: https://www.cpu.re/static/python-telegram-bot/downloads-by-python-version.txt
.. image:: https://img.shields.io/badge/Bot%20API-5.4-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions
.. image:: https://img.shields.io/pypi/dm/python-telegram-bot
:target: https://pypistats.org/packages/python-telegram-bot
:alt: PyPi Package Monthly Download
.. image:: https://img.shields.io/badge/docs-latest-af1a97.svg
:target: https://python-telegram-bot.readthedocs.io/
.. image:: https://readthedocs.org/projects/python-telegram-bot/badge/?version=stable
:target: https://python-telegram-bot.readthedocs.io/en/stable/?badge=stable
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/l/python-telegram-bot.svg
:target: https://www.gnu.org/licenses/lgpl-3.0.html
:alt: LGPLv3 License
.. image:: https://github.com/python-telegram-bot/python-telegram-bot/workflows/GitHub%20Actions/badge.svg?event=schedule
.. image:: https://github.com/python-telegram-bot/python-telegram-bot/workflows/GitHub%20Actions/badge.svg
:target: https://github.com/python-telegram-bot/python-telegram-bot/
:alt: Github Actions workflow
.. image:: https://codecov.io/gh/python-telegram-bot/python-telegram-bot/branch/master/graph/badge.svg
:target: https://codecov.io/gh/python-telegram-bot/python-telegram-bot
:alt: Code coverage
.. image:: http://isitmaintained.com/badge/resolution/python-telegram-bot/python-telegram-bot.svg
:target: http://isitmaintained.com/project/python-telegram-bot/python-telegram-bot
:alt: Median time to resolve an issue
.. image:: https://api.codacy.com/project/badge/Grade/99d901eaa09b44b4819aec05c330c968
:target: https://www.codacy.com/app/python-telegram-bot/python-telegram-bot?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=python-telegram-bot/python-telegram-bot&amp;utm_campaign=Badge_Grade
:alt: Code quality
:alt: Code quality: Codacy
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg
.. image:: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot.svg/?label=active+issues
:target: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot/?ref=repository-badge
:alt: Code quality: DeepSource
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram
:target: https://telegram.me/pythontelegrambotgroup
:alt: Telegram Group
.. image:: https://img.shields.io/badge/IRC-Channel-blue.svg
:target: https://webchat.freenode.net/?channels=##python-telegram-bot
:alt: IRC Bridge
=================
Table of contents
=================
@@ -83,17 +93,25 @@ Introduction
This library provides a pure Python interface for the
`Telegram Bot API <https://core.telegram.org/bots/api>`_.
It's compatible with Python versions 3.6+. PTB might also work on `PyPy <http://pypy.org/>`_, though there have been a lot of issues before. Hence, PyPy is not officially supported.
It's compatible with Python versions 3.6.8+. PTB might also work on `PyPy <http://pypy.org/>`_, though there have been a lot of issues before. Hence, PyPy is not officially supported.
In addition to the pure API implementation, this library features a number of high-level classes to
make the development of bots easy and straightforward. These classes are contained in the
``telegram.ext`` submodule.
A pure API implementation *without* ``telegram.ext`` is available as the standalone package ``python-telegram-bot-raw``. `See here for details. <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/README_RAW.rst>`_
----
Note
----
Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both.
====================
Telegram API support
====================
All types and methods of the Telegram Bot API **4.8** are supported.
All types and methods of the Telegram Bot API **5.4** are supported.
==========
Installing
@@ -119,6 +137,16 @@ In case you have a previously cloned local repository already, you should initia
$ git submodule update --init --recursive
---------------------
Optional Dependencies
---------------------
PTB can be installed with optional dependencies:
* ``pip install python-telegram-bot[passport]`` installs the `cryptography <https://cryptography.io>`_ library. Use this, if you want to use Telegram Passport related functionality.
* ``pip install python-telegram-bot[ujson]`` installs the `ujson <https://pypi.org/project/ujson/>`_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json <https://docs.python.org/3/library/json.html>`_ library.
* ``pip install python-telegram-bot[socks]`` installs the `PySocks <https://pypi.org/project/PySocks/>`_ library. Use this, if you want to work behind a Socks5 server.
===============
Getting started
===============
@@ -187,14 +215,11 @@ You can get help in several ways:
1. We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
2. In case you are unable to join our group due to Telegram restrictions, you can use our `IRC channel <https://webchat.freenode.net/?channels=##python-telegram-bot>`_.
2. Report bugs, request new features or ask questions by `creating an issue <https://github.com/python-telegram-bot/python-telegram-bot/issues/new/choose>`_ or `a discussion <https://github.com/python-telegram-bot/python-telegram-bot/discussions/new>`_.
3. Report bugs, request new features or ask questions by `creating an issue <https://github.com/python-telegram-bot/python-telegram-bot/issues/new/choose>`_.
4. Our `Wiki pages <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ offer a growing amount of resources.
5. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_.
3. Our `Wiki pages <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ offer a growing amount of resources.
4. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_.
============
@@ -203,6 +228,11 @@ Contributing
Contributions of all sizes are welcome. Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst>`_ to get started. You can also help by `reporting bugs <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_.
========
Donating
========
Occasionally we are asked if we accept donations to support the development. While we appreciate the thought, maintaining PTB is our hobby and we have almost no running costs for it. We therefore have nothing set up to accept donations. If you still want to donate, we kindly ask you to donate to another open source project/initiative of your choice instead.
=======
License
=======
+222
View File
@@ -0,0 +1,222 @@
..
Make user to apply any changes to this file to README.rst as well!
.. image:: https://github.com/python-telegram-bot/logos/blob/master/logo-text/png/ptb-raw-logo-text_768.png?raw=true
:align: center
:target: https://python-telegram-bot.org
:alt: python-telegram-bot-raw Logo
We have made you a wrapper you can't refuse
We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
*Stay tuned for library updates and new releases on our* `Telegram Channel <https://telegram.me/pythontelegrambotchannel>`_.
.. image:: https://img.shields.io/pypi/v/python-telegram-bot-raw.svg
:target: https://pypi.org/project/python-telegram-bot-raw/
:alt: PyPi Package Version
.. image:: https://img.shields.io/pypi/pyversions/python-telegram-bot-raw.svg
:target: https://pypi.org/project/python-telegram-bot-raw/
:alt: Supported Python versions
.. image:: https://img.shields.io/badge/Bot%20API-5.4-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions
.. image:: https://img.shields.io/pypi/dm/python-telegram-bot-raw
:target: https://pypistats.org/packages/python-telegram-bot-raw
:alt: PyPi Package Monthly Download
.. image:: https://readthedocs.org/projects/python-telegram-bot/badge/?version=stable
:target: https://python-telegram-bot.readthedocs.io/
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/l/python-telegram-bot-raw.svg
:target: https://www.gnu.org/licenses/lgpl-3.0.html
:alt: LGPLv3 License
.. image:: https://github.com/python-telegram-bot/python-telegram-bot/workflows/GitHub%20Actions/badge.svg
:target: https://github.com/python-telegram-bot/python-telegram-bot/
:alt: Github Actions workflow
.. image:: https://codecov.io/gh/python-telegram-bot/python-telegram-bot/branch/master/graph/badge.svg
:target: https://codecov.io/gh/python-telegram-bot/python-telegram-bot
:alt: Code coverage
.. image:: http://isitmaintained.com/badge/resolution/python-telegram-bot/python-telegram-bot.svg
:target: http://isitmaintained.com/project/python-telegram-bot/python-telegram-bot
:alt: Median time to resolve an issue
.. image:: https://api.codacy.com/project/badge/Grade/99d901eaa09b44b4819aec05c330c968
:target: https://www.codacy.com/app/python-telegram-bot/python-telegram-bot?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=python-telegram-bot/python-telegram-bot&amp;utm_campaign=Badge_Grade
:alt: Code quality: Codacy
.. image:: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot.svg/?label=active+issues
:target: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot/?ref=repository-badge
:alt: Code quality: DeepSource
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram
:target: https://telegram.me/pythontelegrambotgroup
:alt: Telegram Group
=================
Table of contents
=================
- `Introduction`_
- `Telegram API support`_
- `Installing`_
- `Getting started`_
#. `Logging`_
#. `Documentation`_
- `Getting help`_
- `Contributing`_
- `License`_
============
Introduction
============
This library provides a pure Python, lightweight interface for the
`Telegram Bot API <https://core.telegram.org/bots/api>`_.
It's compatible with Python versions 3.6.8+. PTB-Raw might also work on `PyPy <http://pypy.org/>`_, though there have been a lot of issues before. Hence, PyPy is not officially supported.
``python-telegram-bot-raw`` is part of the `python-telegram-bot <https://python-telegram-bot.org>`_ ecosystem and provides the pure API functionality extracted from PTB. It therefore does *not* have independent release schedules, changelogs or documentation. Please consult the PTB resources.
----
Note
----
Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both.
====================
Telegram API support
====================
All types and methods of the Telegram Bot API **5.4** are supported.
==========
Installing
==========
You can install or upgrade python-telegram-bot-raw with:
.. code:: shell
$ pip install python-telegram-bot-raw --upgrade
Or you can install from source with:
.. code:: shell
$ git clone https://github.com/python-telegram-bot/python-telegram-bot --recursive
$ cd python-telegram-bot
$ python setup-raw.py install
In case you have a previously cloned local repository already, you should initialize the added urllib3 submodule before installing with:
.. code:: shell
$ git submodule update --init --recursive
----
Note
----
Installing the `.tar.gz` archive available on PyPi directly via `pip` will *not* work as expected, as `pip` does not recognize that it should use `setup-raw.py` instead of `setup.py`.
---------------------
Optional Dependencies
---------------------
PTB can be installed with optional dependencies:
* ``pip install python-telegram-bot-raw[passport]`` installs the `cryptography <https://cryptography.io>`_ library. Use this, if you want to use Telegram Passport related functionality.
* ``pip install python-telegram-bot-raw[ujson]`` installs the `ujson <https://pypi.org/project/ujson/>`_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json <https://docs.python.org/3/library/json.html>`_ library.
===============
Getting started
===============
Our Wiki contains an `Introduction to the API <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Introduction-to-the-API>`_. Other references are:
- the `Telegram API documentation <https://core.telegram.org/bots/api>`_
- the `python-telegram-bot documentation <https://python-telegram-bot.readthedocs.io/>`_
-------
Logging
-------
This library uses the ``logging`` module. To set up logging to standard output, put:
.. code:: python
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
at the beginning of your script.
You can also use logs in your application by calling ``logging.getLogger()`` and setting the log level you want:
.. code:: python
logger = logging.getLogger()
logger.setLevel(logging.INFO)
If you want DEBUG logs instead:
.. code:: python
logger.setLevel(logging.DEBUG)
=============
Documentation
=============
``python-telegram-bot``'s documentation lives at `readthedocs.io <https://python-telegram-bot.readthedocs.io/>`_, which
includes the relevant documentation for ``python-telegram-bot-raw``.
============
Getting help
============
You can get help in several ways:
1. We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
2. Report bugs, request new features or ask questions by `creating an issue <https://github.com/python-telegram-bot/python-telegram-bot/issues/new/choose>`_ or `a discussion <https://github.com/python-telegram-bot/python-telegram-bot/discussions/new>`_.
3. Our `Wiki pages <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ offer a growing amount of resources.
4. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_.
============
Contributing
============
Contributions of all sizes are welcome. Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst>`_ to get started. You can also help by `reporting bugs <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_.
========
Donating
========
Occasionally we are asked if we accept donations to support the development. While we appreciate the thought, maintaining PTB is our hobby and we have almost no running costs for it. We therefore have nothing set up to accept donations. If you still want to donate, we kindly ask you to donate to another open source project/initiative of your choice instead.
=======
License
=======
You may copy, distribute and modify the software provided that modifications are described and licensed for free under `LGPL-3 <https://www.gnu.org/licenses/lgpl-3.0.html>`_. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be.
+5 -2
View File
@@ -1,3 +1,6 @@
sphinx>=1.7.9
sphinx_rtd_theme
sphinx==3.5.4
sphinx-pypi-upload
# When bumping this, make sure to rebuild the dark-mode CSS
# More instructions at source/_static/dark.css
# Ofc once https://github.com/readthedocs/sphinx_rtd_theme/issues/224 is closed, we should use that
sphinx_rtd_theme==0.5.2
File diff suppressed because it is too large Load Diff
+17 -12
View File
@@ -13,7 +13,6 @@
# serve to show the default.
import sys
import os
import shlex
# import telegram
# If extensions (or modules to document with autodoc) are in another directory,
@@ -24,7 +23,7 @@ sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.7.9'
needs_sphinx = '3.5.2'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -33,6 +32,9 @@ extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon'
]
# Don't show type hints in the signature - that just makes it hardly readable
# and we document the types anyway
autodoc_typehints = 'none'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -49,8 +51,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Python Telegram Bot'
copyright = u'2015-2020, Leandro Toledo'
project = u'python-telegram-bot'
copyright = u'2015-2021, Leandro Toledo'
author = u'Leandro Toledo'
# The version info for the project you're documenting, acts as replacement for
@@ -58,9 +60,9 @@ author = u'Leandro Toledo'
# built documents.
#
# The short X.Y version.
version = '13.0' # telegram.__version__[:3]
version = '13.8' # telegram.__version__[:3]
# The full version, including alpha/beta/rc tags.
release = '13.0' # telegram.__version__
release = '13.8' # telegram.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -116,7 +118,9 @@ html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
'style_external_links': True,
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
@@ -203,7 +207,7 @@ html_static_path = ['_static']
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'PythonTelegramBotdoc'
htmlhelp_basename = 'python-telegram-bot-doc'
# -- Options for LaTeX output ---------------------------------------------
@@ -228,7 +232,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PythonTelegramBot.tex', u'Python Telegram Bot Documentation',
(master_doc, 'python-telegram-bot.tex', u'python-telegram-bot Documentation',
author, 'manual'),
]
@@ -258,7 +262,7 @@ latex_logo = 'ptb-logo_1024.png'
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pythontelegrambot', u'Python Telegram Bot Documentation',
(master_doc, 'python-telegram-bot', u'python-telegram-bot Documentation',
[author], 1)
]
@@ -272,8 +276,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'PythonTelegramBot', u'Python Telegram Bot Documentation',
author, 'PythonTelegramBot', "We have made you a wrapper you can't refuse",
(master_doc, 'python-telegram-bot', u'python-telegram-bot Documentation',
author, 'python-telegram-bot', "We have made you a wrapper you can't refuse",
'Miscellaneous'),
]
@@ -301,4 +305,5 @@ def autodoc_skip_member(app, what, name, obj, skip, options):
def setup(app):
app.add_css_file("dark.css")
app.connect('autodoc-skip-member', autodoc_skip_member)
+5 -2
View File
@@ -15,14 +15,17 @@ On our wiki you will also find guides like how to use handlers, webhooks, emoji,
Examples
========
A great way to learn is by looking at examples. Ours can be found at our `github in the examples folder <https://github.com/python-telegram-bot/python-telegram-bot/tree/master/examples>`_.
A great way to learn is by looking at examples. Ours can be found in our `examples folder on Github <https://github.com/python-telegram-bot/python-telegram-bot/tree/master/examples>`_.
Reference
=========
Below you can find a reference of all the classes and methods in python-telegram-bot.
Apart from the `telegram.ext` package the objects should reflect the types defined in the `official telegram bot api documentation <https://core.telegram.org/bots/api>`_.
Apart from the `telegram.ext` package the objects should reflect the types defined in the `official Telegram Bot API documentation <https://core.telegram.org/bots/api>`_.
.. toctree::
telegram.ext
.. toctree::
telegram
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/animation.py
telegram.Animation
==================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/audio.py
telegram.Audio
==============
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/bot.py
telegram.Bot
============
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommand.py
telegram.BotCommand
===================
+8
View File
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScope
========================
.. autoclass:: telegram.BotCommandScope
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeAllChatAdministrators
=============================================
.. autoclass:: telegram.BotCommandScopeAllChatAdministrators
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeAllGroupChats
=======================================
.. autoclass:: telegram.BotCommandScopeAllGroupChats
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeAllPrivateChats
=======================================
.. autoclass:: telegram.BotCommandScopeAllPrivateChats
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeChat
============================
.. autoclass:: telegram.BotCommandScopeChat
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeChatAdministrators
==========================================
.. autoclass:: telegram.BotCommandScopeChatAdministrators
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeChatMember
==================================
.. autoclass:: telegram.BotCommandScopeChatMember
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeDefault
===============================
.. autoclass:: telegram.BotCommandScopeDefault
:members:
:show-inheritance:
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/games/callbackgame.py
telegram.Callbackgame
=====================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackquery.py
telegram.CallbackQuery
======================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chat.py
telegram.Chat
=============
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chataction.py
telegram.ChatAction
===================
+8
View File
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatinvitelink.py
telegram.ChatInviteLink
=======================
.. autoclass:: telegram.ChatInviteLink
:members:
:show-inheritance:
+8
View File
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatlocation.py
telegram.ChatLocation
=====================
.. autoclass:: telegram.ChatLocation
:members:
:show-inheritance:
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMember
===================
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberAdministrator
================================
.. autoclass:: telegram.ChatMemberAdministrator
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberBanned
=========================
.. autoclass:: telegram.ChatMemberBanned
:members:
:show-inheritance:
+8
View File
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberLeft
=======================
.. autoclass:: telegram.ChatMemberLeft
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberMember
=========================
.. autoclass:: telegram.ChatMemberMember
:members:
:show-inheritance:
+9
View File
@@ -0,0 +1,9 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberOwner
========================
.. autoclass:: telegram.ChatMemberOwner
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberRestricted
=============================
.. autoclass:: telegram.ChatMemberRestricted
:members:
:show-inheritance:
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmemberupdated.py
telegram.ChatMemberUpdated
==========================
.. autoclass:: telegram.ChatMemberUpdated
:members:
:show-inheritance:
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatpermissions.py
telegram.ChatPermissions
========================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/chatphoto.py
telegram.ChatPhoto
==================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/choseninlineresult.py
telegram.ChosenInlineResult
===========================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/constants.py
telegram.constants Module
=========================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/contact.py
telegram.Contact
================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py
telegram.Credentials
====================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py
telegram.DataCredentials
========================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/dice.py
telegram.Dice
=============
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/document.py
telegram.Document
=================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py
telegram.EncryptedCredentials
=============================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/encryptedpassportelement.py
telegram.EncryptedPassportElement
=================================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/error.py
telegram.error module
=====================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/basepersistence.py
telegram.ext.BasePersistence
============================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackcontext.py
telegram.ext.CallbackContext
============================
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackdatacache.py
telegram.ext.CallbackDataCache
==============================
.. autoclass:: telegram.ext.CallbackDataCache
:members:
:show-inheritance:
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackqueryhandler.py
telegram.ext.CallbackQueryHandler
=================================
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/chatmemberhandler.py
telegram.ext.ChatMemberHandler
==============================
.. autoclass:: telegram.ext.ChatMemberHandler
:members:
:show-inheritance:
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/choseninlineresulthandler.py
telegram.ext.ChosenInlineResultHandler
======================================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/commandhandler.py
telegram.ext.CommandHandler
===========================
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/contexttypes.py
telegram.ext.ContextTypes
=========================
.. autoclass:: telegram.ext.ContextTypes
:members:
:show-inheritance:
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/conversationhandler.py
telegram.ext.ConversationHandler
================================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/defaults.py
telegram.ext.Defaults
=====================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/messagequeue.py
telegram.ext.DelayQueue
=======================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/dictpersistence.py
telegram.ext.DictPersistence
============================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/dispatcher.py
telegram.ext.Dispatcher
=======================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/dispatcher.py
telegram.ext.DispatcherHandlerStop
==================================
+9
View File
@@ -0,0 +1,9 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/extbot.py
telegram.ext.ExtBot
===================
.. autoclass:: telegram.ext.ExtBot
:show-inheritance:
.. autofunction:: telegram.ext.ExtBot.insert_callback_data
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/filters.py
telegram.ext.filters Module
===========================
+2 -1
View File
@@ -1,7 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/handler.py
telegram.ext.Handler
====================
.. autoclass:: telegram.ext.Handler
:members:
:undoc-members:
:show-inheritance:
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/inlinequeryhandler.py
telegram.ext.InlineQueryHandler
===============================
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackdatacache.py
telegram.ext.InvalidCallbackData
================================
.. autoclass:: telegram.ext.InvalidCallbackData
:members:
:show-inheritance:
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/jobqueue.py
telegram.ext.Job
=====================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/jobqueue.py
telegram.ext.JobQueue
=====================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/messagehandler.py
telegram.ext.MessageHandler
===========================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/messagequeue.py
telegram.ext.MessageQueue
=========================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/picklepersistence.py
telegram.ext.PicklePersistence
==============================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/pollanswerhandler.py
telegram.ext.PollAnswerHandler
==============================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/pollhandler.py
telegram.ext.PollHandler
========================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/precheckoutqueryhandler.py
telegram.ext.PreCheckoutQueryHandler
====================================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/commandhandler.py
telegram.ext.PrefixHandler
===========================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/regexhandler.py
telegram.ext.RegexHandler
=========================
+23 -4
View File
@@ -3,15 +3,16 @@ telegram.ext package
.. toctree::
telegram.ext.extbot
telegram.ext.updater
telegram.ext.dispatcher
telegram.ext.dispatcherhandlerstop
telegram.ext.filters
telegram.ext.callbackcontext
telegram.ext.job
telegram.ext.jobqueue
telegram.ext.messagequeue
telegram.ext.delayqueue
telegram.ext.callbackcontext
telegram.ext.contexttypes
telegram.ext.defaults
Handlers
@@ -22,10 +23,12 @@ Handlers
telegram.ext.handler
telegram.ext.callbackqueryhandler
telegram.ext.choseninlineresulthandler
telegram.ext.conversationhandler
telegram.ext.chatmemberhandler
telegram.ext.commandhandler
telegram.ext.conversationhandler
telegram.ext.inlinequeryhandler
telegram.ext.messagehandler
telegram.ext.filters
telegram.ext.pollanswerhandler
telegram.ext.pollhandler
telegram.ext.precheckoutqueryhandler
@@ -43,4 +46,20 @@ Persistence
telegram.ext.basepersistence
telegram.ext.picklepersistence
telegram.ext.dictpersistence
telegram.ext.dictpersistence
Arbitrary Callback Data
-----------------------
.. toctree::
telegram.ext.callbackdatacache
telegram.ext.invalidcallbackdata
utils
-----
.. toctree::
telegram.ext.utils.promise
telegram.ext.utils.types
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/shippingqueryhandler.py
telegram.ext.ShippingQueryHandler
=================================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/stringcommandhandler.py
telegram.ext.StringCommandHandler
=================================
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/stringregexhandler.py
telegram.ext.StringRegexHandler
===============================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/typehandler.py
telegram.ext.TypeHandler
========================
+2
View File
@@ -1,3 +1,5 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/updater.py
telegram.ext.Updater
====================
@@ -0,0 +1,8 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/utils/promise.py
telegram.ext.utils.promise.Promise
==================================
.. autoclass:: telegram.ext.utils.promise.Promise
:members:
:show-inheritance:

Some files were not shown because too many files have changed in this diff Show More