]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-50644: Forbid pickling of codecs streams (GH-109180)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 10 Sep 2023 17:06:09 +0000 (20:06 +0300)
committerGitHub <noreply@github.com>
Sun, 10 Sep 2023 17:06:09 +0000 (20:06 +0300)
commitd6892c2b9263b39ea1c7905667942914b6a24b2c
tree26857f7693712248ae06996a024659a1c73bb51f
parent71b6e2602c0b5b06d51855f179cdb30094a67968
gh-50644: Forbid pickling of codecs streams (GH-109180)

Attempts to pickle or create a shallow or deep copy of codecs streams
now raise a TypeError.

Previously, copying failed with a RecursionError, while pickling
produced wrong results that eventually caused unpickling to fail with
a RecursionError.
Lib/codecs.py
Lib/test/test_codecs.py
Misc/NEWS.d/next/Library/2023-09-09-15-08-37.gh-issue-50644.JUAZOh.rst [new file with mode: 0644]