Skip to content

Sync with importlib_metadata for Python 3.13 #117089

Closed

Description

@jaraco

This issue tracks incorporating updates from importlib_metadata into CPython for Python 3.13, including:

Linked PRs

Activity

  1. jaraco commented on Mar 20, 2024

    @jaraco
    MemberAuthor

    As I started looking into what it would take to move the tests from Lib/test/test_importlib to Lib/test/test_importlib/metadata, I found that there are more instances of the mod module leaking across tests, so I'll need to deal with that too.

    ERROR: test_module_resources (test.test_importlib.resources.test_files.ModulesFilesTests.test_module_resources)
    A module can have resources found adjacent to the module.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/jaraco/code/python/cpython/Lib/test/test_importlib/resources/test_files.py", line 88, in test_module_resources
        actual = resources.files(mod).joinpath('res.txt').read_text(encoding='utf-8')
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
      File "/Users/jaraco/code/python/cpython/Lib/pathlib/__init__.py", line 568, in read_text
        return _abc.PathBase.read_text(self, encoding, errors, newline)
               ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jaraco/code/python/cpython/Lib/pathlib/_abc.py", line 743, in read_text
        with self.open(mode='r', encoding=encoding, errors=errors, newline=newline) as f:
             ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jaraco/code/python/cpython/Lib/pathlib/__init__.py", line 559, in open
        return io.open(self, mode, buffering, encoding, errors, newline)
               ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/f2/2plv6q2n7l932m2x004jlw340000gn/T/tmpbuigpc61/res.txt'

    I found tmpbuigpc61 was left over from metadata tests.

  2. added 2 commits that reference this issue on Mar 20, 2024
  3. added 2 commits that reference this issue on Mar 25, 2024
  4. added 2 commits that reference this issue on Apr 17, 2024
  5. hugovk commented on Jun 15, 2024

    @hugovk
    Member

    Triage: I think this is ready to be closed.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions