[issue46162] Make `builtins.property` generic

2022-01-11 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like no one showed much interest in it :( So, yeah, closing it is probably the best idea. Thanks everyone! -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python

[issue46162] Make `builtins.property` generic

2022-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Since the conclusion is that we can't do this without breaking backwards compatibility, should we just close this? Or is there still a compromise possible? -- ___ Python tracker

[issue46162] Make `builtins.property` generic

2021-12-24 Thread Nikita Sobolev
Nikita Sobolev added the comment: Serhiy, no, we can infer that. There are two general cases: 1. `x = property(x_get, x_set)`, it is just ideal 2. `@property x` and `@x.setter`, it is also inferable with a bit of special casing for the mutable type part (we mutate the type of `x` when

[issue46162] Make `builtins.property` generic

2021-12-24 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46162] Make `builtins.property` generic

2021-12-24 Thread Marc Mueller
Change by Marc Mueller : -- nosy: +cdce8p ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46162] Make `builtins.property` generic

2021-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does it mean that property[GetType, SetType] will be required and MyPy will complain if the raw property decorator be used? -- nosy: +serhiy.storchaka ___ Python tracker

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks, Guido! > Yes, it is too late for 3.10 (but you can add it to typing_extensions). Also, > PEP 585 is done, we don't update PEPs. Got it! > Please do test with `from __future__ import annotations` -- you never know. Done, PR is updated. Now we test

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, it is too late for 3.10 (but you can add it to typing_extensions). Also, PEP 585 is done, we don't update PEPs. Please do test with `from __future__ import annotations` -- you never know. When this was first proposed

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28460 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30238 ___ Python tracker ___

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Nikita Sobolev
Nikita Sobolev added the comment: One more question about PEP585: it does not specify `property`. Do we need to update it? -- ___ Python tracker ___

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Nikita Sobolev
New submission from Nikita Sobolev : 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