Files
RustPython/Lib
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
..
2025-04-11 09:30:58 +09:00
2025-04-03 22:12:54 -07:00
2022-08-21 15:23:51 +09:00
2025-08-07 18:29:05 +09:00
2025-07-20 18:44:46 +09:00
2024-03-22 14:54:02 +09:00
2025-10-22 10:57:47 +03:00
2025-04-06 17:21:28 +09:00
2022-08-07 16:31:38 +09:00
2022-07-19 01:35:32 +09:00
2025-08-21 13:15:39 +09:00
2025-03-20 14:28:26 +09:00
2025-03-10 11:43:53 +09:00
2025-10-22 10:57:47 +03:00
2025-01-11 18:48:27 +09:00
2025-03-10 11:43:53 +09:00
2025-03-10 23:13:32 -07:00
2025-03-26 02:24:01 -05:00
2024-07-28 20:24:15 +09:00
2025-03-20 14:33:54 +09:00
2025-06-30 23:56:34 +09:00
2025-07-20 18:37:38 +09:00
2025-08-21 13:22:21 +09:00
2023-12-24 03:59:38 +08:00
2025-08-01 22:16:32 +09:00
2025-07-09 19:03:53 +09:00
2024-02-19 20:04:09 +08:00
2025-09-07 16:13:22 +09:00
2025-07-25 10:47:20 +09:00
2025-04-21 20:45:06 -07:00
2025-07-08 23:49:57 +09:00
2024-06-22 15:24:42 +09:00
2025-07-25 19:08:01 +09:00
2023-02-18 22:52:47 +09:00
2021-11-28 22:33:59 +01:00
2024-04-24 01:46:27 +09:00
2025-04-30 14:33:52 +09:00
2025-09-15 21:36:11 +09:00
2024-04-22 12:46:32 +09:00
2025-04-30 14:33:52 +09:00
2025-09-16 09:35:08 +09:00
2025-04-21 21:21:10 -07:00
2025-07-08 20:13:52 +09:00
2023-06-14 00:18:14 +03:00
2025-07-01 10:59:41 +09:00
2025-04-21 21:11:42 -07:00
2025-08-01 22:16:32 +09:00
2022-08-15 05:25:42 +09:00
2025-10-05 11:14:33 +09:00
2025-08-08 14:37:35 +09:00
2024-05-09 15:20:25 +09:00
2025-04-14 16:56:22 +09:00
2025-04-21 20:43:43 -07:00
2022-08-15 02:36:46 +09:00
2025-07-25 10:50:17 +09:00
2025-04-21 20:48:13 -07:00
2025-07-17 00:03:25 +09:00
2024-11-11 00:17:30 +09:00
2025-04-30 14:33:52 +09:00
2025-04-21 21:11:42 -07:00
2025-07-17 00:04:12 +09:00
2021-06-07 21:12:22 -04:00
2025-07-15 21:27:05 +09:00
2024-04-17 01:33:14 +09:00
2024-04-26 01:39:02 +09:00
2025-01-17 19:44:06 +09:00
2025-03-30 13:55:55 +09:00
2024-03-22 14:54:02 +09:00
2024-03-22 14:54:02 +09:00
2025-07-20 10:37:43 +09:00
2024-03-22 14:59:19 +09:00
2025-05-07 15:01:23 +09:00
2025-04-30 14:33:52 +09:00
2025-07-25 10:50:41 +09:00
2021-04-11 17:38:44 -05:00
2025-09-16 21:58:36 +09:00
2025-04-21 08:48:38 +09:00
2025-08-06 10:31:55 +09:00

Standard Library for RustPython

This directory contains all of the Python files that make up the standard library for RustPython.

Most of these files are copied over from the CPython repository (the 3.7 branch), with slight modifications to allow them to work under RustPython. The current goal is to complete the standard library with as few modifications as possible. Current modifications are just temporary workarounds for bugs/missing feature within the RustPython implementation.

The first big module we are targeting is unittest, so we can leverage the CPython test suite.