From: Jason R. Coombs Date: Sun, 10 Oct 2021 14:23:06 +0000 (-0400) Subject: [3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844) X-Git-Tag: v3.10.1~196 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14a483aa400dda8346ac474ce22e2ba8d8126dff;p=thirdparty%2FPython%2Fcpython.git [3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844) --- diff --git a/Lib/importlib/_adapters.py b/Lib/importlib/_adapters.py index eedde49dd03a..e72edd10705c 100644 --- a/Lib/importlib/_adapters.py +++ b/Lib/importlib/_adapters.py @@ -46,10 +46,11 @@ class DegenerateFiles: 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 000000000000..a901d7453819 --- /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.