Skip to content

gh-97930: Apply changes from importlib_resources 5.10.#100598

Merged
jaraco merged 4 commits intopython:mainfrom
jaraco:feature/importlib-resources-5.10
Jan 1, 2023
Merged

gh-97930: Apply changes from importlib_resources 5.10.#100598
jaraco merged 4 commits intopython:mainfrom
jaraco:feature/importlib-resources-5.10

Conversation

@jaraco
Copy link
Copy Markdown
Member

@jaraco jaraco commented Dec 29, 2022

Previous sync with 5.9 was #97929.

Changes are described here:

#203: Lifted restriction on modules passed to files. Now modules need not be a package and if a non-package module is passed, resources will be resolved adjacent to those modules, even for modules not found in any package. For example, files(import_module('mod.py')) will resolve resources found at the root. The parameter to files was renamed from ‘package’ to ‘anchor’, with a compatibility shim for those passing by keyword.

#259: files no longer requires the anchor to be specified and can infer the anchor from the caller’s scope (defaults to the caller’s module).

These changes have been released for several months with no reported concerns.

@jaraco jaraco force-pushed the feature/importlib-resources-5.10 branch 2 times, most recently from 362c36c to a2524ba Compare December 29, 2022 16:33
@jaraco jaraco changed the title Apply changes from importlib_resources 5.10. gh-97930: Apply changes from importlib_resources 5.10. Dec 29, 2022
@bedevere-bot bedevere-bot mentioned this pull request Dec 29, 2022
3 tasks
@jaraco jaraco force-pushed the feature/importlib-resources-5.10 branch from 95e3e1d to 0b49678 Compare December 29, 2022 17:08