[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 427cb0aa78813b89a3f100073bf7d70a53510f57 by Miss Skeleton (bot) in branch '3.9': bpo-42127: Document effect of cached_property on key-sharing dictionaries (GH-22930) (GH-22955) https://github.com/python/cpython/commit/427cb0aa78813b89a3f100

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker ___ _

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21873 pull_request: https://github.com/python/cpython/pull/22955 ___ Python tracker _

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 48be6b1ef7a6201e13c87a317361cdb60bd5faa8 by Raymond Hettinger in branch 'master': bpo-42127: Document effect of cached_property on key-sharing dictionaries (GH-22930) https://github.com/python/cpython/commit/48be6b1ef7a6201e13c87a317361cdb6

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker ___ _

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +21852 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22930 ___ Python tracker __

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Essentially it means that types using cached_property are less > likely to enjoy the benefits of shared keys. I don't think anything can be done about it. @cached_property and key-sharing dicts are intrinsically at odds with one another. Likewise, @cac

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : Key-sharing dictionaries, defined by https://www.python.org/dev/peps/pep-0412/, require that any resizing of the shared dictionary keys will happen before a second instance of the class is created. cached_property inserts its resolved result into the