[New-bugs-announce] [issue46162] Make `builtins.property` generic

Nikita Sobolev report at bugs.python.org
Thu Dec 23 04:50:25 EST 2021


New submission from Nikita Sobolev <mail at sobolevn.me>:

Original discussion in `typing` bug tracker: https://github.com/python/typing/issues/985

Short description:
- `property[GetType, SetType]` is required for us to remove a lot of special casing from type-checkers and just use the primitive type
- In runtime it copies the same behavior `list` / `dict` / other primitive types have under PEP585

Open questions:
- I think that it is too late to backport this in 3.10. Am I right?
- I hope that `from __future__ import annotations` will just work for this new change. Is there anything I should do in scope of this PR? Is my assumption about `__future__` import is even correct in this context? Do I need to test that it works with `__future__ annotations`?

----------
components: Library (Lib)
messages: 409080
nosy: gvanrossum, kj, sobolevn
priority: normal
severity: normal
status: open
title: Make `builtins.property` generic
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46162>
_______________________________________


More information about the New-bugs-announce mailing list