diff options
author | Victor Stinner <vstinner@python.org> | 2022-10-18 15:52:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 15:52:31 (GMT) |
commit | db03c8066a6b12fa23618f9add0eb795936726b4 (patch) | |
tree | 71d35cac37736188bbe8b046aab657b0892be1de /Doc/whatsnew | |
parent | 9da5215000920870eeddd78af92da4c98099706c (diff) | |
download | cpython-db03c8066a6b12fa23618f9add0eb795936726b4.zip cpython-db03c8066a6b12fa23618f9add0eb795936726b4.tar.gz cpython-db03c8066a6b12fa23618f9add0eb795936726b4.tar.bz2 |
gh-98393: os module reject bytes-like, only accept bytes (#98394)
The os module and the PyUnicode_FSDecoder() function no longer accept
bytes-like paths, like bytearray and memoryview types: only the exact
bytes type is accepted for bytes strings.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.12.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index ad0270a..525efc4 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -515,6 +515,11 @@ Changes in the Python API in Python 3.9. (Contributed by Victor Stinner in :gh:`94352`.) +* The :mod:`os` module no longer accepts bytes-like paths, like + :class:`bytearray` and :class:`memoryview` types: only the exact + :class:`bytes` type is accepted for bytes strings. + (Contributed by Victor Stinner in :gh:`98393`.) + Build Changes ============= @@ -631,6 +636,11 @@ Porting to Python 3.12 to traverse and clear their instance's dictionaries. To clear weakrefs, call :c:func:`PyObject_ClearWeakRefs`, as before. +* The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like + paths, like :class:`bytearray` and :class:`memoryview` types: only the exact + :class:`bytes` type is accepted for bytes strings. + (Contributed by Victor Stinner in :gh:`98393`.) + Deprecated ---------- |