Skip to content
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

pythonPackages.yappi: 1.2.5 -> 1.3.0 #101054

Merged
merged 1 commit into from Oct 24, 2020
Merged

pythonPackages.yappi: 1.2.5 -> 1.3.0 #101054

merged 1 commit into from Oct 24, 2020

Conversation

@JamieMagee
Copy link
Member

@JamieMagee JamieMagee commented Oct 19, 2020

Motivation for this change

ZHF 20.09 #97479

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
checkInputs = [ nose ];
checkInputs = [ gevent ];
checkPhase = ''
${python}/bin/python run_tests.py
Copy link
Contributor

@jonringer jonringer Oct 19, 2020

to support alternate python implementations

Suggested change
${python}/bin/python run_tests.py
${python.interpreter} run_tests.py

@risicle
Copy link
Contributor

@risicle risicle commented Oct 19, 2020

Fails for me on macos 10.14

======================================================================
FAIL: test_filter_callback (test_functionality.BasicUsage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_functionality.py", line 198, in test_filter_callback
    self.assert_traces_almost_equal(r1, stats)
  File "tests/utils.py", line 56, in assert_traces_almost_equal
    self.assert_almost_equal(ttot_orig, t.ttot, err_msg=tline)
  File "tests/utils.py", line 87, in assert_almost_equal
    neg_threshold, y, pos_threshold, err_msg
AssertionError: 0.16028 <= 0.343271 <= 0.28049 is not True. [tests/test_functionality.py:98 a      2      0.000000  0.200350  0.100175]

======================================================================
FAIL: test_tagging_walltime (test_tags.MultiThreadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_tags.py", line 50, in test_tagging_walltime
    self.assert_traces_almost_equal(t1, traces)
  File "tests/utils.py", line 56, in assert_traces_almost_equal
    self.assert_almost_equal(ttot_orig, t.ttot, err_msg=tline)
  File "tests/utils.py", line 87, in assert_almost_equal
    neg_threshold, y, pos_threshold, err_msg
AssertionError: 1.6032471999999998 <= 3.277530999999999 <= 2.8056826 is not True. [..p/yappi/tests/utils.py:134 burn_io  20     0.000638  2.004059  0.100203]

======================================================================
FAIL: test_simple_tagging (test_tags.SingleThreadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_tags.py", line 169, in test_simple_tagging
    self.assert_traces_almost_equal(t1, traces)
  File "tests/utils.py", line 56, in assert_traces_almost_equal
    self.assert_almost_equal(ttot_orig, t.ttot, err_msg=tline)
  File "tests/utils.py", line 87, in assert_almost_equal
    neg_threshold, y, pos_threshold, err_msg
AssertionError: 0.1665168 <= 0.33278699999999994 <= 0.2914044 is not True. [..p/yappi/tests/utils.py:134 burn_io  2      0.000000  0.208146  0.104073]

======================================================================
FAIL: test_basic_old_style (test_gevent.SingleThreadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_gevent.py", line 208, in test_basic_old_style
    self.assert_traces_almost_equal(r1, stats)
  File "tests/utils.py", line 56, in assert_traces_almost_equal
    self.assert_almost_equal(ttot_orig, t.ttot, err_msg=tline)
  File "tests/utils.py", line 87, in assert_almost_equal
    neg_threshold, y, pos_threshold, err_msg
AssertionError: 1.2832392000000001 <= 2.327836 <= 2.2456686 is not True. [..p/yappi/tests/test_asyncio.py:43 a  2      0.000118  1.604049  0.802024]

======================================================================
FAIL: test_basic_old_style (test_asyncio.SingleThreadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_asyncio.py", line 65, in test_basic_old_style
    self.assert_traces_almost_equal(r1, stats)
  File "tests/utils.py", line 56, in assert_traces_almost_equal
    self.assert_almost_equal(ttot_orig, t.ttot, err_msg=tline)
  File "tests/utils.py", line 87, in assert_almost_equal
    neg_threshold, y, pos_threshold, err_msg
AssertionError: 1.2832392000000001 <= 2.295179 <= 2.2456686 is not True. [..p/yappi/tests/test_asyncio.py:43 a  2      0.000118  1.604049  0.802024]

----------------------------------------------------------------------
Ran 97 tests in 41.206s

FAILED (failures=5, skipped=3)

This looks like another timing based test, which are notoriously flakey.

Wonder if we could find a sneaky way to disable the timing checks without disabling the surrounding tests.

@sumerc
Copy link

@sumerc sumerc commented Oct 19, 2020

I will be trying to reproduce the error. However in the meantime: assert almost equal function accepts a err rate param which can be changed which I feel can be useful in your situation.

Copy link
Contributor

@jonringer jonringer left a comment

LGTM

Result of nixpkgs-review pr 101054 1

2 packages built:
  • python37Packages.yappi
  • python38Packages.yappi

Copy link
Contributor

@jonringer jonringer left a comment

LGTM

Result of nixpkgs-review pr 101054 1

2 packages built:
  • python37Packages.yappi
  • python38Packages.yappi

@jonringer jonringer merged commit ce89dd6 into NixOS:master Oct 24, 2020
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants