gh-101860: Expose __name__ on property by eltoder · Pull Request #101876 · python/cpython

@eltoder

Useful for introspection and consistent with functions and other
descriptors.

@eltoder

serhiy-storchaka

@eltoder

@eltoder

Raise AttributeError if no fget or it doesn't have `__name__`.

serhiy-storchaka

@eltoder eltoder deleted the feature/property-name branch

February 20, 2024 15:33

woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request

Mar 4, 2024
Useful for introspection and consistent with functions and other
descriptors.

diegorusso pushed a commit to diegorusso/cpython that referenced this pull request

Apr 17, 2024
Useful for introspection and consistent with functions and other
descriptors.

LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request

Jan 22, 2025
Useful for introspection and consistent with functions and other
descriptors.

dangotbanned added a commit to narwhals-dev/narwhals that referenced this pull request

Apr 23, 2025

MarcoGorelli pushed a commit to narwhals-dev/narwhals that referenced this pull request

Apr 26, 2025
* chore(typing): fix `check_docstrings` `Path` warning

`pyright` did a good job spotting that one

* chore: Use `dir(...)` instead of `.__dir__()`

Fixes 2/6 errors and shrinks the script

* chore(typing): Fix 2 more errors

These have been popping up and bugging me for 2 weeks 🙈
#2351 (comment)

* chore(typing): Fix the last 2 as well

* chore: Simplify the rest

* chore(typing): Ignore remaining in `utils`

* chore(typing): Ignore everything in `tpch`

These are all the same issue, can be fixed with a constrained `TypeVar`

* fix: pre-`3.13` compat?

Following where `__name__` used to be sourced from
- python/cpython#101876

* chore(typing): Fix some of the new `tpch` ignores

The rest seem pretty unavoidable

* fix: don't clobber `typing` 🤦‍♂️

https://github.com/narwhals-dev/narwhals/actions/runs/14624570842/job/41032838053?pr=2426