jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/907485 )
Change subject: [tests] Add a workaround for T334378 to BaseSite.__getattr__
......................................................................
[tests] Add a workaround for T334378 to BaseSite.__getattr__
The print statement prevents the SystemError; don't ask me why.
Bug: T334378
Change-Id: Iee1a1b4bfcede1722ec54eb7830d523a931f1f03
---
M pywikibot/site/_basesite.py
1 file changed, 15 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py
index a13cec7..1f05b30 100644
--- a/pywikibot/site/_basesite.py
+++ b/pywikibot/site/_basesite.py
@@ -6,6 +6,7 @@
#
import functools
import re
+import sys
import threading
from typing import Optional
from warnings import warn
@@ -186,6 +187,8 @@
def __getattr__(self, attr):
"""Delegate undefined methods calls to the Family object."""
+ if sys.version.split()[0] == '3.12.0a7': # T334378 workaround
+ print(end='') # noqa: T001, T201
try:
method = getattr(self.family, attr)
if not callable(method):
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/907485
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: Iee1a1b4bfcede1722ec54eb7830d523a931f1f03
Gerrit-Change-Number: 907485
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]