Skip to content

fix: update contributions for PTB v20 - #155

Open
xuu33030 wants to merge 2 commits into
python-telegram-bot:mainfrom
xuu33030:ptb-v20-compatibility
Open

xuu33030 wants to merge 2 commits into
python-telegram-bot:mainfrom
xuu33030:ptb-v20-compatibility

Conversation

@xuu33030

@xuu33030 xuu33030 commented Sep 19, 2026

Copy link
Copy Markdown

Summary

  • update extract_urls and longbotcommand dependencies to Python Telegram Bot 20.x
  • update the LongBotCommand example to the PTB 20 async Application API
  • align tests with PTB 20 immutable Telegram objects and add coverage for entity type constants
  • keep contribution documentation and examples consistent with the supported dependency range

Root cause

Issue #131 identified two contributions that still depended on PTB v13 APIs. longbotcommand also had tests that attempted to mutate BotCommand.description, which is immutable in PTB v20.

Verification

  • python run_tests.py -n extract_urls longbotcommand — 14 passed
  • pre-commit hooks on all changed Python files — passed
  • fresh Python 3.11 environment resolved both contribution requirements to PTB 20.8
  • updated README example compiled and initialized an Application successfully without starting polling
  • git diff --check — passed

Closes #131

@xuu33030 xuu33030 changed the title ptbcontrib/extract_urls and ptbcontrib/longbotcommand: bump PTB dependency to ~=20.0 and adjust tests for v20 immutability fix: update contributions for PTB v20 Sep 19, 2026

@harshil21 harshil21 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks quite alright!

Comment on lines +18 to +22
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. "
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an "
"unknown printer took a galley of type and scrambled it to make a type specimen book. "
"It has survived not only five centuries, but also the leap into electronic typesetting, "
"remaining essentially unchanged."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This needs to be updated from https://www.lipsum.com/ :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you mind also changing the List to list in the extracturls.py file? If I saw correctly that should make it compatible with py3.10+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update extract_urls and longbotcommand so we can drop V13

2 participants