KEMBAR78
gh-125843: indicate which C function caused a `curses.error` by picnixz · Pull Request #125844 · python/cpython · GitHub
Skip to content

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

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…ython#125844)

- Rename error helpers with a `curses_set_error_*` prefix instead of `PyCurses*`.
- Cleanly report both NULL and ERR cases.
- Raise `curses.error` in `is_linetouched` instead of a `TypeError`.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…ython#125844)

- Rename error helpers with a `curses_set_error_*` prefix instead of `PyCurses*`.
- Cleanly report both NULL and ERR cases.
- Raise `curses.error` in `is_linetouched` instead of a `TypeError`.
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