Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Backport test_cext and test_cppext (C API tests) from main to the 3.12 branch #127906

Closed
vstinner opened this issue Dec 13, 2024 · 3 comments
Labels
tests Tests in the Lib/test dir topic-C-API

Comments

@vstinner
Copy link
Member Author

On the 3.12 branch, test_cext currently fails with these warnings:

  C:\victor\python\3.12\include\cpython/unicodeobject.h(205): error C2220: the following warning is treated as an error
  C:\victor\python\3.12\include\cpython/unicodeobject.h(205): warning C4100: '_unused_op': unreferenced formal parameter
  C:\victor\python\3.12\include\cpython/unicodeobject.h(395): warning C4100: '_unused_op': unreferenced formal parameter
  C:\victor\python\3.12\include\cpython/pytime.h(192): warning C4115: 'timeval': named type definition in parentheses
  extension.c(22): warning C4100: '_unused_module': unreferenced formal parameter
  extension.c(44): warning C4100: '_unused_module': unreferenced formal parameter

I backported MSVC support in Py_UNUSED() to 3.12 to fix unicodeobject.h: PR gh-127907.

@vstinner
Copy link
Member Author

C:\victor\python\3.12\include\cpython/pytime.h(192): warning C4115: 'timeval': named type definition in parentheses

I wrote #127908 to fix this pytime.h warning.

vstinner added a commit that referenced this issue Dec 13, 2024
)

gh-127906: Declare timeval struct in pytime.h on Windows

Fix the following MSVC compiler warning:

    include\cpython\pytime.h(192): warning C4115: 'timeval':
    named type definition in parentheses
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 13, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 13, 2024
vstinner added a commit that referenced this issue Dec 13, 2024
…127919)

gh-127906: Test the limited C API in test_cppext (GH-127916)
(cherry picked from commit d05a4e6)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this issue Dec 13, 2024
…127920)

gh-127906: Test the limited C API in test_cppext (GH-127916)
(cherry picked from commit d05a4e6)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit to vstinner/cpython that referenced this issue Dec 13, 2024
@vstinner
Copy link
Member Author

I tested manually: with "[3.12] gh-127906: Test the limited C API in test_cppext", test_cppext is able to catch #127902 regression!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-C-API
Projects
None yet
Development

No branches or pull requests

1 participant