GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-79940: add introspection API for asynchronous generators by tkren · Pull Request #11590 · python/cpython

Conversation

@tkren

@tkren tkren commented Jan 17, 2019 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The inspect module does not contain functions for determining the current state of asynchronous generators. That is, there is no introspection API for asynchronous generators that match the API for generators and coroutines: https://docs.python.org/3.8/library/inspect.html#current-state-of-generators-and-coroutines.

The functions inspect.getasyncgenstate and inspect.getasyncgenlocals allow to determine the current state of asynchronous generators and mirror the introspection API for generators and coroutines.

https://bugs.python.org/issue35759

https://bugs.python.org/issue35759

  • Issue: inspect module does not implement introspection API for asynchronous generators #79940

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jan 17, 2019
@bedevere-bot bedevere-bot added the awaiting review label Jan 17, 2019
@asvetlov
asvetlov requested a review from 1st1 May 3, 2019 15:12
auvipy
auvipy approved these changes Jun 1, 2019
View reviewed changes
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Jun 1, 2019
@tkren

tkren commented Jan 26, 2021

Copy link
Copy Markdown
Contributor Author

@1st1 This PR is open for some time now, is it still considered?

Also, it appears that the CI/CD pipeline got stuck, the Ubuntu & Windows status is in limbo

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tkren
tkren force-pushed the fix-issue-35759 branch from 221c2c8 to 37a7c35 Compare October 9, 2021 13:31
@tkren

tkren commented Oct 9, 2021

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto main and adapted docs and unit tests for Python 3.11

auvipy reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ezio-melotti ezio-melotti removed the CLA signed label Jul 13, 2022
@tkren tkren changed the title bpo-35759: add introspection API for asynchronous generators gh-79940: add introspection API for asynchronous generators Feb 26, 2023
@tkren
tkren force-pushed the fix-issue-35759 branch from 37a7c35 to cdedc91 Compare February 26, 2023 22:24
@tkren
tkren requested a review from markshannon as a code owner February 26, 2023 22:24
@tkren
inspect: add introspection API for asynchronous generators
bca9939
The functions inspect.getasyncgenstate and inspect.getasyncgenlocals
allow to determine the current state of asynchronous generators and
mirror the introspection API for generators and coroutines.
@tkren
tkren force-pushed the fix-issue-35759 branch from cdedc91 to bca9939 Compare February 26, 2023 22:32
@tkren

tkren commented Feb 26, 2023

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto main and adapted docs and unit tests for Python 3.12

Following additional changes:

  • added ag_suspended property (following bpo-46409: Make generators in bytecode #30633)
  • use inspect module does not implement introspection API for asynchronous generators #79940 instead of bpo-35759
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tkren tkren mannequin mentioned this pull request Mar 5, 2023
inspect module does not implement introspection API for asynchronous generators #79940
Closed
@kumaraditya303 kumaraditya303 added the topic-asyncio label Mar 5, 2023
@kumaraditya303
kumaraditya303 self-requested a review March 5, 2023 17:22
kumaraditya303
kumaraditya303 reviewed Mar 10, 2023
View reviewed changes
Comment thread Lib/inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

kumaraditya303
kumaraditya303 reviewed Mar 10, 2023
View reviewed changes
Comment thread Lib/test/test_inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

tkren added 2 commits March 10, 2023 10:54
@tkren
inspect: use f-string in getasyncgenlocals()
093595a
@tkren
inspect: use anext() built-in in TestGetAsyncGenState
1931c0b
@tkren
tkren requested review from kumaraditya303 and removed request for 1st1 and markshannon March 10, 2023 17:02
kumaraditya303
kumaraditya303 reviewed Mar 11, 2023
View reviewed changes
Comment thread Lib/test/test_inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

kumaraditya303
kumaraditya303 reviewed Mar 11, 2023
View reviewed changes
Comment thread Lib/test/test_inspect.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

kumaraditya303
kumaraditya303 reviewed Mar 11, 2023
View reviewed changes
Comment thread Doc/library/inspect.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303 kumaraditya303 self-assigned this Mar 11, 2023
@kumaraditya303 kumaraditya303 added type-feature A feature request or enhancement 3.12 only security fixes labels Mar 11, 2023
tkren added 2 commits March 11, 2023 06:08
@tkren
whatsnew: add an entry for inspect
771f95e
@tkren
inspect: use IsolatedAsyncioTestCase for TestGetAsyncGenState
ac46ef8
@tkren

tkren commented Mar 11, 2023

Copy link
Copy Markdown
Contributor Author

Adapting whatsnew entry, Docs run fails with

Error: /home/runner/work/cpython/cpython/Doc/whatsnew/3.12.rst:247: ERROR: The GitHub ID '11590' seems too low -- use :issue:`...` for BPO IDs
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tkren
whatsnew: use bpo issue instead of github id
5302f23
@tkren
tkren requested a review from kumaraditya303 March 11, 2023 13:16
kumaraditya303
kumaraditya303 approved these changes Mar 11, 2023
View reviewed changes

@kumaraditya303 kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM, thanks for working on this!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tkren reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Mar 11, 2023
@kumaraditya303
kumaraditya303 merged commit ced13c9 into python:main Mar 11, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Mar 11, 2023
@bedevere-bot

bedevere-bot commented Mar 11, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot wasm32-emscripten node (dynamic linking) 3.x has failed when building commit ced13c9.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1056/builds/1507) and take a look at the build logs.
  4. Check if the failure is related to this commit (ced13c9) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1056/builds/1507

Failed tests:

  • test_inspect

Summary of the results of the build (if available):

== Tests result: FAILURE ==

334 tests OK.

10 slowest tests:

  • test_compile: 9 min 53 sec
  • test_math: 1 min 59 sec
  • test_tokenize: 59.0 sec
  • test_hashlib: 40.3 sec
  • test_unparse: 37.0 sec
  • test_lib2to3: 34.0 sec
  • test_capi: 29.9 sec
  • test_argparse: 27.9 sec
  • test_unicodedata: 25.0 sec
  • test_pickle: 20.7 sec

1 test failed:
test_inspect

99 tests skipped:
test__xxinterpchannels test__xxsubinterpreters test_asyncgen
test_asyncio test_check_c_globals test_clinic test_cmd_line
test_concurrent_futures test_contextlib_async test_ctypes
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_doctest
test_docxmlrpc test_dtrace test_embed test_epoll test_faulthandler
test_fcntl test_file_eintr test_fork1 test_ftplib test_gdb
test_grp test_httplib test_httpservers test_idle test_imaplib
test_interpreters test_ioctl test_kqueue test_launcher test_lzma
test_mmap test_msilib test_multiprocessing_fork
test_multiprocessing_forkserver test_multiprocessing_main_handling
test_multiprocessing_spawn test_nis test_openpty test_ossaudiodev
test_pdb test_peg_generator test_perf_profiler test_poll
test_poplib test_pty test_pwd test_queue test_readline
test_regrtest test_repl test_resource test_select test_selectors
test_smtplib test_smtpnet test_socket test_socketserver test_spwd
test_ssl test_stable_abi_ctypes test_startfile test_subprocess
test_sys_settrace test_syslog test_tcl test_telnetlib test_thread
test_threadedtempfile test_threading test_threading_local test_tix
test_tkinter test_tools test_ttk test_ttk_textonly test_turtle
test_urllib2 test_urllib2_localnet test_urllib2net test_urllibnet
test_venv test_wait3 test_wait4 test_webbrowser test_winconsoleio
test_winreg test_winsound test_wmi test_wsgiref test_xmlrpc
test_xmlrpc_net test_zipfile64 test_zipimport_support
test_zoneinfo
0:26:38 load avg: 6.74
0:26:38 load avg: 6.74 Re-running failed tests is not supported with --python host runner option.

Total duration: 26 min 38 sec

