[Python-checkins] [3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
miss-islington
webhook-mailer at python.org
Sun Oct 10 10:23:17 EDT 2021
https://github.com/python/cpython/commit/14a483aa400dda8346ac474ce22e2ba8d8126dff
commit: 14a483aa400dda8346ac474ce22e2ba8d8126dff
branch: 3.10
author: Jason R. Coombs <jaraco at jaraco.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-10-10T07:23:06-07:00
summary:
[3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
files:
A Misc/NEWS.d/next/Library/2021-10-09-20-53-13.bpo-45419.CauCgt.rst
M Lib/importlib/_adapters.py
diff --git a/Lib/importlib/_adapters.py b/Lib/importlib/_adapters.py
index eedde49dd03ad..e72edd10705c2 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 0000000000000..a901d7453819f
--- /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.
More information about the Python-checkins
mailing list