René's URL Explorer Experiment


Title: Make `copy.replace` more strongly typed by decorator-factory · Pull Request #14819 · python/typeshed · GitHub

Open Graph Title: Make `copy.replace` more strongly typed by decorator-factory · Pull Request #14819 · python/typeshed

X Title: Make `copy.replace` more strongly typed by decorator-factory · Pull Request #14819 · python/typeshed

Description: Collection of library stubs for Python, with static types - Make `copy.replace` more strongly typed by decorator-factory · Pull Request #14819 · python/typeshed

Open Graph Description: The current stub for copy.replace accepts arbitrary keyword arguments. We can use ParamSpec to link the signature of obj.__replace__ to the supplied keyword arguments. This allows passing positiona...

X Description: The current stub for copy.replace accepts arbitrary keyword arguments. We can use ParamSpec to link the signature of obj.__replace__ to the supplied keyword arguments. This allows passing positiona...

Opengraph URL: https://github.com/python/typeshed/pull/14819

X: @github

direct link

Domain: github.com

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/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:7af8b380-5be2-3104-a75b-5e753382d048
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9E6C:245A38:D5E3B9:12018E0:6B00564B
html-safe-noncec0d132b7700a87de8291c9a6bc67888476d6ed624ac28b27f7506f272c111ff7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTZDOjI0NUEzODpENUUzQjk6MTIwMThFMDo2QjAwNTY0QiIsInZpc2l0b3JfaWQiOiI4MDU2MjA0NjM4NjIzMzg5MjU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf127d29e109e448e0ac2e4d7cc38b026bedc1103779710657391c07eca7814df
hovercard-subject-tagpull_request:2880016445
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/typeshed/14819/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/a55296c28d146f4a93418ea01e190e60a455b899e8e89cdd744af386e536fc00/python/typeshed/pull/14819
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a55296c28d146f4a93418ea01e190e60a455b899e8e89cdd744af386e536fc00/python/typeshed/pull/14819
og:image:altThe current stub for copy.replace accepts arbitrary keyword arguments. We can use ParamSpec to link the signature of obj.__replace__ to the supplied keyword arguments. This allows passing positiona...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedecorator-factory
hostnamegithub.com
expected-hostnamegithub.com
Nonef420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb
turbo-cache-controlno-cache
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
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
release26e00df917aba0f128135dc073ea0c5e33a70d40
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/typeshed/pull/14819#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
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%2Fpython%2Ftypeshed%2Fpull%2F14819
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/pull/14819
Reloadhttps://github.com/python/typeshed/pull/14819
Reloadhttps://github.com/python/typeshed/pull/14819
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests252 (252)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
https://github.com/python/typeshed
srittauhttps://github.com/srittau
python:mainhttps://github.com/python/typeshed/tree/main
decorator-factory-clones:stricter-copyreplacehttps://github.com/decorator-factory-clones/typeshed/tree/stricter-copyreplace
Conversationhttps://github.com/python/typeshed/pull/14819
Commits5 (5)https://github.com/python/typeshed/pull/14819/commits
Checkshttps://github.com/python/typeshed/pull/14819/checks
Files changedhttps://github.com/python/typeshed/pull/14819/files
Make copy.replace more strongly typedhttps://github.com/python/typeshed/pull/14819#top
srittauhttps://github.com/srittau
python:mainhttps://github.com/python/typeshed/tree/main
decorator-factory-clones:stricter-copyreplacehttps://github.com/decorator-factory-clones/typeshed/tree/stricter-copyreplace
https://github.com/decorator-factory
decorator-factoryhttps://github.com/decorator-factory
Oct 1, 2025https://github.com/python/typeshed/pull/14819#issue-3475521383
Please reload this pagehttps://github.com/python/typeshed/pull/14819
docs for object.__replace__https://docs.python.org/3.13/library/copy.html#object.__replace__
pyright playgroundhttps://pyright-play.net/?pythonVersion=3.14&strict=true&code=GYJw9gtgBAJghgFzgYwDZwM4YKYagSwgAcwQFZEV0sAoUSKBATyPwDsBzA408gBXAIwyMKho1CJMlBFEm4gALwkaTBgAU9AF7Y2AXgAqIAK7YAlDVVYoAMRP4EALhpQobOBGyOoGBCBdQqGCc3gBGYKLioXDu7lB6tvYI6gBEAEIxmSkANFBGphYg2ABu2HCoAPrMRNjq0bFwAHQVFUVE6MjYLWauAMRQ6gBUue6e3r4g8VCNM7lBIVDholMzjT0AtAB8icYO4lZ4FQDKxkRSCBgAStjtKNgA2oODfLkGALrqAmBCIqhmzq5XDBsMAoC02h0uhV1DhUMBcgB6XKDOAgDgYbx8Rqo9HIwYAawA7jiMVAsUSSRttgYAYC6atxMDQRC7hVigAmR7PV4fMChABW3mOp3OVxukPuLzyb2RJMx2LRGDxFMV8pV6KpeVpRQQxhAbCgfP5zVa4tZ0JRiuVxMVFho-WMGHYXAQAAtsDI9UU2ORZExGizOj5daEaAAPKZ%2BgNmzp1TLuEYebB6FIAQTOqGwKR6dNzdP6bDAUGwIHAIFymGLYZqyAQ2BgNCYkbAcmjt1j9Uyic8KfT7Szc2CHD0NnKOBzBaLJbLFbw2Gr2Fr9ZoWmbrcDtU7CagEHwWGdegALOyc3mz1BJ8XS6RcqFjOQMK6wMZUDBFtgaIS1-6N3GGt3kzTDMB0CIcjxPXNL2nG9FnvHwnxfN9Qg-e0oEdZ0fGMDgOFwOs32QV0Yhw8Mpg3Nl2T-Ls3CTXtgOzc88yg69yygSt5xrPDG1ImMug5Sjt1GQC%2B0zHJQM4Ecx3MPo3CnZjZyrDjl1XBIyL4rc4FyXd93E49TwY-MrzLbxCygIhUSTOtJkEt8tKdTh5PYxdOK-FSePI-iNOonsgP7UT5mHXTIMM0hvEJcBOEYFhsAchclwbIA
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
https://github.com/jorenham
jorenhamhttps://github.com/jorenham
Oct 6, 2025https://github.com/python/typeshed/pull/14819#issuecomment-3369775253
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/decorator-factory
decorator-factoryhttps://github.com/decorator-factory
Oct 6, 2025https://github.com/python/typeshed/pull/14819#issuecomment-3369941129
@jorenhamhttps://github.com/jorenham
https://github.com/python/typeshed/pull/14819/files#diff-57c0ce5b9482eae15b859f6a5ab6e89254e5554fcc350f68f6985660e43a0706R32-R39https://github.com/python/typeshed/pull/14819/files#diff-57c0ce5b9482eae15b859f6a5ab6e89254e5554fcc350f68f6985660e43a0706R32-R39
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/decorator-factory
decorator-factoryhttps://github.com/decorator-factory
Oct 6, 2025https://github.com/python/typeshed/pull/14819#issuecomment-3369987176
Please reload this pagehttps://github.com/python/typeshed/pull/14819
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/jorenham
jorenhamhttps://github.com/jorenham
Oct 15, 2025https://github.com/python/typeshed/pull/14819#issuecomment-3404538601
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/tmke8
tmke8https://github.com/tmke8
Nov 24, 2025https://github.com/python/typeshed/pull/14819#issuecomment-3571783298
https://discuss.python.org/t/better-typing-for-copy-replace-functions-that-operate-on-dataclasses/105004https://discuss.python.org/t/better-typing-for-copy-replace-functions-that-operate-on-dataclasses/105004
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/tmke8
tmke8https://github.com/tmke8
Mar 2, 2026 https://github.com/python/typeshed/pull/14819#ref-issue-4010362587
typing of dataclasses.replace and copy.replace astral-sh/ty#2938 https://github.com/astral-sh/ty/issues/2938
https://github.com/trim21
trim21https://github.com/trim21
Apr 6, 2026 https://github.com/python/typeshed/pull/14819#ref-issue-3006896103
Support for static hints on std replace() functions microsoft/pyright#10354 https://github.com/microsoft/pyright/issues/10354
https://github.com/apoorva-01
apoorva-01https://github.com/apoorva-01
Jul 11, 2026 https://github.com/python/typeshed/pull/14819#ref-pullrequest-4859672144
Fix copy.replace widening a bound TypeVar to its bound #15997 https://github.com/python/typeshed/pull/15997
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
https://github.com/decorator-factory
decorator-factoryhttps://github.com/decorator-factory
force-pushedhttps://github.com/python/typeshed/compare/5252887328a5ac1f069bcc2a2fa483bba94d5b64..ed21715b7ba50bb1ef504995c89c0906f01c10dc
5252887https://github.com/python/typeshed/commit/5252887328a5ac1f069bcc2a2fa483bba94d5b64
ed21715https://github.com/python/typeshed/commit/ed21715b7ba50bb1ef504995c89c0906f01c10dc
Compare https://github.com/python/typeshed/compare/5252887328a5ac1f069bcc2a2fa483bba94d5b64..ed21715b7ba50bb1ef504995c89c0906f01c10dc
September 2, 2026 14:17https://github.com/python/typeshed/pull/14819#event-30421449654
decorator-factoryhttps://github.com/decorator-factory
September 2, 2026 17:18https://github.com/python/typeshed/pull/14819#commits-pushed-0516119
https://github.com/decorator-factory
Make copy.replace more strongly typedhttps://github.com/python/typeshed/pull/14819/commits/0516119fc6facc76b5d208219fdd35c1f0dcd55e
0516119https://github.com/python/typeshed/pull/14819/commits/0516119fc6facc76b5d208219fdd35c1f0dcd55e
https://github.com/decorator-factory
Format code with blackhttps://github.com/python/typeshed/pull/14819/commits/1b57f14378dd018e08af9343bab8f63eb9946767
1b57f14https://github.com/python/typeshed/pull/14819/commits/1b57f14378dd018e08af9343bab8f63eb9946767
https://github.com/decorator-factory
Fix stdlib test for copy.replacehttps://github.com/python/typeshed/pull/14819/commits/1ee1ac534bd51944a4764883c567215095e8867c
1ee1ac5https://github.com/python/typeshed/pull/14819/commits/1ee1ac534bd51944a4764883c567215095e8867c
https://github.com/decorator-factory
Add exemption for copy.replace not matching runtime signaturehttps://github.com/python/typeshed/pull/14819/commits/8abeedc27ea663dc512829109ec2314362d01156
8abeedchttps://github.com/python/typeshed/pull/14819/commits/8abeedc27ea663dc512829109ec2314362d01156
https://github.com/decorator-factory
decorator-factoryhttps://github.com/decorator-factory
force-pushedhttps://github.com/python/typeshed/compare/ed21715b7ba50bb1ef504995c89c0906f01c10dc..8abeedc27ea663dc512829109ec2314362d01156
ed21715https://github.com/python/typeshed/commit/ed21715b7ba50bb1ef504995c89c0906f01c10dc
8abeedchttps://github.com/python/typeshed/commit/8abeedc27ea663dc512829109ec2314362d01156
Compare https://github.com/python/typeshed/compare/ed21715b7ba50bb1ef504995c89c0906f01c10dc..8abeedc27ea663dc512829109ec2314362d01156
September 2, 2026 14:21https://github.com/python/typeshed/pull/14819#event-30421705098
https://github.com/decorator-factory
fix 3.15 stubtest for copy.replacehttps://github.com/python/typeshed/pull/14819/commits/2937351ba940e35e825a07e6a9d1393cb03f79ef
2937351https://github.com/python/typeshed/pull/14819/commits/2937351ba940e35e825a07e6a9d1393cb03f79ef
https://github.com/decorator-factory
decorator-factoryhttps://github.com/decorator-factory
Sep 2, 2026https://github.com/python/typeshed/pull/14819#issuecomment-5511147238
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Sep 2, 2026https://github.com/python/typeshed/pull/14819#issuecomment-5511176987
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/srittau
srittauhttps://github.com/srittau
Sep 2, 2026https://github.com/python/typeshed/pull/14819#issuecomment-5515418666
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/srittau
srittauhttps://github.com/srittau
Sep 2, 2026 https://github.com/python/typeshed/pull/14819#pullrequestreview-5094379162
View reviewed changes https://github.com/python/typeshed/pull/14819/files/2937351ba940e35e825a07e6a9d1393cb03f79ef
srittauhttps://github.com/srittau
https://github.com/python/typeshed/pull/14819#pullrequestreview-5094379162
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/srittau
srittauhttps://github.com/srittau
eea32d0https://github.com/python/typeshed/commit/eea32d06f1008cd7877e5f4793866d2bee75a6ab
Sep 2, 2026https://github.com/python/typeshed/pull/14819#event-30444075071
Please reload this pagehttps://github.com/python/typeshed/pull/14819
Research: statically typed replace() — field-checked keyword arguments or a TypedDict JPHutchins/salix#354 https://github.com/JPHutchins/salix/issues/354
copy.replace rejects a union whose members each have a field the others lack (since #14819) #16582 https://github.com/python/typeshed/issues/16582
copy.replace type inference regression: breaks Self-returning __replace__ with bound TypeVar python/mypy#21672 https://github.com/python/mypy/issues/21672
replace: a union or union-bound TypeVar comes back as Struct (mypy), and a union whose members each have their own field is rejected (pyright, ty) JPHutchins/salix#359 https://github.com/JPHutchins/salix/issues/359
https://github.com/JPHutchins
JPHutchinshttps://github.com/JPHutchins
Nov 7, 2026 https://github.com/python/typeshed/pull/14819#ref-issue-6253589727
copy.replace rejects a union argument whose members' __replace__ signatures differ astral-sh/ty#4976 https://github.com/astral-sh/ty/issues/4976
https://github.com/hrithiksaini99
hrithiksaini99https://github.com/hrithiksaini99
Nov 7, 2026 https://github.com/python/typeshed/pull/14819#ref-pullrequest-6256801805
[copy] Accept unions of dataclasses in copy.replace via overload #16733 https://github.com/python/typeshed/pull/16733
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F14819
https://github.com/srittau
srittau https://github.com/srittau
https://github.com/python/typeshed/pull/14819/files/2937351ba940e35e825a07e6a9d1393cb03f79ef
Please reload this pagehttps://github.com/python/typeshed/pull/14819
Please reload this pagehttps://github.com/python/typeshed/pull/14819
https://github.com/decorator-factory
https://github.com/jorenham
https://github.com/tmke8
https://github.com/srittau
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.