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-140550: Remove PyInit function from test_cext#141511

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

Draft
encukou wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromencukou:modexport-remove-pyinit-from-test_cext

Conversation

@encukou
Copy link
Member

@encukouencukou commentedNov 13, 2025
edited by bedevere-appbot
Loading

This should not be necessary, but let me ask the buildbots.

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@encukouencukou added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelNov 14, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@encukou for commit1ad68bf 🤖

Results will be shown at:

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

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

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelNov 14, 2025
@vstinner
Copy link
Member

FreeBSD failures are unrelated and should be fixed by#141551.

@vstinner
Copy link
Member

buildbot/AMD64 Windows PGO NoGIL PR
buildbot/AMD64 Windows11 Non-Debug PR

test_cext fails with:

  "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\Administrator\buildarea\pull_request.itamaro-win64-srv-22-aws.nogil.pgo\build\PCbuild\AMD64 /LIBPATH:C:\Users\Administrator\buildarea\pull_request.itamaro-win64-srv-22-aws.nogil.pgo\build\build\test_python_3776æ\tempcwd\env\libs /LIBPATH:C:\Users\Administrator\buildarea\pull_request.itamaro-win64-srv-22-aws.nogil.pgo\build\libs /LIBPATH:C:\Users\Administrator\buildarea\pull_request.itamaro-win64-srv-22-aws.nogil.pgo\build /LIBPATH:C:\Users\Administrator\buildarea\pull_request.itamaro-win64-srv-22-aws.nogil.pgo\build\build\test_python_3776æ\tempcwd\env\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64" /EXPORT:PyInit__test_cext build\temp.win-amd64-cpython-315t\Release\extension.obj /OUT:build\lib.win-amd64-cpython-315t\_test_cext.cp315t-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-315t\Release\_test_cext.cp315t-win_amd64.lib  LINK : error LNK2001: unresolved external symbol PyInit__test_cext  build\temp.win-amd64-cpython-315t\Release\_test_cext.cp315t-win_amd64.lib : fatal error LNK1120: 1 unresolved externals  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.44.35207\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120  error: subprocess-exited-with-error

It looks like a legit error.

The (long) build command contains/EXPORT:PyInit__test_cext.

@encukou
Copy link
MemberAuthor

encukou commentedNov 14, 2025
edited
Loading

This one will need coordination with setuptools. Glad we found it early :)

Setuptools is adding an/EXPORT specification to theLINK command for thePyInit_* function.
This fails if there is no such function.

According toMSVC docs:

There are four methods for exporting a definition, listed in recommended order of use:

  1. __declspec(dllexport) in the source code
  2. AnEXPORTS statement in a .def file
  3. An /EXPORT specification in a LINK command
  4. Acomment directive in the source code, of the form#pragma comment(linker, "/export: definition ").

Weshould be using method (1). Once we do, setuptools can stop doing (3), perhaps conditionally.

@encukouencukou marked this pull request as draftNovember 14, 2025 15:59
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@encukou@bedevere-bot@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp