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 — formatfloat wrong return in unicode_format.c · Issue #151845 · python/cpython

formatfloat wrong return in unicode_format.c #151845

New issue
Copy link
New issue
Copy link
Closed
Closed
formatfloat wrong return in unicode_format.c#151845
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@aisk
aisk
opened on Jun 21, 2026
Issue body actions

Bug report

Bug description:

Original gist: https://gist.github.com/devdanzin/577421b083bad6802aa391b909d1a725

formatfloat (line 163): Returns 0 (success) when _PyUnicode_FromASCII fails. Caller has safety net, but violates return-value contract.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

  • gh-151845: Fix formatfloat() return-value contract in unicode_format.c #151846
  • [3.15] gh-151845: Fix formatfloat() return-value contract in unicode_format.c (GH-151846) #151865

Activity

  1. aisk
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 21, 2026
  2. aisk
    added a parent issue on Jun 21, 2026
    • Umbrella issue: bugs found using cpython-review-toolkit #146102
  3. aisk
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Jun 21, 2026
  4. sobolevn
    added 2 commits that reference this issue on Jun 21, 2026

    gh-151845: Fix formatfloat() return-value contract in unicode_format.c (

    c2661e6

    [3.15] gh-151845: Fix formatfloat() return-value contract in unicode_…

    f5119a5
  5. StanFromIreland
    closed this as completedon Jun 21, 2026
  6. pyctrl
    added a commit that references this issue on Jul 5, 2026

    pythongh-151845: Fix formatfloat() return-value contract in unicode_f…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    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.