GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — gh-116738: Make cmath module thread-safe by yoney · Pull Request #142161 · python/cpython Conversation
|
|
Thank you for the review, Sam!
Yes, I agree, this is related to subinterpreters. I was mainly checking the module for ft-python, which is why I created the PR under gh-116738 to mark it checked. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but could you double check and verify that all functions include tests for all combinations of special values? I.e. when one component is a zero, infinity or nan, same other (or is a finite nonzero number, if the first is nonzero).
Tests are here: Lib/test/mathdata/cmath_testcases.txt (usually in a dedicated section, like "special values").
#!/bin/sh # a.sh file=Lib/test/mathdata/cmath_testcases.txt funcs="acos acosh asinh atanh cosh exp log sinh sqrt tanh rect" zeros="0.0 -0.0" nonfinite="-inf nan inf" all="$zeros $nonfinite [1-9]\.[0-9].* -[1-9]\.[0-9].*" for f in $funcs do for t1 in $zeros do for t2 in $zeros $nonfinite do re=" $f $t1 $t2 -> " grep -q "$re" $file || echo "$f $t1 $t2 - missing" re=" $f $t2 $t1 -> " grep -q "$re" $file || echo "$f $t2 $t1 - missing" done done for t1 in $nonfinite do for t2 in $all do re=" $f $t1 $t2 -> " grep -q "$re" $file || echo "$f $t1 $t2 - missing!" re=" $f $t2 $t1 -> " grep -q "$re" $file || echo "$f $t2 $t1 - missing!" done done done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I've checked that special values are tested, though appreciate a second look. Please adjust PR description (an maybe title).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thank you so much, @skirpichev I’ve checked them as well and they look good to me. I am just sharing how I verified this locally, since it’s easy to accidentally copy-paste something incorrectly and not notice it: I compared the statically initialized version with the previous version before deleting the old tables from the code. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @colesbury for commit 64254ba 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F142161%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Buildbot failures are unrelated |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @yoney for the PR, and @colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ule (pythongh-142161) The initialization during `mod_exec` wasn't thread-safe with multiple interpreters. (cherry picked from commit 2dac9e6) Co-authored-by: Alper <[email protected]>
|
GH-142261 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…dule (gh-142161) (gh-142261) The initialization during `mod_exec` wasn't thread-safe with multiple interpreters. (cherry picked from commit 2dac9e6) Co-authored-by: Alper <[email protected]>
…ule (pythongh-142161) The initialization during `mod_exec` wasn't thread-safe with multiple interpreters.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.