Skip to content

Commit 19d2124

Browse files
committed
Merge branch 'master' into arbitrary-callback-data
# Conflicts: # .github/pull_request_template.md # docs/source/telegram.ext.rst # telegram/ext/conversationhandler.py # telegram/ext/dictpersistence.py # telegram/ext/dispatcher.py # telegram/ext/picklepersistence.py # telegram/utils/webhookhandler.py
2 parents e5b0815 + eee8921 commit 19d2124

File tree

88 files changed

+1649
-764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1649
-764
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ Hey! You're PRing? Cool! Please have a look at the below checklist. It's here to
2727
- [ ] Added new handlers for new update types
2828
- [ ] Added new filters for new message (sub)types
2929
- [ ] Added or updated documentation for the changed class(es) and/or method(s)
30+
- [ ] Updated the Bot API version number in all places in `README.rst` and `README_RAW.rst`, including the badge
3031
- [ ] 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`

.github/workflows/readme_notifier.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Warning maintainers
2+
on:
3+
pull_request:
4+
paths:
5+
- README.rst
6+
- README_RAW.rst
7+
jobs:
8+
job:
9+
runs-on: ubuntu-latest
10+
name: about readme change
11+
steps:
12+
- name: running the check
13+
uses: Poolitzer/notifier-action@master
14+
with:
15+
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 :)
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}

CHANGES.rst

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,73 @@
22
Changelog
33
=========
44

5+
Version 13.2
6+
============
7+
*Released 2021-02-02*
8+
9+
**Major Changes:**
10+
11+
- Introduce ``python-telegram-bot-raw`` (`#2324`_)
12+
- Explicit Signatures for Shortcuts (`#2240`_)
13+
14+
**New Features:**
15+
16+
- Add Missing Shortcuts to ``Message`` (`#2330`_)
17+
- Rich Comparison for ``Bot`` (`#2320`_)
18+
- Add ``run_async`` Parameter to ``ConversationHandler`` (`#2292`_)
19+
- Add New Shortcuts to ``Chat`` (`#2291`_)
20+
- Add New Constant ``MAX_ANSWER_CALLBACK_QUERY_TEXT_LENGTH`` (`#2282`_)
21+
- Allow Passing Custom Filename For All Media (`#2249`_)
22+
- Handle Bytes as File Input (`#2233`_)
23+
24+
**Bug Fixes:**
25+
26+
- Fix Escaping in Nested Entities in ``Message`` Properties (`#2312`_)
27+
- Adjust Calling of ``Dispatcher.update_persistence`` (`#2285`_)
28+
- Add ``quote`` kwarg to ``Message.reply_copy`` (`#2232`_)
29+
- ``ConversationHandler``: Docs & ``edited_channel_post`` behavior (`#2339`_)
30+
31+
**Minor changes, CI improvements, doc fixes and type hinting:**
32+
33+
- Doc Fixes (`#2253`_, `#2225`_)
34+
- Reduce Usage of ``typing.Any`` (`#2321`_)
35+
- Extend Deeplinking Example (`#2335`_)
36+
- Add pyupgrade to pre-commit Hooks (`#2301`_)
37+
- Add PR Template (`#2299`_)
38+
- Drop Nightly Tests & Update Badges (`#2323`_)
39+
- Update Copyright (`#2289`_, `#2287`_)
40+
- Change Order of Class DocStrings (`#2256`_)
41+
- Add macOS to Test Matrix (`#2266`_)
42+
- Start Using Versioning Directives in Docs (`#2252`_)
43+
- Improve Annotations & Docs of Handlers (`#2243`_)
44+
45+
.. _`#2324`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2324
46+
.. _`#2240`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2240
47+
.. _`#2330`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2330
48+
.. _`#2320`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2320
49+
.. _`#2292`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2292
50+
.. _`#2291`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2291
51+
.. _`#2282`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2282
52+
.. _`#2249`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2249
53+
.. _`#2233`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2233
54+
.. _`#2312`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2312
55+
.. _`#2285`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2285
56+
.. _`#2232`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2232
57+
.. _`#2339`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2339
58+
.. _`#2253`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2253
59+
.. _`#2225`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2225
60+
.. _`#2321`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2321
61+
.. _`#2335`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2335
62+
.. _`#2301`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2301
63+
.. _`#2299`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2299
64+
.. _`#2323`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2323
65+
.. _`#2289`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2289
66+
.. _`#2287`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2287
67+
.. _`#2256`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2256
68+
.. _`#2266`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2266
69+
.. _`#2252`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2252
70+
.. _`#2243`: https://github.com/python-telegram-bot/python-telegram-bot/pull/2243
71+
572
Version 13.1
673
============
774
*Released 2020-11-29*

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include LICENSE LICENSE.lesser Makefile requirements.txt py.typed
1+
include LICENSE LICENSE.lesser Makefile requirements.txt README_RAW.rst telegram/py.typed

README.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
..
2+
Make user to apply any changes to this file to README_RAW.rst as well!
3+
14
.. image:: https://github.com/python-telegram-bot/logos/blob/master/logo-text/png/ptb-logo-text_768.png?raw=true
25
:align: center
36
:target: https://python-telegram-bot.org
@@ -17,12 +20,16 @@ We have a vibrant community of developers helping each other in our `Telegram gr
1720
:target: https://pypi.org/project/python-telegram-bot/
1821
:alt: Supported Python versions
1922

23+
.. image:: https://img.shields.io/badge/Bot%20API-5.0-blue?logo=telegram
24+
:target: https://core.telegram.org/bots/api-changelog
25+
:alt: Supported Bot API versions
26+
2027
.. image:: https://img.shields.io/pypi/dm/python-telegram-bot
2128
:target: https://pypistats.org/packages/python-telegram-bot
2229
:alt: PyPi Package Monthly Download
2330

24-
.. image:: https://img.shields.io/badge/docs-latest-af1a97.svg
25-
:target: https://python-telegram-bot.readthedocs.io/
31+
.. image:: https://readthedocs.org/projects/python-telegram-bot/badge/?version=stable
32+
:target: https://python-telegram-bot.readthedocs.io/en/stable/?badge=stable
2633
:alt: Documentation Status
2734

2835
.. image:: https://img.shields.io/pypi/l/python-telegram-bot.svg
@@ -36,7 +43,7 @@ We have a vibrant community of developers helping each other in our `Telegram gr
3643
.. image:: https://codecov.io/gh/python-telegram-bot/python-telegram-bot/branch/master/graph/badge.svg
3744
:target: https://codecov.io/gh/python-telegram-bot/python-telegram-bot
3845
:alt: Code coverage
39-
46+
4047
.. image:: http://isitmaintained.com/badge/resolution/python-telegram-bot/python-telegram-bot.svg
4148
:target: http://isitmaintained.com/project/python-telegram-bot/python-telegram-bot
4249
:alt: Median time to resolve an issue
@@ -48,7 +55,7 @@ We have a vibrant community of developers helping each other in our `Telegram gr
4855
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
4956
:target: https://github.com/psf/black
5057

51-
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg
58+
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram
5259
:target: https://telegram.me/pythontelegrambotgroup
5360
:alt: Telegram Group
5461

@@ -92,6 +99,14 @@ In addition to the pure API implementation, this library features a number of hi
9299
make the development of bots easy and straightforward. These classes are contained in the
93100
``telegram.ext`` submodule.
94101

102+
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>`_
103+
104+
----
105+
Note
106+
----
107+
108+
Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both.
109+
95110
====================
96111
Telegram API support
97112
====================
@@ -199,7 +214,6 @@ You can get help in several ways:
199214
5. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_.
200215

201216

202-
203217
============
204218
Contributing
205219
============

README_RAW.rst

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
..
2+
Make user to apply any changes to this file to README.rst as well!
3+
4+
.. image:: https://github.com/python-telegram-bot/logos/blob/master/logo-text/png/ptb-raw-logo-text_768.png?raw=true
5+
:align: center
6+
:target: https://python-telegram-bot.org
7+
:alt: python-telegram-bot-raw Logo
8+
9+
We have made you a wrapper you can't refuse
10+
11+
We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
12+
13+
*Stay tuned for library updates and new releases on our* `Telegram Channel <https://telegram.me/pythontelegrambotchannel>`_.
14+
15+
.. image:: https://img.shields.io/pypi/v/python-telegram-bot-raw.svg
16+
:target: https://pypi.org/project/python-telegram-bot/
17+
:alt: PyPi Package Version
18+
19+
.. image:: https://img.shields.io/pypi/pyversions/python-telegram-bot-raw.svg
20+
:target: https://pypi.org/project/python-telegram-bot/
21+
:alt: Supported Python versions
22+
23+
.. image:: https://img.shields.io/badge/Bot%20API-5.0-blue?logo=telegram
24+
:target: https://core.telegram.org/bots/api-changelog
25+
:alt: Supported Bot API versions
26+
27+
.. image:: https://img.shields.io/pypi/dm/python-telegram-bot-raw
28+
:target: https://pypistats.org/packages/python-telegram-bot
29+
:alt: PyPi Package Monthly Download
30+
31+
.. image:: https://img.shields.io/badge/docs-latest-af1a97.svg
32+
:target: https://python-telegram-bot.readthedocs.io/
33+
:alt: Documentation Status
34+
35+
.. image:: https://img.shields.io/pypi/l/python-telegram-bot-raw.svg
36+
:target: https://www.gnu.org/licenses/lgpl-3.0.html
37+
:alt: LGPLv3 License
38+
39+
.. image:: https://github.com/python-telegram-bot/python-telegram-bot/workflows/GitHub%20Actions/badge.svg
40+
:target: https://github.com/python-telegram-bot/python-telegram-bot/
41+
:alt: Github Actions workflow
42+
43+
.. image:: https://codecov.io/gh/python-telegram-bot/python-telegram-bot/branch/master/graph/badge.svg
44+
:target: https://codecov.io/gh/python-telegram-bot/python-telegram-bot
45+
:alt: Code coverage
46+
47+
.. image:: http://isitmaintained.com/badge/resolution/python-telegram-bot/python-telegram-bot.svg
48+
:target: http://isitmaintained.com/project/python-telegram-bot/python-telegram-bot
49+
:alt: Median time to resolve an issue
50+
51+
.. image:: https://api.codacy.com/project/badge/Grade/99d901eaa09b44b4819aec05c330c968
52+
: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
53+
:alt: Code quality
54+
55+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
56+
:target: https://github.com/psf/black
57+
58+
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram
59+
:target: https://telegram.me/pythontelegrambotgroup
60+
:alt: Telegram Group
61+
62+
.. image:: https://img.shields.io/badge/IRC-Channel-blue.svg
63+
:target: https://webchat.freenode.net/?channels=##python-telegram-bot
64+
:alt: IRC Bridge
65+
66+
=================
67+
Table of contents
68+
=================
69+
70+
- `Introduction`_
71+
72+
- `Telegram API support`_
73+
74+
- `Installing`_
75+
76+
- `Getting started`_
77+
78+
#. `Logging`_
79+
80+
#. `Documentation`_
81+
82+
- `Getting help`_
83+
84+
- `Contributing`_
85+
86+
- `License`_
87+
88+
============
89+
Introduction
90+
============
91+
92+
This library provides a pure Python, lightweight interface for the
93+
`Telegram Bot API <https://core.telegram.org/bots/api>`_.
94+
It's compatible with Python versions 3.6+. 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.
95+
96+
``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.
97+
98+
----
99+
Note
100+
----
101+
102+
Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both.
103+
104+
====================
105+
Telegram API support
106+
====================
107+
108+
All types and methods of the Telegram Bot API **5.0** are supported.
109+
110+
==========
111+
Installing
112+
==========
113+
114+
You can install or upgrade python-telegram-bot-raw with:
115+
116+
.. code:: shell
117+
118+
$ pip install python-telegram-bot-raw --upgrade
119+
120+
Or you can install from source with:
121+
122+
.. code:: shell
123+
124+
$ git clone https://github.com/python-telegram-bot/python-telegram-bot --recursive
125+
$ cd python-telegram-bot
126+
$ python setup-raw.py install
127+
128+
In case you have a previously cloned local repository already, you should initialize the added urllib3 submodule before installing with:
129+
130+
.. code:: shell
131+
132+
$ git submodule update --init --recursive
133+
134+
----
135+
Note
136+
----
137+
138+
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`.
139+
140+
===============
141+
Getting started
142+
===============
143+
144+
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:
145+
146+
- the `Telegram API documentation <https://core.telegram.org/bots/api>`_
147+
- the `python-telegram-bot documentation <https://python-telegram-bot.readthedocs.io/>`_
148+
149+
-------
150+
Logging
151+
-------
152+
153+
This library uses the ``logging`` module. To set up logging to standard output, put:
154+
155+
.. code:: python
156+
157+
import logging
158+
logging.basicConfig(level=logging.DEBUG,
159+
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
160+
161+
at the beginning of your script.
162+
163+
You can also use logs in your application by calling ``logging.getLogger()`` and setting the log level you want:
164+
165+
.. code:: python
166+
167+
logger = logging.getLogger()
168+
logger.setLevel(logging.INFO)
169+
170+
If you want DEBUG logs instead:
171+
172+
.. code:: python
173+
174+
logger.setLevel(logging.DEBUG)
175+
176+
177+
=============
178+
Documentation
179+
=============
180+
181+
``python-telegram-bot``'s documentation lives at `readthedocs.io <https://python-telegram-bot.readthedocs.io/>`_, which
182+
includes the relevant documentation for ``python-telegram-bot-raw``.
183+
184+
============
185+
Getting help
186+
============
187+
188+
You can get help in several ways:
189+
190+
1. We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
191+
192+
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>`_.
193+
194+
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>`_ or `a discussion <https://github.com/python-telegram-bot/python-telegram-bot/discussions/new>`_.
195+
196+
4. Our `Wiki pages <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ offer a growing amount of resources.
197+
198+
5. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_.
199+
200+
============
201+
Contributing
202+
============
203+
204+
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>`_.
205+
206+
=======
207+
License
208+
=======
209+
210+
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.

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
# built documents.
5959
#
6060
# The short X.Y version.
61-
version = '13.1' # telegram.__version__[:3]
61+
version = '13.2' # telegram.__version__[:3]
6262
# The full version, including alpha/beta/rc tags.
63-
release = '13.1' # telegram.__version__
63+
release = '13.2' # telegram.__version__
6464

6565
# The language for content autogenerated by Sphinx. Refer to documentation
6666
# for a list of supported languages.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy