Message366951
I ran your script and didn't get RecursionError. The issue seems to be fixed.
Python 3.8.2 (default, Apr 8 2020, 14:31:25)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import print_function
>>>
>>> import pickle, sys
>>>
>>> class Foo:
... __name__ = __qualname__ = "Foo.ref"
... pass
...
>>> Foo.ref = Foo
>>>
>>> print(sys.version_info)
sys.version_info(major=3, minor=8, micro=2, releaselevel='final', serial=0)
>>> for proto in range(0, pickle.HIGHEST_PROTOCOL + 1):
... print("{}:".format(proto), end=" ")
... try:
... pkl = pickle.dumps(Foo, proto)
... print("Dump OK,", end=" ")
... assert(pickle.loads(pkl) is Foo)
... print("Load OK,")
... except Exception as err:
... print(repr(err))
...
0: PicklingError("Can't pickle <class '__main__.Foo.ref'>: import of module '__main__' failed")
1: PicklingError("Can't pickle <class '__main__.Foo.ref'>: import of module '__main__' failed")
2: PicklingError("Can't pickle <class '__main__.Foo.ref'>: import of module '__main__' failed")
3: PicklingError("Can't pickle <class '__main__.Foo.ref'>: import of module '__main__' failed")
4: Dump OK, Load OK,
5: Dump OK, Load OK,
>>> |
|
Date |
User |
Action |
Args |
2020-04-21 23:19:10 | furkanonder | set | recipients:
+ furkanonder, serhiy.storchaka, Saim Raza |
2020-04-21 23:19:10 | furkanonder | set | messageid: <1587511150.66.0.505514806989.issue38770@roundup.psfhosted.org> |
2020-04-21 23:19:10 | furkanonder | link | issue38770 messages |
2020-04-21 23:19:10 | furkanonder | create | |
|