jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1332226?usp=email )
Change subject: tracking_param_remover: Avoid unsafe C tokenizer without GIL
......................................................................
tracking_param_remover: Avoid unsafe C tokenizer without GIL
mwparserfromhell's C tokenizer can segfault on free-threaded
Python when the GIL is disabled. Select its pure-Python tokenizer for
those interpreters while retaining the C tokenizer elsewhere.
Bug: T435717
Change-Id: I2fc816179cbb742e1d623ab0f46f2bf36f275eda
---
M scripts/tracking_param_remover.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/tracking_param_remover.py
b/scripts/tracking_param_remover.py
index 8f1cd33..49a6683 100755
--- a/scripts/tracking_param_remover.py
+++ b/scripts/tracking_param_remover.py
@@ -27,12 +27,17 @@
import pywikibot
from pywikibot import pagegenerators
from pywikibot.bot import AutomaticTWSummaryBot, ExistingPageBot, SingleSiteBot
+from pywikibot.tools import THREADING_FREE
docuReplacements = { # noqa: N816
'¶ms;': pagegenerators.parameterHelp,
}
+if THREADING_FREE:
+ # The C tokenizer is not safe without the GIL (T435717).
+ mwparserfromhell.parser.use_c = False
+
KNOWN_TRACKER_PARAMS = [
'utm_.+', # universal
'fbclid', # Facebook
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1332226?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I2fc816179cbb742e1d623ab0f46f2bf36f275eda
Gerrit-Change-Number: 1332226
Gerrit-PatchSet: 1
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]