plone / bobtemplates.plone

Python Code Templates for Plone Projects with mr.bob
https://pypi.org/project/bobtemplates.plone/
GNU General Public License v2.0
24 stars 31 forks source link

Workon support for Python 3.10 #509

Closed pbauer closed 1 year ago

pbauer commented 2 years ago

This depends on https://github.com/domenkozar/mr.bob/pull/92

pbauer commented 2 years ago

Why do tests of py3.9 and 3.10 take 48 minutes? Also: I do not understand the failure of the 3.10-test. On tox -e py310-skeletontests-Plone60-template-addon I get:

/Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/lib/python3.10/site-packages/setuptools/dist.py:287: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
  warnings.warn(msg, SetuptoolsDeprecationWarning)
py310-skeletontests-Plone60-template-addon develop-inst-noop: /Users/pbauer/workspace/bobtemplates.plone
py310-skeletontests-Plone60-template-addon installed: attrs==21.4.0,black==22.6.0,-e git+https://github.com/plone/bobtemplates.plone.git@a95b0d3141419c995f2e4700f0be14ab7f2cd2a3#egg=bobtemplates.plone,case-conversion==2.1.0,click==8.1.3,colorama==0.4.5,coverage==6.4.2,distlib==0.3.5,fancycompleter==0.9.1,filelock==3.7.1,iniconfig==1.1.1,isort==5.10.1,Jinja2==3.1.2,lxml==4.9.1,MarkupSafe==2.1.1,mr.bob @ git+https://github.com/collective/mr.bob@8ee956f7155320d2649ec1758f68cea797d74405,mypy-extensions==0.4.3,packaging==21.3,pathspec==0.9.0,pdbpp==0.10.3,platformdirs==2.5.2,pluggy==1.0.0,py==1.11.0,Pygments==2.12.0,pyparsing==3.0.9,pyrepl==0.9.0,pytest==7.1.2,pytest-cov==3.0.0,pytest-html==3.1.1,pytest-metadata==2.0.2,pytest-mock==3.8.2,regex==2022.7.9,six==1.16.0,toml==0.10.2,tomli==2.0.1,tox==3.25.1,virtualenv==20.15.1,wmctrl==0.4
py310-skeletontests-Plone60-template-addon run-test-pre: PYTHONHASHSEED='139583964'
py310-skeletontests-Plone60-template-addon run-test: commands[0] | mkdir -p /Users/pbauer/workspace/bobtemplates.plone/_build/reports/coverage /Users/pbauer/workspace/bobtemplates.plone/_build/reports/pytest
py310-skeletontests-Plone60-template-addon run-test: commands[1] | pytest skeleton-tests/test_addon.py
================================================= test session starts ==================================================
platform darwin -- Python 3.10.4, pytest-7.1.2, pluggy-1.0.0
cachedir: .tox/py310-skeletontests-Plone60-template-addon/.pytest_cache
rootdir: /Users/pbauer/workspace/bobtemplates.plone, configfile: setup.cfg
plugins: html-3.1.1, mock-3.8.2, cov-3.0.0, metadata-2.0.2
collected 1 item

skeleton-tests/test_addon.py
Welcome to mr.bob non-interactive mode. Questions will be answered by default values or hooks.

GIT support disabled!!!

isort-apply: successful:
isort-apply create: /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/isort-apply
isort-apply installdeps: -cconstraints.txt, isort
isort-apply installed: isort==5.10.1
isort-apply run-test-pre: PYTHONHASHSEED='1175535140'
isort-apply run-test: commands[0] | isort /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/setup.py
Fixing /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src/collective/task/__init__.py
Fixing /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src/collective/task/testing.py
Fixing /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src/collective/task/locales/update.py
Fixing /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src/collective/task/tests/test_setup.py
Fixing /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src/collective/task/tests/test_robot.py
Fixing /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/setup.py
_______________________________________________________ summary ________________________________________________________
  isort-apply: commands succeeded
  congratulations :)

black-enforce: successful:
black-enforce create: /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/black-enforce
black-enforce installdeps: -cconstraints.txt, black
black-enforce installed: black==22.3.0,click==8.1.3,mypy-extensions==0.4.3,pathspec==0.9.0,platformdirs==2.5.2,tomli==2.0.1,typing_extensions==4.3.0
black-enforce run-test-pre: PYTHONHASHSEED='3973737941'
black-enforce run-test: commands[0] | black -v src setup.py
Identified `/` as project root containing a file system root.
Sources to be formatted: "private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src", "private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/setup.py"
src/collective/task/browser/__init__.py already well formatted, good job.
src/collective/__init__.py already well formatted, good job.
src/collective/task/interfaces.py already well formatted, good job.
src/collective/task/locales/__init__.py already well formatted, good job.
reformatted src/collective/task/__init__.py
reformatted src/collective/task/setuphandlers.py
reformatted setup.py
reformatted src/collective/task/testing.py
src/collective/task/tests/__init__.py already well formatted, good job.
reformatted src/collective/task/locales/update.py
reformatted src/collective/task/tests/test_robot.py
reformatted src/collective/task/tests/test_setup.py

All done! ✨ 🍰 ✨
7 files reformatted, 5 files left unchanged.
_______________________________________________________ summary ________________________________________________________
  black-enforce: commands succeeded
  congratulations :)

GIT support disabled!
Generated file structure at /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/collective.task

using tox.ini: /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/tox.ini (pid 12534)
'exit code 127' cmd '/Users/pbauer/.pyenv/shims/python3.7' out '' err "pyenv: python3.7: command not found\n\nThe `python3.7' command exists in these Python versions:\n  3.7.12\n\nNote: See 'pyenv help global' for tips on allowing both\n      python2 and python3 to be found.\n"
'exit code 127' cmd '/Users/pbauer/.pyenv/shims/python3.8' out '' err "pyenv: python3.8: command not found\n\nThe `python3.8' command exists in these Python versions:\n  3.8.12\n  3.8.12/envs/pass\n  pass\n\nNote: See 'pyenv help global' for tips on allowing both\n      python2 and python3 to be found.\n"
using tox-3.25.1 from /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/lib/python3.10/site-packages/tox/__init__.py (pid 12534)
[12928] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task$ /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/bin/python /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/lib/python3.10/site-packages/tox/__main__.py -e py310-Plone60,py310-lint -p auto -o -v -r
[12929] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task$ /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/bin/python /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/lib/python3.10/site-packages/tox/__main__.py -e py310-Plone60,py310-lint -p auto -o -v -r
using tox.ini: /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/tox.ini (pid 12929)
using tox.ini: /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/tox.ini (pid 12928)
'exit code 127' cmd '/Users/pbauer/.pyenv/shims/python3.7' out '' err "pyenv: python3.7: command not found\n\nThe `python3.7' command exists in these Python versions:\n  3.7.12\n\nNote: See 'pyenv help global' for tips on allowing both\n      python2 and python3 to be found.\n"
'exit code 127' cmd '/Users/pbauer/.pyenv/shims/python3.8' out '' err "pyenv: python3.8: command not found\n\nThe `python3.8' command exists in these Python versions:\n  3.8.12\n  3.8.12/envs/pass\n  pass\n\nNote: See 'pyenv help global' for tips on allowing both\n      python2 and python3 to be found.\n"
'exit code 127' cmd '/Users/pbauer/.pyenv/shims/python3.7' out '' err "pyenv: python3.7: command not found\n\nThe `python3.7' command exists in these Python versions:\n  3.7.12\n\nNote: See 'pyenv help global' for tips on allowing both\n      python2 and python3 to be found.\n"
'exit code 127' cmd '/Users/pbauer/.pyenv/shims/python3.8' out '' err "pyenv: python3.8: command not found\n\nThe `python3.8' command exists in these Python versions:\n  3.8.12\n  3.8.12/envs/pass\n  pass\n\nNote: See 'pyenv help global' for tips on allowing both\n      python2 and python3 to be found.\n"
using tox-3.25.1 from /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/lib/python3.10/site-packages/tox/__init__.py (pid 12929)
using tox-3.25.1 from /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/lib/python3.10/site-packages/tox/__init__.py (pid 12928)
py310-Plone60 cannot reuse: -r flag
py310-Plone60 create: /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60
[13700] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox$ /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/bin/python -m virtualenv --no-download --python /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/bin/python py310-Plone60 >py310-Plone60/log/py310-Plone60-0.log
ERROR: invocation failed (exit code 1)
✖ FAIL py310-lint in 0.556 seconds
py310-Plone60 installdeps: -rrequirements_plone60.txt, -cconstraints_plone60.txt, coverage
[13701] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task$ /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/python -m pip install -rrequirements_plone60.txt -cconstraints_plone60.txt coverage >.tox/py310-Plone60/log/py310-Plone60-1.log
write config to /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/.tox-config1 as '990b049b13c640df4a4e24eca16638f09b20a9189e0a43dd6a8cfc8108b23975 /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/bin/python\n3.25.1 0 0 0\n00000000000000000000000000000000 -rrequirements_plone60.txt\n00000000000000000000000000000000 -cconstraints_plone60.txt\n00000000000000000000000000000000 coverage'
[13703] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task$ /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/python -m pip freeze >.tox/py310-Plone60/log/py310-Plone60-2.log
py310-Plone60 installed: coverage==6.4.2,zc.buildout==3.0.0rc3
py310-Plone60 run-test-pre: PYTHONHASHSEED='3017772134'
py310-Plone60 run-test: commands[0] | /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/buildout -q -c /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/test_plone60.cfg buildout:directory=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60 buildout:develop=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task bootstrap
[13704] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task$ /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/buildout -q -c test_plone60.cfg buildout:directory=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60 buildout:develop=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task bootstrap
py310-Plone60 run-test: commands[1] | /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/buildout -n -qq -c /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/test_plone60.cfg buildout:directory=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60 buildout:develop=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task install test robot
[13705] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task$ /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/buildout -n -qq -c test_plone60.cfg buildout:directory=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60 buildout:develop=/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task install test robot
/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/lib/python3.10/site-packages/setuptools/dist.py:287: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
  warnings.warn(msg, SetuptoolsDeprecationWarning)
/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
warning: no previously-included files matching '*.pyc' found anywhere in distribution
Versions had to be automatically picked.
The following part definition lists the versions picked:
[versions]

# Required by:
# collective.task==1.0a1
z3c.jbot = 1.1.1
Picked versions have been written to test_plone60.cfg
py310-Plone60 run-test: commands[2] | coverage run /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/test -v1 --auto-color
[13708] /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task$ /private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/.tox/py310-Plone60/bin/coverage run .tox/py310-Plone60/bin/test -v1 --auto-color
/Users/pbauer/.cache/buildout/eggs/cp310/Products.PlonePAS-7.0.0a3-py3.10.egg/Products/PlonePAS/config.py:16: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
  PIL_SCALING_ALGO = Image.ANTIALIAS
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.robotframework-2.0.0b1-py3.10.egg/plone/app/robotframework/quickinstaller.py:3: DeprecationWarning: get_installer is deprecated. Import from plone.base.utils instead (will be removed in Plone 7)
  from Products.CMFPlone.utils import get_installer
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.robotframework-2.0.0b1-py3.10.egg/plone/app/robotframework/users.py:5: DeprecationWarning: ISecuritySchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import ISecuritySchema
/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0/collective.task/src/collective/task/testing.py:54: DeprecationWarning: ZSERVER_FIXTURE is deprecated. Please import from plone.testing.zope.
  z2.ZSERVER_FIXTURE,
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.linkintegrity-3.6.1-py3.10.egg/plone/app/linkintegrity/utils.py:3: DeprecationWarning: IEditingSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IEditingSchema
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.linkintegrity-3.6.1-py3.10.egg/plone/app/linkintegrity/handlers.py:13: DeprecationWarning: IPloneSiteRoot is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IPloneSiteRoot
Running tests at level 1
Running collective.task.testing.CollectiveTaskLayer:IntegrationTesting tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.zope.Startup in 0.117 seconds.
  Set up plone.app.testing.layers.PloneFixture /Users/pbauer/.cache/buildout/eggs/cp310/Products.PortalTransforms-3.2.0-py3.10.egg/Products/PortalTransforms/transforms/safe_html.py:5: DeprecationWarning: IFilterSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IFilterSchema
/Users/pbauer/.cache/buildout/eggs/cp310/Products.PortalTransforms-3.2.0-py3.10.egg/Products/PortalTransforms/transforms/markdown_to_html.py:8: DeprecationWarning: IMarkupSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IMarkupSchema
/Users/pbauer/.cache/buildout/eggs/cp310/Products.CMFPlacefulWorkflow-3.0.0b1-py3.10.egg/Products/CMFPlacefulWorkflow/adapter.py:24: DeprecationWarning: IWorkflowChain is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IWorkflowChain
/Users/pbauer/.cache/buildout/eggs/cp310/zope.configuration-4.4.1-py3.10.egg/zope/configuration/config.py:239: DeprecationWarning: IMigratingPloneSiteRoot is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  obj = getattr(mod, oname)
/Users/pbauer/.cache/buildout/eggs/cp310/plone.staticresources-2.0.0b5-py3.10.egg/plone/staticresources/setuphandlers.py:5: DeprecationWarning: INonInstallable is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import INonInstallable
/Users/pbauer/.cache/buildout/eggs/cp310/Products.CMFPlone-6.0.0b1-py3.10.egg/Products/CMFPlone/controlpanel/browser/editing.py:1: DeprecationWarning: PloneMessageFactory is deprecated. Import from plone.base instead (to be removed in Plone 7)
  from Products.CMFPlone import PloneMessageFactory as _
/Users/pbauer/.cache/buildout/eggs/cp310/plone.formwidget.namedfile-3.0.0a5-py3.10.egg/plone/formwidget/namedfile/utils.py:2: DeprecationWarning: IImagingSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IImagingSchema
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.widgets-4.0.0a2-py3.10.egg/plone/app/widgets/utils.py:10: DeprecationWarning: get_top_site_from_url is deprecated. Import from plone.base.utils instead (will be removed in Plone 7)
  from Products.CMFPlone.utils import get_top_site_from_url
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.vocabularies-4.3.0-py3.10.egg/plone/app/vocabularies/syndication.py:17: DeprecationWarning: Products.CMFPlone.interfaces.syndication has moved to plone.base.interfaces.syndication. Import of Products.CMFPlone.interfaces.syndication will become unsupported in Version 7.0
  from Products.CMFPlone.interfaces.syndication import ISiteSyndicationSettings  # noqa
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.contentmenu-3.0.0b2-py3.10.egg/plone/app/contentmenu/view.py:3: DeprecationWarning: Products.CMFPlone.interfaces.controlpanel has moved to plone.base.interfaces.controlpanel. Import of Products.CMFPlone.interfaces.controlpanel will become unsupported in Version 7.0
  from Products.CMFPlone.interfaces.controlpanel import ISiteSchema
/Users/pbauer/.cache/buildout/eggs/cp310/plone.stringinterp-1.3.3-py3.10.egg/plone/stringinterp/adapters.py:25: DeprecationWarning: Products.CMFPlone.i18nl10n has moved to plone.base.i18nl10n. Import of Products.CMFPlone.i18nl10n will become unsupported in Version 7.0
  from Products.CMFPlone.i18nl10n import ulocalized_time
/Users/pbauer/.cache/buildout/eggs/cp310/zope.configuration-4.4.1-py3.10.egg/zope/configuration/config.py:239: DeprecationWarning: IHideFromBreadcrumbs is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  obj = getattr(mod, oname)
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.portlets-5.0.0b2-py3.10.egg/plone/app/portlets/portlets/news.py:14: DeprecationWarning: ISiteSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import ISiteSchema
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.linkintegrity-3.6.1-py3.10.egg/plone/app/linkintegrity/browser/info.py:11: DeprecationWarning: Products.CMFPlone.interfaces.siteroot has moved to plone.base.interfaces.siteroot. Import of Products.CMFPlone.interfaces.siteroot will become unsupported in Version 7.0
  from Products.CMFPlone.interfaces.siteroot import IPloneSiteRoot
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.multilingual-6.0.0b1-py3.10.egg/plone/app/multilingual/manager.py:18: DeprecationWarning: ILanguage is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import ILanguage
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.multilingual-6.0.0b1-py3.10.egg/plone/app/multilingual/browser/menu.py:21: DeprecationWarning: Products.CMFPlone.defaultpage has moved to plone.base.defaultpage. Import of Products.CMFPlone.defaultpage will become unsupported in Version 7.0
  from Products.CMFPlone.defaultpage import is_default_page
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.users-3.0.0b1-py3.10.egg/plone/app/users/browser/register.py:22: DeprecationWarning: IUserGroupsSettingsSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IUserGroupsSettingsSchema
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.upgrade-3.0.0b3-py3.10.egg/plone/app/upgrade/v60/alphas.py:9: DeprecationWarning: IBundleRegistry is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IBundleRegistry
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.theming-5.0.0a5-py3.10.egg/plone/app/theming/browser/controlpanel.py:23: DeprecationWarning: ILinkSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import ILinkSchema
/Users/pbauer/.cache/buildout/eggs/cp310/Products.CMFPlone-6.0.0b1-py3.10.egg/Products/CMFPlone/__init__.py:75: DeprecationWarning: Products.CMFPlone.PloneBatch has moved to plone.base.batch. Import of Products.CMFPlone.PloneBatch will become unsupported in Version 7.0
  from Products.CMFPlone.PloneBatch import Batch
/Users/pbauer/.cache/buildout/eggs/cp310/zope.configuration-4.4.1-py3.10.egg/zope/configuration/name.py:53: DeprecationWarning: IMigrationTool is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  a = getattr(m, last)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: IMaintenanceSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: IMailSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: INavigationSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: ISearchSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: ITinyMCESchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: IDateAndTimeSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: ISocialMediaSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: ITypesSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/zope.dottedname-4.3-py3.10.egg/zope/dottedname/resolve.py:43: DeprecationWarning: ILoginSchema is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  found = getattr(found, n)
/Users/pbauer/.cache/buildout/eggs/cp310/plone.app.theming-5.0.0a5-py3.10.egg/plone/app/theming/utils.py:440: DeprecationWarning: Use plone.base.utils.safe_text instead (will be removed in Plone 7)
  themes.sort(key=lambda x: safe_unicode(x.title))
in 3.939 seconds.
  Set up collective.task.testing.CollectiveTaskLayer /Users/pbauer/.cache/buildout/eggs/cp310/zope.configuration-4.4.1-py3.10.egg/zope/configuration/config.py:239: DeprecationWarning: ITestCasePloneSiteRoot is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  obj = getattr(mod, oname)
/Users/pbauer/.cache/buildout/eggs/cp310/plone.restapi-8.23.0-py3.10.egg/plone/restapi/services/contextnavigation/get.py:24: DeprecationWarning: INonStructuralFolder is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import INonStructuralFolder
/Users/pbauer/.cache/buildout/eggs/cp310/plone.restapi-8.23.0-py3.10.egg/plone/restapi/services/types/get.py:10: DeprecationWarning: IConstrainTypes is deprecated. Moved to plone.base.interfaces, import from there instead (will be removed in Plone 7).
  from Products.CMFPlone.interfaces import IConstrainTypes
