Skip to content

Test regression with pypy3.9: test_overload_on_compiled_functions #83

Description

@mgorny
$ pypy3 --version
Python 3.9.12 (05fbe3aa5b0845e6c37239768aa455451aa5faba, Sep 05 2022, 05:41:51)
[PyPy 7.3.9 with GCC 12.2.1 20220903]
$ tox -e pypy3
pypy3 inst-nodeps: /tmp/typing_extensions/.tox/.tmp/package/1/typing_extensions-4.4.0.tar.gz
pypy3 installed: cffi==1.15.0,greenlet==0.4.13,hpy==0.0.3,readline==6.2.4.1,typing_extensions @ file:///tmp/typing_extensions/.tox/.tmp/package/1/typing_extensions-4.4.0.tar.gz
pypy3 run-test-pre: PYTHONHASHSEED='150667971'
pypy3 run-test: commands[0] | python -m unittest discover
..................s...........................................................................................s.s..s...............................F.................................................Runtime type is 'object'
......................................................s.........
======================================================================
FAIL: test_overload_on_compiled_functions (test_typing_extensions.OverloadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pypy3.9/unittest/mock.py", line 1336, in patched
    return func(*newargs, **newkeywargs)
  File "/tmp/typing_extensions/src/test_typing_extensions.py", line 526, in test_overload_on_compiled_functions
    self.assertEqual(get_overloads(sum), [])
AssertionError: Lists differ: [<built-in function sum>] != []

First list contains 1 additional elements.
First extra element 0:
<built-in function sum>

- [<built-in function sum>]
+ []

----------------------------------------------------------------------
Ran 261 tests in 0.253s

FAILED (failures=1, skipped=5)
ERROR: InvocationError for command /tmp/typing_extensions/.tox/pypy3/bin/python -m unittest discover (exited with code 1)
_______________________________________________________________ summary _______________________________________________________________
ERROR:   pypy3: commands failed

Activity

  1. added a commit that references this issue on Oct 7, 2022
  2. srittau commented on Oct 7, 2022

    @srittau
    Collaborator

    One preliminary note: As the implementation of overload matches the implementation of overload in Python 3.11, pypy would also fail with the typing.py module from there.

  3. srittau commented on Oct 7, 2022

    @srittau
    Collaborator

    The problem is that sum() and print() are not compiled functions in pypy. The test in question checks whether @overload is skipped for those, so it can't work. #84 just skips this tests when running pypy.

  4. mgorny commented on Oct 7, 2022

    @mgorny
    Author

    Thanks. This makes sense to me.

  5. added a commit that references this issue on Oct 7, 2022
    3a54ef1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions