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

Cannot run tests #104070

Closed
Eclips4 opened this issue May 1, 2023 · 5 comments
Closed

Cannot run tests #104070

Eclips4 opened this issue May 1, 2023 · 5 comments
Labels
pending The issue will be closed if no feedback is provided type-bug An unexpected behavior, bug, or error

Comments

@Eclips4
Copy link
Member

Eclips4 commented May 1, 2023

On current main, I got this:

 C:\Users\KIRILL-1\CLionProjects\cpython> ./python -m test -v test_typing
Running Debug|x64 interpreter...
== CPython 3.12.0a7+ (heads/issue-104057-dirty:d9931f6855, May 1 2023, 23:20:40) [MSC v.1933 64 bit (AMD64)]
== Windows-10-10.0.19043-SP0 little-endian
== Python build: debug
== cwd: C:\Users\KIRILL-1\CLionProjects\cpython\build\test_python_19412æ
== CPU count: 16
== encodings: locale=cp1251, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_typing
test test_typing crashed -- Traceback (most recent call last):
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\libregrtest\runtest.py", line 373, in _runtest_inner
    refleak = _runtest_inner2(ns, test_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\libregrtest\runtest.py", line 313, in _runtest_inner2
    the_module = importlib.import_module(abstest)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\importlib\__init__.py", line 124, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1332, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1305, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1276, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1027, in exec_module
  File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_typing.py", line 12, in <module>
    from unittest.mock import patch
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\unittest\mock.py", line 26, in <module>
    import asyncio
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\asyncio\__init__.py", line 8, in <module>
    from .base_events import *
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\asyncio\base_events.py", line 45, in <module>
    from . import staggered
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\asyncio\staggered.py", line 11, in <module>
    from . import tasks
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\asyncio\tasks.py", line 946, in <module>
    eager_task_factory = create_eager_task_factory(Task)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\asyncio\tasks.py", line 936, in create_eager_task_factory
    raise TypeError(
TypeError: Provided constructor does not support eager task execution

test_typing failed (uncaught exception)

== Tests result: FAILURE ==

1 test failed:
    test_typing

Total duration: 672 ms
Tests result: FAILURE
@Eclips4 Eclips4 added the type-bug An unexpected behavior, bug, or error label May 1, 2023
@JelleZijlstra
Copy link
Member

Probably from #102853, cc @itamaro.

@Eclips4
Copy link
Member Author

Eclips4 commented May 1, 2023

However.. I just rebuilt an interpreter and now tests are ok.
Please, add pending label until I find way to reproduce it =)

@JelleZijlstra
Copy link
Member

Might be related to whether the _asyncio accelerator module exists? Just guessing.

@AlexWaygood AlexWaygood added the pending The issue will be closed if no feedback is provided label May 1, 2023
@itamaro
Copy link
Contributor

itamaro commented May 1, 2023

my guess: if you pulled main without rebuilding the interpreter, you got an old Task type from the accelerator module mixed with new eager task factory from the tasks python module

@Eclips4
Copy link
Member Author

Eclips4 commented May 1, 2023

Yeah, @itamaro you're right!
Sorry for making noise

@Eclips4 Eclips4 closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending The issue will be closed if no feedback is provided type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants