Skip to content

Conversation

@smurav
Copy link
Contributor

@smurav smurav commented Apr 23, 2025

Fix for gh-132835.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

How difficult is it to write tests for this?

}
PyObject *new_mro = lookup_tp_mro(type);
if (new_mro == NULL) {
return -1;
Copy link
Member

Choose a reason for hiding this comment

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

It returns error without setting an exception. Does not it cause issues downstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, -1 indicates an error and is processed normally further.

@smurav
Copy link
Contributor Author

smurav commented May 12, 2025

I think this fix is redundant, since mro_internal_unlocked checks mro for NULL and returns -1 in this case.

if (new_mro == NULL) {

@smurav smurav closed this May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants