jenkins-bot submitted this change.

View Change


Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] Follow-up patch for T334378

This is necessary due to another SystemError:
SystemError: <built-in method split of str object at 0x7f21bee950b0>
returned a result with an exception set

Bug: T334378
Change-Id: If746cbe93844cac6793c50c590e2aafc9c6031cb
---
M pywikibot/site/_basesite.py
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/pywikibot/site/_basesite.py b/pywikibot/site/_basesite.py
index 1f05b30..c0311d3 100644
--- a/pywikibot/site/_basesite.py
+++ b/pywikibot/site/_basesite.py
@@ -31,6 +31,9 @@
)


+PYTHON_312A7 = sys.version.split()[0] == '3.12.0a7' # T334378 workaround
+
+
class BaseSite(ComparableMixin):

"""Site methods that are independent of the communication interface."""
@@ -187,7 +190,7 @@

def __getattr__(self, attr):
"""Delegate undefined methods calls to the Family object."""
- if sys.version.split()[0] == '3.12.0a7': # T334378 workaround
+ if PYTHON_312A7: # T334378 workaround
print(end='') # noqa: T001, T201
try:
method = getattr(self.family, attr)

To view, visit change 907495. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: If746cbe93844cac6793c50c590e2aafc9c6031cb
Gerrit-Change-Number: 907495
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged