GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — More strict format checks in PyUnicode_FromFormat() · Issue #95781 · python/cpython

More strict format checks in PyUnicode_FromFormat() #95781

New issue
Copy link
New issue
Copy link
Closed
Closed
More strict format checks in PyUnicode_FromFormat()#95781
Copy link
Assignees
serhiy-storchaka
Labels
topic-C-APItype-featureA feature request or enhancementA feature request or enhancement

Description

@serhiy-storchaka
serhiy-storchaka
opened on Aug 8, 2022
Issue body actions

PyUnicode_FromFormat() is loose in checking for errors in the format string. If it encounter an invalid format specifier, it silently outputs the rest of the format string. And it allows digits between %s: "%123%" is interpreted the same as "%%", i.e. as literal %.

It was not a big problem, because it is expected that the user of the C API do not make mistakes in the format string, and incorrect format string can easily lead to crash. But id did not help either.

Recently it was discussed on Discuss: https://discuss.python.org/t/pyunicode-fromformat-allow-format-with-precision/17873.

Activity

  1. serhiy-storchaka
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Aug 8, 2022
  2. serhiy-storchaka
    self-assigned this
    on Aug 8, 2022
  3. serhiy-storchaka
    added
    topic-C-API
    on Aug 8, 2022
  4. serhiy-storchaka
    added 2 commits that reference this issue on Aug 8, 2022

    pythongh-95781: More strict format string checking in PyUnicode_FromF…

    a48f1dd

    pythongh-95781: More strict format string checking in PyUnicode_FromF…

    88d548f
  5. serhiy-storchaka
    closed this as completedon Aug 8, 2022
  6. serhiy-storchaka
    added a commit that references this issue on Aug 8, 2022

    gh-95781: More strict format string checking in PyUnicode_FromFormatV…

    62f0650
  7. iritkatriel
    added a commit that references this issue on Aug 11, 2022

    pythongh-95781: More strict format string checking in PyUnicode_FromF…

    a77c7c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @serhiy-storchaka
    serhiy-storchaka

Labels

topic-C-APItype-featureA feature request or enhancementA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.