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

Build failing on v0.13, but no issues on 0.12.10 #807

Closed
kharoutaj opened this issue Oct 2, 2021 · 10 comments · Fixed by #808
Closed

Build failing on v0.13, but no issues on 0.12.10 #807

kharoutaj opened this issue Oct 2, 2021 · 10 comments · Fixed by #808
Labels

Comments

@kharoutaj
Copy link

My project seems to fail to build on the 0.13 release and I was wondering if there are any breaking changes or what could possibly be going wrong that was not an issue on 0.12.10. The traceback does seem to point to importlib, but I figured this could be of use in case there is some other issue.

Traceback (most recent call last):
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/cli.py", line 475, in main
    summary = reactor.build(
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/reactor.py", line 235, in build
    execution_summary = self.build_execution_plan(tasks, execution_plan)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/reactor.py", line 270, in build_execution_plan
    task_execution_summaries = self.execution_manager.execute_execution_plan(
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 393, in execute_execution_plan
    summaries.append(self.execute_task(task, **kwargs))
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 340, in execute_task
    task.execute(self.logger, kwargs, _executable=_executable)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 179, in execute
    executable.execute(argument_dict)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 95, in execute
    self.callable(*arguments)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 65, in run_unit_tests
    run_tests(project, logger, reactor, "unittest", "unit tests")
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 90, in run_tests
    result, console_out = execute_tests_matching(
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 144, in execute_tests_matching
    tests = pipe.get_exposed("unittest_tests")
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/remote/__init__.py", line 667, in get_exposed
    return self._recv()  # type: _BaseProxy
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/remote/__init__.py", line 942, in _recv
    raise data[1]
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/remote_tools/unittest_tool.py", line 43, in start
    tests = loader.loadTestsFromNames(self.test_modules)
  File "/usr/lib/python3.8/unittest/loader.py", line 220, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.8/unittest/loader.py", line 220, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.8/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/home/dev/testing/common/src/unittest/python/util/url_tests.py", line 8, in <module>
    import seven_common.util.url as url
  File "/home/dev/testing/common/src/main/python/seven_common/util/url.py", line 3, in <module>
    from .data import transform_values
  File "/home/dev/testing/common/src/main/python/seven_common/util/data.py", line 10, in <module>
    from openapi_schema_validator import validate
  File "/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/lib/python3.8/site-packages/openapi_schema_validator/__init__.py", line 2, in <module>
    from openapi_schema_validator._format import oas30_format_checker
  File "/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/lib/python3.8/site-packages/openapi_schema_validator/_format.py", line 6, in <module>
    from jsonschema._format import FormatChecker
  File "/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/lib/python3.8/site-packages/jsonschema/__init__.py", line 34, in <module>
    __version__ = metadata.version("jsonschema")
  File "/usr/lib/python3.8/importlib/metadata.py", line 530, in version
    return distribution(distribution_name).version
  File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.8/importlib/metadata.py", line 173, in from_name
    dist = next(dists, None)
TypeError: 'list' object is not an iterator
@arcivanov
Copy link
Member

arcivanov commented Oct 2, 2021

That's very interesting, thanks!

Could you please post pyb -vX log in full?

@kharoutaj
Copy link
Author

Sure. Thanks for taking a look.

pyb --reset-plugins -vX
[DEBUG] Registered Python environment 'system': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/testing/bin/python3']
PyBuilder version 0.13.0
Build started at 2021-10-01 19:54:05
------------------------------------------------------------
[DEBUG] Loading project module from ./build.py
[DEBUG] Setting up plugins VEnv at '/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0' (resetting)
[DEBUG] Registered Python environment 'pybuilder': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0/bin/python3']
[DEBUG] Patched __import__ system to defer plugin loading
[DEBUG] Loading plugin 'python.core'
[DEBUG] Trying to load direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Found direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Loading plugin 'python.unittest'
[DEBUG] Trying to load direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Found direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Loading plugin 'python.integrationtest'
[DEBUG] Trying to load direct plugin 'python.integrationtest', module 'pybuilder.plugins.python.integrationtest_plugin'
[DEBUG] Found direct plugin 'python.integrationtest', module 'pybuilder.plugins.python.integrationtest_plugin'
[DEBUG] Loading plugin 'python.install_dependencies'
[DEBUG] Trying to load direct plugin 'python.install_dependencies', module 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Found direct plugin 'python.install_dependencies', module 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Loading plugin 'python.flake8'
[DEBUG] Trying to load direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Found direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Loading plugin 'python.distutils'
[DEBUG] Trying to load direct plugin 'python.distutils', module 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Found direct plugin 'python.distutils', module 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Loading plugin 'core'
[DEBUG] Trying to load direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Found direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Found task 'clean' with dependencies []
[DEBUG] Registering task 'clean'
[DEBUG] Found task 'compile_sources' with dependencies [prepare]
[DEBUG] Registering task 'compile_sources'
[DEBUG] Registering initializer 'init'
[DEBUG] Found task 'install' with dependencies [package, publish(optional)]
[DEBUG] Registering task 'install'
[DEBUG] Found task 'package' with dependencies [compile_sources, run_unit_tests(optional)]
[DEBUG] Registering task 'package'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Found task 'print_module_path' with dependencies []
[DEBUG] Registering task 'print_module_path'
[DEBUG] Found task 'print_scripts_path' with dependencies []
[DEBUG] Registering task 'print_scripts_path'
[DEBUG] Found task 'publish' with dependencies [package, verify(optional)]
[DEBUG] Registering task 'publish'
[DEBUG] Found task 'run_integration_tests' with dependencies [package]
[DEBUG] Registering task 'run_integration_tests'
[DEBUG] Found task 'run_unit_tests' with dependencies [compile_sources]
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found task 'verify' with dependencies [run_integration_tests(optional)]
[DEBUG] Registering task 'verify'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Registering initializer 'init_python_directories'
[DEBUG] Found task 'package' with dependencies []
[DEBUG] Registering task 'package'
[DEBUG] Found action coverage_init
[DEBUG] Registering action 'coverage_init'
[DEBUG] Registering initializer 'init_test_source_directory'
[DEBUG] Found task 'run_unit_tests' with dependencies []
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found action coverage_init
[DEBUG] Registering action 'coverage_init'
[DEBUG] Registering initializer 'initialize_integrationtest_plugin'
[DEBUG] Found task 'run_integration_tests' with dependencies []
[DEBUG] Registering task 'run_integration_tests'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Registering initializer 'initialize_install_dependencies_plugin'
[DEBUG] Found task 'install_build_dependencies' with dependencies [prepare]
[DEBUG] Registering task 'install_build_dependencies'
[DEBUG] Found task 'install_dependencies' with dependencies [prepare]
[DEBUG] Registering task 'install_dependencies'
[DEBUG] Found task 'install_runtime_dependencies' with dependencies [prepare]
[DEBUG] Registering task 'install_runtime_dependencies'
[DEBUG] Found task 'list_dependencies' with dependencies []
[DEBUG] Registering task 'list_dependencies'
[DEBUG] Found task 'analyze' with dependencies [prepare]
[DEBUG] Registering task 'analyze'
[DEBUG] Found action assert_flake8_is_executable
[DEBUG] Registering action 'assert_flake8_is_executable'
[DEBUG] Registering initializer 'initialize_flake8_plugin'
[DEBUG] Found action build_binary_distribution
[DEBUG] Registering action 'build_binary_distribution'
[DEBUG] Registering initializer 'initialize_distutils_plugin'
[DEBUG] Found task 'install' with dependencies []
[DEBUG] Registering task 'install'
[DEBUG] Found action set_description
[DEBUG] Registering action 'set_description'
[DEBUG] Found task 'upload' with dependencies []
[DEBUG] Registering task 'upload'
[DEBUG] Found action write_manifest_file
[DEBUG] Registering action 'write_manifest_file'
[DEBUG] Found action write_setup_script
[DEBUG] Registering action 'write_setup_script'
[DEBUG] Have loaded plugins python.core, python.unittest, python.integrationtest, python.install_dependencies, python.flake8, python.distutils, core
[DEBUG] Registering initializer 'initialize'
[DEBUG] Adding 'prepare' as a dependency of task 'compile_sources'
[DEBUG] Adding 'package' as a dependency of task 'install'
[DEBUG] Adding 'publish(optional)' as a dependency of task 'install'
[DEBUG] Adding 'compile_sources' as a dependency of task 'package'
[DEBUG] Adding 'run_unit_tests(optional)' as a dependency of task 'package'
[DEBUG] Adding 'package' as a dependency of task 'publish'
[DEBUG] Adding 'verify(optional)' as a dependency of task 'publish'
[DEBUG] Adding 'package' as a dependency of task 'run_integration_tests'
[DEBUG] Adding 'compile_sources' as a dependency of task 'run_unit_tests'
[DEBUG] Adding 'run_integration_tests(optional)' as a dependency of task 'verify'
[DEBUG] Adding 'prepare' as a dependency of task 'install_build_dependencies'
[DEBUG] Adding 'prepare' as a dependency of task 'install_dependencies'
[DEBUG] Adding 'prepare' as a dependency of task 'install_runtime_dependencies'
[DEBUG] Adding 'prepare' as a dependency of task 'analyze'
[DEBUG] Adding before action 'coverage_init' for task 'prepare'
[DEBUG] Adding before action 'coverage_init' for task 'prepare'
[DEBUG] Adding after action 'assert_flake8_is_executable' for task 'prepare'
[DEBUG] Adding before action 'build_binary_distribution' for task 'publish'
[DEBUG] Adding after action 'set_description' for task 'prepare'
[DEBUG] Adding after action 'write_manifest_file' for task 'package'
[DEBUG] Adding after action 'write_setup_script' for task 'package'
[DEBUG] Verbose output enabled.

[DEBUG] Executing initializer 'init' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing initializer 'init_python_directories' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Executing initializer 'init_test_source_directory' from 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Executing initializer 'initialize_integrationtest_plugin' from 'pybuilder.plugins.python.integrationtest_plugin'
[DEBUG] Executing initializer 'initialize_install_dependencies_plugin' from 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Executing initializer 'initialize_flake8_plugin' from 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Executing initializer 'initialize_distutils_plugin' from 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Executing initializer 'initialize' from 'build'
[DEBUG] Project properties: 
                                 basedir : /home/dev/testing/common
                                dir_dist : $dir_target/dist/seven-common-0.1.28
                        dir_dist_scripts : scripts
                        dir_install_logs : $dir_logs/install_dependencies
                                dir_logs : $dir_target/logs
                             dir_reports : $dir_target/reports
       dir_source_integrationtest_python : src/integrationtest/python
                  dir_source_main_python : src/main/python
                 dir_source_main_scripts : src/main/scripts
              dir_source_unittest_python : src/unittest/python
                              dir_target : target
                   distutils_classifiers : ['Development Status :: 3 - Alpha', 'Programming Language :: Python']
               distutils_command_options : None
                      distutils_commands : ['sdist', 'bdist_wheel']
               distutils_console_scripts : None
         distutils_description_overwrite : False
                  distutils_entry_points : None
              distutils_fail_on_warnings : False
  distutils_issue8876_workaround_enabled : False
            distutils_readme_description : False
                   distutils_readme_file : README.md
           distutils_readme_file_convert : False
          distutils_readme_file_encoding : None
              distutils_readme_file_type : None
           distutils_readme_file_variant : None
                distutils_setup_keywords : None
             distutils_summary_overwrite : False
               distutils_upload_register : False
             distutils_upload_repository : None
         distutils_upload_repository_key : None
                   distutils_upload_sign : False
          distutils_upload_sign_identity : None
          distutils_upload_skip_existing : False
                distutils_use_setuptools : True
                      distutils_zip_safe : True
                      flake8_break_build : True
                 flake8_exclude_patterns : None
                    flake8_extend_ignore : None
                           flake8_ignore : None
                 flake8_include_patterns : None
                  flake8_include_scripts : False
             flake8_include_test_sources : True
                   flake8_max_complexity : None
                  flake8_max_line_length : 120
                   flake8_verbose_output : True
        install_dependencies_constraints : constraints_file
    install_dependencies_extra_index_url : None
          install_dependencies_index_url : None
install_dependencies_insecure_installation : []
      install_dependencies_local_mapping : {}
       install_dependencies_trusted_host : None
            install_dependencies_upgrade : False
                             install_env : system
  integrationtest_additional_commandline : 
  integrationtest_additional_environment : {}
          integrationtest_always_verbose : False
            integrationtest_breaks_build : True
      integrationtest_cpu_scaling_factor : 4
               integrationtest_file_glob : *_tests.py
             integrationtest_file_suffix : None
     integrationtest_inherit_environment : True
                integrationtest_parallel : False
              integrationtest_python_env : test
                             pip_verbose : 0
                           refresh_venvs : False
                            remote_debug : 0
                   unittest_breaks_build : True
                    unittest_file_suffix : None
                    unittest_module_glob : *_tests
                     unittest_python_env : build
                         unittest_runner : (<function init_test_source_directory.<locals>.<lambda> at 0x7f0b25d30940>, '_make_result')
             unittest_test_method_prefix : None
                              venv_clean : False
                       venv_dependencies : {}
                              venv_names : ['build', 'test']
                                 verbose : True
[DEBUG] Execution plan is clean, prepare, install_dependencies, analyze, compile_sources, run_unit_tests, package, run_integration_tests, verify, publish
[INFO]  Building seven-common version 0.1.28
[INFO]  Executing build in /home/dev/testing/common
[INFO]  Going to execute tasks: clean, install_dependencies, analyze, verify, publish
[DEBUG] Executing task 'clean'
[DEBUG] Executing subtask of 'clean' from 'pybuilder.plugins.core_plugin'
[INFO]  Removing target directory /home/dev/testing/common/target
[DEBUG] Executing task 'prepare'
[DEBUG] Executing action 'coverage_init' from 'pybuilder.plugins.python.unittest_plugin' before task
[DEBUG] Executing action 'coverage_init' from 'pybuilder.plugins.python.integrationtest_plugin' before task
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.core_plugin'
[DEBUG] Creating target directory /home/dev/testing/common/target
[DEBUG] Creating reports directory /home/dev/testing/common/target/reports
[DEBUG] Inspecting package flake8
[DEBUG] Package flake8 is added to the list of installation constraints
[DEBUG] Package flake8 has a non-exact version specifier and will be updated
[DEBUG] Inspecting package pypandoc
[DEBUG] Package pypandoc is added to the list of installation constraints
[DEBUG] Package pypandoc has a non-exact version specifier and will be updated
[DEBUG] Inspecting package setuptools
[DEBUG] Package setuptools is added to the list of installation constraints
[DEBUG] Package setuptools has a non-exact version specifier and will be updated
[DEBUG] Inspecting package twine
[DEBUG] Package twine is added to the list of installation constraints
[DEBUG] Package twine has a non-exact version specifier and will be updated
[DEBUG] Inspecting package unittest-xml-reporting
[DEBUG] Package unittest-xml-reporting is added to the list of installation constraints
[DEBUG] Package unittest-xml-reporting has a non-exact version specifier and will be updated
[DEBUG] Inspecting package wheel
[DEBUG] Package wheel is added to the list of installation constraints
[DEBUG] Package wheel has a non-exact version specifier and will be updated
[INFO]  Processing plugin packages 'flake8~=3.7' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'pypandoc~=1.4' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'setuptools>=38.6.0' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'twine>=1.15.0' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'unittest-xml-reporting~=3.0.4' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'wheel>=0.34.0' to be installed with {'upgrade': True}
[DEBUG] Executing command: '/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0/bin/python3' '-m' 'pip.__main__' 'install' '--upgrade' '--upgrade-strategy' 'only-if-needed' 'flake8~=3.7' 'pypandoc~=1.4' 'setuptools>=38.6.0' 'twine>=1.15.0' 'unittest-xml-reporting~=3.0.4' 'wheel>=0.34.0'
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Creating log directory '/home/dev/testing/common/target/logs/install_dependencies'
[INFO]  Creating target 'build' VEnv in '/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0'
[DEBUG] Registered Python environment 'build': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/bin/python3']
[DEBUG] Inspecting package flake8
[DEBUG] Package flake8 is not installed and will be installed
[DEBUG] Inspecting package mccabe
[DEBUG] Package mccabe is not installed and will be installed
[DEBUG] Inspecting package pep8
[DEBUG] Package pep8 is not installed and will be installed
[DEBUG] Inspecting package pyflakes
[DEBUG] Package pyflakes is not installed and will be installed
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'flake8' to be installed with {}
[INFO]  Processing dependency packages 'mccabe' to be installed with {}
[INFO]  Processing dependency packages 'pep8' to be installed with {}
[INFO]  Processing dependency packages 'pyflakes' to be installed with {}
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/bin/python3' '-m' 'pip.__main__' 'install' '-c' '/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/constraints_file' 'flake8' 'mccabe' 'pep8' 'pyflakes' '-r' 'requirements.txt'
[INFO]  Creating target 'test' VEnv in '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0'
[DEBUG] Registered Python environment 'test': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3']
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '-m' 'pip.__main__' 'install' '-c' '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/constraints_file' '-r' 'requirements.txt'
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Creating log directory '/home/dev/testing/common/target/logs/install_dependencies'
[DEBUG] Creating target directory '/home/dev/testing/common/target'
[DEBUG] Executing action 'assert_flake8_is_executable' from 'pybuilder.plugins.python.flake8_plugin' before task
[DEBUG] Checking if flake8 is executable.
[DEBUG] Verifying command: 'flake8' '--version'
[DEBUG] Executing action 'set_description' from 'pybuilder.plugins.python.distutils_plugin' before task
[DEBUG] Executing task 'install_dependencies'
[DEBUG] Executing subtask of 'install_dependencies' from 'pybuilder.plugins.python.install_dependencies_plugin'
[INFO]  Installing all dependencies
[DEBUG] Inspecting package flake8
[DEBUG] Package 'flake8' is already up-to-date and will be skipped
[DEBUG] Inspecting package mccabe
[DEBUG] Package 'mccabe' is already up-to-date and will be skipped
[DEBUG] Inspecting package pep8
[DEBUG] Package 'pep8' is already up-to-date and will be skipped
[DEBUG] Inspecting package pyflakes
[DEBUG] Package 'pyflakes' is already up-to-date and will be skipped
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/home/dev/testing/common/testing/bin/python3' '-m' 'pip.__main__' 'install' '-c' '/home/dev/testing/common/target/install_dependencies_constraints' '-r' 'requirements.txt'
[DEBUG] Executing task 'analyze'
[DEBUG] Executing subtask of 'analyze' from 'pybuilder.plugins.python.flake8_plugin'
[INFO]  Executing flake8 on project sources.
[DEBUG] Executing command: 'flake8' '--max-line-length=120' 'src/main/python' 'src/unittest/python' 'src/integrationtest/python'
[DEBUG] Executing task 'compile_sources'
[DEBUG] Executing subtask of 'compile_sources' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'run_unit_tests'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.python.unittest_plugin'
[INFO]  Running unit tests
[INFO]  Executing unit tests from Python modules in /home/dev/testing/common/src/unittest/python
[DEBUG] Including files matching '*_tests'
Traceback (most recent call last):
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/cli.py", line 475, in main
    summary = reactor.build(
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/reactor.py", line 235, in build
    execution_summary = self.build_execution_plan(tasks, execution_plan)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/reactor.py", line 270, in build_execution_plan
    task_execution_summaries = self.execution_manager.execute_execution_plan(
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 393, in execute_execution_plan
    summaries.append(self.execute_task(task, **kwargs))
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 340, in execute_task
    task.execute(self.logger, kwargs, _executable=_executable)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 179, in execute
    executable.execute(argument_dict)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/execution.py", line 95, in execute
    self.callable(*arguments)
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 65, in run_unit_tests
    run_tests(project, logger, reactor, "unittest", "unit tests")
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 90, in run_tests
    result, console_out = execute_tests_matching(
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 144, in execute_tests_matching
    tests = pipe.get_exposed("unittest_tests")
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/remote/__init__.py", line 667, in get_exposed
    return self._recv()  # type: _BaseProxy
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/remote/__init__.py", line 942, in _recv
    raise data[1]
  File "/home/dev/testing/common/testing/lib/python3.8/site-packages/pybuilder/plugins/python/remote_tools/unittest_tool.py", line 43, in start
    tests = loader.loadTestsFromNames(self.test_modules)
  File "/usr/lib/python3.8/unittest/loader.py", line 220, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.8/unittest/loader.py", line 220, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.8/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/home/dev/testing/common/src/unittest/python/util/url_tests.py", line 8, in <module>
    import seven_common.util.url as url
  File "/home/dev/testing/common/src/main/python/seven_common/util/url.py", line 3, in <module>
    from .data import transform_values
  File "/home/dev/testing/common/src/main/python/seven_common/util/data.py", line 10, in <module>
    from openapi_schema_validator import validate
  File "/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/lib/python3.8/site-packages/openapi_schema_validator/__init__.py", line 2, in <module>
    from openapi_schema_validator._format import oas30_format_checker
  File "/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/lib/python3.8/site-packages/openapi_schema_validator/_format.py", line 6, in <module>
    from jsonschema._format import FormatChecker
  File "/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/lib/python3.8/site-packages/jsonschema/__init__.py", line 34, in <module>
    __version__ = metadata.version("jsonschema")
  File "/usr/lib/python3.8/importlib/metadata.py", line 530, in version
    return distribution(distribution_name).version
  File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.8/importlib/metadata.py", line 173, in from_name
    dist = next(dists, None)
TypeError: 'list' object is not an iterator

@arcivanov
Copy link
Member

And you're sure that latest 0.12 works fine on the same version of Python?

@kharoutaj
Copy link
Author

Yep here is the output from 0.12.10, I recreated the venv so should be the same Python. Unless there is some error in doing so? Let me know what you think. Thanks again

pyb --reset-plugins -vX
[DEBUG] Registered Python environment 'system': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/testing/bin/python3']
PyBuilder version 0.12.10
Build started at 2021-10-01 20:45:05
------------------------------------------------------------
[DEBUG] Loading project module from ./build.py
[DEBUG] Setting up plugins VEnv at '/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0' (resetting)
[DEBUG] Registered Python environment 'pybuilder': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0/bin/python3']
[DEBUG] Patched __import__ system to defer plugin loading
[DEBUG] Loading plugin 'python.core'
[DEBUG] Trying to load direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Found direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Loading plugin 'python.unittest'
[DEBUG] Trying to load direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Found direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Loading plugin 'python.integrationtest'
[DEBUG] Trying to load direct plugin 'python.integrationtest', module 'pybuilder.plugins.python.integrationtest_plugin'
[DEBUG] Found direct plugin 'python.integrationtest', module 'pybuilder.plugins.python.integrationtest_plugin'
[DEBUG] Loading plugin 'python.install_dependencies'
[DEBUG] Trying to load direct plugin 'python.install_dependencies', module 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Found direct plugin 'python.install_dependencies', module 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Loading plugin 'python.flake8'
[DEBUG] Trying to load direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Found direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Loading plugin 'python.distutils'
[DEBUG] Trying to load direct plugin 'python.distutils', module 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Found direct plugin 'python.distutils', module 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Loading plugin 'core'
[DEBUG] Trying to load direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Found direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Found task 'clean' with dependencies []
[DEBUG] Registering task 'clean'
[DEBUG] Found task 'compile_sources' with dependencies [prepare]
[DEBUG] Registering task 'compile_sources'
[DEBUG] Registering initializer 'init'
[DEBUG] Found task 'install' with dependencies [package, publish(optional)]
[DEBUG] Registering task 'install'
[DEBUG] Found task 'package' with dependencies [compile_sources, run_unit_tests(optional)]
[DEBUG] Registering task 'package'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Found task 'print_module_path' with dependencies []
[DEBUG] Registering task 'print_module_path'
[DEBUG] Found task 'print_scripts_path' with dependencies []
[DEBUG] Registering task 'print_scripts_path'
[DEBUG] Found task 'publish' with dependencies [package, verify(optional)]
[DEBUG] Registering task 'publish'
[DEBUG] Found task 'run_integration_tests' with dependencies [package]
[DEBUG] Registering task 'run_integration_tests'
[DEBUG] Found task 'run_unit_tests' with dependencies [compile_sources]
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found task 'verify' with dependencies [run_integration_tests(optional)]
[DEBUG] Registering task 'verify'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Registering initializer 'init_python_directories'
[DEBUG] Found task 'package' with dependencies []
[DEBUG] Registering task 'package'
[DEBUG] Found action coverage_init
[DEBUG] Registering action 'coverage_init'
[DEBUG] Registering initializer 'init_test_source_directory'
[DEBUG] Found task 'run_unit_tests' with dependencies []
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found action coverage_init
[DEBUG] Registering action 'coverage_init'
[DEBUG] Registering initializer 'initialize_integrationtest_plugin'
[DEBUG] Found task 'run_integration_tests' with dependencies []
[DEBUG] Registering task 'run_integration_tests'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Registering initializer 'initialize_install_dependencies_plugin'
[DEBUG] Found task 'install_build_dependencies' with dependencies [prepare]
[DEBUG] Registering task 'install_build_dependencies'
[DEBUG] Found task 'install_dependencies' with dependencies [prepare]
[DEBUG] Registering task 'install_dependencies'
[DEBUG] Found task 'install_runtime_dependencies' with dependencies [prepare]
[DEBUG] Registering task 'install_runtime_dependencies'
[DEBUG] Found task 'list_dependencies' with dependencies []
[DEBUG] Registering task 'list_dependencies'
[DEBUG] Found task 'analyze' with dependencies [prepare]
[DEBUG] Registering task 'analyze'
[DEBUG] Found action assert_flake8_is_executable
[DEBUG] Registering action 'assert_flake8_is_executable'
[DEBUG] Registering initializer 'initialize_flake8_plugin'
[DEBUG] Found action build_binary_distribution
[DEBUG] Registering action 'build_binary_distribution'
[DEBUG] Registering initializer 'initialize_distutils_plugin'
[DEBUG] Found task 'install' with dependencies []
[DEBUG] Registering task 'install'
[DEBUG] Found action set_description
[DEBUG] Registering action 'set_description'
[DEBUG] Found task 'upload' with dependencies []
[DEBUG] Registering task 'upload'
[DEBUG] Found action write_manifest_file
[DEBUG] Registering action 'write_manifest_file'
[DEBUG] Found action write_setup_script
[DEBUG] Registering action 'write_setup_script'
[DEBUG] Have loaded plugins python.core, python.unittest, python.integrationtest, python.install_dependencies, python.flake8, python.distutils, core
[DEBUG] Registering initializer 'initialize'
[DEBUG] Adding 'prepare' as a dependency of task 'compile_sources'
[DEBUG] Adding 'package' as a dependency of task 'install'
[DEBUG] Adding 'publish(optional)' as a dependency of task 'install'
[DEBUG] Adding 'compile_sources' as a dependency of task 'package'
[DEBUG] Adding 'run_unit_tests(optional)' as a dependency of task 'package'
[DEBUG] Adding 'package' as a dependency of task 'publish'
[DEBUG] Adding 'verify(optional)' as a dependency of task 'publish'
[DEBUG] Adding 'package' as a dependency of task 'run_integration_tests'
[DEBUG] Adding 'compile_sources' as a dependency of task 'run_unit_tests'
[DEBUG] Adding 'run_integration_tests(optional)' as a dependency of task 'verify'
[DEBUG] Adding 'prepare' as a dependency of task 'install_build_dependencies'
[DEBUG] Adding 'prepare' as a dependency of task 'install_dependencies'
[DEBUG] Adding 'prepare' as a dependency of task 'install_runtime_dependencies'
[DEBUG] Adding 'prepare' as a dependency of task 'analyze'
[DEBUG] Adding before action 'coverage_init' for task 'prepare'
[DEBUG] Adding before action 'coverage_init' for task 'prepare'
[DEBUG] Adding after action 'assert_flake8_is_executable' for task 'prepare'
[DEBUG] Adding before action 'build_binary_distribution' for task 'publish'
[DEBUG] Adding after action 'set_description' for task 'prepare'
[DEBUG] Adding after action 'write_manifest_file' for task 'package'
[DEBUG] Adding after action 'write_setup_script' for task 'package'
[DEBUG] Verbose output enabled.

[DEBUG] Executing initializer 'init' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing initializer 'init_python_directories' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Executing initializer 'init_test_source_directory' from 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Executing initializer 'initialize_integrationtest_plugin' from 'pybuilder.plugins.python.integrationtest_plugin'
[DEBUG] Executing initializer 'initialize_install_dependencies_plugin' from 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Executing initializer 'initialize_flake8_plugin' from 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Executing initializer 'initialize_distutils_plugin' from 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Executing initializer 'initialize' from 'build'
[DEBUG] Project properties: 
                                 basedir : /home/dev/testing/common
                                dir_dist : $dir_target/dist/seven-common-0.1.28
                        dir_dist_scripts : scripts
                        dir_install_logs : $dir_logs/install_dependencies
                                dir_logs : $dir_target/logs
                             dir_reports : $dir_target/reports
       dir_source_integrationtest_python : src/integrationtest/python
                  dir_source_main_python : src/main/python
                 dir_source_main_scripts : src/main/scripts
              dir_source_unittest_python : src/unittest/python
                              dir_target : target
                   distutils_classifiers : ['Development Status :: 3 - Alpha', 'Programming Language :: Python']
               distutils_command_options : None
                      distutils_commands : ['sdist', 'bdist_wheel']
               distutils_console_scripts : None
         distutils_description_overwrite : False
                  distutils_entry_points : None
              distutils_fail_on_warnings : False
  distutils_issue8876_workaround_enabled : False
            distutils_readme_description : False
                   distutils_readme_file : README.md
           distutils_readme_file_convert : False
          distutils_readme_file_encoding : None
              distutils_readme_file_type : None
           distutils_readme_file_variant : None
                distutils_setup_keywords : None
             distutils_summary_overwrite : False
               distutils_upload_register : False
             distutils_upload_repository : None
         distutils_upload_repository_key : None
                   distutils_upload_sign : False
          distutils_upload_sign_identity : None
          distutils_upload_skip_existing : False
                distutils_use_setuptools : True
                      distutils_zip_safe : True
                      flake8_break_build : True
                 flake8_exclude_patterns : None
                    flake8_extend_ignore : None
                           flake8_ignore : None
                 flake8_include_patterns : None
                  flake8_include_scripts : False
             flake8_include_test_sources : True
                   flake8_max_complexity : None
                  flake8_max_line_length : 120
                   flake8_verbose_output : True
        install_dependencies_constraints : constraints_file
    install_dependencies_extra_index_url : None
          install_dependencies_index_url : None
install_dependencies_insecure_installation : []
      install_dependencies_local_mapping : {}
       install_dependencies_trusted_host : None
            install_dependencies_upgrade : False
                             install_env : system
  integrationtest_additional_commandline : 
  integrationtest_additional_environment : {}
          integrationtest_always_verbose : False
            integrationtest_breaks_build : True
      integrationtest_cpu_scaling_factor : 4
               integrationtest_file_glob : *_tests.py
             integrationtest_file_suffix : None
     integrationtest_inherit_environment : True
                integrationtest_parallel : False
              integrationtest_python_env : test
                             pip_verbose : 0
                           refresh_venvs : False
                            remote_debug : 0
                   unittest_breaks_build : True
                    unittest_file_suffix : None
                    unittest_module_glob : *_tests
                     unittest_python_env : build
                         unittest_runner : (<function init_test_source_directory.<locals>.<lambda> at 0x7fb5609e2d30>, '_make_result')
             unittest_test_method_prefix : None
                              venv_clean : False
                       venv_dependencies : {}
                              venv_names : ['build', 'test']
                                 verbose : True
[DEBUG] Execution plan is clean, prepare, install_dependencies, analyze, compile_sources, run_unit_tests, package, run_integration_tests, verify, publish
[INFO]  Building seven-common version 0.1.28
[INFO]  Executing build in /home/dev/testing/common
[INFO]  Going to execute tasks: clean, install_dependencies, analyze, verify, publish
[DEBUG] Executing task 'clean'
[DEBUG] Executing subtask of 'clean' from 'pybuilder.plugins.core_plugin'
[INFO]  Removing target directory /home/dev/testing/common/target
[DEBUG] Executing task 'prepare'
[DEBUG] Executing action 'coverage_init' from 'pybuilder.plugins.python.unittest_plugin' before task
[DEBUG] Executing action 'coverage_init' from 'pybuilder.plugins.python.integrationtest_plugin' before task
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.core_plugin'
[DEBUG] Creating target directory /home/dev/testing/common/target
[DEBUG] Creating reports directory /home/dev/testing/common/target/reports
[DEBUG] Inspecting package flake8
[DEBUG] Package flake8 is added to the list of installation constraints
[DEBUG] Package flake8 has a non-exact version specifier and will be updated
[DEBUG] Inspecting package pypandoc
[DEBUG] Package pypandoc is added to the list of installation constraints
[DEBUG] Package pypandoc has a non-exact version specifier and will be updated
[DEBUG] Inspecting package setuptools
[DEBUG] Package setuptools is added to the list of installation constraints
[DEBUG] Package setuptools has a non-exact version specifier and will be updated
[DEBUG] Inspecting package twine
[DEBUG] Package twine is added to the list of installation constraints
[DEBUG] Package twine has a non-exact version specifier and will be updated
[DEBUG] Inspecting package unittest-xml-reporting
[DEBUG] Package unittest-xml-reporting is added to the list of installation constraints
[DEBUG] Package unittest-xml-reporting has a non-exact version specifier and will be updated
[DEBUG] Inspecting package wheel
[DEBUG] Package wheel is added to the list of installation constraints
[DEBUG] Package wheel has a non-exact version specifier and will be updated
[INFO]  Processing plugin packages 'flake8~=3.7' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'pypandoc~=1.4' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'setuptools>=38.6.0' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'twine>=1.15.0' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'unittest-xml-reporting~=3.0.2' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'wheel>=0.34.0' to be installed with {'upgrade': True}
[DEBUG] Executing command: '/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0/bin/python3' '-m' 'pip.__main__' 'install' '--upgrade' '--upgrade-strategy' 'only-if-needed' 'flake8~=3.7' 'pypandoc~=1.4' 'setuptools>=38.6.0' 'twine>=1.15.0' 'unittest-xml-reporting~=3.0.2' 'wheel>=0.34.0'
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Creating log directory '/home/dev/testing/common/target/logs/install_dependencies'
[INFO]  Creating target 'build' VEnv in '/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0'
[DEBUG] Registered Python environment 'build': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/bin/python3']
[DEBUG] Inspecting package flake8
[DEBUG] Package flake8 is not installed and will be installed
[DEBUG] Inspecting package mccabe
[DEBUG] Package mccabe is not installed and will be installed
[DEBUG] Inspecting package pep8
[DEBUG] Package pep8 is not installed and will be installed
[DEBUG] Inspecting package pyflakes
[DEBUG] Package pyflakes is not installed and will be installed
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'flake8' to be installed with {}
[INFO]  Processing dependency packages 'mccabe' to be installed with {}
[INFO]  Processing dependency packages 'pep8' to be installed with {}
[INFO]  Processing dependency packages 'pyflakes' to be installed with {}
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/bin/python3' '-m' 'pip.__main__' 'install' '-c' '/home/dev/testing/common/target/venv/build/cpython-3.8.10.final.0/constraints_file' 'flake8' 'mccabe' 'pep8' 'pyflakes' '-r' 'requirements.txt'
[INFO]  Creating target 'test' VEnv in '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0'
[DEBUG] Registered Python environment 'test': CPython version 3.8.10.final.0 on linux in ['/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3']
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '-m' 'pip.__main__' 'install' '-c' '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/constraints_file' '-r' 'requirements.txt'
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.python.install_dependencies_plugin'
[DEBUG] Creating log directory '/home/dev/testing/common/target/logs/install_dependencies'
[DEBUG] Creating target directory '/home/dev/testing/common/target'
[DEBUG] Executing action 'assert_flake8_is_executable' from 'pybuilder.plugins.python.flake8_plugin' before task
[DEBUG] Checking if flake8 is executable.
[DEBUG] Verifying command: 'flake8' '--version'
[DEBUG] Executing action 'set_description' from 'pybuilder.plugins.python.distutils_plugin' before task
[DEBUG] Executing task 'install_dependencies'
[DEBUG] Executing subtask of 'install_dependencies' from 'pybuilder.plugins.python.install_dependencies_plugin'
[INFO]  Installing all dependencies
[DEBUG] Inspecting package flake8
[DEBUG] Package flake8 is not installed and will be installed
[DEBUG] Inspecting package mccabe
[DEBUG] Package mccabe is not installed and will be installed
[DEBUG] Inspecting package pep8
[DEBUG] Package pep8 is not installed and will be installed
[DEBUG] Inspecting package pyflakes
[DEBUG] Package pyflakes is not installed and will be installed
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'flake8' to be installed with {}
[INFO]  Processing dependency packages 'mccabe' to be installed with {}
[INFO]  Processing dependency packages 'pep8' to be installed with {}
[INFO]  Processing dependency packages 'pyflakes' to be installed with {}
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/home/dev/testing/common/testing/bin/python3' '-m' 'pip.__main__' 'install' '-c' '/home/dev/testing/common/target/install_dependencies_constraints' 'flake8' 'mccabe' 'pep8' 'pyflakes' '-r' 'requirements.txt'
[DEBUG] Executing task 'analyze'
[DEBUG] Executing subtask of 'analyze' from 'pybuilder.plugins.python.flake8_plugin'
[INFO]  Executing flake8 on project sources.
[DEBUG] Executing command: 'flake8' '--max-line-length=120' 'src/main/python' 'src/unittest/python' 'src/integrationtest/python'
[DEBUG] Executing task 'compile_sources'
[DEBUG] Executing subtask of 'compile_sources' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'run_unit_tests'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.python.unittest_plugin'
[INFO]  Running unit tests
[INFO]  Executing unit tests from Python modules in /home/dev/testing/common/src/unittest/python
[DEBUG] Including files matching '*_tests'
[DEBUG] starting test_should_get_system_event_base_no_modifier (constants_tests.ConstantsTest)
[DEBUG] starting test_should_get_system_event_base_with_modifier (constants_tests.ConstantsTest)
[DEBUG] starting test_should_get_system_event_modifier_no_modifier (constants_tests.ConstantsTest)
[DEBUG] starting test_should_get_system_event_modifier_with_modifier (constants_tests.ConstantsTest)
[DEBUG] starting test_should_create_directory (util.file_tests.FileTest)
[DEBUG] starting test_get_repeat_dt_days_from_now (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_get_repeat_dt_days_from_start (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_get_repeat_dt_hours_from_now (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_get_repeat_dt_hours_from_start (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_get_repeat_dt_minutes_from_now (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_get_repeat_dt_minutes_from_start (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_get_repeat_dt_weeks_from_now (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_get_repeat_dt_weeks_from_start (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_convert_aware_to_utc_isoformat (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_convert_naive_to_utc_isoformat (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_convert_to_utc_isoformat_truncate_ms (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_get_local_daytime_daytime (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_get_local_daytime_evening (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_get_local_daytime_morning (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_get_time_from_now_datetime (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_get_time_from_now_string (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_get_timestamp_text (util.datetime_tests.DateTimeTest)
[DEBUG] starting test_should_append_fragment (util.url_tests.UrlTest)
[DEBUG] starting test_should_append_fragment_with_parameters (util.url_tests.UrlTest)
[DEBUG] starting test_should_append_query (util.url_tests.UrlTest)
[DEBUG] starting test_should_append_query_or_fragment_to_fragment (util.url_tests.UrlTest)
[DEBUG] starting test_should_append_query_or_fragment_to_query (util.url_tests.UrlTest)
[DEBUG] starting test_should_format_url (util.url_tests.UrlTest)
[DEBUG] starting test_should_not_resize_image_320 (util.image_tests.ImageTest)
[DEBUG] starting test_should_resize_image_160 (util.image_tests.ImageTest)
[DEBUG] starting test_should_convert_jwk_to_pem (util.crypto_tests.CryptoTest)
[DEBUG] starting test_should_get_verify_request_token (util.crypto_tests.CryptoTest)
[DEBUG] starting test_should_get_verify_request_token_expired (util.crypto_tests.CryptoTest)
[DEBUG] starting test_should_get_verify_request_token_not_expired (util.crypto_tests.CryptoTest)
[DEBUG] starting test_default_formatter_default_no_value (util.string_tests.StringTest)
[DEBUG] starting test_default_formatter_default_value (util.string_tests.StringTest)
[DEBUG] starting test_default_formatter_no_default (util.string_tests.StringTest)
[DEBUG] starting test_mask_email (util.string_tests.StringTest)
[DEBUG] starting test_mask_phone (util.string_tests.StringTest)
[DEBUG] starting test_should_convert_to_camel_case (util.string_tests.StringTest)
[DEBUG] starting test_should_convert_to_snake_case (util.string_tests.StringTest)
[DEBUG] starting test_should_get_random_alphanum_string (util.string_tests.StringTest)
[DEBUG] starting test_should_parse_string_to_bool (util.string_tests.StringTest)
[DEBUG] starting test_should_parse_string_to_number (util.string_tests.StringTest)
[DEBUG] starting test_should_parse_value (util.string_tests.StringTest)
[DEBUG] starting test_should_get_action_url (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_action_url_full (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_action_url_list (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_action_url_str (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_app_url (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_dt_param (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_icon_url (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_preview_url_no_trailing_slash (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_preview_url_trailing_slash (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_scheduled_data (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_value_attribute (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_value_not_found (util.template_tests.TemplateTest)
[DEBUG] starting test_should_get_value_value (util.template_tests.TemplateTest)
[DEBUG] starting test_should_eval_exp (util.eval_tests.DateTimeTest)
[DEBUG] starting test_should_eval_exp_name_not_found (util.eval_tests.DateTimeTest)
[DEBUG] starting test_all_fields_should_be_invalid (util.data_tests.DataTest)
[DEBUG] starting test_all_fields_should_be_valid (util.data_tests.DataTest)
[DEBUG] starting test_any_fields_should_be_invalid (util.data_tests.DataTest)
[DEBUG] starting test_any_fields_should_be_valid (util.data_tests.DataTest)
[DEBUG] starting test_should_convert_dot_to_nested (util.data_tests.DataTest)
[DEBUG] starting test_should_convert_to_json_str (util.data_tests.DataTest)
[DEBUG] starting test_should_filter_by_key_dict (util.data_tests.DataTest)
[DEBUG] starting test_should_filter_by_key_list (util.data_tests.DataTest)
[DEBUG] starting test_should_filter_key_nested_dict (util.data_tests.DataTest)
[DEBUG] starting test_should_filter_key_nested_list (util.data_tests.DataTest)
[DEBUG] starting test_should_filter_key_nested_list_nested_dict (util.data_tests.DataTest)
test_should_filter_key_nested_list_nested_dict: 0.01371721737086773
[DEBUG] starting test_should_filter_keys (util.data_tests.DataTest)
test_should_filter_keys: 0.035776058211922646
[DEBUG] starting test_should_filter_keys_duplicate (util.data_tests.DataTest)
[DEBUG] starting test_should_filter_keys_nested_list (util.data_tests.DataTest)
[DEBUG] starting test_should_filter_keys_nested_list_nested_dict (util.data_tests.DataTest)
test_should_filter_keys_nested_list_nested_dict: 0.04637008532881737
[DEBUG] starting test_should_filter_keys_nested_multiple (util.data_tests.DataTest)
test_should_filter_keys_nested_multiple: 0.04578009247779846
[DEBUG] starting test_should_filter_keys_nested_multiple_key_list (util.data_tests.DataTest)
test_should_filter_keys_nested_multiple_key_list: 0.03635394386947155
[DEBUG] starting test_should_filter_keys_non_nested (util.data_tests.DataTest)
test_should_filter_keys_non_nested: 0.006963964551687241
[DEBUG] starting test_should_filter_keys_some_invalid (util.data_tests.DataTest)
[DEBUG] starting test_should_get_list_depth (util.data_tests.DataTest)
[DEBUG] starting test_should_merge_dict (util.data_tests.DataTest)
test_should_merge_dict: 0.033322954550385475
[DEBUG] starting test_should_merge_dict_list (util.data_tests.DataTest)
test_should_merge_dict_list: 0.0346179585903883
[DEBUG] starting test_should_not_filter_key_invalid (util.data_tests.DataTest)
[DEBUG] starting test_should_not_filter_key_nested_invalid (util.data_tests.DataTest)
[DEBUG] starting test_should_not_remove_empty_keys_not_iterable (util.data_tests.DataTest)
[DEBUG] starting test_should_not_transform_keys_not_iterable (util.data_tests.DataTest)
[DEBUG] starting test_should_partition_list (util.data_tests.DataTest)
[DEBUG] starting test_should_remove_empty_keys_dict_list (util.data_tests.DataTest)
[DEBUG] starting test_should_remove_items_dict_list (util.data_tests.DataTest)
[DEBUG] starting test_should_select_data (util.data_tests.DataTest)
[DEBUG] starting test_should_select_data_all (util.data_tests.DataTest)
[DEBUG] starting test_should_select_data_nested (util.data_tests.DataTest)
[DEBUG] starting test_should_select_data_schema (util.data_tests.DataTest)
[DEBUG] starting test_should_serialize_data (util.data_tests.DataTest)
[DEBUG] starting test_should_sort_list (util.data_tests.DataTest)
[DEBUG] starting test_should_transform_keys_dict_list_lowercase (util.data_tests.DataTest)
[DEBUG] starting test_should_transform_keys_dict_lowercase (util.data_tests.DataTest)
[DEBUG] starting test_should_transform_keys_list_lowercase (util.data_tests.DataTest)
[DEBUG] starting test_should_transform_values_dict_list_lowercase (util.data_tests.DataTest)
[DEBUG] starting test_should_transform_values_dict_lowercase (util.data_tests.DataTest)
[DEBUG] starting test_should_validate_data_invalid (util.data_tests.DataTest)
[DEBUG] starting test_should_validate_data_valid (util.data_tests.DataTest)
[INFO]  Executed 102 unit tests
[INFO]  All unit tests passed.
[DEBUG] Executing task 'package'
[DEBUG] Executing subtask of 'package' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'package' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Creating directory /home/dev/testing/common/target/dist/seven-common-0.1.28
[INFO]  Building distribution in /home/dev/testing/common/target/dist/seven-common-0.1.28
[DEBUG] Copying module/ package seven_common
[INFO]  Copying scripts to /home/dev/testing/common/target/dist/seven-common-0.1.28/scripts
[DEBUG] Executing action 'write_manifest_file' from 'pybuilder.plugins.python.distutils_plugin' before task
[DEBUG] Files included in MANIFEST.in: ['seven_common/templates/en-US/email/*', 'seven_common/templates/includes/email/*']
[INFO]  Writing MANIFEST.in as /home/dev/testing/common/target/dist/seven-common-0.1.28/MANIFEST.in
[DEBUG] Executing action 'write_setup_script' from 'pybuilder.plugins.python.distutils_plugin' before task
[INFO]  Writing setup.py as /home/dev/testing/common/target/dist/seven-common-0.1.28/setup.py
[DEBUG] Executing task 'run_integration_tests'
[DEBUG] Executing subtask of 'run_integration_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'run_integration_tests' from 'pybuilder.plugins.python.integrationtest_plugin'
[DEBUG] Running integration tests sequentially
[INFO]  Running integration test action_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/action_tests.py'
[INFO]  Running integration test workbench_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/workbench_tests.py'
[INFO]  Running integration test schedule_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/schedule_tests.py'
[INFO]  Running integration test s3_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/s3_tests.py'
[INFO]  Running integration test orm_models_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/orm_models_tests.py'
[INFO]  Running integration test timeline_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/timeline_tests.py'
[INFO]  Running integration test job_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/job_tests.py'
[INFO]  Running integration test schema_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/schema_tests.py'
[INFO]  Running integration test owm_tests
[DEBUG] Executing command: '/home/dev/testing/common/target/venv/test/cpython-3.8.10.final.0/bin/python3' '/home/dev/testing/common/src/integrationtest/python/api/owm_tests.py'
[INFO]  Executed 9 integration tests.
[DEBUG] Executing task 'verify'
[DEBUG] Executing subtask of 'verify' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'publish'
[DEBUG] Executing action 'build_binary_distribution' from 'pybuilder.plugins.python.distutils_plugin' before task
[INFO]  Building binary distribution in /home/dev/testing/common/target/dist/seven-common-0.1.28
[DEBUG] Executing distutils command: ['/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0/bin/python3', '/home/dev/testing/common/target/dist/seven-common-0.1.28/setup.py', '-v', 'clean', '--all', 'sdist']
[DEBUG] Executing distutils command: ['/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0/bin/python3', '/home/dev/testing/common/target/dist/seven-common-0.1.28/setup.py', '-v', 'clean', '--all', 'bdist_wheel']
[INFO]  Running Twine check for generated artifcats
[DEBUG] Executing Twine: ['/home/dev/testing/common/.pybuilder/plugins/cpython-3.8.10.final.0/bin/python3', '-m', 'twine', 'check', '/home/dev/testing/common/target/dist/seven-common-0.1.28/dist/seven-common-0.1.28.tar.gz', '/home/dev/testing/common/target/dist/seven-common-0.1.28/dist/seven_common-0.1.28-py3-none-any.whl']
[DEBUG] Executing subtask of 'publish' from 'pybuilder.plugins.core_plugin'
------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------
Build Summary
             Project: seven-common
             Version: 0.1.28
      Base directory: /home/dev/testing/common
        Environments: 
               Tasks: clean [360 ms] prepare [41359 ms] install_dependencies [21236 ms] analyze [812 ms] compile_sources [0 ms] run_unit_tests [1130 ms] package [6 ms] run_integration_tests [50034 ms] verify [0 ms] publish [767 ms]
Build finished at 2021-10-01 20:47:04
Build took 119 seconds (119002 ms)

@arcivanov
Copy link
Member

Thanks! Let me see if I can repro it.

@arcivanov
Copy link
Member

This setup works on 3.9.7:

        self.write_file("src/main/python/code.py", textwrap.dedent(
            """
            def run_code():
                import jsonschema
                
                print(jsonschema.__version__)
            """))
        self.write_file("src/unittest/python/code_tests.py", textwrap.dedent(
            """
            import unittest
            import code
            
            class CodeTests(unittest.TestCase):
                def test_code(self):
                    code.run_code()
            """
        ))

@arcivanov
Copy link
Member

This setup also works on 3.9.7:

        self.write_file("src/main/python/code.py", textwrap.dedent(
            """
            import jsonschema
            
            def run_code():
                print(jsonschema.__version__)
            """))
        self.write_file("src/unittest/python/code_tests.py", textwrap.dedent(
            """
            import unittest
            import code
            
            class CodeTests(unittest.TestCase):
                def test_code(self):
                    code.run_code()
            """
        ))

@arcivanov
Copy link
Member

This setup also works on 3.9.7:

        self.write_file("src/main/python/code.py", textwrap.dedent(
            """
            import jsonschema
            
            def run_code():
                print(jsonschema.__version__)
            """))
        self.write_file("src/unittest/python/code_tests.py", textwrap.dedent(
            """
            import unittest
            import code
            
            class CodeTests(unittest.TestCase):
                def test_code(self):
                    code.run_code()
            """
        ))

Reproduced on 3.8.10 only. 3.9.7 works fine.

@arcivanov
Copy link
Member

arcivanov commented Oct 2, 2021

The cause is this: python/importlib_metadata#122
But I'm not sure whether 0.12 vs 0.13 affect it. I was able to reproduce this on Python 3.8.10 with 0.13 tree, but not on 3.9.

@arcivanov
Copy link
Member

Found it, it's a bug in Python 3.8. Workaround found, fix incoming.

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 a pull request may close this issue.

2 participants