]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
authorJason R. Coombs <jaraco@jaraco.com>
Sun, 10 Oct 2021 14:23:06 +0000 (10:23 -0400)
committerGitHub <noreply@github.com>
Sun, 10 Oct 2021 14:23:06 +0000 (07:23 -0700)
Lib/importlib/_adapters.py
Misc/NEWS.d/next/Library/2021-10-09-20-53-13.bpo-45419.CauCgt.rst [new file with mode: 0644]

index eedde49dd03ad98116aecaae56108b85b46684df..e72edd10705c26a2726d798f94c3ce11f3aee230 100644 (file)
@@ -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 (file)
index 0000000..a901d74
--- /dev/null
@@ -0,0 +1 @@
+Correct interfaces on DegenerateFiles.Path.