jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/789893 )
Change subject: [bugfix] Remove ThreadList.stop_all() method
......................................................................
[bugfix] Remove ThreadList.stop_all() method
ThreadList is a thread pool executor which collect a couple of Threads
and starts them running. Threads does not have a stop() method and
calling Thread.stop() leads to an AttributeError
- remove ThreadList.stop_all() due to this bug. It is not used elsewhere.
There is no easy way to stop a running Thread.
Bug: T307830
Change-Id: I8512dc654aca0f6763b016957af4c1d56a9aa0f1
---
M pywikibot/tools/__init__.py
1 file changed, 0 insertions(+), 10 deletions(-)
Approvals:
Mpaa: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 04fd27d..acb91a8 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -809,16 +809,6 @@
pywikibot.logging.debug("thread {} ('{}') started"
.format(len(self), type(thd)))
- def stop_all(self) -> None:
- """Stop all threads the pool."""
- if self:
- pywikibot.logging.debug('EARLY QUIT: Threads: {}'
- .format(len(self)))
- for thd in self:
- thd.stop()
- pywikibot.logging.debug('EARLY QUIT: Queue size left in {}: {}'
- .format(thd, thd.queue.qsize()))
-
def intersect_generators(*iterables, allow_duplicates: bool = False):
"""Generator of intersect iterables.
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/789893
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8512dc654aca0f6763b016957af4c1d56a9aa0f1
Gerrit-Change-Number: 789893
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged