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 — bpo-40170: Always define PyExceptionClass_Name as a function by erlend-aasland · Pull Request #24553 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Feb 16, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Remove the macro variant, as it accessed PyTypeObject.tp_name directly.

https://bugs.python.org/issue40170

Sorry, something went wrong.

Uh oh!

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

All reactions
Erlend E. Aasland added 2 commits February 16, 2021 22:13
Erlend E. Aasland
bpo-40170: Remove macro variant of PyExceptionClass_Name
e726c39
Erlend E. Aasland
Add NEWS entry
7e6e8d1
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Feb 16, 2021
@bedevere-bot bedevere-bot added the awaiting review label Feb 16, 2021
@erlend-aasland

erlend-aasland commented Feb 16, 2021

Copy link
Copy Markdown
Contributor Author

@vstinner Would you mind reviewing this?

In related news: The NEWS item section for #24533, #24535, and #24548 were Core and Builtins, but in retrospect I see that C API would have been more fitting. Should I change them?

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner merged commit cd80f43 into python:master Feb 17, 2021
@bedevere-bot bedevere-bot removed the awaiting review label Feb 17, 2021
@vstinner

vstinner commented Feb 17, 2021

Copy link
Copy Markdown
Member

In related news: The NEWS item section for #24533, #24535, and #24548 were Core and Builtins, but in retrospect I see that C API would have been more fitting. Should I change them?

Right, these changes impact the C API. If these changes were made after the latest Python 3.10 release, you can move the NEWS entries in a new PR. Otherwise, we can leave them, it's not a big deal.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Feb 17, 2021

Copy link
Copy Markdown
Member

Merged, thanks.

The function is only used to display errors, so I don't think that we need to micro-optimize the code (add an internal static inline function, for example), it's not "hot code". I consider that error handling is "cold code".

erlend-aasland 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.

@erlend-aasland
erlend-aasland deleted the bpo-40170/PyExceptionClass_Name branch February 17, 2021 11:00
@erlend-aasland

erlend-aasland commented Feb 17, 2021

Copy link
Copy Markdown
Contributor Author

Right, these changes impact the C API. If these changes were made after the latest Python 3.10 release, you can move the NEWS entries in a new PR. Otherwise, we can leave them, it's not a big deal.

All right. I prefer to move them before the next alpha. I'll throw up a PR.

Thanks for reviewing 🙏🏻

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland erlend-aasland mentioned this pull request Feb 17, 2021
bpo-40170: Move 3 NEWS entries to the C API section #24555
Merged
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Erlend Egeberg Aasland @adorilson
bpo-40170: Always define PyExceptionClass_Name() as a function (pytho…
e9facf7
…nGH-24553)

Remove macro variant of PyExceptionClass_Name().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

4 participants

@erlend-aasland @vstinner @the-knights-who-say-ni @bedevere-bot
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.