gh-51574: Make tempfile.mkdtemp() always return absolute paths (#94612)

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
Samuel Sloniker 2023-04-25 09:05:59 -07:00 committed by GitHub
parent c8c3956d90
commit 32bea69b89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 3 deletions

View file

@ -376,7 +376,7 @@ def mkdtemp(suffix=None, prefix=None, dir=None):
continue
else:
raise
return file
return _os.path.abspath(file)
raise FileExistsError(_errno.EEXIST,
"No usable temporary directory name found")