Skip to content

Remove pytest_plugin#10762

Draft
Dreamsorcerer wants to merge 237 commits intomasterfrom
drop-pytest-plugin
Draft

Remove pytest_plugin#10762
Dreamsorcerer wants to merge 237 commits intomasterfrom
drop-pytest-plugin

Conversation

@Dreamsorcerer
Copy link
Copy Markdown
Member

This will be maintained exclusively in pytest-aiohttp going forwards.

@Dreamsorcerer Dreamsorcerer added the backport:skip Skip backport bot label Apr 20, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4477 1 4476 75
View the top 1 failed test(s) by shortest run time
tests.test_benchmarks_client::test_one_hundred_simple_get_requests_no_session
Stack Traces | 0.402s run time
self = <ProactorEventLoop running=False closed=True debug=False>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mclose#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Close the event loop.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    This clears the queues and shuts down the executor,#x1B[39;49;00m
    #x1B[33m    but does not wait for the executor to finish.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    The event loop must not be running.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.is_running():#x1B[90m#x1B[39;49;00m
            #x1B[94mraise#x1B[39;49;00m #x1B[96mRuntimeError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot close a running event loop#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._closed:#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._debug:#x1B[90m#x1B[39;49;00m
            logger.debug(#x1B[33m"#x1B[39;49;00m#x1B[33mClose #x1B[39;49;00m#x1B[33m%r#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[96mself#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[96mself#x1B[39;49;00m._closed = #x1B[94mTrue#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       #x1B[96mself#x1B[39;49;00m._ready.clear()#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       ResourceWarning: unclosed <socket.socket fd=2784, family=2, type=1, proto=0>#x1B[0m

executor   = None
self       = <ProactorEventLoop running=False closed=True debug=False>

#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\asyncio\base_events.py#x1B[0m:716: ResourceWarning

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x00000233E3D256C0>
when = 'teardown'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    #x1B[0m#x1B[37m@classmethod#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mfrom_call#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        #x1B[96mcls#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        func: Callable[[], TResult],#x1B[90m#x1B[39;49;00m
        when: Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mcollect#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33msetup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcall#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mteardown#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        reraise: #x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m] | #x1B[96mtuple#x1B[39;49;00m[#x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m], ...] | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> CallInfo[TResult]:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Call func, wrapping the result in a CallInfo.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    :param func:#x1B[39;49;00m
    #x1B[33m        The function to call. Called without arguments.#x1B[39;49;00m
    #x1B[33m    :type func: Callable[[], _pytest.runner.TResult]#x1B[39;49;00m
    #x1B[33m    :param when:#x1B[39;49;00m
    #x1B[33m        The phase in which the function is called.#x1B[39;49;00m
    #x1B[33m    :param reraise:#x1B[39;49;00m
    #x1B[33m        Exception or exceptions that shall propagate if raised by the#x1B[39;49;00m
    #x1B[33m        function, instead of being wrapped in the CallInfo.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        excinfo = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        instant = timing.Instant()#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           result: TResult | #x1B[94mNone#x1B[39;49;00m = func()#x1B[90m#x1B[39;49;00m
                                     ^^^^^^#x1B[90m#x1B[39;49;00m

cls        = <class '_pytest.runner.CallInfo'>
duration   = Duration(start=Instant(time=1777911927.7851458, perf_count=892.5524179), stop=Instant(time=1777911927.8123562, perf_count=892.580509))
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=2784, family=2, type=1, proto...cated.\nSee https://docs.pytest..../stable/how-to/capture-warnings.html#resource-warnings for more info.') tblen=13>
func       = <function call_and_report.<locals>.<lambda> at 0x00000233E3D256C0>
instant    = Instant(time=1777911927.7851458, perf_count=892.5524179)
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
when       = 'teardown'

#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\runner.py#x1B[0m:353: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\runner.py#x1B[0m:245: in <lambda>
    #x1B[0m#x1B[94mlambda#x1B[39;49;00m: runtest_hook(item=item, **kwds),#x1B[90m#x1B[39;49;00m
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
        item       = <Function test_one_hundred_simple_get_requests_no_session>
        kwds       = {'nextitem': <Function test_one_hundred_simple_get_requests_multiple_methods_route>}
        runtest_hook = <HookCaller 'pytest_runtest_teardown'>
#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\pluggy\_hooks.py#x1B[0m:512: in __call__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._hookexec(#x1B[96mself#x1B[39;49;00m.name, #x1B[96mself#x1B[39;49;00m._hookimpls.copy(), kwargs, firstresult)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
        firstresult = False
        kwargs     = {'item': <Function test_one_hundred_simple_get_requests_no_session>, 'nextitem': <Function test_one_hundred_simple_get_requests_multiple_methods_route>}
        self       = <HookCaller 'pytest_runtest_teardown'>
#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\pluggy\_manager.py#x1B[0m:120: in _hookexec
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._inner_hookexec(hook_name, methods, kwargs, firstresult)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
        firstresult = False
        hook_name  = 'pytest_runtest_teardown'
        kwargs     = {'item': <Function test_one_hundred_simple_get_requests_no_session>, 'nextitem': <Function test_one_hundred_simple_get_requests_multiple_methods_route>}
        methods    = [<HookImpl plugin_name='threadexception', plugin=<module '_pytest.threadexception' from 'C:\\hostedtoolcache\\windows\...e=None>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x00000233E0BFAB40>>]
        self       = <_pytest.config.PytestPluginManager object at 0x00000233DBC17320>
#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\logging.py#x1B[0m:858: in pytest_runtest_teardown
    #x1B[0m#x1B[94myield#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        item       = <Function test_one_hundred_simple_get_requests_no_session>
        self       = <_pytest.logging.LoggingPlugin object at 0x00000233E0BFAB40>
#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\capture.py#x1B[0m:905: in pytest_runtest_teardown
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m (#x1B[94myield#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            ^^^^^#x1B[90m#x1B[39;49;00m
        item       = <Function test_one_hundred_simple_get_requests_no_session>
        self       = <CaptureManager _method='fd' _global_capturing=<MultiCapture out=<FDCapture 1 oldfd=6 _state='suspended' tmpfile=<_io...._io.TextIOWrapper name='nul' mode='r' encoding='utf-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>
#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\unraisableexception.py#x1B[0m:163: in pytest_runtest_teardown
    #x1B[0mcollect_unraisable(item.config)#x1B[90m#x1B[39;49;00m
        item       = <Function test_one_hundred_simple_get_requests_no_session>
#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\unraisableexception.py#x1B[0m:79: in collect_unraisable
    #x1B[0m#x1B[94mraise#x1B[39;49;00m errors[#x1B[94m0#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        config     = <_pytest.config.Config object at 0x00000233DCE1DDF0>
        msg        = 'Exception ignored in: <socket.socket fd=2784, family=2, type=1, proto=0>\n\nTraceback (most recent call last):\n  Fil...ct was allocated.\nSee https://docs.pytest..../stable/how-to/capture-warnings.html#resource-warnings for more info.'
        pop_unraisable = <built-in method pop of collections.deque object at 0x00000233E12EEB60>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

config = <_pytest.config.Config object at 0x00000233DCE1DDF0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mcollect_unraisable#x1B[39;49;00m(config: Config) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        pop_unraisable = config.stash[unraisable_exceptions].pop#x1B[90m#x1B[39;49;00m
        errors: #x1B[96mlist#x1B[39;49;00m[pytest.PytestUnraisableExceptionWarning | #x1B[96mRuntimeError#x1B[39;49;00m] = []#x1B[90m#x1B[39;49;00m
        meta = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        hook_error = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            #x1B[94mwhile#x1B[39;49;00m #x1B[94mTrue#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    meta = pop_unraisable()#x1B[90m#x1B[39;49;00m
                #x1B[94mexcept#x1B[39;49;00m #x1B[96mIndexError#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    #x1B[94mbreak#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(meta, #x1B[96mBaseException#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
                    hook_error = #x1B[96mRuntimeError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mFailed to process unraisable exception#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                    hook_error.__cause__ = meta#x1B[90m#x1B[39;49;00m
                    errors.append(hook_error)#x1B[90m#x1B[39;49;00m
                    #x1B[94mcontinue#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                msg = meta.msg#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>                   warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE                   pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=2784, family=2, type=1, proto=0>#x1B[0m
#x1B[1m#x1B[31mE                   Enable tracemalloc to get traceback where the object was allocated.#x1B[0m
#x1B[1m#x1B[31mE                   See https://docs.pytest..../stable/how-to/capture-warnings.html#resource-warnings for more info.#x1B[0m

config     = <_pytest.config.Config object at 0x00000233DCE1DDF0>
msg        = 'Exception ignored in: <socket.socket fd=2784, family=2, type=1, proto=0>\n\nTraceback (most recent call last):\n  Fil...ct was allocated.\nSee https://docs.pytest..../stable/how-to/capture-warnings.html#resource-warnings for more info.'
pop_unraisable = <built-in method pop of collections.deque object at 0x00000233E12EEB60>

#x1B[1m#x1B[31mC:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\unraisableexception.py#x1B[0m:67: PytestUnraisableExceptionWarning

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@webknjaz
Copy link
Copy Markdown
Member

Missing change log?

@Dreamsorcerer Dreamsorcerer marked this pull request as draft April 22, 2025 11:55
Comment thread tests/test_run_app.py Outdated
Comment thread tests/test_run_app.py Outdated
Comment thread tests/test_run_app.py Outdated
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Comment thread tests/test_proxy_functional.py Outdated
Comment thread tests/test_worker.py Outdated
Comment thread tests/test_worker.py Outdated
Comment thread tests/test_worker.py Outdated
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Comment thread tests/test_tracing.py Outdated
Comment thread tests/test_streams.py Outdated
Comment thread tests/test_web_websocket_functional.py Outdated
Comment thread tests/test_web_runner.py Outdated
Comment thread tests/test_web_server.py Outdated
Comment thread tests/test_client_request.py Outdated
Comment thread tests/test_client_functional.py Outdated
Comment thread tests/test_client_functional.py Outdated
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Comment thread tests/test_benchmarks_client.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip Skip backport bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants