Skip to content

gh-125843: indicate which C function caused a curses.error #125844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
May 19, 2025

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Oct 22, 2024

@picnixz picnixz marked this pull request as draft April 25, 2025 11:02
@picnixz picnixz changed the title gh-125843: store the name of the curses C function or macro in curses.error gh-125843: include which C function caused a curses.error Apr 25, 2025
@picnixz picnixz changed the title gh-125843: include which C function caused a curses.error gh-125843: indicate which C function caused a curses.error Apr 25, 2025
@picnixz picnixz marked this pull request as ready for review April 25, 2025 19:35
Copy link
Member Author

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Actually, there are some funcname that should be corrected but I need to see how they should really be corrected.

@picnixz picnixz marked this pull request as draft April 25, 2025 19:50
picnixz added 2 commits May 7, 2025 12:57
- use `curses_set_error_*` prefix for error helpers
- remove some macros with predefined messages
- cleanly report both NULL and ERR cases
@picnixz
Copy link
Member Author

picnixz commented May 7, 2025

I've decided to keep the explicit calls to reduce the number of helper functions. When the python function name is the same, the caller needs to pass NULL. It also avoids the _from suffixes. I also updated the _curses_panel module that I totally forgot.

Note: I can actually delay the curses_panel changes for a follow-up PR btw.

@picnixz
Copy link
Member Author

picnixz commented May 19, 2025

I'll make a separate PR for _curses.panel as I want to merge the curses part now.

@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 19, 2025
@bedevere-bot

This comment was marked as resolved.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 19, 2025
@picnixz

This comment was marked as resolved.

@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 19, 2025
@bedevere-bot

This comment was marked as resolved.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 19, 2025
@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 19, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 34a1c31 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F125844%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 19, 2025
Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

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

OK, let's do it!
Thank you!

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@picnixz picnixz merged commit ee36db5 into python:main May 19, 2025
39 checks passed
@picnixz picnixz deleted the curses/improve-error-type-125843 branch May 19, 2025 13:53
@picnixz
Copy link
Member Author

picnixz commented May 19, 2025

Ok, so actually I broke another build bot. However, it's good that it's broken because this means that either my function call is wrong or something else was wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy