Commit Graph

12 Commits

Author SHA1 Message Date
ShaharNaveh
4ab7c38c90 Update test_property.py from 3.14.3 2026-02-13 13:42:52 +09:00
Jeong, YunWon
98fff96f1c __doc__ handing in the right way (#6390) 2025-12-10 20:04:09 +09:00
Jiseok CHOI
e096ce7bc7 Implement property.__name__ attribute (#6230)
* Implement property.__name__ attribute

Add getter and setter for the __name__ attribute on property objects.
The getter returns the explicitly set name if available, otherwise
falls back to the getter function's __name__. Raises AttributeError
if no name is available, matching CPython 3.13 behavior.

The implementation handles edge cases:
- Returns None when explicitly set to None
- Propagates non-AttributeError exceptions from getter's __getattr__
- Raises property-specific AttributeError when getter lacks __name__

This fix enables test_property_name in test_property.py to pass.

* Refactor to use get_property_name in __name__ implementation

Consolidate duplicate logic by making name_getter() use the existing
get_property_name() helper method. This eliminates code duplication
and improves maintainability.

Changes:
- Update get_property_name() to return PyResult<Option<PyObjectRef>>
  to properly handle and propagate non-AttributeError exceptions
- Simplify name_getter() to delegate to get_property_name()
- Update format_property_error() to handle the new return type

This addresses review feedback about the relationship between
get_property_name() and __name__ implementation.

* style comment
2025-11-01 18:30:03 +09:00
ShaharNaveh
d82554124c Update test_property.py from 3.13.7 2025-08-23 22:13:48 +03:00
Jiseok CHOI
ff35dcd95a feat(vm/slot): implement Py_TPFLAGS_MANAGED_DICT for class objects (#5949) 2025-07-20 14:11:36 +09:00
Jeong, YunWon
86d8d23ad8 implement more property features (#5828)
* property getter_doc

* Fix property.isabstractmethod

* Fix property error messages

* refactor getter/setter/deleter

* fix property
2025-06-24 13:31:31 +09:00
Andrey Maltsev
5c09cc37c9 Update test_property.py from Cpython v3.11.2 2023-04-18 19:54:49 +00:00
Gyubong
d4aa062441 Fix set_name error message when arguments are invalid 2023-02-20 14:54:56 +09:00
Jeong YunWon
20f3985615 mark failing tests from test_property 2022-08-15 02:36:46 +09:00
CPython Developers
7689b8e8f7 Update test_property from cpython 3.10.6 2022-08-15 02:36:46 +09:00
Padraic Fanning
b9024f6375 Mark erroring/failing tests 2021-04-29 21:25:15 -04:00
Padraic Fanning
107dcded4c Add test_property from CPython 3.8 2021-04-29 21:25:14 -04:00