Page MenuHomePhabricator

Toolforge bots stopped working
Closed, ResolvedPublic

Description

Since beginning of June all Pywikibot scripts in Toolforge fail to run due to the following issue:

(setuptools 33.1.1 (/usr/lib/python3/dist-packages), Requirement.parse('setuptools!=50.0.0,<50.2.0,>=49.4.0; python_version < "3.6"'))

A package necessary for pywikibot is outdated.
Please update required module with:


    pip install "setuptools!=50.0.0,<50.2.0,>=49.4.0"


You may continue on your own risk; type CTRL-C to stop.

CRITICAL: Exiting due to uncaught exception <class 'AttributeError'>
Traceback (most recent call last):
  File "pwb.py", line 399, in <module>
    if not main():
  File "pwb.py", line 394, in main
    module)
  File "pwb.py", line 93, in run_python_file
    check_pwb_versions(package)
  File "pwb.py", line 51, in check_pwb_versions
    if scripts_version.release > wikibot_version.release:
AttributeError: 'Version' object has no attribute 'release'
CRITICAL: Exiting due to uncaught exception <class 'AttributeError'>

Expected behavior
Scripts should not throw critical error with this message. Also Toolforge Pywikibot installation is not installed using setuptools (it is cloned by git), so the message is pointless here.

Configuration
Toolforge, Python 3.5.3, Debian 9.13 Stretch (Linux 4.19), python3-setuptools 33.1.1, Pywikibot master

Event Timeline

Xqt reopened this task as Open.EditedJun 15 2021, 7:15 AM

I reopend it and will revert the script check (until 7.0 or so). I think setuptools can be updatet on toolforge with virtualenv but I am not sure.

But why is toolforge using core?

Change 699952 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [fix] Implement Version properties from setuptools 49.4.0/vendor package 20.4

https://gerrit.wikimedia.org/r/699952

As I said earlier, we can do a workaround and "install" setuptools into a folder inside pywikibot folder, like we do with mwparserfromhell. I'll test my suggestion and if it will work, we don't have to revert anything.

As a workaround we could temporarily install newer setuptools into /shared/pywikibot/setuptools, like we do with mwparserfromhell. Not sure if it will work this way though.

As I said earlier, we can do a workaround and "install" setuptools into a folder inside pywikibot folder, like we do with mwparserfromhell. I'll test my suggestion and if it will work, we don't have to revert anything.

As a workaround we could temporarily install newer setuptools into /shared/pywikibot/setuptools, like we do with mwparserfromhell. Not sure if it will work this way though.

It should now work (I installed setuptools 50.1.0 as described)

Change 699952 merged by jenkins-bot:

[pywikibot/core@master] [fix] Implement Version properties from setuptools 49.4.0/vendor package 20.4

https://gerrit.wikimedia.org/r/699952

Xqt claimed this task.
Xqt triaged this task as High priority.