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

ExternalCommandBuilder not backwards compatible #692

Closed
soda480 opened this issue Apr 14, 2020 · 1 comment
Closed

ExternalCommandBuilder not backwards compatible #692

soda480 opened this issue Apr 14, 2020 · 1 comment
Labels

Comments

@soda480
Copy link

soda480 commented Apr 14, 2020

The latest version of pybuilder 0.12.0 requires a new positional argument for ExternalCommandBuilder which causes all of our existing builds to fail with TypeError: __init__() missing 1 required positional argument: 'reactor':

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pybuilder/cli.py", line 468, in main
    environments=options.environments, tasks=arguments)
  File "/usr/local/lib/python3.6/site-packages/pybuilder/reactor.py", line 235, in build
    execution_summary = self.build_execution_plan(tasks, execution_plan)
  File "/usr/local/lib/python3.6/site-packages/pybuilder/reactor.py", line 274, in build_execution_plan
    reactor=self)
  File "/usr/local/lib/python3.6/site-packages/pybuilder/execution.py", line 399, in execute_execution_plan
    summaries.append(self.execute_task(task, **kwargs))
  File "/usr/local/lib/python3.6/site-packages/pybuilder/execution.py", line 346, in execute_task
    task.execute(self.logger, kwargs, _executable=_executable)
  File "/usr/local/lib/python3.6/site-packages/pybuilder/execution.py", line 187, in execute
    executable.execute(argument_dict)
  File "/usr/local/lib/python3.6/site-packages/pybuilder/execution.py", line 101, in execute
    self.callable(*arguments)
  File "./build.py", line 52, in cyclomatic_complexity
    command = ExternalCommandBuilder('radon', project)
TypeError: __init__() missing 1 required positional argument: 'reactor'
@arcivanov
Copy link
Member

Yep, it does. Reactor can be passed to any task, initializer or action as one of the parameters and can in turn be fed into ExternalCommandBuilder.
I'll add this change to the migration guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants