Skip to content

[3.15] gh-158445: Add C API tests on build information functions - #159515

Merged
vstinner merged 3 commits into
python:3.15from
vstinner:test_build15
Oct 16, 2026
Merged

vstinner merged 3 commits into
python:3.15from
vstinner:test_build15

Conversation

@vstinner

@vstinner vstinner commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

vstinner and others added 2 commits October 16, 2026 10:31
…on#158603)

Add tests on functions:

* Py_GetBuildInfo()
* Py_GetCompiler()
* Py_GetCopyright()
* Py_GetPlatform()
* Py_GetVersion()

Changes:

* Add Modules/_testlimitedcapi.c and
  Lib/test/test_capi/test_build.py files.
* Add internal _Py_GetBuiltWithAssert() function.
* Reimplemenet support.built_with_c_assertions() using
  _Py_GetBuiltWithAssert() to cover more cases like buildbots using
  CFLAGS=-UNDEBUG in release mode.

(cherry picked from commit a831abb)
Co-authored-by: Stan Ulbrych <stan@python.org>
(cherry picked from commit c700121)
@vstinner

Copy link
Copy Markdown
Member Author

Oh, many tests of test_idle and test_tkinter failed on macOS (free-threading) / build and test (macos-26). Example:

ERROR: test_filter (test.test_tkinter.test_filedialog.FileDialogTest.test_filter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_tkinter/test_filedialog.py", line 51, in test_filter
    d = filedialog.FileDialog(self.root)
  File "/Users/runner/work/cpython/cpython/Lib/tkinter/filedialog.py", line 66, in __init__
    _setup_dialog(self.top)
    ~~~~~~~~~~~~~^^^^^^^^^^
  File "/Users/runner/work/cpython/cpython/Lib/tkinter/simpledialog.py", line 265, in _setup_dialog
    w.tk.call("::tk::unsupported::MacWindowStyle", "style",
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              w, "moveableModal", "")
              ^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle"

@vstinner

Copy link
Copy Markdown
Member Author

Oh, many tests of test_idle and test_tkinter failed on macOS (free-threading) / build and test (macos-26). Example:

I reported the regression as #159517 and I created a PR to fix it.

I upgraded this PR to retrieve the tkinter fix.

@vstinner
vstinner merged commit cb7a629 into python:3.15 Oct 16, 2026
60 checks passed
@vstinner
vstinner deleted the test_build15 branch October 16, 2026 11:15
@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Oct 16, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker cb7a629f4df7c3ad9535e5ac4ace3769589ec452 3.14

@bedevere-app

bedevere-app Bot commented Oct 16, 2026

Copy link
Copy Markdown

GH-159525 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 16, 2026
vstinner added a commit that referenced this pull request Oct 16, 2026
…9515) (#159525)

[3.15] gh-158445: Add C API tests on build information functions (#159515)

* gh-158445: Add C API tests on build information functions (#158603)

Add tests on functions:

* Py_GetBuildInfo()
* Py_GetCompiler()
* Py_GetCopyright()
* Py_GetPlatform()
* Py_GetVersion()

Changes:

* Add Modules/_testlimitedcapi.c and
  Lib/test/test_capi/test_build.py files.
* Add internal _Py_GetBuiltWithAssert() function.
* Reimplemenet support.built_with_c_assertions() using
  _Py_GetBuiltWithAssert() to cover more cases like buildbots using
  CFLAGS=-UNDEBUG in release mode.

(cherry picked from commit a831abb)

* gh-155742: Add support.built_with_c_assertions() (#156776)


(cherry picked from commit c700121)

---------


(cherry picked from commit cb7a629)

Co-authored-by: Stan Ulbrych <stan@python.org>
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.

1 participant