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-94808: Cover handling non-finite numbers from round when ndigits is provided by mdboom · Pull Request #94860 · python/cpython

Conversation

@mdboom

@mdboom mdboom commented Jul 14, 2022 •
edited by miss-islington
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

This is an interesting corner case.

By default round returns int which can't represent non-finite numbers, so it throws various exceptions.

When ndigits is provided, round returns float, so non-finite numbers can be represented, and they just return what was passed in.

  • Issue: Metabug: Improving C-level coverage #94808

Automerge-Triggered-By: GH:brandtbucher

Sorry, something went wrong.

Uh oh!

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

All reactions
@mdboom
pythongh-94808: Cover handling non-finite numbers from round when ndi…
3cd7327
…gits is provided
@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting review labels Jul 14, 2022
@mdboom mdboom mentioned this pull request Jul 14, 2022
Metabug: Improving C-level coverage #94808
Open
@kumaraditya303 kumaraditya303 added the skip news label Jul 14, 2022
@brandtbucher brandtbucher added the 🤖 automerge label Jul 14, 2022
brandtbucher
brandtbucher approved these changes Jul 14, 2022
View reviewed changes

@brandtbucher brandtbucher left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting indeed!

Sorry, something went wrong.

Uh oh!

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

All reactions
@brandtbucher brandtbucher added awaiting merge and removed awaiting review labels Jul 14, 2022
@brandtbucher
brandtbucher merged commit 625ba9b into python:main Jul 14, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Jul 14, 2022
@brandtbucher brandtbucher added needs backport to 3.11 only security fixes and removed 🤖 automerge labels Jul 14, 2022
@miss-islington

miss-islington commented Jul 15, 2022

Copy link
Copy Markdown
Contributor

Thanks @mdboom for the PR, and @brandtbucher for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 15, 2022
@bedevere-bot

bedevere-bot commented Jul 15, 2022

Copy link
Copy Markdown

GH-94882 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 15, 2022
@mdboom @miss-islington
pythonGH-94808: Cover handling non-finite numbers from round when ndi…
4d0c077
…gits is provided (pythonGH-94860)

(cherry picked from commit 625ba9b)

Co-authored-by: Michael Droettboom <[email protected]>
miss-islington added a commit that referenced this pull request Jul 15, 2022
@miss-islington
[3.11] GH-94808: Cover handling non-finite numbers from round when nd…
e55f60d
…igits is provided (GH-94860) (GH-94882)

(cherry picked from commit 625ba9b)


Co-authored-by: Michael Droettboom <[email protected]>

Automerge-Triggered-By: GH:brandtbucher
@mdboom mdboom added the needs backport to 3.11 only security fixes label Aug 8, 2022
@miss-islington

miss-islington commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

Thanks @mdboom for the PR, and @brandtbucher for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington

miss-islington commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

Sorry, @mdboom and @brandtbucher, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 625ba9bdff51baddf9d5e156e5facf05fa1003d6 3.11

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned brandtbucher Aug 8, 2022
@mdboom mdboom removed the needs backport to 3.11 only security fixes label Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brandtbucher brandtbucher brandtbucher approved these changes

Uh oh!

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

Assignees

@brandtbucher brandtbucher

Labels

skip news tests Tests in the Lib/test dir

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.

5 participants

@mdboom @miss-islington @bedevere-bot @brandtbucher @kumaraditya303
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.