Skip to content

API 6.3 #3346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Nov 22, 2022
Merged

API 6.3 #3346

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
74d1528
Feat: New attributes for chat
Poolitzer Nov 5, 2022
2cd6c54
Update fallback bots and add forum_group_id fixture
Bibo-Joshi Nov 6, 2022
f083fff
doc fix
Bibo-Joshi Nov 7, 2022
0b597d9
Merge remote-tracking branch 'origin/master' into api_6.3_update
Poolitzer Nov 7, 2022
7dc634e
Fix: black
Poolitzer Nov 7, 2022
3e8aa6e
add `message_thread_id` param to methods, `message_thread_id` and `is…
lemontree210 Nov 9, 2022
d48499f
Feat: Docstring changes + moving limit to constants (#3343)
Poolitzer Nov 9, 2022
7463346
Merge branch 'master' into api_6.3_update
Poolitzer Nov 11, 2022
1ebb561
Fix: Pycharm messing with me
Poolitzer Nov 11, 2022
7cb99c6
Some part of the new api update (#3342)
clot27 Nov 11, 2022
48c04d5
post-merge review of #3342
Bibo-Joshi Nov 11, 2022
b8837ad
Merge branch 'master' into api_6.3_update
Bibo-Joshi Nov 11, 2022
2fd5538
temporarily enable tests for PRs agains this branch
Bibo-Joshi Nov 13, 2022
2c8a1c0
update two shorcut methods
Bibo-Joshi Nov 14, 2022
897105c
Merge branch 'master' into api_6.3_update
Bibo-Joshi Nov 15, 2022
addaa6d
6.3 new methods (#3360)
Poolitzer Nov 15, 2022
3940b53
small doc fix
Bibo-Joshi Nov 17, 2022
0cc1d03
New classes for API 6.3: `ForumTopic`, `ForumTopicCreated`, `ForumTop…
lemontree210 Nov 18, 2022
86b2a55
review + fixes: fix coverage and some docs
harshil21 Nov 18, 2022
1d78410
update bot api version number
harshil21 Nov 18, 2022
8afae2d
add xfail marker to test
harshil21 Nov 18, 2022
84a1693
revert changes to test config
harshil21 Nov 18, 2022
fa917c8
minor(`test_forum.py`): remove TODO
lemontree210 Nov 19, 2022
eef0a48
minor(`ChatPermissions`) move "and" in docstring
lemontree210 Nov 19, 2022
330e483
minor(`ChatPermissions`) add comma before attr in docstring
lemontree210 Nov 19, 2022
e63eae3
minor(`constants.ForumIconColor`) add HEX equivalents in docstr
lemontree210 Nov 19, 2022
a0f5e93
refactor(constants) `ChatLimit` -> `TitleLimit`
lemontree210 Nov 20, 2022
444e999
minor(constants) add refs to params in docstrings of `TopicLimit`
lemontree210 Nov 20, 2022
937544b
minor(constants): rename `TitleLimit`->`ChatLimit`, move it up in code
lemontree210 Nov 20, 2022
101b8e4
minor(constants): rename `TopicLimit`->`ForumTopicLimit`
lemontree210 Nov 20, 2022
fba5421
minor(constants): sort `__all__` alphabetically
lemontree210 Nov 20, 2022
2f624e2
`filters.IS_TOPIC_MESSAGE`
Bibo-Joshi Nov 20, 2022
c0f4c2f
Update filters.__all__ and add a unit test
Bibo-Joshi Nov 22, 2022
3dbd118
Merge branch 'master' into api_6.3_update
Bibo-Joshi Nov 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,35 @@ jobs:
# Test without passport
pytest -v --cov -k test_no_passport.py
status=$?

# test without pytz
pytest -v --cov --cov-append -k test_datetime.py
status=$(( $? > status ? $? : status))
pytest -v --cov --cov-append -k test_defaults.py
status=$(( $? > status ? $? : status))

# test without pytz & jobqueue
pytest -v --cov --cov-append -k test_jobqueue.py
pytest -v --cov --cov-append -k test_applicationbuilder.py
status=$(( $? > status ? $? : status))

# Test without ratelimiter
pytest -v --cov --cov-append -k test_ratelimiter.py
status=$(( $? > status ? $? : status))

# Test without webhooks
pytest -v --cov --cov-append -k test_updater.py
status=$(( $? > status ? $? : status))

