Skip to content

Refactor type related error raising into separate utility functions#7680

Open
scoder wants to merge 7 commits into
cython:masterfrom
scoder:refactor_type_errors
Open

Refactor type related error raising into separate utility functions#7680
scoder wants to merge 7 commits into
cython:masterfrom
scoder:refactor_type_errors

Conversation

@scoder
Copy link
Copy Markdown
Contributor

@scoder scoder commented May 10, 2026

… to correctly and efficiently handle the type name formatting.

Closes #7601

…o correctly and efficiently handle the type name formatting.
@da-woods
Copy link
Copy Markdown
Contributor

Very superficial comment, but would it make more sense in Exceptions.c rather than Object handling.c

@scoder
Copy link
Copy Markdown
Contributor Author

scoder commented May 10, 2026

would it make more sense in Exceptions.c rather than Object handling.c

Hmm, we already have a longer list of exception raising functions in ObjectHandling.c that are related to handling objects in various ways, but we don't currently have special exception raising functions in Exceptions.c, just code to handle Python style exception raising and propagation. I don't think the functions should go there.

@da-woods
Copy link
Copy Markdown
Contributor

The basic idea here definitely seems like an improvement to me, although I'm away from a proper computer at the moment so haven't had a detailed look.

(Obviously there still looks to be one build issue though)

@scoder
Copy link
Copy Markdown
Contributor Author

scoder commented May 12, 2026

Obviously there still looks to be one build issue though

I think I fixed the Limited API build problem, but the Py3.15 issue also applies to master and needs investigation. It seems that all End-to-End tests are failing since yesterday (2026-05-11) because they can't find distutils any more. The last setuptools release already dates a while back, and Py3.15b1 also isn't from exactly yesterday, so I can't see an obvious change that broke this. I'll try to dig into it.

(EDIT: obviously, the Sanitizers jobs use the latest CPython main branch, so there might have been a change between 3.15b1 and now that broke this.)

(EDIT2: I found python/cpython#149583 to be the most probable reason.)

@scoder
Copy link
Copy Markdown
Contributor Author

scoder commented May 12, 2026

This PR branch is failing on CPython main in the same way as Cython master, and none of it is specific to either Py3.15 or this PR. So I deem this done and worth a second look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants