File tree 4 files changed +22
-3
lines changed 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ Damian Skrzypczak
87
87
Daniel Grana
88
88
Daniel Hahler
89
89
Daniel Nuri
90
+ Daniel Sánchez Castelló
90
91
Daniel Wandschneider
91
92
Daniele Procida
92
93
Danielle Jenkins
@@ -190,6 +191,7 @@ Katerina Koukiou
190
191
Keri Volans
191
192
Kevin C
192
193
Kevin Cox
194
+ Kevin Hierro Carrasco
193
195
Kevin J. Foley
194
196
Kian Eliasi
195
197
Kian-Meng Ang
@@ -328,6 +330,7 @@ Taneli Hukkinen
328
330
Tanvi Mehta
329
331
Tarcisio Fischer
330
332
Tareq Alayan
333
+ Tatiana Ovary
331
334
Ted Xiao
332
335
Terje Runde
333
336
Thomas Grainger
@@ -346,6 +349,7 @@ Tyler Goodlet
346
349
Tzu-ping Chung
347
350
Vasily Kuznetsov
348
351
Victor Maryama
352
+ Victor Rodriguez
349
353
Victor Uriarte
350
354
Vidar T. Fauske
351
355
Virgil Dupras
Original file line number Diff line number Diff line change
1
+ Explicit note that :fixture: `tmpdir ` fixture is discouraged in favour of :fixture: `tmp_path `.
Original file line number Diff line number Diff line change @@ -104,8 +104,10 @@ The ``tmpdir`` and ``tmpdir_factory`` fixtures
104
104
105
105
The ``tmpdir `` and ``tmpdir_factory `` fixtures are similar to ``tmp_path ``
106
106
and ``tmp_path_factory ``, but use/return legacy `py.path.local `_ objects
107
- rather than standard :class: `pathlib.Path ` objects. These days, prefer to
108
- use ``tmp_path `` and ``tmp_path_factory ``.
107
+ rather than standard :class: `pathlib.Path ` objects.
108
+
109
+ .. note ::
110
+ These days, it is preferred to use ``tmp_path `` and ``tmp_path_factory ``.
109
111
110
112
See :fixture: `tmpdir <tmpdir> ` :fixture: `tmpdir_factory <tmpdir_factory> `
111
113
API for details.
Original file line number Diff line number Diff line change @@ -271,7 +271,14 @@ def testdir(pytester: Pytester) -> Testdir:
271
271
@attr .s (init = False , auto_attribs = True )
272
272
class TempdirFactory :
273
273
"""Backward compatibility wrapper that implements :class:`py.path.local`
274
- for :class:`TempPathFactory`."""
274
+ for :class:`TempPathFactory`.
275
+
276
+ .. note::
277
+ These days, it is preferred to use ``tmp_path_factory``.
278
+
279
+ :ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.
280
+
281
+ """
275
282
276
283
_tmppath_factory : TempPathFactory
277
284
@@ -312,6 +319,11 @@ def tmpdir(tmp_path: Path) -> LEGACY_PATH:
312
319
313
320
The returned object is a `legacy_path`_ object.
314
321
322
+ .. note::
323
+ These days, it is preferred to use ``tmp_path``.
324
+
325
+ :ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.
326
+
315
327
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html
316
328
"""
317
329
return legacy_path (tmp_path )
You can’t perform that action at this time.
0 commit comments