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

Module path (sys.path) confusion when coverage is installed in "system" pyenv #696

Closed
arcivanov opened this issue Apr 18, 2020 · 0 comments · Fixed by #697
Closed

Module path (sys.path) confusion when coverage is installed in "system" pyenv #696

arcivanov opened this issue Apr 18, 2020 · 0 comments · Fixed by #697
Assignees
Labels

Comments

@arcivanov
Copy link
Member

Coverage 5.x is installed in <project>/.pybuilder/plugins/... but somehow it's not imported if coverage is installed in the system Python.

Likely sys.path order confusion integration pybuilder pyenv.

[DEBUG] Executing subtask of 'coverage' from 'pybuilder.plugins.python.coverage_plugin'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pybuilder/cli.py", line 468, in main
    environments=options.environments, tasks=arguments)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 235, in build
    execution_summary = self.build_execution_plan(tasks, execution_plan)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 274, in build_execution_plan
    reactor=self)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 399, in execute_execution_plan
    summaries.append(self.execute_task(task, **kwargs))
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 346, in execute_task
    task.execute(self.logger, kwargs, _executable=_executable)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 187, in execute
    executable.execute(argument_dict)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 101, in execute
    self.callable(*arguments)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/plugins/python/coverage_plugin.py", line 133, in coverage
    cov = coverage_factory(**coverage_config)
TypeError: __init__() got an unexpected keyword argument 'context'
------------------------------------------------------------
BUILD FAILED - TypeError: __init__() got an unexpected keyword argument 'context' (pybuilder/plugins/python/coverage_plugin.py:133)
------------------------------------------------------------
Build finished at 2020-04-17 22:41:54
Build took 9 seconds (9571 ms)
$ pip show coverage
Name: coverage
Version: 4.5.4
Summary: Code coverage measurement for Python
Home-page: https://github.com/nedbat/coveragepy
Author: Ned Batchelder and 100 others
Author-email: ned@nedbatchelder.com
License: Apache 2.0
Location: /usr/lib64/python3.7/site-packages
Requires: 
Required-by: 
@arcivanov arcivanov self-assigned this Apr 18, 2020
@arcivanov arcivanov added the bug label Apr 18, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 18, 2020
Remove sys.path manipulation from unittest plugin and move it into the
tool.
Update README.md.
filter plugin should only be touching $dir_dist.
Return all Travis production builds.

fixes pybuilder#696
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 18, 2020
Remove sys.path manipulation from unittest plugin and move it into the
tool.
Update README.md.
filter plugin should only be touching $dir_dist.
Return all Travis production builds.

fixes pybuilder#696
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 18, 2020
Remove sys.path manipulation from unittest plugin and move it into the
tool.
Update README.md.
filter plugin should only be touching $dir_dist.
Return all Travis production builds.

fixes pybuilder#696
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.

1 participant