Content-Length: 300650 | pFad | https://github.com/python/cpython/issues/100750

87 PEP 597: platform from_subprocess missing encoding kwarg · Issue #100750 · python/cpython · GitHub
Skip to content

PEP 597: platform from_subprocess missing encoding kwarg #100750

@graingert

Description

@graingert

Bug report

python3.11 -W error -X warn_default_encoding -c "import platform; print(platform.uname().processor)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.11/functools.py", line 1001, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/platform.py", line 792, in processor
    return _unknown_as_blank(_Processor.get())
                             ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/platform.py", line 738, in get
    return func() or ''
           ^^^^^^
  File "/usr/lib/python3.11/platform.py", line 761, in from_subprocess
    return subprocess.check_output(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 908, in __init__
    self.encoding = encoding = _text_encoding()
                               ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 372, in _text_encoding
    warnings.warn("'encoding' argument not specified.",
EncodingWarning: 'encoding' argument not specified.

Your environment

  • CPython versions tested on:
  • Operating system and architecture:

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/100750

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy