Wed, 16 Dec 2020 18:31:37 +0100
Debugger: completed support for the multiprocessing module.
--- a/eric6/DebugClients/Python/DebugClientBase.py Tue Dec 15 18:07:56 2020 +0100 +++ b/eric6/DebugClients/Python/DebugClientBase.py Wed Dec 16 18:31:37 2020 +0100 @@ -2066,7 +2066,13 @@ port = os.getenv('ERICPORT', 42424) remoteAddress = self.__resolveHost(host) - name = os.path.basename(progargs[0]) + if progargs: + if not progargs[0].startswith("-"): + name = os.path.basename(progargs[0]) + else: + name = "debug_client_code" + else: + name = "debug_client_code" self.connectDebugger(port, remoteAddress, redirect, name=name) self._fncache = {}
--- a/eric6/DebugClients/Python/MultiProcessDebugExtension.py Tue Dec 15 18:07:56 2020 +0100 +++ b/eric6/DebugClients/Python/MultiProcessDebugExtension.py Wed Dec 16 18:31:37 2020 +0100 @@ -265,7 +265,7 @@ @return function replacing the original one @type function """ - def new_fork(): + def newFork(): """ Function replacing the 'fork' function of the os module. """ @@ -322,7 +322,7 @@ multiprocessSupport=multiprocess) return childProcess - return new_fork + return newFork def createCreateProcess(originalName): @@ -366,7 +366,7 @@ return import os -## import sys + import sys # patch 'os.exec...()' functions ## patchModule(os, "execl", createExecl) @@ -379,19 +379,19 @@ ## patchModule(os, "execvpe", createExecve) # patch 'os.spawn...()' functions -## patchModule(os, "spawnl", createSpawnl) -## patchModule(os, "spawnle", createSpawnl) -## patchModule(os, "spawnlp", createSpawnl) -## patchModule(os, "spawnlpe", createSpawnl) -## patchModule(os, "spawnv", createSpawnv) -## patchModule(os, "spawnve", createSpawnve) -## patchModule(os, "spawnvp", createSpawnv) -## patchModule(os, "spawnvpe", createSpawnve) + patchModule(os, "spawnl", createSpawnl) + patchModule(os, "spawnle", createSpawnl) + patchModule(os, "spawnlp", createSpawnl) + patchModule(os, "spawnlpe", createSpawnl) + patchModule(os, "spawnv", createSpawnv) + patchModule(os, "spawnve", createSpawnve) + patchModule(os, "spawnvp", createSpawnv) + patchModule(os, "spawnvpe", createSpawnve) # patch 'os.posix_spawn...()' functions -## if sys.version_info >= (3, 8) and not isWindowsPlatform(): -## patchModule(os, "posix_spawn", createPosixSpawn) -## patchModule(os, "posix_spawnp", createPosixSpawn) + if sys.version_info >= (3, 8) and not isWindowsPlatform(): + patchModule(os, "posix_spawn", createPosixSpawn) + patchModule(os, "posix_spawnp", createPosixSpawn) if isWindowsPlatform(): try:
--- a/eric6/DebugClients/Python/MultiprocessingExtension.py Tue Dec 15 18:07:56 2020 +0100 +++ b/eric6/DebugClients/Python/MultiprocessingExtension.py Wed Dec 16 18:31:37 2020 +0100 @@ -16,6 +16,8 @@ _originalBootstrap = None +# TODO: add support for start method 'forkserver' +# TODO: add support for start method 'spawn' def patchMultiprocessing(module, debugClient): """ Function to patch the multiprocessing module.