| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I mark the PR as a draft since test_pickle fails on the test that I added: FAIL: test_recursive_frozendict_and_inst (test.test_pickle.InMemoryPickleTests.test_recursive_frozendict_and_inst) (proto=5)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/vstinner/python/main/Lib/test/pickletester.py", line 2852, in _test_recursive_collection_and_inst
self.assertIs(list(x)[0].attr, x)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
AssertionError: frozendict({<test.picklecommon.Object object at 0x200009adea0>: None}) is not frozendict({<test.picklecommon.Object object at 0x200009adea0>: None})
|
Sorry, something went wrong.
Ah it's ok, I found the issue: the C implementation was not correct. It's not fixed. |
Sorry, something went wrong.
Sorry, something went wrong.
|
You do not need to change the pickle module. Just add the __getnewargs__() method returning (dict(self),) or (list(self.items()),). Adding a new pickle opcode requires a separate PEP. |
Sorry, something went wrong.
Oh, I didn't know that it was so simple :-) I wrote #144967 to implement __getnewargs__(). |
Sorry, something went wrong.
|
I close this PR in favor of the more complete #144967 PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.