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 — gh-130317: fix test_pack_unpack_roundtrip() and add docs by skirpichev · Pull Request #133204 · python/cpython

Conversation

@skirpichev

@skirpichev skirpichev commented Apr 30, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • skip sNaN's testing in 32-bit mode
  • drop float_set_snan() helper
  • use memcpy() workaround for sNaN's in PyFloat_Unpack4()
  • document, that sNaN's may not be preserved by PyFloat_Pack/Unpack API
  • Issue: struct (un)packing of half-precision nan floats is non-invertible #130317

📚 Documentation preview 📚: https://cpython-previews--133204.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@skirpichev
pythongh-130317: fix test_pack_unpack_roundtrip() and add docs
b474ecf
* skip sNaN's testing in 32-bit mode
* drop float_set_snan() helper
* use memcpy() workaround for sNaN's in PyFloat_Unpack4()
* document, that sNaN's may not be preserved by PyFloat_Pack/Unpack API
@skirpichev skirpichev added the skip news label Apr 30, 2025
@skirpichev
skirpichev requested a review from vstinner April 30, 2025 11:53
@bedevere-app bedevere-app Bot added the awaiting review label Apr 30, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Apr 30, 2025
struct (un)packing of half-precision nan floats is non-invertible #130317
Closed
@vstinner

This comment was marked as resolved.

Sign in to view
@skirpichev
+1
ceff73a
@vstinner

vstinner commented Apr 30, 2025

Copy link
Copy Markdown
Member

!buildbot x86 Debian

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Apr 30, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @vstinner for commit ceff73a 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133204%2Fmerge

The command will test the builders whose names match following regular expression: x86 Debian

The builders matched are:

  • x86 Debian Non-Debug with X PR
  • x86 Debian Installed with X PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner merged commit ad2f088 into python:main May 1, 2025
@bedevere-app bedevere-app Bot removed the awaiting review label May 1, 2025
@skirpichev
skirpichev deleted the pack-unpack-snan/130317 branch May 1, 2025 14:34
@bedevere-bot

bedevere-bot commented May 1, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 RHEL8 LTO 3.x (tier-1) has failed when building commit ad2f088.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/64/builds/9303) and take a look at the build logs.
  4. Check if the failure is related to this commit (ad2f088) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/64/builds/9303

Failed tests:

  • test_frame

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 13, done.        
remote: Counting objects:   8% (1/12)        
remote: Counting objects:  16% (2/12)        
remote: Counting objects:  25% (3/12)        
remote: Counting objects:  33% (4/12)        
remote: Counting objects:  41% (5/12)        
remote: Counting objects:  50% (6/12)        
remote: Counting objects:  58% (7/12)        
remote: Counting objects:  66% (8/12)        
remote: Counting objects:  75% (9/12)        
remote: Counting objects:  83% (10/12)        
remote: Counting objects:  91% (11/12)        
remote: Counting objects: 100% (12/12)        
remote: Counting objects: 100% (12/12), done.        
remote: Compressing objects:  20% (1/5)        
remote: Compressing objects:  40% (2/5)        
remote: Compressing objects:  60% (3/5)        
remote: Compressing objects:  80% (4/5)        
remote: Compressing objects: 100% (5/5)        
remote: Compressing objects: 100% (5/5), done.        
remote: Total 13 (delta 7), reused 7 (delta 7), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to 'ad2f0884b16e6af4087ba078d2255d4c81ae8e96'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at ad2f0884b16 gh-130317: Fix test_pack_unpack_roundtrip() and add docs (#133204)
Switched to and reset branch 'main'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2453: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request May 5, 2025
gh-130317: fix PyFloat_Pack/Unpack[24] for NaN's with payload #130452
Merged
This was referenced Nov 7, 2025
superseded mattwang44/cpython#1
Closed
Update NaNs handling description in c-api/float.rst #141179
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner Awaiting requested review from vstinner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@skirpichev @vstinner @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.