Skip to content

gh-116869: Add test_cext test: build a C extension #116954

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

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 18, 2024

@vstinner
Copy link
Member Author

Once my fix PR gh-116950 will be merged, I will write a second change on top of this issue to run tests with -Werror=declaration-after-statement to avoid regressions.

@vstinner vstinner added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 18, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit d024b10 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 18, 2024
@vstinner
Copy link
Member Author

Oh, the test catched a warning when using -std=c99:

      In file included from extension.c:7:
      In file included from /buildbot/buildarea/pull_request.ware-freebsd/build/Include/Python.h:122:
      /buildbot/buildarea/pull_request.ware-freebsd/build/Include/cpython/optimizer.h:77:3: error: redefinition of typedef '_PyOptimizerObject' is a C11 feature [-Werror,-Wtypedef-redefinition]
      } _PyOptimizerObject;
        ^
      /buildbot/buildarea/pull_request.ware-freebsd/build/Include/cpython/optimizer.h:60:35: note: previous definition is here
      typedef struct _PyOptimizerObject _PyOptimizerObject;
                                        ^
      1 error generated.

I wrote PR #116963 to fix it.

@vstinner
Copy link
Member Author

PR rebased on top of PR #116963 merged.

@vstinner vstinner added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 18, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 8a5b224 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 18, 2024
@vstinner vstinner marked this pull request as ready for review March 18, 2024 17:17
Comment on lines +16 to +19
# gh-110119: pip does not currently support 't' in the ABI flag use by
# --disable-gil builds. Once it does, we can remove this skip.
@unittest.skipIf(support.Py_GIL_DISABLED,
'test does not work with --disable-gil')
Copy link
Contributor

Choose a reason for hiding this comment

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

It should work now that #116878 landed!

(The comment was a bit inaccurate: it turns out the issue was in wheel, not pip)

Copy link
Member Author

Choose a reason for hiding this comment

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

That's great! I will write a follow-up to patch also test_cppext

Copy link
Member Author

Choose a reason for hiding this comment

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

PR #116973

@vstinner vstinner merged commit 590a260 into python:main Mar 18, 2024
@vstinner vstinner deleted the test_cext branch March 18, 2024 19:15
@vstinner
Copy link
Member Author

vstinner commented Mar 18, 2024

Merged. Let's start with something simple.

vstinner added a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants