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

Pin lint dependencies to bandit 1.7.2 #3458

Merged
merged 1 commit into from
Feb 28, 2022
Merged

Conversation

nastra
Copy link
Collaborator

@nastra nastra commented Feb 28, 2022

Bandit core 1.7.3 was just released
(https://github.com/PyCQA/bandit/releases/tag/1.7.3) and the
flake8-bandit package uses this latest version. However, flake8 is
currently failing.

More specifically, the change in PyCQA/bandit@0f4a495 is causing the below issue:

  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 125, in worker
      result = (True, func(*args, **kwds))
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
      return list(map(*args))
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 687, in _run_checks
      return checker.run_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 597, in run_checks
      self.run_ast_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 500, in run_ast_checks
      for (line_number, offset, text, _) in runner:
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 85, in run
      for warn in self._check_source():
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 59, in _check_source
      bnv = BanditNodeVisitor(
  TypeError: __init__() missing 1 required positional argument: 'metrics'

Therefore we temporarily pin the bandit version to 1.7.2 until the 1.7.3
version is compatible with flake8-bandit.

Bandit core 1.7.3 was just released
(https://github.com/PyCQA/bandit/releases/tag/1.7.3) and the
flake8-bandit package uses this latest version. However, flake8 is
currently failing.

More specifically, the change in PyCQA/bandit@0f4a495 is causing the below issue:
```
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 125, in worker
      result = (True, func(*args, **kwds))
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
      return list(map(*args))
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 687, in _run_checks
      return checker.run_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 597, in run_checks
      self.run_ast_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 500, in run_ast_checks
      for (line_number, offset, text, _) in runner:
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 85, in run
      for warn in self._check_source():
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 59, in _check_source
      bnv = BanditNodeVisitor(
  TypeError: __init__() missing 1 required positional argument: 'metrics'
```

Therefore we temporarily pin the bandit version to 1.7.2 until the 1.7.3
version is compatible with flake8-bandit.
@nastra
Copy link
Collaborator Author

nastra commented Feb 28, 2022

See also tylerwince/flake8-bandit#21

@omarsmak
Copy link
Contributor

What a morning where one of the Python dependencies just break your build :D. Thanks @nastra !

@codecov
Copy link

codecov bot commented Feb 28, 2022

Codecov Report

Merging #3458 (75f7804) into main (79d4685) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3458      +/-   ##
============================================
- Coverage     86.87%   86.86%   -0.01%     
+ Complexity     2672     2671       -1     
============================================
  Files           342      342              
  Lines         15041    15041              
  Branches       1108     1108              
============================================
- Hits          13067    13066       -1     
  Misses         1586     1586              
- Partials        388      389       +1     
Flag Coverage Δ
java 87.33% <ø> (-0.01%) ⬇️
javascript 82.55% <ø> (ø)
python 83.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/projectnessie/quarkus/runner/ProcessHandler.java 77.31% <0.00%> (-1.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79d4685...75f7804. Read the comment docs.

@snazy snazy merged commit 8474e82 into projectnessie:main Feb 28, 2022
@nastra nastra deleted the fix-flake8 branch February 28, 2022 08:20
snazy added a commit to snazy/nessie-demos that referenced this pull request Feb 28, 2022
Bandit core 1.7.3 was just released
(https://github.com/PyCQA/bandit/releases/tag/1.7.3) and the
flake8-bandit package uses this latest version. However, flake8 is
currently failing.

More specifically, the change in PyCQA/bandit@0f4a495 is causing the below issue:
```
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 125, in worker
      result = (True, func(*args, **kwds))
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
      return list(map(*args))
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 687, in _run_checks
      return checker.run_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 597, in run_checks
      self.run_ast_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 500, in run_ast_checks
      for (line_number, offset, text, _) in runner:
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 85, in run
      for warn in self._check_source():
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 59, in _check_source
      bnv = BanditNodeVisitor(
  TypeError: __init__() missing 1 required positional argument: 'metrics'
```

Therefore we temporarily pin the bandit version to 1.7.2 until the 1.7.3
version is compatible with flake8-bandit.

See also: projectnessie/nessie#3458
snazy added a commit to projectnessie/nessie-demos that referenced this pull request Feb 28, 2022
Bandit core 1.7.3 was just released
(https://github.com/PyCQA/bandit/releases/tag/1.7.3) and the
flake8-bandit package uses this latest version. However, flake8 is
currently failing.

More specifically, the change in PyCQA/bandit@0f4a495 is causing the below issue:
```
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 125, in worker
      result = (True, func(*args, **kwds))
    File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
      return list(map(*args))
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 687, in _run_checks
      return checker.run_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 597, in run_checks
      self.run_ast_checks()
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8/checker.py", line 500, in run_ast_checks
      for (line_number, offset, text, _) in runner:
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 85, in run
      for warn in self._check_source():
    File "/home/runner/work/nessie/nessie/python/.tox/lint/lib/python3.8/site-packages/flake8_bandit.py", line 59, in _check_source
      bnv = BanditNodeVisitor(
  TypeError: __init__() missing 1 required positional argument: 'metrics'
```

Therefore we temporarily pin the bandit version to 1.7.2 until the 1.7.3
version is compatible with flake8-bandit.

See also: projectnessie/nessie#3458
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants