Skip to content

Suppress typeguard warnings that affect testing. - #6751

Merged
sklam merged 4 commits into
numba:masterfrom
sklam:misc/typeguardci
Feb 24, 2021
Merged

sklam merged 4 commits into
numba:masterfrom
sklam:misc/typeguardci

Conversation

@sklam

@sklam sklam commented Feb 23, 2021

Copy link
Copy Markdown
Member

New typeguard 2.11.1 is released and there're new warnings raised for everything time it finds something that is not annotated. We need to suppress these warnings for tests that checks on warnings to pass.

New typeguard 2.11.1 is released and there're new warnings raised for everything time it finds something that is not annotated. We need to suppress these warnings for tests that checks on warnings to pass.
@esc

esc commented Feb 24, 2021

Copy link
Copy Markdown
Member

Seems like there is only a single issue with the test suite now:

======================================================================
FAIL: test_loop_lift_warn (numba.tests.test_warnings.TestBuiltins)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vsts/work/1/s/numba/tests/test_warnings.py", line 116, in test_loop_lift_warn
    self.assertEqual(len(w), 4, msg=msg)
AssertionError: 6 != 4 : ----------

Compilation is falling back to object mode WITH looplifting enabled because Function "do_loop" failed type inference due to: Cannot infer the type of variable 'a', have imprecise type: DictType[undefined,undefined]<iv={}>. 

File "numba/tests/test_warnings.py", line 103:
        def do_loop(x):
            a = {} # noqa dead
            ^

----------

Compilation is falling back to object mode WITHOUT looplifting enabled because Function "do_loop" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "numba/tests/test_warnings.py", line 104:
        def do_loop(x):
            <source elided>
            a = {} # noqa dead
            for i in range(x.shape[0]):
            ^

----------
Function "do_loop" was compiled in object mode without forceobj=True, but has lifted loops.

@esc esc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM -- it passed!

@esc esc added 5 - Ready to merge Review and testing done, is ready to merge and removed 3 - Ready for Review labels Feb 24, 2021
@esc esc mentioned this pull request Feb 24, 2021
@sklam
sklam merged commit ab1f6f7 into numba:master Feb 24, 2021
@sklam
sklam deleted the misc/typeguardci branch February 24, 2021 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to merge Review and testing done, is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants