diff --git a/Lib/importlib/_adapters.py b/Lib/importlib/_adapters.py index eedde49dd03..e72edd10705 100644 --- a/Lib/importlib/_adapters.py +++ b/Lib/importlib/_adapters.py @@ -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): diff --git a/Misc/NEWS.d/next/Library/2021-10-09-20-53-13.bpo-45419.CauCgt.rst b/Misc/NEWS.d/next/Library/2021-10-09-20-53-13.bpo-45419.CauCgt.rst new file mode 100644 index 00000000000..a901d745381 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-10-09-20-53-13.bpo-45419.CauCgt.rst @@ -0,0 +1 @@ +Correct interfaces on DegenerateFiles.Path.