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

@ -292,6 +292,9 @@ The module defines the following user-callable items:
.. versionchanged:: 3.6
The *dir* parameter now accepts a :term:`path-like object`.
.. versionchanged:: 3.12
:func:`mkdtemp` now always returns an absolute path, even if *dir* is relative.
.. function:: gettempdir()

View file

@ -457,8 +457,10 @@ uuid
tempfile
--------
The :class:`tempfile.NamedTemporaryFile` function has a new optional parameter
*delete_on_close* (Contributed by Evgeny Zorin in :gh:`58451`.)
* The :class:`tempfile.NamedTemporaryFile` function has a new optional parameter
*delete_on_close* (Contributed by Evgeny Zorin in :gh:`58451`.)
* :func:`tempfile.mkdtemp` now always returns an absolute path, even if the
argument provided to the *dir* parameter is a relative path.
.. _whatsnew-typing-py312: