Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com> Co-authored-by: kevin.hierro-ext <kevin.hierro-ext@clarity.ai> Co-authored-by: Dani Sancas <lord.sancas@gmail.com>
This commit is contained in:
parent
c1d134172c
commit
70cac3d464
4
AUTHORS
4
AUTHORS
|
@ -87,6 +87,7 @@ Damian Skrzypczak
|
||||||
Daniel Grana
|
Daniel Grana
|
||||||
Daniel Hahler
|
Daniel Hahler
|
||||||
Daniel Nuri
|
Daniel Nuri
|
||||||
|
Daniel Sánchez Castelló
|
||||||
Daniel Wandschneider
|
Daniel Wandschneider
|
||||||
Daniele Procida
|
Daniele Procida
|
||||||
Danielle Jenkins
|
Danielle Jenkins
|
||||||
|
@ -190,6 +191,7 @@ Katerina Koukiou
|
||||||
Keri Volans
|
Keri Volans
|
||||||
Kevin C
|
Kevin C
|
||||||
Kevin Cox
|
Kevin Cox
|
||||||
|
Kevin Hierro Carrasco
|
||||||
Kevin J. Foley
|
Kevin J. Foley
|
||||||
Kian Eliasi
|
Kian Eliasi
|
||||||
Kian-Meng Ang
|
Kian-Meng Ang
|
||||||
|
@ -328,6 +330,7 @@ Taneli Hukkinen
|
||||||
Tanvi Mehta
|
Tanvi Mehta
|
||||||
Tarcisio Fischer
|
Tarcisio Fischer
|
||||||
Tareq Alayan
|
Tareq Alayan
|
||||||
|
Tatiana Ovary
|
||||||
Ted Xiao
|
Ted Xiao
|
||||||
Terje Runde
|
Terje Runde
|
||||||
Thomas Grainger
|
Thomas Grainger
|
||||||
|
@ -346,6 +349,7 @@ Tyler Goodlet
|
||||||
Tzu-ping Chung
|
Tzu-ping Chung
|
||||||
Vasily Kuznetsov
|
Vasily Kuznetsov
|
||||||
Victor Maryama
|
Victor Maryama
|
||||||
|
Victor Rodriguez
|
||||||
Victor Uriarte
|
Victor Uriarte
|
||||||
Vidar T. Fauske
|
Vidar T. Fauske
|
||||||
Virgil Dupras
|
Virgil Dupras
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Explicit note that :fixture:`tmpdir` fixture is discouraged in favour of :fixture:`tmp_path`.
|
|
@ -104,8 +104,10 @@ The ``tmpdir`` and ``tmpdir_factory`` fixtures
|
||||||
|
|
||||||
The ``tmpdir`` and ``tmpdir_factory`` fixtures are similar to ``tmp_path``
|
The ``tmpdir`` and ``tmpdir_factory`` fixtures are similar to ``tmp_path``
|
||||||
and ``tmp_path_factory``, but use/return legacy `py.path.local`_ objects
|
and ``tmp_path_factory``, but use/return legacy `py.path.local`_ objects
|
||||||
rather than standard :class:`pathlib.Path` objects. These days, prefer to
|
rather than standard :class:`pathlib.Path` objects.
|
||||||
use ``tmp_path`` and ``tmp_path_factory``.
|
|
||||||
|
.. note::
|
||||||
|
These days, it is preferred to use ``tmp_path`` and ``tmp_path_factory``.
|
||||||
|
|
||||||
See :fixture:`tmpdir <tmpdir>` :fixture:`tmpdir_factory <tmpdir_factory>`
|
See :fixture:`tmpdir <tmpdir>` :fixture:`tmpdir_factory <tmpdir_factory>`
|
||||||
API for details.
|
API for details.
|
||||||
|
|
|
@ -271,7 +271,14 @@ class LegacyTestdirPlugin:
|
||||||
@attr.s(init=False, auto_attribs=True)
|
@attr.s(init=False, auto_attribs=True)
|
||||||
class TempdirFactory:
|
class TempdirFactory:
|
||||||
"""Backward compatibility wrapper that implements :class:`py.path.local`
|
"""Backward compatibility wrapper that implements :class:`py.path.local`
|
||||||
for :class:`TempPathFactory`."""
|
for :class:`TempPathFactory`.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
These days, it is preferred to use ``tmp_path_factory``.
|
||||||
|
|
||||||
|
:ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
_tmppath_factory: TempPathFactory
|
_tmppath_factory: TempPathFactory
|
||||||
|
|
||||||
|
@ -312,6 +319,11 @@ class LegacyTmpdirPlugin:
|
||||||
|
|
||||||
The returned object is a `legacy_path`_ object.
|
The returned object is a `legacy_path`_ object.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
These days, it is preferred to use ``tmp_path``.
|
||||||
|
|
||||||
|
:ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.
|
||||||
|
|
||||||
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html
|
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html
|
||||||
"""
|
"""
|
||||||
return legacy_path(tmp_path)
|
return legacy_path(tmp_path)
|
||||||
|
|
Loading…
Reference in New Issue