Skip to content

test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x #89241

Closed

Description

@vstinner
BPO 45078
Nosy @brettcannon, @jaraco, @vstinner, @FFY00
PRs
  • bpo-45078: delete the files with broken newlines. #28120
  • 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:

    assignee = None
    closed_at = <Date 2021-09-13.00:03:05.018>
    created_at = <Date 2021-09-01.15:54:48.722>
    labels = ['tests', '3.11']
    title = 'test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x'
    updated_at = <Date 2021-09-13.00:03:05.017>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2021-09-13.00:03:05.017>
    actor = 'jaraco'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-13.00:03:05.018>
    closer = 'jaraco'
    components = ['Tests']
    creation = <Date 2021-09-01.15:54:48.722>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45078
    keywords = ['patch']
    message_count = 8.0
    messages = ['400847', '400850', '400852', '400887', '400890', '400891', '400893', '401678']
    nosy_count = 4.0
    nosy_names = ['brett.cannon', 'jaraco', 'vstinner', 'FFY00']
    pr_nums = ['28120']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue45078'
    versions = ['Python 3.11']

    Activity

    1. vstinner commented on Sep 1, 2021

      @vstinner
      MemberAuthor

      Since build 305 (commit a40675c), test_importlib fails on AMD64 Windows8.1 Non-Debug 3.x:
      https://buildbot.python.org/all/#/builders/405/builds/305

      The last successful build wa the build 304 (commit ee03bad).

      Sadly, the test doesn't report the 'actual' variable value when the test fails.

      ======================================================================
      FAIL: test_read_bytes (test.test_importlib.test_files.OpenNamespaceTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_importlib\test_files.py", line 14, in test_read_bytes
          assert actual == b'Hello, UTF-8 world!\n'
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError
    2. added
      3.11only security fixes
      testsTests in the Lib/test dir
      on Sep 1, 2021
    3. vstinner commented on Sep 1, 2021

      @vstinner
      MemberAuthor

      Interesting commits from:
      $ git log ee03bad..a40675c

      commit aaa83cd
      Author: Jason R. Coombs <[email protected]>
      Date: Thu Jul 29 21:05:05 2021 -0400

      bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436)
      
      * bpo-44771: Apply changes from importlib_resources@3b24bd6307
      
      * Add blurb
      
      * Exclude namespacedata01 from eol conversion.
      
    4. vstinner commented on Sep 1, 2021

      @vstinner
      MemberAuthor

      Maybe Git does change the end of line of Lib/test/test_importlib/namespacedata01/utf-8.file file, even if .gitattributes contains:
      "Lib/test/test_importlib/namespacedata01/* -text"

    5. jaraco commented on Sep 2, 2021

      @jaraco
      Member

      There is an issue where that file originally got EOL conversions, so all Windows buildbots were failing (bpo-44779).

      I'd thought we'd worked around the issue by pushing out a PR that deleted the file and ensuring it ran on the buildbots (#27436 (comment)).

      I knew it was a risk, however, that either that PR failed to checkout on the buildbot, checked out on a different shard, or that another PR subsequently managed to check out the code without the .gitattributes fix.

    6. jaraco commented on Sep 2, 2021

      @jaraco
      Member

      I'm going to attempt that technique again and see if it's sufficient to bypass the symptom.

    7. jaraco commented on Sep 2, 2021

      @jaraco
      Member

      I've submitted a PR that deletes the file and requested it be built by the buildbots, but I also see that that bot hasn't built anything in 7 days (https://buildbot.python.org/all/#/builders/405), so I'm not hopeful my request for it to build that change will have any effect on that builder.

    8. jaraco commented on Sep 2, 2021

      @jaraco
      Member

      I'm not confident that I can get the message to the buildbot, so I sent a message to [email protected] requesting to run the workaround on the buildbot. The message was flagged for moderation. My hope is that eventually goes through and will address the issue.

    9. jaraco commented on Sep 13, 2021

      @jaraco
      Member

      The builder is now passing after the buildbot owner reset the checkout.

    10. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixestestsTests in the Lib/test dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions