gh-87901: os.popen: Remove the encoding argument#92836
Conversation
|
Since the parameter was added to Python 3.11, I guess your intent is to backport this change to 3.11. What's the rationale for adding the parameter and then to remove it? #87901 doesn't give details. |
|
I want to fix EncodingWarning in stdlib as possible. Adding This PR doesn't fix the EncodingWarning in |
|
Since I wish I could deprecate os.popen(), I like the idea of suggesting users to use the subprocess module directly. It's just that I was surprised to see the parameter added and then removed. Now I understand the rationale, thanks. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I just added a remark on the doc.
Doc/library/os.rst
Outdated
| :func:`locale.getpreferredencoding(False) <locale.getpreferredencoding>`_. | ||
| The :ref:`Python UTF-8 Mode <utf8-mode>` affects both encodings. | ||
|
|
||
| Use :class:`subprocess.Popen` to control encoding and many other options. |
There was a problem hiding this comment.
The last sentence "... use subprocess to control encoding ..." is fine. But I'm not sure that it's worth it to maintain a documentation of the encoding used by subprocess here. I'm not against it ;-)
|
Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
|
GH-92939 is a backport of this pull request to the 3.11 branch. |
No description provided.