Click to see traceback logs
remote: Enumerating objects: 18, done.        
remote: Counting objects:   5% (1/17)        
remote: Counting objects:  11% (2/17)        
remote: Counting objects:  17% (3/17)        
remote: Counting objects:  23% (4/17)        
remote: Counting objects:  29% (5/17)        
remote: Counting objects:  35% (6/17)        
remote: Counting objects:  41% (7/17)        
remote: Counting objects:  47% (8/17)        
remote: Counting objects:  52% (9/17)        
remote: Counting objects:  58% (10/17)        
remote: Counting objects:  64% (11/17)        
remote: Counting objects:  70% (12/17)        
remote: Counting objects:  76% (13/17)        
remote: Counting objects:  82% (14/17)        
remote: Counting objects:  88% (15/17)        
remote: Counting objects:  94% (16/17)        
remote: Counting objects: 100% (17/17)        
remote: Counting objects: 100% (17/17), done.        
remote: Compressing objects:   7% (1/14)        
remote: Compressing objects:  14% (2/14)        
remote: Compressing objects:  21% (3/14)        
remote: Compressing objects:  28% (4/14)        
remote: Compressing objects:  35% (5/14)        
remote: Compressing objects:  42% (6/14)        
remote: Compressing objects:  50% (7/14)        
remote: Compressing objects:  57% (8/14)        
remote: Compressing objects:  64% (9/14)        
remote: Compressing objects:  71% (10/14)        
remote: Compressing objects:  78% (11/14)        
remote: Compressing objects:  85% (12/14)        
remote: Compressing objects:  92% (13/14)        
remote: Compressing objects: 100% (14/14)        
remote: Compressing objects: 100% (14/14), done.        
remote: Total 18 (delta 3), reused 5 (delta 3), pack-reused 1        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to 'ced13c96a4eb9391a9d27e3e13218f70c579670f'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at ced13c96a4 gh-79940: add introspection API for asynchronous generators to `inspect` module (#11590)
Switched to and reset branch 'main'

../../Objects/obmalloc.c:775:1: warning: always_inline function might not be inlinable [-Wattributes]
  775 | arena_map_get(pymem_block *p, int create)
      | ^~~~~~~~~~~~~

configure: ../../configure --prefix $(PWD)/target/host --with-pydebug --without-pydebug --with-emscripten-target=node --enable-wasm-dynamic-linking --disable-wasm-pthreads --build=x86_64-pc-linux-gnu --host=wasm32-unknown-emscripten --with-build-python=../build/python
configure: WARNING: using cross tools not prefixed with host triplet
mcc: error: no input files

make: make -j2 all
../../Python/initconfig.c:2360:27: warning: format specifies type 'wint_t' (aka 'int') but the argument has type 'wint_t' (aka 'unsigned int') [-Wformat]
    printf(usage_envvars, (wint_t)DELIM, (wint_t)DELIM, PYTHONHOMEHELP);
           ~~~~~~~~~~~~~  ^~~~~~~~~~~~~
../../Python/initconfig.c:145:18: note: format string is defined here
"PYTHONPATH   : '%lc'-separated list of directories prefixed to the\n"
                 ^~~
                 %c
../../Python/initconfig.c:2360:42: warning: format specifies type 'wint_t' (aka 'int') but the argument has type 'wint_t' (aka 'unsigned int') [-Wformat]
    printf(usage_envvars, (wint_t)DELIM, (wint_t)DELIM, PYTHONHOMEHELP);
           ~~~~~~~~~~~~~                 ^~~~~~~~~~~~~
../../Python/initconfig.c:148:58: note: format string is defined here
"PYTHONHOME   : alternate <prefix> directory (or <prefix>%lc<exec_prefix>).\n"
                                                         ^~~
                                                         %c
2 warnings generated.
../../Modules/expat/xmlparse.c:3116:9: warning: code will never be executed [-Wunreachable-code]
        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
        ^~~~~~
../../Modules/expat/xmlparse.c:3115:16: note: silence by adding parentheses to mark code as explicitly dead
      else if (0 && parser->m_characterDataHandler)
               ^
               /* DISABLES CODE */ ( )
../../Modules/expat/xmlparse.c:4059:9: warning: code will never be executed [-Wunreachable-code]
        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
        ^~~~~~
../../Modules/expat/xmlparse.c:4058:16: note: silence by adding parentheses to mark code as explicitly dead
      else if (0 && parser->m_characterDataHandler)
               ^
               /* DISABLES CODE */ ( )
../../Modules/expat/xmlparse.c:7703:11: warning: format specifies type 'int' but the argument has type 'ptrdiff_t' (aka 'long') [-Wformat]
          bytesMore, (account == XML_ACCOUNT_DIRECT) ? "DIR" : "EXP",
          ^~~~~~~~~
3 warnings generated.
../../Modules/socketmodule.c:4047:33: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
         cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) {
                                ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/buildbot/.emscripten_cache/sysroot/include/sys/socket.h:356:44: note: expanded from macro 'CMSG_NXTHDR'
        __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Modules/socketmodule.c:4100:33: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
         cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) {
                                ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/buildbot/.emscripten_cache/sysroot/include/sys/socket.h:356:44: note: expanded from macro 'CMSG_NXTHDR'
        __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Modules/socketmodule.c:4724:54: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
            cmsgh = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsgh);
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/buildbot/.emscripten_cache/sysroot/include/sys/socket.h:356:44: note: expanded from macro 'CMSG_NXTHDR'
        __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
../../Modules/_sqlite/connection.c:2197:19: warning: result of comparison of constant 9223372036854775807 with expression of type 'Py_ssize_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare]
    if (data->len > 9223372036854775807) {  // (1 << 63) - 1
        ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
1 warning generated.

make: *** [Makefile:1913: buildbottest] Error 2

Cannot open file '/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-dl/build/build/build_oot/host/test-results.xml' for upload
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Mar 11, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot wasm32-emscripten node (pthreads) 3.x has failed when building commit ced13c9.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1050/builds/1504) and take a look at the build logs.
  4. Check if the failure is related to this commit (ced13c9) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1050/builds/1504

Failed tests:

  • test_inspect

Summary of the results of the build (if available):

== Tests result: FAILURE ==

338 tests OK.

10 slowest tests:

  • test_compile: 10 min 14 sec
  • test_math: 1 min 39 sec
  • test_tokenize: 1 min 3 sec
  • test_unparse: 40.8 sec
  • test_lib2to3: 40.3 sec
  • test_io: 37.7 sec
  • test_capi: 30.5 sec
  • test_hashlib: 26.6 sec
  • test_unicodedata: 25.2 sec
  • test_pickle: 21.3 sec

1 test failed:
test_inspect

95 tests skipped:
test__xxinterpchannels test__xxsubinterpreters test_asyncgen
test_asyncio test_check_c_globals test_clinic test_cmd_line
test_concurrent_futures test_contextlib_async test_ctypes
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_doctest
test_docxmlrpc test_dtrace test_embed test_epoll test_faulthandler
test_fcntl test_file_eintr test_fork1 test_ftplib test_gdb
test_grp test_httplib test_httpservers test_idle test_imaplib
test_interpreters test_ioctl test_kqueue test_launcher test_lzma
test_mmap test_msilib test_multiprocessing_fork
test_multiprocessing_forkserver test_multiprocessing_main_handling
test_multiprocessing_spawn test_nis test_openpty test_ossaudiodev
test_pdb test_peg_generator test_perf_profiler test_poll
test_poplib test_pty test_pwd test_readline test_regrtest
test_repl test_resource test_select test_selectors test_smtplib
test_smtpnet test_socket test_socketserver test_spwd test_ssl
test_stable_abi_ctypes test_startfile test_subprocess
test_sys_settrace test_syslog test_tcl test_telnetlib test_tix
test_tkinter test_tools test_ttk test_ttk_textonly test_turtle
test_urllib2 test_urllib2_localnet test_urllib2net test_urllibnet
test_venv test_wait3 test_wait4 test_webbrowser test_winconsoleio
test_winreg test_winsound test_wmi test_wsgiref test_xmlrpc
test_xmlrpc_net test_xxlimited test_zipfile64
test_zipimport_support test_zoneinfo
0:25:52 load avg: 6.90
0:25:52 load avg: 6.90 Re-running failed tests is not supported with --python host runner option.

Total duration: 25 min 52 sec

Click to see traceback logs
remote: Enumerating objects: 18, done.        
remote: Counting objects:   5% (1/17)        
remote: Counting objects:  11% (2/17)        
remote: Counting objects:  17% (3/17)        
remote: Counting objects:  23% (4/17)        
remote: Counting objects:  29% (5/17)        
remote: Counting objects:  35% (6/17)        
remote: Counting objects:  41% (7/17)        
remote: Counting objects:  47% (8/17)        
remote: Counting objects:  52% (9/17)        
remote: Counting objects:  58% (10/17)        
remote: Counting objects:  64% (11/17)        
remote: Counting objects:  70% (12/17)        
remote: Counting objects:  76% (13/17)        
remote: Counting objects:  82% (14/17)        
remote: Counting objects:  88% (15/17)        
remote: Counting objects:  94% (16/17)        
remote: Counting objects: 100% (17/17)        
remote: Counting objects: 100% (17/17), done.        
remote: Compressing objects:   6% (1/15)        
remote: Compressing objects:  13% (2/15)        
remote: Compressing objects:  20% (3/15)        
remote: Compressing objects:  26% (4/15)        
remote: Compressing objects:  33% (5/15)        
remote: Compressing objects:  40% (6/15)        
remote: Compressing objects:  46% (7/15)        
remote: Compressing objects:  53% (8/15)        
remote: Compressing objects:  60% (9/15)        
remote: Compressing objects:  66% (10/15)        
remote: Compressing objects:  73% (11/15)        
remote: Compressing objects:  80% (12/15)        
remote: Compressing objects:  86% (13/15)        
remote: Compressing objects:  93% (14/15)        
remote: Compressing objects: 100% (15/15)        
remote: Compressing objects: 100% (15/15), done.        
remote: Total 18 (delta 2), reused 3 (delta 2), pack-reused 1        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to 'ced13c96a4eb9391a9d27e3e13218f70c579670f'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at ced13c96a4 gh-79940: add introspection API for asynchronous generators to `inspect` module (#11590)
Switched to and reset branch 'main'

../../Objects/obmalloc.c:775:1: warning: always_inline function might not be inlinable [-Wattributes]
  775 | arena_map_get(pymem_block *p, int create)
      | ^~~~~~~~~~~~~

configure: ../../configure --prefix $(PWD)/target/host --with-pydebug --without-pydebug --with-emscripten-target=node --disable-wasm-dynamic-linking --enable-wasm-pthreads --build=x86_64-pc-linux-gnu --host=wasm32-unknown-emscripten --with-build-python=../build/python
configure: WARNING: using cross tools not prefixed with host triplet
mcc: error: no input files

make: make -j2 all
../../Python/initconfig.c:2360:27: warning: format specifies type 'wint_t' (aka 'int') but the argument has type 'wint_t' (aka 'unsigned int') [-Wformat]
    printf(usage_envvars, (wint_t)DELIM, (wint_t)DELIM, PYTHONHOMEHELP);
           ~~~~~~~~~~~~~  ^~~~~~~~~~~~~
../../Python/initconfig.c:145:18: note: format string is defined here
"PYTHONPATH   : '%lc'-separated list of directories prefixed to the\n"
                 ^~~
                 %c
../../Python/initconfig.c:2360:42: warning: format specifies type 'wint_t' (aka 'int') but the argument has type 'wint_t' (aka 'unsigned int') [-Wformat]
    printf(usage_envvars, (wint_t)DELIM, (wint_t)DELIM, PYTHONHOMEHELP);
           ~~~~~~~~~~~~~                 ^~~~~~~~~~~~~
../../Python/initconfig.c:148:58: note: format string is defined here
"PYTHONHOME   : alternate <prefix> directory (or <prefix>%lc<exec_prefix>).\n"
                                                         ^~~
                                                         %c
2 warnings generated.
../../Modules/expat/xmlparse.c:3116:9: warning: code will never be executed [-Wunreachable-code]
        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
        ^~~~~~
../../Modules/expat/xmlparse.c:3115:16: note: silence by adding parentheses to mark code as explicitly dead
      else if (0 && parser->m_characterDataHandler)
               ^
               /* DISABLES CODE */ ( )
../../Modules/expat/xmlparse.c:4059:9: warning: code will never be executed [-Wunreachable-code]
        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
        ^~~~~~
../../Modules/expat/xmlparse.c:4058:16: note: silence by adding parentheses to mark code as explicitly dead
      else if (0 && parser->m_characterDataHandler)
               ^
               /* DISABLES CODE */ ( )
../../Modules/expat/xmlparse.c:7703:11: warning: format specifies type 'int' but the argument has type 'ptrdiff_t' (aka 'long') [-Wformat]
          bytesMore, (account == XML_ACCOUNT_DIRECT) ? "DIR" : "EXP",
          ^~~~~~~~~
3 warnings generated.
../../Modules/socketmodule.c:4047:33: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
         cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) {
                                ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/buildbot/.emscripten_cache/sysroot/include/sys/socket.h:356:44: note: expanded from macro 'CMSG_NXTHDR'
        __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Modules/socketmodule.c:4100:33: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
         cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) {
                                ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/buildbot/.emscripten_cache/sysroot/include/sys/socket.h:356:44: note: expanded from macro 'CMSG_NXTHDR'
        __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Modules/socketmodule.c:4724:54: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
            cmsgh = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsgh);
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/buildbot/.emscripten_cache/sysroot/include/sys/socket.h:356:44: note: expanded from macro 'CMSG_NXTHDR'
        __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
../../Modules/_sqlite/connection.c:2197:19: warning: result of comparison of constant 9223372036854775807 with expression of type 'Py_ssize_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare]
    if (data->len > 9223372036854775807) {  // (1 << 63) - 1
        ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
1 warning generated.
mcc: warning: USE_PTHREADS + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271 [-Wpthreads-mem-growth]

make: *** [Makefile:1912: buildbottest] Error 2

Cannot open file '/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-pthreads/build/build/build_oot/host/test-results.xml' for upload
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Mar 11, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot wasm32-wasi 3.x has failed when building commit ced13c9.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1046/builds/1540) and take a look at the build logs.
  4. Check if the failure is related to this commit (ced13c9) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1046/builds/1540

Failed tests:

  • test_inspect

Failed subtests:

  • test_getasyncgenlocals_empty - test.test_inspect.TestGetAsyncGenState.test_getasyncgenlocals_empty
  • test_easy_debugging - test.test_inspect.TestGetAsyncGenState.test_easy_debugging
  • test_suspended - test.test_inspect.TestGetAsyncGenState.test_suspended
  • test_getasyncgenlocals - test.test_inspect.TestGetAsyncGenState.test_getasyncgenlocals
  • test_closed_after_exhaustion - test.test_inspect.TestGetAsyncGenState.test_closed_after_exhaustion
  • test_getasyncgenlocals_error - test.test_inspect.TestGetAsyncGenState.test_getasyncgenlocals_error
  • test_created - test.test_inspect.TestGetAsyncGenState.test_created
  • test_closed_after_immediate_exception - test.test_inspect.TestGetAsyncGenState.test_closed_after_immediate_exception
  • test_running - test.test_inspect.TestGetAsyncGenState.test_running

Summary of the results of the build (if available):

== Tests result: FAILURE ==

325 tests OK.

10 slowest tests:

  • test_compile: 6 min 4 sec
  • test_math: 1 min 28 sec
  • test_tokenize: 47.8 sec
  • test_lib2to3: 31.6 sec
  • test_unparse: 29.4 sec
  • test_hashlib: 24.0 sec
  • test_capi: 22.9 sec
  • test_unicodedata: 16.5 sec
  • test_pickle: 13.8 sec
  • test_decimal: 12.9 sec

1 test failed:
test_inspect

108 tests skipped:
test__xxinterpchannels test__xxsubinterpreters test_asyncgen
test_asyncio test_bz2 test_check_c_globals test_clinic
test_cmd_line test_concurrent_futures test_contextlib_async
test_ctypes test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_doctest test_docxmlrpc test_dtrace test_embed test_epoll
test_faulthandler test_fcntl test_file_eintr test_fork1
test_ftplib test_gdb test_grp test_gzip test_httplib
test_httpservers test_idle test_imaplib test_interpreters
test_ioctl test_kqueue test_launcher test_lzma test_mailbox
test_mmap test_msilib test_multiprocessing_fork
test_multiprocessing_forkserver test_multiprocessing_main_handling
test_multiprocessing_spawn test_nis test_openpty test_ossaudiodev
test_pdb test_peg_generator test_perf_profiler test_pipes
test_poll test_poplib test_pty test_pwd test_queue test_readline
test_regrtest test_repl test_resource test_select test_selectors
test_smtplib test_smtpnet test_socket test_socketserver test_spwd
test_sqlite3 test_ssl test_stable_abi_ctypes test_startfile
test_subprocess test_sys_settrace test_syslog test_tcl
test_telnetlib test_thread test_threadedtempfile test_threading
test_threading_local test_tix test_tkinter test_tools test_ttk
test_ttk_textonly test_turtle test_urllib test_urllib2
test_urllib2_localnet test_urllib2net test_urllib_response
test_urllibnet test_venv test_wait3 test_wait4 test_webbrowser
test_winconsoleio test_winreg test_winsound test_wmi test_wsgiref
test_xmlrpc test_xmlrpc_net test_xxlimited test_zipfile64
test_zipimport_support test_zlib test_zoneinfo
0:08:19 load avg: 1.85
0:08:19 load avg: 1.85 Re-running failed tests is not supported with --python host runner option.

