Description
The files()
API completely supersedes the earlier APIs through a simpler and more intuitive interface. In order to achieve "one and preferably only one" interface for the same behavior, it's desirable to remove the legacy API.
In GitLab by @jaraco on Feb 22, 2020, 09:33
Following from !76 and this comment, I'd like to explore what the implementation would look like with only the traversable API. In that comment, I wrote:
I've started stripping out [the legacy] functionality in the feature/drop-legacy-api branch. Progress was good, but I got stumped on
Traversable.open()
for zip files, which doesn't support text-decoding. This leads me to believe that's a feature zipp should support. This also suggests theTraversable
API should include.open()
.
Plan
- Update implementation of legacy API functions to rely on
files
. Tests still pass. (Replace legacy API implementation with files() #221) - Develop and document transition guidance. (Deprecate legacy functions #236)
- Mark legacy API with DeprecationWarnings. (Deprecate legacy functions #236)
- Create/adapt test suite such that
files
API is covered entirely by tests not using legacy API. (Replace tests of legacy API with comparable tests of traversable API. #239) - Port to CPython for
3.103.11. - Freeze legacy implementation.
- Remove legacy implementation. (Remove legacy functions #282)
- Port to CPython for
3.113.13+. (gh-106531: Remove importlib.resources._legacy cpython#106532)