]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-98963: Restore the ability to have a dict-less property. (GH-105262) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 5 Jun 2023 03:45:12 +0000 (20:45 -0700)
committerGitHub <noreply@github.com>
Mon, 5 Jun 2023 03:45:12 +0000 (03:45 +0000)
commit3e7ddc29a3f33b638c5d51d9372763fbc688b06b
treee3ebdb5ab80bebe9b3c7054634631620cd2905e5
parent9ce3312cdba865b57547377d4e99877fe811a92f
[3.12] gh-98963: Restore the ability to have a dict-less property. (GH-105262) (#105297)

gh-98963: Restore the ability to have a dict-less property. (GH-105262)

Ignore doc string assignment failures in `property` as has been the
behavior of all past Python releases.  (the docstring is discarded)
(cherry picked from commit 418befd75d4d0d1cba83d8b81e1a7bcc9a65be8e)

This fixes a behavior regression in 3.12beta1 where an AttributeError was being raised in a situation it has never been in the past. It keeps the existing unusual single situation where AttributeError does get raised.

Existing widely deployed projects depend on this not raising an exception.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/test/test_property.py
Misc/NEWS.d/next/Core and Builtins/2023-06-02-17-39-19.gh-issue-98963.J4wJgk.rst [new file with mode: 0644]
Objects/descrobject.c