René's URL Explorer Experiment


Title: Does `field_specifier` support non-keyword arguments? · Issue #2170 · python/typing · GitHub

Open Graph Title: Does `field_specifier` support non-keyword arguments? · Issue #2170 · python/typing

X Title: Does `field_specifier` support non-keyword arguments? · Issue #2170 · python/typing

Description: I was reading through the specification of dataclass_transform and it doesn't really specify what field_specifiers looks like. It mostly just says: field_specifiers (tuple[Callable[..., Any], ...]) – Specifies a static list of supported ...

Open Graph Description: I was reading through the specification of dataclass_transform and it doesn't really specify what field_specifiers looks like. It mostly just says: field_specifiers (tuple[Callable[..., Any], ...])...

X Description: I was reading through the specification of dataclass_transform and it doesn't really specify what field_specifiers looks like. It mostly just says: field_specifiers (tuple[Callable[..., Any], ....

Opengraph URL: https://github.com/python/typing/issues/2170

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Does `field_specifier` support non-keyword arguments?","articleBody":"I was reading through the specification of `dataclass_transform` and it doesn't really specify what `field_specifiers` looks like. It mostly just says:\n\n> field_specifiers ([tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)[..., Any], ...]) – Specifies a static list of supported classes or functions that describe fields, similar to [dataclasses.field()](https://docs.python.org/3/library/dataclasses.html#dataclasses.field). Defaults to ().\n\nBut `dataclasses.field` takes keyword-only arguments, which leaves it a bit ambiguous about whether positional arguments are ok. For example:\n\n```python\nfrom typing import dataclass_transform, Any\n\ndef custom_field(default: object, *, init: bool = True) -> Any: ...\n\n@dataclass_transform(field_specifiers=(custom_field,))\ndef build(x): ...\n\n@build\nclass A:\n    x: int = custom_field(default=0)\n\n@build\nclass B:\n    x: int = custom_field(0)\n\nA()\nB()\n```\n\n[`pyrefly`](https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEALqcROgOZ0Q3G6UN2ZUDVAGMoqOHAD6DShjhheNADR0AgulKrKMAG4xUUGcxgAddOcwwwdEQFc4DWlMgwomABRWwqO1AaIdLjYAFYwIgyqAFSqrBABdHi4UHQAvHQAKpR2MACUdAC0AHzqmoGEFebmAAKCwmIS0rLyipQ0Hq7uUnDE4RCulHCpHvaOzp2Yyrm5ltaJdtCe%2BLnllRbo1dgL7uYNkuqI5nTHdPiBrPzpo040LhBunt6%2B-qkADDPrm9uYu%2BL7AEKHdAnU7ndCXWwOG53B4ed5VdA6fSGYy9DxqQhSKRxBhYj5IgxGJho-6Y7HoeJ4hFqDwff60kDKEB2BjQOAkciIEAAYjoAFVWVB4qQ6GA7OgIhBcOg4AjvKKlEIpOg7DRsDBKB4zpxwflinRHJQgSCdAw7JRgWBTCAAHKq9VGujAfAAX2t5kZIDIOjAUFIhBuUAovIACqQfX6DRgcARbNLIGxzUIpehCOZeQBlGAwOgACwYDGIcEQAHoS97rH7CLw2CWYOgS5hcCI4CWRPGIIm5KzpSWFZQ6KhdKhoKhsLA4%2BgE0me8DcMRZ%2BzzGQGLnpQV9IMU2k6NaAMyEACMACZ3egQC6maJWfoAGLQGAUNBYPBEMgXoA), [`pyright`](https://pyright-play.net/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoAmAhjEQMYA2RAztQPowhErXC4QA0UAginFyACmAN0FEKDRIIBQ0goOBQyAV2oxIdYEkEUCACnnAiyijABcUMACMAVoLIwuAKi6ok5qFbBgKUALxQACogyoIAlFAAtAB8PHwWAHRJsgACxKSUNPSMzKzselo6BHTUCPZIhSDUfnoqahqFuhxhYXIKnspIunoAHmGJydIpVp260pm0PGbSULNQPRao%2BAF16hCa2t2GxqZ%2BAAytQyNdBONUkwBC03PziyjLSqprG0V6B7JCouKSZXrcCXQ6G4YIDWp8xBJ4L8LgCgSh3KDZNw9K0LiigA), and [`mypy`](https://mypy-play.net/?mypy=latest&python=3.12&gist=6b7fa4d140b43ef67b8bb5a62f2388c6) all flag `B()` as an error while [`ty`](https://play.ty.dev/432daf76-d2e0-43ff-a1ce-4e5f30edc95e) accepts it without complaint.\n\nMy (uninformed) take is that this should be allowed -- `custom_field(default=0)` and `custom_field(0)` have the same runtime effect, so it feels like they should have the same type-checking effect too. This also matches how `pydantic` and `attrs` works (e.g. you can do `pydantic.Field(1)` and `attr.ib(0)`) -- today I suspect the type-checkers are special-casing this to make `pydantic` and `attrs` (since I've definitely used both without running into static type-checking errors about missing default values before).","author":{"url":"https://github.com/alanhdu","@type":"Person","name":"alanhdu"},"datePublished":"2026-02-11T00:46:18Z","url":"https://github.com/python/typing/issues/2170"}

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:521e664f-c8bf-eea1-8411-4744f79d2e86
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD7C6:1833B7:3A92D0:4FC0F0:6AFF7D6E
html-safe-noncee52da6b43f82c106b5af6d04bde1790ca33a0ef2121080d2784d7f59d357ed29
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0M2OjE4MzNCNzozQTkyRDA6NEZDMEYwOjZBRkY3RDZFIiwidmlzaXRvcl9pZCI6IjQ1MDA2NDcyOTQ0MTYxNTgwNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf9de5f2bcbbd22824458ff244c002eef57a1ca65a048c719f8f971c2d966c60d
hovercard-subject-tagissue:3924195089
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/typing/2170/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b07ce59d477ff44b022fcdd3bc16a22b1aa424116194848e36ace42d607d51fe/python/typing/issues/2170
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b07ce59d477ff44b022fcdd3bc16a22b1aa424116194848e36ace42d607d51fe/python/typing/issues/2170
og:image:altI was reading through the specification of dataclass_transform and it doesn't really specify what field_specifiers looks like. It mostly just says: field_specifiers (tuple[Callable[..., Any], ...])...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamealanhdu
hostnamegithub.com
expected-hostnamegithub.com
Noneb5a2047dbbde77e0ba2f8dfd78621e8a7313a105f7437ca693fcccd16cd137ee
turbo-cache-controlno-preview
go-importgithub.com/python/typing git https://github.com/python/typing.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id24604008
octolytics-dimension-repository_nwopython/typing
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24604008
octolytics-dimension-repository_network_root_nwopython/typing
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
release83e3dfa4de364d61589204ed35e53b2b7f77fba2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typing/issues/2170#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F2170
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%2Ftyping%2Fissues%2F2170
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=python%2Ftyping
Reloadhttps://github.com/python/typing/issues/2170
Reloadhttps://github.com/python/typing/issues/2170
Reloadhttps://github.com/python/typing/issues/2170
pythonhttps://github.com/python
typinghttps://github.com/python/typing
Codehttps://github.com/python/typing
Issues206 (206)https://github.com/python/typing/issues
Pull requests27 (27)https://github.com/python/typing/pulls
Discussionshttps://github.com/python/typing/discussions
Actionshttps://github.com/python/typing/actions
Security and qualityhttps://github.com/python/typing/security
Insightshttps://github.com/python/typing/insights
https://github.com/python/typing
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/2170
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/2170
Does field_specifier support non-keyword arguments?https://github.com/python/typing/issues/2170#top
topic: documentationDocumentation-related issues and PRshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20documentation%22
https://github.com/alanhdu
alanhduhttps://github.com/alanhdu
on Feb 11, 2026https://github.com/python/typing/issues/2170#issue-3924195089
tuplehttps://docs.python.org/3/library/stdtypes.html#tuple
Callablehttps://docs.python.org/3/library/collections.abc.html#collections.abc.Callable
dataclasses.field()https://docs.python.org/3/library/dataclasses.html#dataclasses.field
pyreflyhttps://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEALqcROgOZ0Q3G6UN2ZUDVAGMoqOHAD6DShjhheNADR0AgulKrKMAG4xUUGcxgAddOcwwwdEQFc4DWlMgwomABRWwqO1AaIdLjYAFYwIgyqAFSqrBABdHi4UHQAvHQAKpR2MACUdAC0AHzqmoGEFebmAAKCwmIS0rLyipQ0Hq7uUnDE4RCulHCpHvaOzp2Yyrm5ltaJdtCe%2BLnllRbo1dgL7uYNkuqI5nTHdPiBrPzpo040LhBunt6%2B-qkADDPrm9uYu%2BL7AEKHdAnU7ndCXWwOG53B4ed5VdA6fSGYy9DxqQhSKRxBhYj5IgxGJho-6Y7HoeJ4hFqDwff60kDKEB2BjQOAkciIEAAYjoAFVWVB4qQ6GA7OgIhBcOg4AjvKKlEIpOg7DRsDBKB4zpxwflinRHJQgSCdAw7JRgWBTCAAHKq9VGujAfAAX2t5kZIDIOjAUFIhBuUAovIACqQfX6DRgcARbNLIGxzUIpehCOZeQBlGAwOgACwYDGIcEQAHoS97rH7CLw2CWYOgS5hcCI4CWRPGIIm5KzpSWFZQ6KhdKhoKhsLA4%2BgE0me8DcMRZ%2BzzGQGLnpQV9IMU2k6NaAMyEACMACZ3egQC6maJWfoAGLQGAUNBYPBEMgXoA
pyrighthttps://pyright-play.net/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoAmAhjEQMYA2RAztQPowhErXC4QA0UAginFyACmAN0FEKDRIIBQ0goOBQyAV2oxIdYEkEUCACnnAiyijABcUMACMAVoLIwuAKi6ok5qFbBgKUALxQACogyoIAlFAAtAB8PHwWAHRJsgACxKSUNPSMzKzselo6BHTUCPZIhSDUfnoqahqFuhxhYXIKnspIunoAHmGJydIpVp260pm0PGbSULNQPRao%2BAF16hCa2t2GxqZ%2BAAytQyNdBONUkwBC03PziyjLSqprG0V6B7JCouKSZXrcCXQ6G4YIDWp8xBJ4L8LgCgSh3KDZNw9K0LiigA
mypyhttps://mypy-play.net/?mypy=latest&python=3.12&gist=6b7fa4d140b43ef67b8bb5a62f2388c6
tyhttps://play.ty.dev/432daf76-d2e0-43ff-a1ce-4e5f30edc95e
alanhduhttps://github.com/alanhdu
topic: documentationDocumentation-related issues and PRshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20documentation%22
on Feb 11, 2026https://github.com/python/typing/issues/2170#event-22690328126
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typing/issues/2170
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typing/issues/2170
topic: documentationDocumentation-related issues and PRshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20documentation%22
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.