[Python-checkins] gh-99238: clarify the type of the env dict. (GH-99253)

miss-islington webhook-mailer at python.org
Tue Nov 8 16:09:10 EST 2022


https://github.com/python/cpython/commit/00147a84fca70fadd9fa869e8bcae4b720b90c2e
commit: 00147a84fca70fadd9fa869e8bcae4b720b90c2e
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022年11月08日T13:09:04-08:00
summary:
gh-99238: clarify the type of the env dict. (GH-99253)
(cherry picked from commit 2eee9d9cd7eb1e396fa9a4af7c5fadeeafbdaa38)
Co-authored-by: Gregory P. Smith <greg at krypto.org>
files:
M Doc/library/subprocess.rst
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 51b9e38b7b6c..14414ea7f81e 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -81,8 +81,10 @@ underlying :class:`Popen` interface can be used directly.
 
 If *env* is not ``None``, it must be a mapping that defines the environment
 variables for the new process; these are used instead of the default
- behavior of inheriting the current process' environment. It is passed directly
- to :class:`Popen`.
+ behavior of inheriting the current process' environment. It is passed
+ directly to :class:`Popen`. This mapping can be str to str on any platform
+ or bytes to bytes on POSIX platforms much like :data:`os.environ` or
+ :data:`os.environb`.
 
 Examples::
 
@@ -619,7 +621,9 @@ functions.
 
 If *env* is not ``None``, it must be a mapping that defines the environment
 variables for the new process; these are used instead of the default
- behavior of inheriting the current process' environment.
+ behavior of inheriting the current process' environment. This mapping can be
+ str to str on any platform or bytes to bytes on POSIX platforms much like
+ :data:`os.environ` or :data:`os.environb`.
 
 .. note::
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /