Skip to content

Conversation

@xhochy
Copy link

@xhochy xhochy commented Nov 28, 2025

The types_world_is_stopped() function needs to be defined if NDEBUG or when we're in a debug build is not defined.

Issue:

@bedevere-app
Copy link

bedevere-app bot commented Nov 28, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

#define END_TYPE_DICT_LOCK() Py_END_CRITICAL_SECTION2()

#ifndef NDEBUG
#if !defined(NDEBUG) || defined(Py_Debug)
Copy link
Member

@picnixz picnixz Nov 28, 2025

Choose a reason for hiding this comment

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

The name of the macro is not Py_Debug but Py_DEBUG And ideally, I think we should instead use Py_DEBUG rather than NDEBUG.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, this should be just Py_DEBUG.

Copy link
Author

Choose a reason for hiding this comment

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

We had that before, and that caused problems for non-debug builds with --with-assertions. This issue was then addressed by #140133, which, however, introduced a new problem with debug-without-assertions builds.

@bedevere-app
Copy link

bedevere-app bot commented Nov 28, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

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.

3 participants