GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-97930: Apply changes from importlib_resources 5.10. by jaraco · Pull Request #100598 · python/cpython

Conversation

@jaraco

@jaraco jaraco commented Dec 29, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

  • Issue: Refresh importlib.resources #97930

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jaraco
jaraco requested review from FFY00, brettcannon and warsaw as code owners December 29, 2022 03:06
@bedevere-bot bedevere-bot added the awaiting core review label Dec 29, 2022
@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
Refresh importlib.resources #97930
Closed
3 tasks done
jaraco added 2 commits December 29, 2022 12:08
@jaraco
Apply changes from importlib_resources 5.10.
726f8dd
@jaraco
Add blurb
9f533cb
@jaraco
jaraco force-pushed the feature/importlib-resources-5.10 branch from 95e3e1d to 0b49678 Compare December 29, 2022 17:08
@jaraco
Update documentation to match the implementation with Anchor object b…
81c3c5e
…eing preferred and Package object being deprecated.
@jaraco
jaraco force-pushed the feature/importlib-resources-5.10 branch from 0b49678 to 81c3c5e Compare December 29, 2022 17:14
jaraco
jaraco commented Dec 29, 2022
View reviewed changes
Comment thread Lib/importlib/resources/_adapters.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jaraco
Restore _adapters to prior state.
1637ad4
@jaraco
jaraco merged commit 447d061 into python:main Jan 1, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label Jan 1, 2023
@jaraco
jaraco deleted the feature/importlib-resources-5.10 branch January 1, 2023 16:07
@bedevere-bot

bedevere-bot commented Jan 1, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM Raspbian 3.x has failed when building commit 447d061.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/424/builds/3216) and take a look at the build logs.
  4. Check if the failure is related to this commit (447d061) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/424/builds/3216

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

411 tests OK.

10 slowest tests:

  • test_largefile: 6 min 32 sec
  • test_venv: 4 min 50 sec
  • test_asyncio: 3 min 51 sec
  • test_multiprocessing_spawn: 3 min 21 sec
  • test_concurrent_futures: 3 min 9 sec
  • test_multiprocessing_forkserver: 3 min 2 sec
  • test_zipfile: 2 min 44 sec
  • test_shutil: 2 min 20 sec
  • test_tokenize: 2 min 1 sec
  • test_gdb: 1 min 45 sec

1 test altered the execution environment:
test_multiprocessing_forkserver

21 tests skipped:
test_check_c_globals test_devpoll test_idle test_ioctl test_kqueue
test_launcher test_msilib test_peg_generator test_perf_profiler
test_startfile test_tcl test_tix test_tkinter test_ttk
test_ttk_textonly test_turtle test_winconsoleio test_winreg
test_winsound test_wmi test_zipfile64

Total duration: 29 min 29 sec

Click to see traceback logs
remote: Enumerating objects: 42, done.        
remote: Counting objects:   2% (1/42)        
remote: Counting objects:   4% (2/42)        
remote: Counting objects:   7% (3/42)        
remote: Counting objects:   9% (4/42)        
remote: Counting objects:  11% (5/42)        
remote: Counting objects:  14% (6/42)        
remote: Counting objects:  16% (7/42)        
remote: Counting objects:  19% (8/42)        
remote: Counting objects:  21% (9/42)        
remote: Counting objects:  23% (10/42)        
remote: Counting objects:  26% (11/42)        
remote: Counting objects:  28% (12/42)        
remote: Counting objects:  30% (13/42)        
remote: Counting objects:  33% (14/42)        
remote: Counting objects:  35% (15/42)        
remote: Counting objects:  38% (16/42)        
remote: Counting objects:  40% (17/42)        
remote: Counting objects:  42% (18/42)        
remote: Counting objects:  45% (19/42)        
remote: Counting objects:  47% (20/42)        
remote: Counting objects:  50% (21/42)        
remote: Counting objects:  52% (22/42)        
remote: Counting objects:  54% (23/42)        
remote: Counting objects:  57% (24/42)        
remote: Counting objects:  59% (25/42)        
remote: Counting objects:  61% (26/42)        
remote: Counting objects:  64% (27/42)        
remote: Counting objects:  66% (28/42)        
remote: Counting objects:  69% (29/42)        
remote: Counting objects:  71% (30/42)        
remote: Counting objects:  73% (31/42)        
remote: Counting objects:  76% (32/42)        
remote: Counting objects:  78% (33/42)        
remote: Counting objects:  80% (34/42)        
remote: Counting objects:  83% (35/42)        
remote: Counting objects:  85% (36/42)        
remote: Counting objects:  88% (37/42)        
remote: Counting objects:  90% (38/42)        
remote: Counting objects:  92% (39/42)        
remote: Counting objects:  95% (40/42)        
remote: Counting objects:  97% (41/42)        
remote: Counting objects: 100% (42/42)        
remote: Counting objects: 100% (42/42), done.        
remote: Compressing objects:   5% (1/20)        
remote: Compressing objects:  10% (2/20)        
remote: Compressing objects:  15% (3/20)        
remote: Compressing objects:  20% (4/20)        
remote: Compressing objects:  25% (5/20)        
remote: Compressing objects:  30% (6/20)        
remote: Compressing objects:  35% (7/20)        
remote: Compressing objects:  40% (8/20)        
remote: Compressing objects:  45% (9/20)        
remote: Compressing objects:  50% (10/20)        
remote: Compressing objects:  55% (11/20)        
remote: Compressing objects:  60% (12/20)        
remote: Compressing objects:  65% (13/20)        
remote: Compressing objects:  70% (14/20)        
remote: Compressing objects:  75% (15/20)        
remote: Compressing objects:  80% (16/20)        
remote: Compressing objects:  85% (17/20)        
remote: Compressing objects:  90% (18/20)        
remote: Compressing objects:  95% (19/20)        
remote: Compressing objects: 100% (20/20)        
remote: Compressing objects: 100% (20/20), done.        
remote: Total 23 (delta 18), reused 7 (delta 3), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '447d061bc7b978afedd3b0148715d2153ac726c5'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 447d061bc7 gh-97930: Apply changes from importlib_resources 5.10. (GH-100598)
Switched to and reset branch 'main'

Objects/obmalloc.c:776:1: warning: ‘always_inline’ function might not be inlinable [-Wattributes]
  776 | arena_map_get(pymem_block *p, int create)
      | ^~~~~~~~~~~~~

make: *** [Makefile:1895: buildbottest] Error 3
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jaraco

jaraco commented Jan 1, 2023

Copy link
Copy Markdown
Member Author

The buildbot failure appears unrelated to this change and highly isolated, so I'm going to assume it's a spurious failure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk mentioned this pull request Oct 25, 2023
What's new in Python 3.13: move importlib.resources removals under the Removed section #111301
Closed
Gatsik added a commit to Gatsik/client that referenced this pull request Aug 4, 2024
@Gatsik
Pin irc library version to 20.4.0
89da415
this version was in the recent 0.21.0 release and worked fine

the irc library is broken (for us) since jaraco/irc@c95c063
the reason is that it uses importlib.resources.files() to import codes
and this function is buggy -- it doesn't work with freezed code
(see also python/cpython#121735. wimglenn/resources-example#6)
and (what a coincidence!) broken implementation of files() function was written
by the same person -- see python/cpython#100598
@donbarbos donbarbos mentioned this pull request Aug 22, 2025
Remove deprecated parameter alias for importlib.resources.files #138044
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner
@brettcannon brettcannon Awaiting requested review from brettcannon
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jaraco @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.