Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Full Support for Bot API 8.3#4676

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 21 commits intomasterfromapi_8.3
Mar 1, 2025
Merged

Full Support for Bot API 8.3#4676

Bibo-Joshi merged 21 commits intomasterfromapi_8.3
Mar 1, 2025

Conversation

Poolitzer
Copy link
Member

@PoolitzerPoolitzer commentedFeb 12, 2025
edited by Bibo-Joshi
Loading

First take, needs to be extended

when readycloses#4677


  • Added.. versionadded:: NEXT.VERSION,.. versionchanged:: NEXT.VERSION,.. deprecated:: NEXT.VERSION or.. versionremoved:: NEXT.VERSION to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to theCSI standard_
  • Added myself alphabetically toAUTHORS.rst (optional)
  • Added new classes & modules to the docs and all suitable__all__ s
  • Checked theStability Policy in case of deprecations or changes to documented behavior
  • Check the diff files inthis channel for documentation updates

If the PR contains API changes (otherwise, you can ignore this passage)

  • Checked the Bot API specific sections of theStability Policy

  • Created a PR to remove functionality deprecated in the previous Bot API release (see here)

  • New classes:

    • Addedself._id_attrs and corresponding documentation
    • __init__ acceptsapi_kwargs as kw-only
  • Added new shortcuts:

    • Intelegram.Chat &telegram.User for all methods that acceptchat/user_id
    • Intelegram.Message for all methods that acceptchat_id andmessage_id
    • For newtelegram.Message shortcuts: Addedquote argument if methods acceptsreply_to_message_id
    • Intelegram.CallbackQuery for all methods that accept eitherchat_id andmessage_id orinline_message_id
  • If relevant:

    • Added new constants attelegram.constants and shortcuts to them as class variables

    • Link new and existing constants in docstrings instead of hard-coded numbers and strings

    • Add new message types totelegram.Message.effective_attachment

    • Added new handlers for new update types

      • Add the handlers to the warning loop in thetelegram.ext.ConversationHandler
    • Added new filters for new message (sub)types

    • Added or updated documentation for the changed class(es) and/or method(s)

    • Added the new method(s) to_extbot.py

    • Added or updatedbot_methods.rst

    • Updated the Bot API version number in all places:README.rst (including the badge) andtelegram.constants.BOT_API_VERSION_INFO

    • Added logic for arbitrary callback data intelegram.ext.ExtBot for new methods that either accept areply_markup in some form or have a return type that is/containstelegram.Message

Relaxx422 reacted with laugh emoji
@codecovCodecov
Copy link

codecovbot commentedFeb 12, 2025
edited
Loading

❌ 1 Tests Failed:

Tests completedFailedPassedSkipped
652916528533
View the top 1 failed test(s) by shortest run time
tests.test_gifts.TestGiftWithoutRequest::test_send_gift_without_gift_id
Stack Traces | 0.004s run time
self=<tests.test_gifts.TestGiftWithoutRequestobjectat0x00000176A4007790>offline_bot=PytestExtBot[token=5737018356:AAH138SuiKQF0LDCWsfgWeXfjJ5d63kCWLA]gift=Gift(id='some_id',remaining_count=5,star_count=5,sticker=Sticker(file_id='file_id',file_unique_id='file_unique_id'...=512,is_animated=False,is_video=False,type=<StickerType.REGULAR>,width=512),total_count=10,upgrade_star_count=10)monkeypatch=<_pytest.monkeypatch.MonkeyPatchobjectat0x00000176A5BB8DD0>asyncdeftest_send_gift_without_gift_id(self,offline_bot,gift,monkeypatch):# Only here because we have to temporarily mark gift_id as optional.# tags: deprecated NEXT.VERSION# We can't send actual gifts, so we just check that the correct parameters are passedtext_entities= [MessageEntity(MessageEntity.TEXT_LINK,0,4,"url"),MessageEntity(MessageEntity.BOLD,5,9),        ]asyncdefmake_assertion(url,request_data:RequestData,*args,**kwargs):user_id=request_data.parameters["chat_id"]=="chat_id"gift_id=request_data.parameters["gift_id"]=="gift_id"text=request_data.parameters["text"]=="text"text_parse_mode=request_data.parameters["text_parse_mode"]=="text_parse_mode"tes=request_data.parameters["text_entities"]== [me.to_dict()formeintext_entities            ]pay_for_upgrade=request_data.parameters["pay_for_upgrade"]isTruereturnuser_idandgift_idandtextandtext_parse_modeandtesandpay_for_upgrademonkeypatch.setattr(offline_bot.request,"post",make_assertion)>assertawaitoffline_bot.send_gift(gift_id=gift,text="text",text_parse_mode="text_parse_mode",text_entities=text_entities,pay_for_upgrade=True,chat_id="chat_id",        )EassertFalsetests\test_gifts.py:190:AssertionError

To view more test analytics, go to theTest Analytics Dashboard
📋 Got 3 mins?Take this short survey to help us improve Test Analytics.

@Bibo-JoshiBibo-Joshi changed the titleApi 8.3Full Support for Bot API 8.3Feb 12, 2025
@Bibo-JoshiBibo-Joshi added ⚙️ bot-apiaffected functionality: bot-api 🔌 enhancementpr description: enhancement labelsFeb 17, 2025
@Bibo-JoshiBibo-Joshi mentioned this pull requestFeb 17, 2025
4 tasks
Copy link
Member

@Bibo-JoshiBibo-Joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

thank you for the PR Pool! I went through the changes a first time and left some comments, nothing mejor though.

Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

tests/_payment/stars/test_transactionpartner.py:498

  • The equality test creates a TransactionPartnerChat without explicitly passing the 'gift' parameter, while the fixture instance includes it. This may lead to unexpected behavior if 'gift' does not have a consistent default; consider passing 'gift' explicitly or documenting the default behavior.
b = TransactionPartnerChat(            chat=self.chat,

tests/_payment/stars/test_transactionpartner.py:475

  • [nitpick] Using the literal 'err' as the default value in getattr for verifyingslots might mask cases where an attribute's value is legitimately 'err'. Consider using a unique sentinel value to reliably detect missing attributes.
for attr in inst.__slots__:

Bibo-Joshiand others added7 commitsFebruary 26, 2025 21:08
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
@Bibo-JoshiBibo-Joshi merged commitb75948e intomasterMar 1, 2025
26 checks passed
@Bibo-JoshiBibo-Joshi deleted the api_8.3 branchMarch 1, 2025 10:13
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 9, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

Copilot code reviewCopilotCopilot left review comments

@Bibo-JoshiBibo-JoshiBibo-Joshi approved these changes

Assignees
No one assigned
Labels
⚙️ bot-apiaffected functionality: bot-api🔌 enhancementpr description: enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

API 8.3
3 participants
@Poolitzer@Bibo-Joshi@aelkheir

[8]ページ先頭

©2009-2025 Movatter.jp