Total duration: 8 min 19 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/Lib/unittest/async_case.py", line 85, in _callSetUp
    self._asyncioRunner.get_loop()
  File "/Lib/asyncio/runners.py", line 83, in get_loop
    self._lazy_init()
  File "/Lib/asyncio/runners.py", line 137, in _lazy_init
    self._loop = events.new_event_loop()
                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Lib/asyncio/events.py", line 819, in new_event_loop
    return get_event_loop_policy().new_event_loop()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Lib/asyncio/events.py", line 716, in new_event_loop
    return self._loop_factory()
           ^^^^^^^^^^^^^^^^^^^^
  File "/Lib/asyncio/unix_events.py", line 64, in __init__
    super().__init__(selector)
  File "/Lib/asyncio/selector_events.py", line 66, in __init__
    self._make_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 120, in _make_self_pipe
    self._ssock, self._csock = socket.socketpair()
                               ^^^^^^^^^^^^^^^^^^^
  File "/Lib/socket.py", line 632, in socketpair
    lsock = socket(family, type, proto)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Lib/socket.py", line 233, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 58] Not supported


Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
Warning -- Unraisable exception
Exception ignored in: <function BaseEventLoop.__del__ at 0xf59e08>
Traceback (most recent call last):
  File "/Lib/asyncio/base_events.py", line 705, in __del__
    self.close()
  File "/Lib/asyncio/unix_events.py", line 68, in close
    super().close()
  File "/Lib/asyncio/selector_events.py", line 104, in close
    self._close_self_pipe()
  File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
    self._remove_reader(self._ssock.fileno())
                        ^^^^^^^^^^^
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
k
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tkren

tkren commented Mar 11, 2023

Copy link
Copy Markdown
Contributor Author

Buildbot wasm32 worker seem to be unhappy, asyncio loop initialization fails now in test_inspect. I'll have a look and check how to fix this in a follow up PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tkren added a commit to tkren/cpython that referenced this pull request Mar 11, 2023
@tkren
TestGetAsyncGenState requires working sockets
2c44e3b
Skip `TestGetAsyncGenState` and restoring of the default event loop
policy in `test_inspect` if platform lacks working socket support.

Fixes python#11590
@tkren tkren mentioned this pull request Mar 11, 2023
gh-79940: skip TestGetAsyncGenState on wasm as it requires working sockets #102605
Merged
tkren added a commit to tkren/cpython that referenced this pull request Mar 11, 2023
@tkren
TestGetAsyncGenState requires working sockets
184f617
Skip `TestGetAsyncGenState` and restoring of the default event loop
policy in `test_inspect` if platform lacks working socket support.

Fixes python#11590
tkren added a commit to tkren/cpython that referenced this pull request Mar 11, 2023
@tkren
TestGetAsyncGenState requires working sockets
6ab6bcf
Skip `TestGetAsyncGenState` and restoring of the default event loop
policy in `test_inspect` if platform lacks working socket support.

Fixes python#11590
miss-islington pushed a commit that referenced this pull request Mar 11, 2023
@tkren
gh-79940: skip TestGetAsyncGenState on wasm as it requires working …
534660f
…sockets (GH-102605)

Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support.

Fixes #11590

Automerge-Triggered-By: GH:kumaraditya303
iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request Mar 12, 2023
@tkren @iritkatriel
pythongh-79940: add introspection API for asynchronous generators to …
f9250e4
…`inspect` module (python#11590)
iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request Mar 12, 2023
@tkren @iritkatriel
pythongh-79940: skip TestGetAsyncGenState on wasm as it requires wo…
45cc601
…rking sockets (pythonGH-102605)

Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support.

Fixes python#11590

Automerge-Triggered-By: GH:kumaraditya303
@x42005e1f x42005e1f mentioned this pull request Dec 19, 2025
The explanation of ag_suspended should be added to Types and members #142996
Closed
@x42005e1f x42005e1f mentioned this pull request Jan 8, 2026
[BUG] inspect.get*state() does not work for compiled objects on Python ≥3.11 cython/cython#7448
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
+1 more reviewer
@auvipy auvipy auvipy approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@kumaraditya303 kumaraditya303

Labels

3.12 only security fixes topic-asyncio type-feature A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@tkren @bedevere-bot @auvipy @kumaraditya303 @the-knights-who-say-ni @ezio-melotti
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.