diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2021-10-09 20:52:42 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2021-10-09 20:53:21 -0400 |
commit | 8a408c9f2a37add12898ecea36ed317702d16e2e (patch) | |
tree | 7aafc58039dae815ffd987ae53aee998a110b81e | |
parent | 459a4db5eae1f5ef063b34c61cc099820aa9ed0a (diff) | |
download | cpython-git-bpo-45419.tar.gz |
bpo-45419: Correct interfaces on DegenerateFiles.Path.bpo-45419
-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 eedde49dd0..e72edd1070 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 0000000000..a901d74538 --- /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. |