René's URL Explorer Experiment


Title: Enable developers to inject non-bolt arguments to listener function args · Issue #709 · slackapi/bolt-python · GitHub

Open Graph Title: Enable developers to inject non-bolt arguments to listener function args · Issue #709 · slackapi/bolt-python

X Title: Enable developers to inject non-bolt arguments to listener function args · Issue #709 · slackapi/bolt-python

Description: I'm using dependency_injector to provide automatic dependency injection for my application, and I'm encountering an issue with Bolt overriding injected parameters with None since it doesn't recognize them. Reproducible in: pip freeze | g...

Open Graph Description: I'm using dependency_injector to provide automatic dependency injection for my application, and I'm encountering an issue with Bolt overriding injected parameters with None since it doesn't recogni...

X Description: I'm using dependency_injector to provide automatic dependency injection for my application, and I'm encountering an issue with Bolt overriding injected parameters with None since it doesn&#...

Opengraph URL: https://github.com/slackapi/bolt-python/issues/709

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Enable developers to inject non-bolt arguments to listener function args","articleBody":"I'm using [dependency_injector](https://python-dependency-injector.ets-labs.org) to provide automatic dependency injection for my application, and I'm encountering an issue with Bolt overriding injected parameters with `None` since it doesn't recognize them.\r\n\r\n### Reproducible in:\r\n\r\n```bash\r\npip freeze | grep slack\r\npython --version\r\nsw_vers && uname -v # or `ver`\r\n```\r\n\r\n#### The `slack_bolt` version\r\n\r\n```\r\nslack-bolt==1.14.3\r\nslack-sdk==3.18.1\r\n```\r\n\r\n#### Python runtime version\r\n\r\n```\r\nPython 3.10.6\r\n```\r\n\r\n#### OS info\r\n\r\n```\r\nProductName:    macOS\r\nProductVersion: 12.5.1\r\nBuildVersion:   21G83\r\nDarwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000\r\n```\r\n\r\n#### Steps to reproduce:\r\n\r\n(Share the commands to run, source code, and project settings (e.g., setup.py))\r\n\r\n1. Have a kwarg that is populated by some mechanism other than bolt (such as another decorator), e.g.\r\n\r\n```python\r\n@app.command('/ping')\r\n@inject\r\nasync def handle_ping(ack, respond, version: str = Provide[Container.config.VERSION]):\r\n    await ack()\r\n    await respond({\r\n        \"blocks\": [\r\n            SectionBlock(text=MarkdownTextObject(text='Pong!')),\r\n            DividerBlock(),\r\n            ContextBlock(elements=[\r\n                MarkdownTextObject(text=f'*Host:* {platform.node()}'),\r\n                MarkdownTextObject(text=f'*Version:* {version}')\r\n            ])\r\n        ]\r\n    })\r\n```\r\n\r\n### Expected result:\r\n\r\nBolt doesn't touch the `version` kwarg, but still injects the `ack` and `respond` kwargs.\r\n\r\n### Actual result:\r\n\r\n`version` ends up being set to `None` and Bolt logs the following warning: `version is not a valid argument`.\r\n\r\nThis is caused by [this line](https://github.com/slackapi/bolt-python/blob/main/slack_bolt/kwargs_injection/async_utils.py#L105). \r\n\r\n## Requirements\r\n\r\nPlease read the [Contributing guidelines](https://github.com/slackapi/bolt-python/blob/main/.github/contributing.md) and [Code of Conduct](https://slackhq.github.io/code-of-conduct) before creating this issue or pull request. By submitting, you are agreeing to those rules.\r\n","author":{"url":"https://github.com/cooperbenson-qz","@type":"Person","name":"cooperbenson-qz"},"datePublished":"2022-08-24T16:56:33Z","url":"https://github.com/slackapi/bolt-python/issues/709"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7c299d12-f10a-730b-3485-60a3327976ef
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8D7E:3CE0F6:1557B31:1C670DC:6AFEB907
html-safe-nonced887a921439864d0e38990895d4dfb2ba947ed89dbac7f4c56e274412c5ea241
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDdFOjNDRTBGNjoxNTU3QjMxOjFDNjcwREM6NkFGRUI5MDciLCJ2aXNpdG9yX2lkIjoiNDQyMzgxOTYzMjM4OTgzMDkxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac75d9ccfdd4c34be4a7038949f83438d87d9646db0d637af96b98c2f45315ef7d
hovercard-subject-tagissue:1349760483
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/slackapi/bolt-python/709/issue_layout
twitter:imagehttps://opengraph.githubassets.com/66e48b2c3771570c19adf92d7c66cb2464bd140e3f002f53469f940893ab6d00/slackapi/bolt-python/issues/709
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/66e48b2c3771570c19adf92d7c66cb2464bd140e3f002f53469f940893ab6d00/slackapi/bolt-python/issues/709
og:image:altI'm using dependency_injector to provide automatic dependency injection for my application, and I'm encountering an issue with Bolt overriding injected parameters with None since it doesn't recogni...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecooperbenson-qz
hostnamegithub.com
expected-hostnamegithub.com
None95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e
turbo-cache-controlno-preview
go-importgithub.com/slackapi/bolt-python git https://github.com/slackapi/bolt-python.git
octolytics-dimension-user_id6962987
octolytics-dimension-user_loginslackapi
octolytics-dimension-repository_id268795735
octolytics-dimension-repository_nwoslackapi/bolt-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id268795735
octolytics-dimension-repository_network_root_nwoslackapi/bolt-python
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
release3f25273206cd841171bca0002261ae4c9757d934
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/slackapi/bolt-python/issues/709#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fslackapi%2Fbolt-python%2Fissues%2F709
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fslackapi%2Fbolt-python%2Fissues%2F709
Sign uphttps://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=slackapi%2Fbolt-python
Reloadhttps://github.com/slackapi/bolt-python/issues/709
Reloadhttps://github.com/slackapi/bolt-python/issues/709
Reloadhttps://github.com/slackapi/bolt-python/issues/709
slackapihttps://github.com/slackapi
bolt-pythonhttps://github.com/slackapi/bolt-python
Codehttps://github.com/slackapi/bolt-python
Issues28 (28)https://github.com/slackapi/bolt-python/issues
Pull requests11 (11)https://github.com/slackapi/bolt-python/pulls
Actionshttps://github.com/slackapi/bolt-python/actions
Security and qualityhttps://github.com/slackapi/bolt-python/security
Insightshttps://github.com/slackapi/bolt-python/insights
https://github.com/slackapi/bolt-python
New issuehttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/709
New issuehttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/709
Enable developers to inject non-bolt arguments to listener function argshttps://github.com/slackapi/bolt-python/issues/709#top
https://github.com/seratch
improvementhttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22improvement%22
1.xhttps://github.com/slackapi/bolt-python/milestone/39
https://github.com/cooperbenson-qz
cooperbenson-qzhttps://github.com/cooperbenson-qz
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#issue-1349760483
dependency_injectorhttps://python-dependency-injector.ets-labs.org
this linehttps://github.com/slackapi/bolt-python/blob/main/slack_bolt/kwargs_injection/async_utils.py#L105
Contributing guidelineshttps://github.com/slackapi/bolt-python/blob/main/.github/contributing.md
Code of Conducthttps://slackhq.github.io/code-of-conduct
cooperbenson-qzhttps://github.com/cooperbenson-qz
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#event-7252760339
filmajhttps://github.com/filmaj
improvementhttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22improvement%22
good first issuehttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#event-7253342646
https://github.com/filmaj
filmajhttps://github.com/filmaj
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#issuecomment-1226085212
@seratchhttps://github.com/seratch
the kwargs scrubbing code that @cooperbenson-qz linked tohttps://github.com/slackapi/bolt-python/blob/main/slack_bolt/kwargs_injection/async_utils.py#L105
https://github.com/cooperbenson-qz
cooperbenson-qzhttps://github.com/cooperbenson-qz
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#issuecomment-1226325560
https://github.com/seratch
seratchhttps://github.com/seratch
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#issuecomment-1226357031
seratchhttps://github.com/seratch
1.14.4https://github.com/slackapi/bolt-python/milestone/64
1.15.0https://github.com/slackapi/bolt-python/milestone/60
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#event-7254318676
https://github.com/eddyg
eddyghttps://github.com/eddyg
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#issuecomment-1226373852
https://github.com/cooperbenson-qz
cooperbenson-qzhttps://github.com/cooperbenson-qz
on Aug 24, 2022https://github.com/slackapi/bolt-python/issues/709#issuecomment-1226397829
warningshttps://docs.python.org/3/library/warnings.html
seratchhttps://github.com/seratch
on Aug 25, 2022https://github.com/slackapi/bolt-python/issues/709#event-7256382427
seratchhttps://github.com/seratch
on Aug 25, 2022https://github.com/slackapi/bolt-python/issues/709#event-7256385313
https://github.com/seratch
seratchhttps://github.com/seratch
on Aug 25, 2022https://github.com/slackapi/bolt-python/issues/709#issuecomment-1226826294
@eddyghttps://github.com/eddyg
@cooperbenson-qzhttps://github.com/cooperbenson-qz
#712https://github.com/slackapi/bolt-python/pull/712
seratchhttps://github.com/seratch
good first issuehttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
on Aug 25, 2022https://github.com/slackapi/bolt-python/issues/709#event-7257538411
seratchhttps://github.com/seratch
1.15.0https://github.com/slackapi/bolt-python/milestone/60
1.xhttps://github.com/slackapi/bolt-python/milestone/39
on Aug 25, 2022https://github.com/slackapi/bolt-python/issues/709#event-7257538714
https://github.com/seratch
seratchhttps://github.com/seratch
on Aug 25, 2022https://github.com/slackapi/bolt-python/issues/709#issuecomment-1226996364
#712https://github.com/slackapi/bolt-python/pull/712
Sign up for freehttps://github.com/signup?return_to=https://github.com/slackapi/bolt-python/issues/709
Sign in to commenthttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/709
seratchhttps://github.com/seratch
improvementhttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22improvement%22
1.xNo due datehttps://github.com/slackapi/bolt-python/milestone/39
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.