diff --git a/Lib/asyncio/tools.py b/Lib/asyncio/tools.py index 6c1f725e777fb9..dde755e3796bbb 100644 --- a/Lib/asyncio/tools.py +++ b/Lib/asyncio/tools.py @@ -5,7 +5,7 @@ from itertools import count from enum import Enum import sys -from _remotedebugging import get_all_awaited_by +from _remote_debugging import get_all_awaited_by class NodeType(Enum): diff --git a/Lib/test/test_external_inspection.py b/Lib/test/test_external_inspection.py index f787190b1ae4e0..40c21c830c0436 100644 --- a/Lib/test/test_external_inspection.py +++ b/Lib/test/test_external_inspection.py @@ -15,13 +15,12 @@ PROCESS_VM_READV_SUPPORTED = False try: - from _remotedebugging import PROCESS_VM_READV_SUPPORTED - from _remotedebugging import get_stack_trace - from _remotedebugging import get_async_stack_trace - from _remotedebugging import get_all_awaited_by + from _remote_debugging import PROCESS_VM_READV_SUPPORTED + from _remote_debugging import get_stack_trace + from _remote_debugging import get_async_stack_trace + from _remote_debugging import get_all_awaited_by except ImportError: - raise unittest.SkipTest("Test only runs when _remotedebuggingmodule is available") - + raise unittest.SkipTest("Test only runs when _remote_debugging is available") def _make_test_script(script_dir, script_basename, source): to_return = make_script(script_dir, script_basename, source) diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 10c3e0e9a1d2bb..b3dba9dad006ab 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1960,7 +1960,7 @@ def _supports_remote_attaching(): PROCESS_VM_READV_SUPPORTED = False try: - from _remotedebuggingmodule import PROCESS_VM_READV_SUPPORTED + from _remote_debugging import PROCESS_VM_READV_SUPPORTED except ImportError: pass diff --git a/Modules/Setup b/Modules/Setup index f23f082d9eff5f..81f364abd479cb 100644 --- a/Modules/Setup +++ b/Modules/Setup @@ -284,10 +284,10 @@ PYTHONPATH=$(COREPYTHONPATH) #*shared* #_ctypes_test _ctypes/_ctypes_test.c +#_remote_debugging _remote_debugging_module.c #_testcapi _testcapimodule.c #_testimportmultiple _testimportmultiple.c #_testmultiphase _testmultiphase.c -#_remotedebugging _remotedebuggingmodule.c #_testsinglephase _testsinglephase.c # --- diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in index 1512187bb097bd..8b676ca69b081b 100644 --- a/Modules/Setup.stdlib.in +++ b/Modules/Setup.stdlib.in @@ -33,7 +33,6 @@ # Modules that should always be present (POSIX and Windows): @MODULE_ARRAY_TRUE@array arraymodule.c @MODULE__ASYNCIO_TRUE@_asyncio _asynciomodule.c -@MODULE__REMOTEDEBUGGING_TRUE@_remotedebugging _remotedebuggingmodule.c @MODULE__BISECT_TRUE@_bisect _bisectmodule.c @MODULE__CSV_TRUE@_csv _csv.c @MODULE__HEAPQ_TRUE@_heapq _heapqmodule.c @@ -42,6 +41,7 @@ @MODULE__PICKLE_TRUE@_pickle _pickle.c @MODULE__QUEUE_TRUE@_queue _queuemodule.c @MODULE__RANDOM_TRUE@_random _randommodule.c +@MODULE__REMOTE_DEBUGGING_TRUE@_remote_debugging _remote_debugging_module.c @MODULE__STRUCT_TRUE@_struct _struct.c # build supports subinterpreters diff --git a/Modules/_remotedebuggingmodule.c b/Modules/_remote_debugging_module.c similarity index 99% rename from Modules/_remotedebuggingmodule.c rename to Modules/_remote_debugging_module.c index cffa9a38331dde..9314ddd9bed5d7 100644 --- a/Modules/_remotedebuggingmodule.c +++ b/Modules/_remote_debugging_module.c @@ -1775,13 +1775,13 @@ static PyMethodDef methods[] = { static struct PyModuleDef module = { .m_base = PyModuleDef_HEAD_INIT, - .m_name = "_remotedebugging", + .m_name = "_remote_debugging", .m_size = -1, .m_methods = methods, }; PyMODINIT_FUNC -PyInit__remotedebugging(void) +PyInit__remote_debugging(void) { PyObject* mod = PyModule_Create(&module); if (mod == NULL) { diff --git a/PCbuild/_remotedebugging.vcxproj b/PCbuild/_remote_debugging.vcxproj similarity index 97% rename from PCbuild/_remotedebugging.vcxproj rename to PCbuild/_remote_debugging.vcxproj index a16079f7c6c869..c55f2908e03d33 100644 --- a/PCbuild/_remotedebugging.vcxproj +++ b/PCbuild/_remote_debugging.vcxproj @@ -68,7 +68,7 @@ {4D7C112F-3083-4D9E-9754-9341C14D9B39} - _remotedebugging + _remote_debugging Win32Proj false @@ -93,7 +93,7 @@ <_ProjectFileVersion>10.0.30319.1 - + diff --git a/PCbuild/_remotedebugging.vcxproj.filters b/PCbuild/_remote_debugging.vcxproj.filters similarity index 90% rename from PCbuild/_remotedebugging.vcxproj.filters rename to PCbuild/_remote_debugging.vcxproj.filters index 888e2cd478aa4e..ce4437f74e00cd 100644 --- a/PCbuild/_remotedebugging.vcxproj.filters +++ b/PCbuild/_remote_debugging.vcxproj.filters @@ -9,7 +9,7 @@ - + diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj index eec213d7bac612..da603eed1b332f 100644 --- a/PCbuild/pcbuild.proj +++ b/PCbuild/pcbuild.proj @@ -66,7 +66,7 @@ - + diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln index 0699f8f05d0b8c..45e46095c9942e 100644 --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln @@ -163,7 +163,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testlimitedcapi", "_testli EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib-ng", "zlib-ng.vcxproj", "{FB91C8B2-6FBC-3A01-B644-1637111F902D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_remotedebugging", "_remotedebugging.vcxproj", "{4D7C112F-3083-4D9E-9754-9341C14D9B39}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_remote_debugging", "_remote_debugging.vcxproj", "{4D7C112F-3083-4D9E-9754-9341C14D9B39}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Python/stdlib_module_names.h b/Python/stdlib_module_names.h index 92cc5afedc8429..56e349a544c079 100644 --- a/Python/stdlib_module_names.h +++ b/Python/stdlib_module_names.h @@ -71,6 +71,7 @@ static const char* _Py_stdlib_module_names[] = { "_pyrepl", "_queue", "_random", +"_remote_debugging", "_scproxy", "_sha1", "_sha2", diff --git a/Tools/build/generate_stdlib_module_names.py b/Tools/build/generate_stdlib_module_names.py index 761eecba96f291..88414cdbb37a8d 100644 --- a/Tools/build/generate_stdlib_module_names.py +++ b/Tools/build/generate_stdlib_module_names.py @@ -34,7 +34,6 @@ '_testlimitedcapi', '_testmultiphase', '_testsinglephase', - '_remotedebugging', '_xxtestfuzz', 'idlelib.idle_test', 'test', diff --git a/configure b/configure index 65a493af2a3168..1f425c02a55156 100755 --- a/configure +++ b/configure @@ -654,8 +654,6 @@ MODULE__XXTESTFUZZ_FALSE MODULE__XXTESTFUZZ_TRUE MODULE_XXSUBTYPE_FALSE MODULE_XXSUBTYPE_TRUE -MODULE__REMOTEDEBUGGING_FALSE -MODULE__REMOTEDEBUGGING_TRUE MODULE__TESTSINGLEPHASE_FALSE MODULE__TESTSINGLEPHASE_TRUE MODULE__TESTMULTIPHASE_FALSE @@ -793,6 +791,8 @@ MODULE__STRUCT_FALSE MODULE__STRUCT_TRUE MODULE_SELECT_FALSE MODULE_SELECT_TRUE +MODULE__REMOTE_DEBUGGING_FALSE +MODULE__REMOTE_DEBUGGING_TRUE MODULE__RANDOM_FALSE MODULE__RANDOM_TRUE MODULE__QUEUE_FALSE @@ -31072,7 +31072,7 @@ case $ac_sys_system in #( py_cv_module__ctypes_test=n/a - py_cv_module__remotedebugging=n/a + py_cv_module__remote_debugging=n/a py_cv_module__testimportmultiple=n/a py_cv_module__testmultiphase=n/a py_cv_module__testsinglephase=n/a @@ -31394,6 +31394,28 @@ then : +fi + + + if test "$py_cv_module__remote_debugging" != "n/a" +then : + py_cv_module__remote_debugging=yes +fi + if test "$py_cv_module__remote_debugging" = yes; then + MODULE__REMOTE_DEBUGGING_TRUE= + MODULE__REMOTE_DEBUGGING_FALSE='#' +else + MODULE__REMOTE_DEBUGGING_TRUE='#' + MODULE__REMOTE_DEBUGGING_FALSE= +fi + + as_fn_append MODULE_BLOCK "MODULE__REMOTE_DEBUGGING_STATE=$py_cv_module__remote_debugging$as_nl" + if test "x$py_cv_module__remote_debugging" = xyes +then : + + + + fi @@ -33877,46 +33899,6 @@ fi printf "%s\n" "$py_cv_module__testsinglephase" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _remotedebugging" >&5 -printf %s "checking for stdlib extension module _remotedebugging... " >&6; } - if test "$py_cv_module__remotedebugging" != "n/a" -then : - - if test "$TEST_MODULES" = yes -then : - if true -then : - py_cv_module__remotedebugging=yes -else case e in #( - e) py_cv_module__remotedebugging=missing ;; -esac -fi -else case e in #( - e) py_cv_module__remotedebugging=disabled ;; -esac -fi - -fi - as_fn_append MODULE_BLOCK "MODULE__REMOTEDEBUGGING_STATE=$py_cv_module__remotedebugging$as_nl" - if test "x$py_cv_module__remotedebugging" = xyes -then : - - - - -fi - if test "$py_cv_module__remotedebugging" = yes; then - MODULE__REMOTEDEBUGGING_TRUE= - MODULE__REMOTEDEBUGGING_FALSE='#' -else - MODULE__REMOTEDEBUGGING_TRUE='#' - MODULE__REMOTEDEBUGGING_FALSE= -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__remotedebugging" >&5 -printf "%s\n" "$py_cv_module__remotedebugging" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module xxsubtype" >&5 printf %s "checking for stdlib extension module xxsubtype... " >&6; } if test "$py_cv_module_xxsubtype" != "n/a" @@ -34291,6 +34273,10 @@ if test -z "${MODULE__RANDOM_TRUE}" && test -z "${MODULE__RANDOM_FALSE}"; then as_fn_error $? "conditional \"MODULE__RANDOM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MODULE__REMOTE_DEBUGGING_TRUE}" && test -z "${MODULE__REMOTE_DEBUGGING_FALSE}"; then + as_fn_error $? "conditional \"MODULE__REMOTE_DEBUGGING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${MODULE_SELECT_TRUE}" && test -z "${MODULE_SELECT_FALSE}"; then as_fn_error $? "conditional \"MODULE_SELECT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -34551,10 +34537,6 @@ if test -z "${MODULE__TESTSINGLEPHASE_TRUE}" && test -z "${MODULE__TESTSINGLEPHA as_fn_error $? "conditional \"MODULE__TESTSINGLEPHASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${MODULE__REMOTEDEBUGGING_TRUE}" && test -z "${MODULE__REMOTEDEBUGGING_FALSE}"; then - as_fn_error $? "conditional \"MODULE__REMOTEDEBUGGING\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${MODULE_XXSUBTYPE_TRUE}" && test -z "${MODULE_XXSUBTYPE_FALSE}"; then as_fn_error $? "conditional \"MODULE_XXSUBTYPE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index d53ba20579f658..96b157a13e88db 100644 --- a/configure.ac +++ b/configure.ac @@ -7755,7 +7755,7 @@ AS_CASE([$ac_sys_system], dnl (see Modules/Setup.stdlib.in). PY_STDLIB_MOD_SET_NA( [_ctypes_test], - [_remotedebugging], + [_remote_debugging], [_testimportmultiple], [_testmultiphase], [_testsinglephase], @@ -7849,6 +7849,7 @@ PY_STDLIB_MOD_SIMPLE([_pickle]) PY_STDLIB_MOD_SIMPLE([_posixsubprocess]) PY_STDLIB_MOD_SIMPLE([_queue]) PY_STDLIB_MOD_SIMPLE([_random]) +PY_STDLIB_MOD_SIMPLE([_remote_debugging]) PY_STDLIB_MOD_SIMPLE([select]) PY_STDLIB_MOD_SIMPLE([_struct]) PY_STDLIB_MOD_SIMPLE([_types]) @@ -8122,7 +8123,6 @@ PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) PY_STDLIB_MOD([_testsinglephase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes]) -PY_STDLIB_MOD([_remotedebugging], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([xxsubtype], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes]) PY_STDLIB_MOD([_ctypes_test],