Skip to content

Conversation

@encukou
Copy link
Member

@encukou encukou commented Feb 28, 2025

Ask GCC/clang to more strictly validate compliance with the standards.
Add opt-outs where currently necessary.

Add a C/C++ version note to docs.

This applies #130686 again, and then does a different dance for C++03. There, I couldn't find a way to keep GCC pedantic on the full API. For the limited API, we only need to remove one comma.

I'll run the buildbots this time.


📚 Documentation preview 📚: https://cpython-previews--130692.org.readthedocs.build/

Also add a check for c++03 *limited* API, which passes in pedantic mode
after removing a comma in the `PySendResult` declaration, and allowing
`long long`.
@chris-eibl
Copy link
Member

clang (in contrast to gcc) suppresses both warnings

  • comma at end of enumerator list
  • ISO C++ 1998 does not support 'long long'

when -Wno-c++11-extensions is given. See https://godbolt.org/z/E1o1EfKWT.

If you can/want to differ between gcc and clang, you could run the non-limited build for clang, too.

@erlend-aasland erlend-aasland self-requested a review March 2, 2025 11:41
@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 3, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @encukou for commit 6c714df 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F130692%2Fmerge

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 3, 2025
@encukou
Copy link
Member Author

encukou commented Mar 4, 2025

The buildbot failures are pre-existing.

@encukou encukou merged commit d91cc9d into python:main Mar 4, 2025
125 of 128 checks passed
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Debian Non-Debug with X 3.x (no tier) has failed when building commit d91cc9d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1245/builds/4490) and take a look at the build logs.
  4. Check if the failure is related to this commit (d91cc9d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1245/builds/4490

Failed tests:

  • test.test_concurrent_futures.test_process_pool

Failed subtests:

  • test_force_shutdown_workers - test.test_concurrent_futures.test_process_pool.ProcessPoolForkserverProcessPoolExecutorTest.test_force_shutdown_workers
  • test_force_shutdown_workers - test.test_concurrent_futures.test_process_pool.ProcessPoolForkProcessPoolExecutorTest.test_force_shutdown_workers

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_importlib/metadata/fixtures.py", line 391, in _inner
    func(self, **args)
    ~~~~^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_concurrent_futures/test_process_pool.py", line 279, in test_force_shutdown_workers
    self.assertEqual(worker_process.exitcode, -signal.SIGTERM)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 255 != -15


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_importlib/metadata/fixtures.py", line 391, in _inner
    func(self, **args)
    ~~~~^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_concurrent_futures/test_process_pool.py", line 281, in test_force_shutdown_workers
    self.assertEqual(worker_process.exitcode, -signal.SIGKILL)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 255 != -9

@encukou encukou deleted the c11-doc-test branch March 10, 2025 14:06
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…ang test_c[pp]ext tests (pythonGH-130692)

Disable pedantic check for c++03 (unlimited API)

Also add a check for c++03 *limited* API, which passes in pedantic mode
after removing a comma in the `PySendResult` declaration, and allowing
`long long`.
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