Skip to content

Commit

Permalink
bpo-45419: Correct interfaces on DegenerateFiles.Path.name and .open.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 10, 2021
1 parent f13c9b6 commit 690b5d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v5.0.7
======

* bpo-45419: Correct ``DegenerateFiles.Path`` ``.name``
and ``.open()`` interfaces to match ``Traversable``.

v5.0.6
======

Expand Down
3 changes: 2 additions & 1 deletion importlib_resources/_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ def is_dir(self):
def joinpath(self, other):
return DegenerateFiles.Path()

@property
def name(self):
return ''

def open(self):
def open(self, mode='rb', *args, **kwargs):
raise ValueError()

def __init__(self, spec):
Expand Down

0 comments on commit 690b5d6

Please sign in to comment.