-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make_dataclass is missing the documented kw_only argument #89961
Comments
According to the 3.10 documentation, make_dataclass includes the kw_only argument: Line 1327 in 3f15792
However, the source code referred to by the same doc does not appear to include the kw_only argument: Line 1327 in 3f15792
|
to clarify, the documentation permalink is: https://docs.python.org/3/library/dataclasses.html#dataclasses.make_dataclass |
Thanks for the bug report! |
Python 3.10.0 missed the `kw_only` parameter for `dataclasses.make_dataclass()`: python/cpython#89961 It was added in 3.10.1. This change updates the version checking in the Pydantic integration to only use the `kw_only` parameter for 3.10.1 versions and above. Otherwise to falls back to our custom init function. Diff-Id: 5faf9
Python 3.10.0 missed the `kw_only` parameter for `dataclasses.make_dataclass()`: python/cpython#89961 It was added in 3.10.1. This change updates the version checking in the Pydantic integration to only use the `kw_only` parameter for 3.10.1 versions and above. Otherwise to falls back to our custom init function. Diff-Id: 5faf9
* Fix dataclass creation in Pydantic integration for Python 3.10.0 Python 3.10.0 missed the `kw_only` parameter for `dataclasses.make_dataclass()`: python/cpython#89961 It was added in 3.10.1. This change updates the version checking in the Pydantic integration to only use the `kw_only` parameter for 3.10.1 versions and above. Otherwise to falls back to our custom init function. Diff-Id: 5faf9 * Add RELEASE file Diff-Id: 5a2cc * Fix line too long error Diff-Id: 4d6e7
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: