◐ Shell
clean mode source ↗

gh-104018: disallow "z" format specifier in %-format of byte strings by belm0 · Pull Request #104033 · python/cpython

…rings

PEP-0682 specified that %-formatting would not support the "z"
specifier, but it was unintentionally allowed for a byte strings.

Issue: python#104018

@blurb-it

mdickinson

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 1, 2023
…rings (pythonGH-104033)

PEP-0682 specified that %-formatting would not support the "z" specifier,
but it was unintentionally allowed for bytes. This PR makes use of the "z"
flag an error for %-formatting in a bytestring.

Issue: pythonGH-104018

---------

(cherry picked from commit 3ed8c88)

Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>

mdickinson pushed a commit that referenced this pull request

May 1, 2023
…trings (GH-104033) (#104058)

gh-104018: disallow "z" format specifier in %-format of byte strings (GH-104033)

PEP-0682 specified that %-formatting would not support the "z" specifier,
but it was unintentionally allowed for bytes. This PR makes use of the "z"
flag an error for %-formatting in a bytestring.

Issue: GH-104018

---------

(cherry picked from commit 3ed8c88)

Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>

carljm added a commit to carljm/cpython that referenced this pull request

May 1, 2023

belm0 added a commit to belm0/cpython that referenced this pull request

May 2, 2023

@belm0 belm0 mentioned this pull request

May 2, 2023

@belm0 belm0 deleted the z_format_bytes branch

May 2, 2023 22:04

belm0 added a commit to belm0/cpython that referenced this pull request

May 2, 2023
…oat()

This is a cleanup overlooked in PR python#104033.

Please skip NEWS.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 7, 2023

jbower-fb pushed a commit to jbower-fb/cpython that referenced this pull request

May 8, 2023