# Test without callback-data
pytest -v --cov --cov-append -k test_callbackdatacache.py
status=$(( $? > status ? $? : status))

# Test without socks
pytest -v --cov --cov-append -k test_request.py
status=$(( $? > status ? $? : status))

# Test the rest

export TEST_WITH_OPT_DEPS='true'
pip install -r requirements-opts.txt
# `-n auto --dist loadfile` uses pytest-xdist to run each test file on a different CPU
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:target: https://pypi.org/project/python-telegram-bot/
:alt: Supported Python versions

.. image:: https://img.shields.io/badge/Bot%20API-6.2-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-6.3-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions

Expand Down
2 changes: 1 addition & 1 deletion README_RAW.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:target: https://pypi.org/project/python-telegram-bot-raw/
:alt: Supported Python versions

.. image:: https://img.shields.io/badge/Bot%20API-6.2-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-6.3-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions

Expand Down
29 changes: 29 additions & 0 deletions docs/source/inclusions/bot_methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,35 @@
</details>
<br>

.. raw:: html

<details>
<summary>Forum topic management</summary>

.. list-table::
:align: left
:widths: 1 4

* - :meth:`~telegram.Bot.close_forum_topic`
- Used for closing a forum topic
* - :meth:`~telegram.Bot.create_forum_topic`
- Used to create a topic
* - :meth:`~telegram.Bot.delete_forum_topic`
- Used for deleting a forum topic
* - :meth:`~telegram.Bot.edit_forum_topic`
- Used to edit a topic
* - :meth:`~telegram.Bot.reopen_forum_topic`
- Used to reopen a topic
* - :meth:`~telegram.Bot.get_forum_topic_icon_stickers`
- Used to get custom emojis to use as topic icons
* - :meth:`~telegram.Bot.unpin_all_forum_topic_messages`
- Used to unpin all messages in a forum topic

.. raw:: html

</details>
<br>

.. raw:: html

<details>
Expand Down
4 changes: 4 additions & 0 deletions docs/source/telegram.at-tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Available Types
telegram.document
telegram.file
telegram.forcereply
telegram.forumtopic
telegram.forumtopicclosed
telegram.forumtopiccreated
telegram.forumtopicreopened
telegram.inlinekeyboardbutton
telegram.inlinekeyboardmarkup
telegram.inputfile
Expand Down
6 changes: 6 additions & 0 deletions docs/source/telegram.forumtopic.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
telegram.ForumTopic
===================

.. autoclass:: telegram.ForumTopic
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.forumtopicclosed.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
telegram.ForumTopicClosed
=========================

.. autoclass:: telegram.ForumTopicClosed
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.forumtopiccreated.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
telegram.ForumTopicCreated
==========================

.. autoclass:: telegram.ForumTopicCreated
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.forumtopicreopened.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
telegram.ForumTopicReopened
===========================

.. autoclass:: telegram.ForumTopicReopened
:members:
:show-inheritance:
4 changes: 4 additions & 0 deletions docs/substitutions/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

.. |chat_id_group| replace:: Unique identifier for the target chat or username of the target supergroup (in the format ``@supergroupusername``).

.. |message_thread_id| replace:: Unique identifier for the target message thread of the forum topic.

.. |message_thread_id_arg| replace:: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.

.. |parse_mode| replace:: Mode for parsing entities. See :class:`telegram.constants.ParseMode` and `formatting options <https://core.telegram.org/bots/api#formatting-options>`__ for more details.

.. |allow_sending_without_reply| replace:: Pass :obj:`True`, if the message should be sent even if the specified replied-to message is not found.
Expand Down
5 changes: 5 additions & 0 deletions telegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"File",
"FileCredentials",
"ForceReply",
"ForumTopic",
"ForumTopicClosed",
"ForumTopicCreated",
"ForumTopicReopened",
"Game",
"GameHighScore",
"helpers",
Expand Down Expand Up @@ -230,6 +234,7 @@
from ._files.videonote import VideoNote
from ._files.voice import Voice
from ._forcereply import ForceReply
from ._forumtopic import ForumTopic, ForumTopicClosed, ForumTopicCreated, ForumTopicReopened
from ._games.callbackgame import CallbackGame
from ._games.game import Game
from ._games.gamehighscore import GameHighScore
Expand Down
Loading