python / cpython

The Python programming language
https://www.python.org
Other
63.19k stars 30.26k forks source link

Tests fail with python3.6 built with VS2019 #84802

Closed 94523e83-ab6f-4aad-bf91-3deb8ed0dcc5 closed 4 years ago

94523e83-ab6f-4aad-bf91-3deb8ed0dcc5 commented 4 years ago
BPO 40622
Nosy @terryjreedy, @pfmoore, @tjguk, @ned-deily, @zware, @zooba, @spacelg
Files
  • test.log.2.out
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['invalid', 'type-bug', 'tests', 'OS-windows'] title = 'Tests fail with python3.6 built with VS2019' updated_at = user = 'https://github.com/spacelg' ``` bugs.python.org fields: ```python activity = actor = 'ned.deily' assignee = 'none' closed = True closed_date = closer = 'ned.deily' components = ['Tests', 'Windows'] creation = creator = 'Lin' dependencies = [] files = ['49152'] hgrepos = [] issue_num = 40622 keywords = [] message_count = 4.0 messages = ['368822', '368999', '369010', '369011'] nosy_count = 7.0 nosy_names = ['terry.reedy', 'paul.moore', 'tim.golden', 'ned.deily', 'zach.ware', 'steve.dower', 'Lin'] pr_nums = [] priority = 'normal' resolution = 'not a bug' stage = 'resolved' status = 'closed' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue40622' versions = ['Python 3.6'] ```

    94523e83-ab6f-4aad-bf91-3deb8ed0dcc5 commented 4 years ago

    Here is repro steps:

    1. git clone -b "3.6" -c core.autocrlf=true https://github.com/python/cpython.git F:\gitP\python\cpython
    2. Open a VS 2019 16.4.5 x86 command prompt and browse to F:\gitP\python\cpython
    3. checkout the revision to f3a5b7a.
    4. Add #include \<windows.h> to the _iomodule.c.
    5. cd F:\gitP\python\cpython\PCBuild
    6. devenv /upgrade pcbuild.sln
    7. build -e -r --no-tkinter -v "/p:PlatformToolset=v142" "/p:WindowsTargetPlatformVersion=10.0.18362.0" 8.cd F:\gitP\python\cpython\PCBuild 9.rt -q -x test_math test_cmath test_distutils test_codecencodings_iso2022 test_random test_sax test_enum test_re test_subprocess test_socket Error: 4 tests failed: test_binhex test_importlib test_peg_generator test_tools Please see the attachment for details
    terryjreedy commented 4 years ago

    Runtest itself ran to completion but the 4 tests listed failed. I suspect that this should be closed as "won't fix" because A. 3.6 only gets security fixes since Dec 2018. B. Locally built Windows binaries often fail a few tests, either occasionally or dependably even if the Windows buildbots are green. Just now, test_import (still, or again), test__locale, and test_locale failed for me with 3.9.0a6+. This is unfortunate, but it is sometimes not clear whether the bug is in the modules or the tests.

    ned-deily commented 4 years ago

    Thanks for the report. Unfortunately, you are not actually building Python 3.6 here. Revision f3a5b7a is on the master branch, not 3.6. The fact that you are seeing a failure of test_peg_generator confirms that you are building from master (i.e. a pre-release of 3.9), since that test and the feature behind it are new in 3.9.

    ned-deily commented 4 years ago

    P.S. If you *do* want to build the current HEAD of the 3.6 branch including as yet unreleased fixes:

    git checkout 3.6

    If you want to build a specific release, use the v^ tags provided for each release:

    git checkout v3.6.8