Content-Length: 277625 | pFad | https://github.com/python/cpython/issues/98393

BC os module: reject bytes-like strings for paths, only accept the exact bytes type · Issue #98393 · python/cpython · GitHub
Skip to content

os module: reject bytes-like strings for paths, only accept the exact bytes type #98393

@vstinner

Description

@vstinner

In Python 3.6, the support for "bytes-like" paths was deprecated (commit d73c318): see issue #70987 for the rationale.

I propose to remove the support for bytes-like paths in Python 3.12. The feature was deprecated in 6 Python releases (PEP 387 is respected). In practice, the two most common "bytes-like" types are: bytearray and memoryview.

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/98393

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy