Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allowlist_externals=make to fix tox 4 #6801

Merged
merged 2 commits into from Dec 13, 2022

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Dec 13, 2022

Calling make (without allowlist_externals = make in tox.ini) gives a deprecation warning in tox 3 and an error in tox 4.

Add allowlist_externals = make to remove the warning and error.

Also format tox.ini with https://github.com/tox-dev/tox-ini-fmt

Before

tox 3.27.1

Warns about using make without allowlist_externals

$ tox -e py311
GLOB sdist-make: /Users/hugo/github/Pillow/setup.py
py311 create: /Users/hugo/github/Pillow/.tox/py311
py311 installdeps: cffi, numpy
py311 inst: /Users/hugo/github/Pillow/.tox/.tmp/package/5/Pillow-9.4.0.dev0.zip
py311 installed: attrs==22.1.0,build==0.9.0,certifi==2022.12.7,cffi==1.15.1,charset-normalizer==2.1.1,check-manifest==0.49,coverage==6.5.0,defusedxml==0.7.1,docutils==0.19,idna==3.4,iniconfig==1.1.1,markdown2==2.4.6,numpy==1.23.5,olefile==0.46,packaging==22.0,pep517==0.13.0,Pillow @ file:///Users/hugo/github/Pillow/.tox/.tmp/package/5/Pillow-9.4.0.dev0.zip,pluggy==1.0.0,pycparser==2.21,Pygments==2.13.0,pyroma==4.1,pytest==7.2.0,pytest-cov==4.0.0,pytest-timeout==2.1.0,requests==2.28.1,trove-classifiers==2022.12.1,urllib3==1.26.13
py311 run-test-pre: PYTHONHASHSEED='3385010674'
py311 run-test: commands[0] | make clean
WARNING: test command found but not installed in testenv
  cmd: /usr/bin/make
  env: /Users/hugo/github/Pillow/.tox/py311
Maybe you forgot to specify a dependency? See also the allowlist_externals envconfig setting.

DEPRECATION WARNING: this will be an error in tox 4 and above!
python3 setup.py clean
...

tox 4.0.8

As promised, fails when using make without allowlist_externals

$ tox -e py311
.pkg: _optional_hooks> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py311: install_package> python -I -m pip install --force-reinstall --no-deps /Users/hugo/github/Pillow/.tox/.tmp/package/4/Pillow-9.4.0.dev0.tar.gz
py311: commands[0]> make clean
py311: failed with make is not allowed, use allowlist_externals to allow it
.pkg: _exit> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  py311: FAIL code 1 (24.65 seconds)
  evaluation failed :( (24.68 seconds)

After

tox 3.27.1

No warning

$ ⌂10.76 [hugo:~/github/Pillow] fix-tox-4+* ± tox -e py311
GLOB sdist-make: /Users/hugo/github/Pillow/setup.py
py311 inst-nodeps: /Users/hugo/github/Pillow/.tox/.tmp/package/5/Pillow-9.4.0.dev0.zip
py311 installed: attrs==22.1.0,build==0.9.0,certifi==2022.12.7,cffi==1.15.1,charset-normalizer==2.1.1,check-manifest==0.49,coverage==6.5.0,defusedxml==0.7.1,docutils==0.19,idna==3.4,iniconfig==1.1.1,markdown2==2.4.6,numpy==1.23.5,olefile==0.46,packaging==22.0,pep517==0.13.0,Pillow @ file:///Users/hugo/github/Pillow/.tox/.tmp/package/5/Pillow-9.4.0.dev0.zip,pluggy==1.0.0,pycparser==2.21,Pygments==2.13.0,pyroma==4.1,pytest==7.2.0,pytest-cov==4.0.0,pytest-timeout==2.1.0,requests==2.28.1,trove-classifiers==2022.12.1,urllib3==1.26.13
py311 run-test-pre: PYTHONHASHSEED='1473613542'
py311 run-test: commands[0] | make clean
python3 setup.py clean
...

tox 4.0.8

No error

$ tox -e py311
py311: install_deps> python -I -m pip install cffi numpy
.pkg: _optional_hooks> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py311: install_package_deps> python -I -m pip install check-manifest coverage defusedxml markdown2 olefile packaging pyroma pytest pytest-cov pytest-timeout
py311: install_package> python -I -m pip install --force-reinstall --no-deps /Users/hugo/github/Pillow/.tox/.tmp/package/5/Pillow-9.4.0.dev0.tar.gz
py311: commands[0]> make clean
python3 setup.py clean
...

@hugovk hugovk added the Testing label Dec 13, 2022
@radarhere radarhere merged commit d37c168 into python-pillow:main Dec 13, 2022
@hugovk hugovk deleted the fix-tox-4 branch December 13, 2022 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants