Use :class:`subprocess.Popen` or :func:`subprocess.run` to
control options like encodings.
+ .. deprecated:: 3.14
+ The function is :term:`soft deprecated` and should no longer be used to
+ write new code. The :mod:`subprocess` module is recommended instead.
+
.. function:: posix_spawn(path, argv, env, *, file_actions=None, \
setpgroup=None, resetids=False, setsid=False, setsigmask=(), \
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
+ .. deprecated:: 3.14
+ These functions are :term:`soft deprecated` and should no longer be used
+ to write new code. The :mod:`subprocess` module is recommended instead.
+
.. data:: P_NOWAIT
P_NOWAITO
shell documentation.
The :mod:`subprocess` module provides more powerful facilities for spawning
- new processes and retrieving their results; using that module is preferable
+ new processes and retrieving their results; using that module is recommended
to using this function. See the :ref:`subprocess-replacements` section in
the :mod:`subprocess` documentation for some helpful recipes.
as a single positional argument.
(Contributed by Serhiy Storchaka in :gh:`109218`.)
+* :term:`Soft deprecate <soft deprecated>` :func:`os.popen` and
+ :func:`os.spawn* <os.spawnl>` functions. They should no longer be used to
+ write new code. The :mod:`subprocess` module is recommended instead.
+ (Contributed by Victor Stinner in :gh:`120743`.)
+
Removed
=======
--- /dev/null
+:term:`Soft deprecate <soft deprecated>` :func:`os.popen` and :func:`os.spawn*
+<os.spawnl>` functions. They should no longer be used to write new code. The
+:mod:`subprocess` module is recommended instead. Patch by Victor Stinner.