René's URL Explorer Experiment


Title: Handler callback revamp · Issue #1026 · python-telegram-bot/python-telegram-bot · GitHub

Open Graph Title: Handler callback revamp · Issue #1026 · python-telegram-bot/python-telegram-bot

X Title: Handler callback revamp · Issue #1026 · python-telegram-bot/python-telegram-bot

Description: This issue is here to expose to the community a proposed design for the Handlers callback prototype. We have recently closed/rejected PR #859 in this subject as we preferred to go in a different direction. Here we intend to discuss with ...

Open Graph Description: This issue is here to expose to the community a proposed design for the Handlers callback prototype. We have recently closed/rejected PR #859 in this subject as we preferred to go in a different di...

X Description: This issue is here to expose to the community a proposed design for the Handlers callback prototype. We have recently closed/rejected PR #859 in this subject as we preferred to go in a different di...

Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/1026

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Handler callback revamp","articleBody":"This issue is here to expose to the community a proposed design for the Handlers callback prototype.\r\nWe have recently closed/rejected PR #859 in this subject as we preferred to go in a different direction. Here we intend to discuss with the community what will be the chosen design.\r\n\r\n**Current situation:**\r\nMinimal callback prototype is `def callback(bot, update)`.\r\nIf users require more data/facilities they can initialize the Handler with extra `pass_` (bool) arguments  which mandates the callback to accept more arguments (like `groups`, `args` and others).\r\n\r\nProblems:\r\n * The API is very cumbersome and confusing for new users.\r\n * Adding/pushing new context data into the callbacks requires code changes from the users.\r\nLets say that we want the RegexHandler to provide the match object to the callback. With the current design it will be impossible to add that information without changing the callback prototype and (most likely) impose a new `pass_` parameter during Handler initialization.\r\n\r\n**Proposed API**\r\nIMPORTANT: This change is non backward compatible. We might implement a backward compatibility layer for a certain period like we have done with other deprecated mechanisms in the past.\r\n * Deprecate `pass_` arguments when initializing Handlers.\r\n * Handler callbacks prototype will change to: `def callback(update, ctx)`.\r\n * The above `ctx` will be a context of all information/facilities that users may need. The context will be a Mixin of various context objects, depending on the Handler.\r\nExamples of such information/facilities:\r\n    * `bot`\r\n    * `update_queue`\r\n    * `job_queue` (something to think about: instead of updater_queue \u0026 job_queue, pass the `updater`)\r\n    * `user_data`\r\n    * `chat_data`\r\n    * `match` (instead of `groups`, `groups_dict` and similar for).","author":{"url":"https://github.com/tsnoam","@type":"Person","name":"tsnoam"},"datePublished":"2018-03-01T08:33:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/1026/python-telegram-bot/issues/1026"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ec08b7b9-d836-e4f8-d7fb-cfd405fa39b2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA350:7D6D8:7BE11:9EE3A:6A601503
html-safe-nonce174c5355d55ed71a47dd1e0494c404f72b4cf719ab9fb53f8a2e01a54f2f353d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzUwOjdENkQ4OjdCRTExOjlFRTNBOjZBNjAxNTAzIiwidmlzaXRvcl9pZCI6IjQyNzYzMjI5MTM0NzIyMjI0NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac380b0ea5ba18ba56b30c27bde436a7c3bb8d8bd4882d37c35d3f7d88b0995307
hovercard-subject-tagissue:301317725
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/1026/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4b624ae013ddde4cead9f35bc2829531761b2f0ae317165940d8510187a93cfb/python-telegram-bot/python-telegram-bot/issues/1026
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4b624ae013ddde4cead9f35bc2829531761b2f0ae317165940d8510187a93cfb/python-telegram-bot/python-telegram-bot/issues/1026
og:image:altThis issue is here to expose to the community a proposed design for the Handlers callback prototype. We have recently closed/rejected PR #859 in this subject as we preferred to go in a different di...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametsnoam
hostnamegithub.com
expected-hostnamegithub.com
None399e662401f6b9a532ecd80b305d17b9efadd864681448a290ab2901b98f288a
turbo-cache-controlno-preview
go-importgithub.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git
octolytics-dimension-user_id16178365
octolytics-dimension-user_loginpython-telegram-bot
octolytics-dimension-repository_id38696925
octolytics-dimension-repository_nwopython-telegram-bot/python-telegram-bot
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38696925
octolytics-dimension-repository_network_root_nwopython-telegram-bot/python-telegram-bot
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2f4d68ce236d24a2cd682f94ef8bd8537c09d73d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-telegram-bot/python-telegram-bot/issues/1026#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fissues%2F1026
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Fissues%2F1026
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-telegram-bot%2Fpython-telegram-bot
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/issues/1026
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/issues/1026
Reloadhttps://github.com/python-telegram-bot/python-telegram-bot/issues/1026
Please reload this pagehttps://github.com/python-telegram-bot/python-telegram-bot/issues/1026
python-telegram-bot https://github.com/python-telegram-bot
python-telegram-bothttps://github.com/python-telegram-bot/python-telegram-bot
Notifications https://github.com/login?return_to=%2Fpython-telegram-bot%2Fpython-telegram-bot
Fork 6.1k https://github.com/login?return_to=%2Fpython-telegram-bot%2Fpython-telegram-bot
Star 29.3k https://github.com/login?return_to=%2Fpython-telegram-bot%2Fpython-telegram-bot
Code https://github.com/python-telegram-bot/python-telegram-bot
Issues 24 https://github.com/python-telegram-bot/python-telegram-bot/issues
Pull requests 9 https://github.com/python-telegram-bot/python-telegram-bot/pulls
Discussions https://github.com/python-telegram-bot/python-telegram-bot/discussions
Actions https://github.com/python-telegram-bot/python-telegram-bot/actions
Projects https://github.com/python-telegram-bot/python-telegram-bot/projects
Wiki https://github.com/python-telegram-bot/python-telegram-bot/wiki
Security and quality 0 https://github.com/python-telegram-bot/python-telegram-bot/security
Insights https://github.com/python-telegram-bot/python-telegram-bot/pulse
Code https://github.com/python-telegram-bot/python-telegram-bot
Issues https://github.com/python-telegram-bot/python-telegram-bot/issues
Pull requests https://github.com/python-telegram-bot/python-telegram-bot/pulls
Discussions https://github.com/python-telegram-bot/python-telegram-bot/discussions
Actions https://github.com/python-telegram-bot/python-telegram-bot/actions
Projects https://github.com/python-telegram-bot/python-telegram-bot/projects
Wiki https://github.com/python-telegram-bot/python-telegram-bot/wiki
Security and quality https://github.com/python-telegram-bot/python-telegram-bot/security
Insights https://github.com/python-telegram-bot/python-telegram-bot/pulse
Handler callback revamphttps://github.com/python-telegram-bot/python-telegram-bot/issues/1026#top
https://github.com/tsnoam
https://github.com/tsnoam
tsnoamhttps://github.com/tsnoam
on Mar 1, 2018https://github.com/python-telegram-bot/python-telegram-bot/issues/1026#issue-301317725
#859https://github.com/python-telegram-bot/python-telegram-bot/pull/859
tsnoamhttps://github.com/tsnoam
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.