GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — bpo-35540 dataclasses.asdict support defaultdict fields by kwsp · Pull Request #32056 · python/cpython Conversation
|
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
dataclasses.asdict breaks when there are `defaultdict`s in the dataclass attributes because it assumes `defaultdict` and `dict` are the same thing, but in reality `defaultdict` takes a default_factory as the first argument in its constructor. This change adds support for defaultdict fields.
|
Could you add a test please? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I just added a test for this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Tests ok on Fedora.
Ref to bugs.python.org/issue35540 is not future proof, assume will be turned off at some time.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* main: bpo-35540 dataclasses.asdict now supports defaultdict fields (pythongh-32056) pythonGH-91052: Add C API for watching dictionaries (pythonGH-31787) bpo-38693: Use f-strings instead of str.format() within importlib (python#17058)
There was an error while loading. Please reload this page.
|
Does this merge fix the issue yet cause it still throws error in Python 3.11 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This was merged in 3.12 and not backported to 3.11 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.