Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-105059: Fix MSCV compiler warning on PyObject union#107239

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:incref_pragram
Jul 25, 2023

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commentedJul 25, 2023
edited by bedevere-bot
Loading

Use pragma to ignore the MSCV compiler warning on the PyObject nameless union.

Use pragma to ignore the MSCV compiler warning on the PyObjectnameless union.
@vstinner
Copy link
MemberAuthor

@zooba: Would you be able to check if this change fix the compiler warning for you? These warnings:#105059 (comment)

@vstinner
Copy link
MemberAuthor

I managed to reproduce the issue with thisrepro.c file:

#include<Python.h>intmain () {return0;}

I open the "Developer Command Prompt", go Python source code directory, and typecl /c /I Include /I PC /W4 repro.c.

Output on the main branch:

Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86Copyright (C) Microsoft Corporation.  All rights reserved.repro.cC:\victor\python\main\Include\object.h(178): warning C4201: nonstandard extension used: nameless struct/unionC:\victor\python\main\Include\cpython/unicodeobject.h(199): warning C4100: '_unused_op': unreferenced formal parameterC:\victor\python\main\Include\cpython/unicodeobject.h(387): warning C4100: '_unused_op': unreferenced formal parameter

=> Thewarning C4201: nonstandard extension used: nameless struct/union warning is there.

Outputwith my PR:

Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86Copyright (C) Microsoft Corporation.  All rights reserved.repro.cC:\victor\python\main\Include\cpython/unicodeobject.h(199): warning C4100: '_unused_op': unreferenced formal parameterC:\victor\python\main\Include\cpython/unicodeobject.h(387): warning C4100: '_unused_op': unreferenced formal parameter

=>The waning is gone!

@vstinnervstinner merged commit1c8fe9b intopython:mainJul 25, 2023
@vstinnervstinner deleted the incref_pragram branchJuly 25, 2023 14:45
@miss-islington
Copy link
Contributor

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

@bedevere-bot
Copy link

GH-107248 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelJul 25, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 25, 2023
…H-107239)Use pragma to ignore the MSCV compiler warning on the PyObjectnameless union.(cherry picked from commit1c8fe9b)Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot
Copy link

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

Hi! The buildbotx86 Gentoo Installed with X 3.x has failed when building commit1c8fe9b.

What do you need to do:

  1. Don't panic.
  2. Checkthe 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/all/#builders/464/builds/5113) and take a look at the build logs.
  4. Check if the failure is related to this commit (1c8fe9b) 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/all/#builders/464/builds/5113

Failed tests:

  • test.test_asyncio.test_subprocess

Failed subtests:

  • test_subprocess_consistent_callbacks - test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_subprocess_consistent_callbacks

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

== Tests result: FAILURE then FAILURE ==

429 tests OK.

1 test failed:
test.test_asyncio.test_subprocess

17 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_asdl_parser test_clinic
test_devpoll test_gdb test_generated_cases test_ioctl test_kqueue
test_launcher test_perf_profiler test_startfile test_winconsoleio
test_winreg test_winsound test_wmi test_zipfile64

1 re-run test:
test.test_asyncio.test_subprocess

Total duration: 8 min 58 sec

Click to see traceback logs
Traceback (most recent call last):  File"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.13/test/test_asyncio/test_subprocess.py", line788, intest_subprocess_consistent_callbacksself.loop.run_until_complete(main())  File"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.13/asyncio/base_events.py", line664, inrun_until_completereturn future.result()^^^^^^^^^^^^^^^  File"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.13/test/test_asyncio/test_subprocess.py", line780, inmainself.assertEqual(events, [AssertionError:Lists differ: ['process_exited', ('pipe_data_received', 1, b'stdout')] != [('pipe_data_received', 1, b'stdout'), ('p[95 chars]ted']

vstinner added a commit that referenced this pull requestJul 25, 2023
) (#107248)gh-105059: Fix MSCV compiler warning on PyObject union (GH-107239)Use pragma to ignore the MSCV compiler warning on the PyObjectnameless union.(cherry picked from commit1c8fe9b)Co-authored-by: Victor Stinner <vstinner@python.org>
jtcave pushed a commit to jtcave/cpython that referenced this pull requestJul 27, 2023
…107239)Use pragma to ignore the MSCV compiler warning on the PyObjectnameless union.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@miss-islington@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp