Skip to content

Conversation

@jaraco
Copy link
Member

@jaraco jaraco commented Jun 11, 2020

As discovered in this comment, the protocol for soliciting a files() method on loaders is inadequate as some loaders do not have the context about the package with which they're associated, and although GH-20576 (and importlib_resources 2.x) attempted to address this concern while continuing to supply native support on ResourceReaders, it also brought unintended consequences, reported in bpo-40924.

This change selectively removes that behavior to avoid tempting custom loader implementers from implementing this protocol.

A different fix should be applied in master.

https://bugs.python.org/issue40924

… found in importlib_resources 1.3-1.6 (added in Python 3.8b1).
@jaraco jaraco requested a review from ambv June 11, 2020 23:39
@jaraco jaraco changed the title Remove protocol for supplying Traversable objects from loaders bpo-40924: Remove protocol for supplying Traversable objects from loaders Jun 11, 2020
@jaraco jaraco changed the title bpo-40924: Remove protocol for supplying Traversable objects from loaders [3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders Jun 11, 2020
@ambv ambv merged commit 8a34690 into python:3.9 Jun 14, 2020
@jaraco jaraco deleted the hotfix/bpo-40924-remove-loader-files branch March 5, 2021 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants