-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix precise_xstrtod segfault on long exponent #38789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# GH#38753 | ||
parser = all_parsers | ||
data = f"data\n10E{neg_exp}" | ||
for precision in parser.float_precision_choices: |
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.
you can parameterize on these too
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.
Issue I ran into is that the parsers don't have consistent potential float_precisions
, eg PythonParser
only has None
. Could parameterize and just assert failure on disallowed combinations of float_precision
and parser
, but that seems ugly. Will try to think of a better solution.
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.
Some kind of fixture-within-a-fixture functionality would be nice, though not sure if that's feasible...
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.
Added a new fixture, all_parsers_all_precisions
. Not the most elegant solution, essentially just precomputes all allowed combos and uses that as the source for the fixture. If you have a better idea please let me know!
# GH#38753 | ||
parser = all_parsers | ||
data = f"data\n10E{exp}" | ||
for precision in parser.float_precision_choices: |
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.
same
cc @gfyoung |
|
if precision == "round_trip": | ||
if exp == 999999999999999999 and is_platform_linux(): | ||
mark = pytest.mark.xfail(reason="On Linux gives object result") | ||
request.node.add_marker(mark) |
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.
This discrepancy is unrelated, occurs on master, have opened #38794 for it
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.
kk can you put the issue number in the xfail itself.
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.
small comment, ping on green.
if precision == "round_trip": | ||
if exp == 999999999999999999 and is_platform_linux(): | ||
mark = pytest.mark.xfail(reason="On Linux gives object result") | ||
request.node.add_marker(mark) |
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.
kk can you put the issue number in the xfail itself.
thanks @mzeitlin11 very nice, keep em coming! |
@meeseeksdev backport 1.2.x |
#38828) Co-authored-by: mzeitlin11 <[email protected]>
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
@snowman2 can you check if this branch returns behavior to what you had before 1.2?