Skip to content
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

Feat: API 7.1 #4118

Merged
merged 32 commits into from Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3fb1488
Make `allow_sending_without_reply`, `reply_to_message_id` and `disabl…
Bibo-Joshi Feb 11, 2024
5785813
Merge branch 'master' into remove-api-7.0-deprecations
Bibo-Joshi Feb 11, 2024
c72d338
Remove `UserShared` and `KeyboardButtonRequestUser`
Bibo-Joshi Feb 12, 2024
f004701
Feat: API 7.1
Poolitzer Feb 15, 2024
ca3b638
Remove rest & adapt tests
Bibo-Joshi Feb 16, 2024
2816ffa
Try Fixing docs
Bibo-Joshi Feb 16, 2024
dd12f84
Try harder
Bibo-Joshi Feb 16, 2024
391cebf
Code Coverage
Bibo-Joshi Feb 16, 2024
e3fd1d2
Fix: move Chatboostadded to the correct file
Poolitzer Feb 16, 2024
f39d62d
Feat: Mark admin right stories as non optional
Poolitzer Feb 16, 2024
2a9812e
Feat: Mark chat member right stories as non optional
Poolitzer Feb 16, 2024
1aeee91
Fix: Small review things
Poolitzer Feb 16, 2024
0829abd
Feat: Trying to improve workflow trigger
Poolitzer Feb 16, 2024
fe7dff7
review
Bibo-Joshi Feb 18, 2024
2341d92
Apply suggestions from code review
Poolitzer Feb 24, 2024
ad654a5
Fix: Apply suggestions
Poolitzer Feb 24, 2024
b72df90
Fix: Fixing tests
Poolitzer Feb 24, 2024
7b354b1
Fix: Adding filters
Poolitzer Feb 24, 2024
03caaa1
Merge remote-tracking branch 'origin/api-7.1' into api-7.1
Poolitzer Feb 24, 2024
bb48f5b
Merge branch 'remove-api-7.0-deprecations' into api-7.1
Poolitzer Feb 24, 2024
7fe0639
Fix: Missed adding optionals here
Poolitzer Feb 24, 2024
5b6a116
Merge remote-tracking branch 'origin/api-7.1' into api-7.1
Poolitzer Feb 24, 2024
2e05aa5
Merge branch 'master' into api-7.1
Bibo-Joshi Feb 25, 2024
e1b4249
Merge branch 'master' into api-7.1
Poolitzer Feb 28, 2024
8791fc6
Update telegram/_chatadministratorrights.py
Poolitzer Feb 28, 2024
6b020fc
Fix: add ignore for official test
Poolitzer Feb 28, 2024
946f2af
Fix: remove optional from docstring
Poolitzer Feb 28, 2024
d150956
Merge remote-tracking branch 'origin/api-7.1' into api-7.1
Poolitzer Feb 28, 2024
b8489fe
Fix: pre commit failling
Poolitzer Feb 28, 2024
2cc97a7
Fix: Remove double version added
Poolitzer Feb 29, 2024
ad1e219
Fix: Improve workflow trigger
Poolitzer Feb 29, 2024
f20e0b7
Merge branch 'master' into api-7.1
Bibo-Joshi Mar 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Expand Up @@ -2,12 +2,14 @@ name: Test Documentation Build
on:
pull_request:
branches:
- master
- doc-fixes
paths:
- telegram/**
Bibo-Joshi marked this conversation as resolved.
Show resolved Hide resolved
push:
branches:
- master
- doc-fixes
paths:
- telegram/**

jobs:
test-sphinx-build:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test_official.yml
@@ -1,11 +1,13 @@
name: Bot API Tests
on:
pull_request:
branches:
- master
paths:
- telegram/**
- tests/**
push:
branches:
- master
paths:
- telegram/**
- tests/**
schedule:
# Run monday and friday morning at 03:07 - odd time to spread load on GitHub Actions
- cron: '7 3 * * 1,5'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/type_completeness.yml
@@ -1,11 +1,11 @@
name: Check Type Completeness
on:
pull_request:
branches:
- master
paths:
- telegram/**
push:
branches:
- master
paths:
- telegram/**

jobs:
test-type-completeness:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/unit_tests.yml
@@ -1,12 +1,14 @@
name: Unit Tests
on:
pull_request:
branches:
- master
paths:
- telegram/**
- tests/**

push:
branches:
- master
paths:
- telegram/**
- tests/**

schedule:
# Run monday and friday morning at 03:07 - odd time to spread load on GitHub Actions
Expand Down
4 changes: 2 additions & 2 deletions README.rst
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-7.0-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-7.1-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions

Expand Down Expand Up @@ -93,7 +93,7 @@ Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conju
Telegram API support
====================

All types and methods of the Telegram Bot API **7.0** are supported.
All types and methods of the Telegram Bot API **7.1** are supported.

Installing
==========
Expand Down
4 changes: 2 additions & 2 deletions README_RAW.rst
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-7.0-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-7.1-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions

Expand Down Expand Up @@ -89,7 +89,7 @@ Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conju
Telegram API support
====================

All types and methods of the Telegram Bot API **7.0** are supported.
All types and methods of the Telegram Bot API **7.1** are supported.

Installing
==========
Expand Down
1 change: 1 addition & 0 deletions docs/source/telegram.at-tree.rst
Expand Up @@ -22,6 +22,7 @@ Available Types
telegram.chat
telegram.chatadministratorrights
telegram.chatboost
telegram.chatboostadded
telegram.chatboostremoved
telegram.chatboostsource
telegram.chatboostsourcegiftcode
Expand Down
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboostadded.rst
@@ -0,0 +1,8 @@
ChatBoostAdded
==============

.. versionadded:: NEXT.VERSION

harshil21 marked this conversation as resolved.
Show resolved Hide resolved
.. autoclass:: telegram.ChatBoostAdded
:members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/substitutions/global.rst
Expand Up @@ -68,7 +68,7 @@

.. |rtm_aswr_deprecated| replace:: replacing this argument. PTB will automatically convert this argument to that one, but you should update your code to use the new argument.

.. |keyword_only_arg| replace:: In future versions, this argument will become a keyword-only argument.
.. |keyword_only_arg| replace:: This argument is now a keyword-only argument.

.. |text_html| replace:: The return value of this property is a best-effort approach. Unfortunately, it can not be guaranteed that sending a message with the returned string will render in the same way as the original message produces the same :attr:`~telegram.Message.entities`/:attr:`~telegram.Message.caption_entities` as the original message. For example, Telegram recommends that entities of type :attr:`~telegram.MessageEntity.BLOCKQUOTE` and :attr:`~telegram.MessageEntity.PRE` *should* start and end on a new line, but does not enforce this and leaves rendering decisions up to the clients.

Expand Down
12 changes: 4 additions & 8 deletions telegram/__init__.py
Expand Up @@ -40,6 +40,7 @@
"Chat",
"ChatAdministratorRights",
"ChatBoost",
"ChatBoostAdded",
"ChatBoostRemoved",
"ChatBoostSource",
"ChatBoostSourceGiftCode",
Expand Down Expand Up @@ -130,7 +131,6 @@
"KeyboardButton",
"KeyboardButtonPollType",
"KeyboardButtonRequestChat",
"KeyboardButtonRequestUser",
"KeyboardButtonRequestUsers",
"LabeledPrice",
"LinkPreviewOptions",
Expand Down Expand Up @@ -198,7 +198,6 @@
"User",
"UserChatBoosts",
"UserProfilePhotos",
"UserShared",
"UsersShared",
"Venue",
"Video",
Expand Down Expand Up @@ -244,6 +243,7 @@
from ._chatadministratorrights import ChatAdministratorRights
from ._chatboost import (
ChatBoost,
ChatBoostAdded,
ChatBoostRemoved,
ChatBoostSource,
ChatBoostSourceGiftCode,
Expand Down Expand Up @@ -338,11 +338,7 @@
from ._inline.inputvenuemessagecontent import InputVenueMessageContent
from ._keyboardbutton import KeyboardButton
from ._keyboardbuttonpolltype import KeyboardButtonPollType
from ._keyboardbuttonrequest import (
KeyboardButtonRequestChat,
KeyboardButtonRequestUser,
KeyboardButtonRequestUsers,
)
from ._keyboardbuttonrequest import KeyboardButtonRequestChat, KeyboardButtonRequestUsers
from ._linkpreviewoptions import LinkPreviewOptions
from ._loginurl import LoginUrl
from ._menubutton import MenuButton, MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp
Expand Down Expand Up @@ -397,7 +393,7 @@
from ._replykeyboardmarkup import ReplyKeyboardMarkup
from ._replykeyboardremove import ReplyKeyboardRemove
from ._sentwebappmessage import SentWebAppMessage
from ._shared import ChatShared, UserShared, UsersShared
from ._shared import ChatShared, UsersShared
from ._story import Story
from ._switchinlinequerychosenchat import SwitchInlineQueryChosenChat
from ._telegramobject import TelegramObject
Expand Down