in 0.408 seconds.
  Set up collective.task.testing.CollectiveTaskLayer:IntegrationTesting in 0.000 seconds.
  Running:

  Ran 4 tests with 0 failures, 0 errors and 0 skipped in 0.034 seconds.
Tearing down left over layers:
  Tear down collective.task.testing.CollectiveTaskLayer:IntegrationTesting in 0.000 seconds.
  Tear down collective.task.testing.CollectiveTaskLayer in 0.002 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.016 seconds.
  Tear down plone.testing.zope.Startup in 0.002 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.000 seconds.
✔ OK py310-Plone60 in 21.128 seconds
_______________________________________________________ summary ________________________________________________________
  py310-Plone60: commands succeeded
ERROR:   py310-lint: parallel child exit code 1
F                                                                                                                                    [100%]

=============================================================================== FAILURES ================================================================================
______________________________________________________________________________ test_addon _______________________________________________________________________________

tmpdir = local('/private/var/folders/6t/_1_p43ms5j7b519d4cdc8jbr0000gn/T/pytest-of-pbauer/pytest-0/test_addon0')
capsys = <_pytest.capture.CaptureFixture object at 0x102a47400>, config = <conftest.Config object at 0x102a47010>

    def test_addon(tmpdir, capsys, config):
        template = """[variables]
    package.description = Dummy package
    package.example = True
    package.git.disabled = True

    author.name = The Plone Collective
    author.email = collective@plone.org
    author.github.user = collective

    plone.version = {version}
    """.format(
            version=config.version,
        )
        generate_answers_ini(tmpdir.strpath, template)

        config.template = "addon"
        config.package_name = "collective.task"

        with capsys.disabled():
            result = subprocess.call(
                [
                    "mrbob",
                    "-O",
                    config.package_name,
                    "bobtemplates.plone:" + config.template,
                    "--config",
                    "answers.ini",
                    "--non-interactive",
                ],
                cwd=tmpdir.strpath,
            )
            assert result == 0

        generated_files = glob.glob(
            tmpdir.strpath + "/" + config.package_name + "/*",
        )
        length = len(tmpdir.strpath + "/" + config.package_name + "/")
        generated_files = [f[length:] for f in generated_files]
        required_files = base_files + addon_files
        assert required_files <= generated_files

        base_path = tmpdir.strpath + "/" + config.package_name

        assert file_exists(base_path, "/src/collective/task/configure.zcml")

        wd = os.path.abspath(
            os.path.join(tmpdir.strpath, config.package_name),
        )

        with capsys.disabled():
            returncode = run_skeleton_tox_env(wd, config)
>           assert (
                returncode == 0
            ), "The tests inside the generated package are failing, please check the output above!"
E           AssertionError: The tests inside the generated package are failing, please check the output above!
E           assert 1 == 0

skeleton-tests/test_addon.py:74: AssertionError
======================================================================== short test summary info ========================================================================
FAILED skeleton-tests/test_addon.py::test_addon - AssertionError: The tests inside the generated package are failing, please check the output above!
========================================================================== 1 failed in 31.17s ===========================================================================
ERROR: InvocationError for command /Users/pbauer/workspace/bobtemplates.plone/.tox/py310-skeletontests-Plone60-template-addon/bin/pytest skeleton-tests/test_addon.py (exited with code 1)
________________________________________________________________________________ summary ________________________________________________________________________________
ERROR:   py310-skeletontests-Plone60-template-addon: commands failed
mamico commented 1 year ago

@pbauer I've synced the branch with the main branch, and attempted to fix your issue, updating the tox.ini inside the template.

btw, I don't have any clue about slowness during GHA tests, locally are faster.

p.s. I'm sorry, if I directly committed in your branch :)

MrTango commented 1 year ago

the test take always a while, we are testing a lot, but might be that GH is not outperforming it self here. But hey it's free ;)

MrTango commented 1 year ago

I also dropped Python 3.7 in the CI, that should save some time.