Skip to content

Commit 14a483a

Browse files
authored
[3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
1 parent 459a4db commit 14a483a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/importlib/_adapters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ def is_dir(self):
4646
def joinpath(self, other):
4747
return DegenerateFiles.Path()
4848

49+
@property
4950
def name(self):
5051
return ''
5152

52-
def open(self):
53+
def open(self, mode='rb', *args, **kwargs):
5354
raise ValueError()
5455

5556
def __init__(self, spec):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correct interfaces on DegenerateFiles.Path.

0 commit comments

Comments
 (0)