Skip to content

[3.11] gh-115198: Fix test_check_metadata_deprecation in test_distutils#115200

Merged
terryjreedy merged 2 commits into
python:3.11from
serhiy-storchaka:test-distutils-test_check_metadata_deprecated
Feb 9, 2024
Merged

[3.11] gh-115198: Fix test_check_metadata_deprecation in test_distutils#115200
terryjreedy merged 2 commits into
python:3.11from
serhiy-storchaka:test-distutils-test_check_metadata_deprecated

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Feb 9, 2024

Copy link
Copy Markdown
Member

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pcbuild/build.bat -d get compile warnings (separate issue)

f:\dev\311\Modules\_ssl.c(3624,28): warning C4244: 'function': conversion from
'uint64_t' to 'long', possible loss of data [f:\dev\311\PCbuild\_ssl.vcxproj]
f:\dev\311\Modules\_ssl.c(3638,12): warning C4244: '=': conversion from 'uint64
_t' to 'long', possible loss of data [f:\dev\311\PCbuild\_ssl.vcxproj]

Without the patch, test_distutils passes but with 7 link warnings like the following:

 Creating library build\temp.win-amd64-3.11-pydebug\Debug\xx_d.cp311-win_amd64.lib and object build\temp.win-amd64-3.11-pydebug\Debug\xx_d.cp311-win_amd64.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance

If CI and bots use this build, this explains why they pass. I have seen these before; not sure if this test.

PCbuild/build.bat, without -d, supposed to be 'release' build, get same compile warnings, tests again pass. Either this build is different from what is installed (perhaps the latter has pgo training?) or some other patch had effect.

In any case, after hand-editing the installed test_register to add your line and a similar line for a another deprecation message (see edit to issue report -- sorry I missed it before), tests pass on installed 3.11.8. The edit to test_sdist is not needed.

I would apply the corrected patch rather than worry about why not needed for my local builds.

Comment thread Lib/distutils/tests/test_register.py
Comment thread Lib/distutils/tests/test_sdist.py Outdated
@bedevere-app

bedevere-app Bot commented Feb 9, 2024

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

@terryjreedy

Copy link
Copy Markdown
Member

I verified that the two new lines in the patch are exactly equal to the two new lines in my installed copy. Thank you for the fix.

@terryjreedy
terryjreedy merged commit 115f72b into python:3.11 Feb 9, 2024
@serhiy-storchaka
serhiy-storchaka deleted the test-distutils-test_check_metadata_deprecated branch July 1, 2026 16:51
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants