classification
Title: 3.9-dev regression? TypeError: exec_module() missing 1 required positional argument: 'module'
Type: Stage: resolved
Components: Versions: Python 3.9
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: hugovk, xtreak
Priority: normal Keywords:

Created on 2020-07-10 12:47 by hugovk, last changed 2020-07-11 20:29 by ned.deily. This issue is now closed.

Messages (2)
msg373464 - (view) Author: Hugo van Kemenade (hugovk) * Date: 2020-07-10 12:47
For the past 3 months we've been testing Pillow on Travis CI using 3.9-dev, which Travis builds nightly from the 3.9 branch.

Two days ago the 3.9-dev build passed, but it failed yesterday with the same Pillow commit, and all subsequent builds.

* Last pass: https://travis-ci.org/github/python-pillow/Pillow/jobs/706015838
* First fail: https://travis-ci.org/github/hugovk/Pillow/jobs/706476038

Diffing the logs, here's the CPython commits for each:

platform     linux 3.9.0b4+ (heads/3.9:edeaf61, Jul  7 2020, 06:29:52)
platform     linux 3.9.0b4+ (heads/3.9:1d1c574, Jul  8 2020, 07:05:21)

Diff of those commits:

1d1c5743400bdf384ec83eb6ba5b39a355d121e3">https://github.com/python/cpython/compare/edeaf61b6827ab3a8673aff1fb7717917f08f003..1d1c5743400bdf384ec83eb6ba5b39a355d121e3

It's also failing with the most recent:

platform     linux 3.9.0b4+ (heads/3.9:e689789, Jul  9 2020, 07:57:24)

I didn't see anything obvious to cause it, so thought I'd better report it here to be on the safe side.

Our tracking issue: https://github.com/python-pillow/Pillow/issues/4769

Here's the traceback:

Finished processing dependencies for Pillow==7.3.0.dev0
python3 selftest.py
Traceback (most recent call last):
  File "/home/travis/build/hugovk/Pillow/selftest.py", line 6, in <module>
    from PIL import Image, features
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/Pillow-7.3.0.dev0-py3.9-linux-x86_64.egg/PIL/Image.py", line 94, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/Pillow-7.3.0.dev0-py3.9-linux-x86_64.egg/PIL/_imaging.py", line 8, in <module>
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/Pillow-7.3.0.dev0-py3.9-linux-x86_64.egg/PIL/_imaging.py", line 7, in __bootstrap__
TypeError: exec_module() missing 1 required positional argument: 'module'
Makefile:59: recipe for target 'install-coverage' failed
make: *** [install-coverage] Error 1
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 495, in _importconftest
    return self._conftestpath2mod[key]
KeyError: PosixPath('/home/travis/build/hugovk/Pillow/conftest.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/python/3.9-dev/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/python/3.9-dev/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pytest/__main__.py", line 7, in <module>
    raise SystemExit(pytest.main())
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 105, in main
    config = _prepareconfig(args, plugins)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 257, in _prepareconfig
    return pluginmanager.hook.pytest_cmdline_parse(
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/helpconfig.py", line 90, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 836, in pytest_cmdline_parse
    self.parse(args)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1044, in parse
    self._preparse(args, addopts=addopts)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1001, in _preparse
    self.hook.pytest_load_initial_conftests(
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 899, in pytest_load_initial_conftests
    self.pluginmanager._set_initial_conftests(early_config.known_args_namespace)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 441, in _set_initial_conftests
    self._try_load_conftest(anchor)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 447, in _try_load_conftest
    self._getconftestmodules(anchor)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 473, in _getconftestmodules
    mod = self._importconftest(conftestpath)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 520, in _importconftest
    self.consider_conftest(mod)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 575, in consider_conftest
    self.register(conftestmodule, name=conftestmodule.__file__)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 386, in register
    self.consider_module(plugin)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 581, in consider_module
    self._import_plugin_specs(getattr(mod, "pytest_plugins", []))
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 586, in _import_plugin_specs
    self.import_plugin(import_spec)
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/config/__init__.py", line 613, in import_plugin
    __import__(importspec)
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 152, in exec_module
    exec(co, module.__dict__)
  File "/home/travis/build/hugovk/Pillow/Tests/helper.py", line 14, in <module>
    from PIL import Image, ImageMath, features
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/Pillow-7.3.0.dev0-py3.9-linux-x86_64.egg/PIL/Image.py", line 94, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/Pillow-7.3.0.dev0-py3.9-linux-x86_64.egg/PIL/_imaging.py", line 8, in <module>
  File "/home/travis/virtualenv/python3.9-dev/lib/python3.9/site-packages/Pillow-7.3.0.dev0-py3.9-linux-x86_64.egg/PIL/_imaging.py", line 7, in __bootstrap__
TypeError: exec_module() missing 1 required positional argument: 'module'
msg373520 - (view) Author: Hugo van Kemenade (hugovk) * Date: 2020-07-11 09:05
Okay, looks like this is actually a setuptools issue, introduced in version 47.3.2.

Reported: https://github.com/pypa/setuptools/issues/2246
History
Date User Action Args
2020-07-11 20:29:20ned.deilysetstatus: open -> closed
resolution: third party
stage: resolved
2020-07-11 09:05:26hugovksetmessages: + msg373520
2020-07-10 14:45:31xtreaksetnosy: + xtreak
2020-07-10 12:47:44hugovkcreate