diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2021-10-10 14:23:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-10 14:23:06 (GMT) |
commit | 14a483aa400dda8346ac474ce22e2ba8d8126dff (patch) | |
tree | 7aafc58039dae815ffd987ae53aee998a110b81e | |
parent | 459a4db5eae1f5ef063b34c61cc099820aa9ed0a (diff) | |
download | cpython-14a483aa400dda8346ac474ce22e2ba8d8126dff.zip cpython-14a483aa400dda8346ac474ce22e2ba8d8126dff.tar.gz cpython-14a483aa400dda8346ac474ce22e2ba8d8126dff.tar.bz2 |
[3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
-rw-r--r-- | Lib/importlib/_adapters.py | 3 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-10-09-20-53-13.bpo-45419.CauCgt.rst | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/importlib/_adapters.py b/Lib/importlib/_adapters.py index eedde49..e72edd1 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 0000000..a901d74 --- /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. |