Page MenuHomePhabricator

Tests fails due to missing setuptools with Python 3.12
Closed, ResolvedPublic

Description

After removing setuptools dependencies in rPWBC5c0f079 (T340640, T347052) all tests with Python 3.12 fails (whereas Python 3.13 still works).

  env:
    PYWIKIBOT_TEST_RUNNING: 1
    PYWIKIBOT_USERNAME: Pywikibot-test
    PYWIKIBOT_LOGIN_LOGOUT: 1
    pythonLocation: /Users/runner/hostedtoolcache/Python/3.12.1/x64
    PKG_CONFIG_PATH: /Users/runner/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig
    Python_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.12.1/x64
    Python2_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.12.1/x64
    Python3_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.12.1/x64
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/runner/work/pywikibot/pywikibot/pwb.py", line 40, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/runner/work/pywikibot/pywikibot/pwb.py", line 36, in main
    runpy.run_path(str(path), run_name='__main__')
  File "<frozen runpy>", line 286, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/runner/work/pywikibot/pywikibot/pywikibot/scripts/wrapper.py", line 517, in <module>
    main()
  File "/Users/runner/work/pywikibot/pywikibot/pywikibot/scripts/wrapper.py", line 498, in main
    if not check_modules():  # pragma: no cover
           ^^^^^^^^^^^^^^^
  File "/Users/runner/work/pywikibot/pywikibot/pywikibot/scripts/wrapper.py", line 233, in check_modules
    from setup import script_deps
  File "/Users/runner/work/pywikibot/pywikibot/setup.py", line 31, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'
CRITICAL: Exiting due to uncaught exception ModuleNotFoundError: No module named 'setuptools'
Error: Process completed with exit code 1.

Event Timeline

Xqt triaged this task as High priority.Jan 8 2024, 8:23 AM

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

[pywikibot/core@master] [bugfix] lazy import setuptools in setup.py

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

Change 988397 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] lazy import setuptools in setup.py

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

Xqt removed a project: Patch-For-Review.