GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-101860: Expose __name__ on property by eltoder · Pull Request #101876 · python/cpython

Conversation

@eltoder

@eltoder eltoder commented Feb 13, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Useful for introspection and consistent with functions and other descriptors.

  • Issue: Add __name__ to property #101860

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

funkyfuture reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-bot bedevere-bot added the awaiting review label Feb 13, 2023
@bedevere-bot bedevere-bot mentioned this pull request Feb 13, 2023
Add __name__ to property #101860
Closed
@bedevere-bot

bedevere-bot commented Feb 13, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eltoder
eltoder force-pushed the feature/property-name branch 3 times, most recently from 05db108 to 9c956c7 Compare February 13, 2023 18:00
@serhiy-storchaka

serhiy-storchaka commented Feb 17, 2024

Copy link
Copy Markdown
Member

@eltoder, there are a lot of conflicts now. Could you please update the branch?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka
serhiy-storchaka self-requested a review February 17, 2024 08:17
@eltoder
pythongh-101860: Expose __name__ on property
8ec1251
Useful for introspection and consistent with functions and other
descriptors.
@eltoder
eltoder force-pushed the feature/property-name branch from 9c956c7 to 8ec1251 Compare February 17, 2024 15:59
@eltoder

eltoder commented Feb 17, 2024

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka Done

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka

serhiy-storchaka commented Feb 17, 2024

Copy link
Copy Markdown
Member

Thank you. I knew I could count on you.

eltoder reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eltoder
Fallback to func.__name__ if property __name__ not set.
e514472
serhiy-storchaka
serhiy-storchaka reviewed Feb 17, 2024
View reviewed changes
Comment thread Lib/inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/howto/descriptor.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Objects/descrobject.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@eltoder
eltoder requested a review from serhiy-storchaka February 17, 2024 17:56
@eltoder
Merge branch 'main' into feature/property-name
5dfa4f4
@eltoder

eltoder commented Feb 20, 2024

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka I made __name__ default to fget.__name__ when possible. What do you think?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eltoder
Fallback to fget.__name__ if name is not set
c20e9a7
Raise AttributeError if no fget or it doesn't have `__name__`.
@eltoder
eltoder force-pushed the feature/property-name branch from 732337d to c20e9a7 Compare February 20, 2024 04:40
serhiy-storchaka
serhiy-storchaka approved these changes Feb 20, 2024
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. And I like to to review more of your PRs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Feb 20, 2024
@serhiy-storchaka
serhiy-storchaka merged commit c0b0c2f into python:main Feb 20, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 20, 2024
@eltoder
eltoder deleted the feature/property-name branch February 20, 2024 15:33
@eltoder

eltoder commented Feb 20, 2024

Copy link
Copy Markdown
Contributor Author

Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
@eltoder @woodruffw
pythongh-101860: Expose __name__ on property (pythonGH-101876)
f7dedb5
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
@eltoder @diegorusso
pythongh-101860: Expose __name__ on property (pythonGH-101876)
794df41
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
@eltoder @LukasWoodtli
pythongh-101860: Expose __name__ on property (pythonGH-101876)
b7abd7a
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
@dangotbanned
fix: pre-3.13 compat?
86dda9b
Following where `__name__` used to be sourced from
- python/cpython#101876
MarcoGorelli pushed a commit to narwhals-dev/narwhals that referenced this pull request Apr 26, 2025
@dangotbanned
chore(typing): fix/ignore utils, tpch warnings (#2426)
41475ad
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@eltoder @bedevere-bot @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.