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 — bpo-43475: Fix the Python implementation of hash of Decimal NaN by serhiy-storchaka · Pull Request #26679 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 11, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

https://bugs.python.org/issue43475

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
bpo-43475: Fix the Python implementation of hash of Decimal NaN
943d8c6
@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error skip news labels Jun 11, 2021
@serhiy-storchaka
serhiy-storchaka requested a review from rhettinger June 11, 2021 18:22
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jun 11, 2021
@bedevere-bot bedevere-bot added the awaiting core review label Jun 11, 2021
serhiy-storchaka
serhiy-storchaka commented Jun 11, 2021
View reviewed changes
Comment thread Lib/test/test_decimal.py
self.assertEqual(hashit(value), hashit(int(value)))

#the same hash that to an int
self.assertEqual(hashit(Decimal(23)), hashit(23))

@serhiy-storchaka serhiy-storchaka Jun 11, 2021

Copy link
Copy Markdown
Member Author

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.

Covered by tests above.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/test/test_decimal.py
Comment on lines -1822 to -1823
self.assertTrue(hashit(Decimal('Inf')))
self.assertTrue(hashit(Decimal('-Inf')))

@serhiy-storchaka serhiy-storchaka Jun 11, 2021

Copy link
Copy Markdown
Member Author

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.

Covered by tests below.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/test/test_decimal.py

#the same hash that to an int
self.assertEqual(hashit(Decimal(23)), hashit(23))
self.assertRaises(TypeError, hash, Decimal('sNaN'))

@serhiy-storchaka serhiy-storchaka Jun 11, 2021

Copy link
Copy Markdown
Member Author

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.

Moved to test_hash_method_nan.

Sorry, something went wrong.

Uh oh!

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

All reactions
mdickinson
mdickinson approved these changes Jun 12, 2021
View reviewed changes

@mdickinson mdickinson 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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jun 12, 2021
@serhiy-storchaka
serhiy-storchaka merged commit 9f1c5f6 into python:main Jun 12, 2021
@bedevere-bot bedevere-bot removed the awaiting merge label Jun 12, 2021
@serhiy-storchaka
serhiy-storchaka deleted the hash-nan branch June 12, 2021 12:15
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.10 label Jun 13, 2021
@miss-islington

miss-islington commented Jun 13, 2021

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Jun 13, 2021

Copy link
Copy Markdown

GH-26706 is a backport of this pull request to the 3.10 branch.

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.10 label Jun 13, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 13, 2021
@serhiy-storchaka @miss-islington
bpo-43475: Fix the Python implementation of hash of Decimal NaN (pyth…
ed58970
…onGH-26679)

(cherry picked from commit 9f1c5f6)

Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington added a commit that referenced this pull request Jun 13, 2021
@miss-islington @serhiy-storchaka
bpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-2…
128899d
…6679)

(cherry picked from commit 9f1c5f6)

Co-authored-by: Serhiy Storchaka <[email protected]>
jdevries3133 pushed a commit to jdevries3133/cpython that referenced this pull request Jun 19, 2021
@serhiy-storchaka @jdevries3133
bpo-43475: Fix the Python implementation of hash of Decimal NaN (pyth…
29584b7
…onGH-26679)
@pablogsal pablogsal mentioned this pull request Jul 18, 2021
[3.10] Correct the order of regen-abidump #27228
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rhettinger rhettinger Awaiting requested review from rhettinger
1 more reviewer
@mdickinson mdickinson mdickinson approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

skip news type-bug An unexpected behavior, bug, or error

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

@serhiy-storchaka @miss-islington @bedevere-bot @mdickinson @the-knights-who-say-ni
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.