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

Broken test with flake8>=3.9.1 #171

Closed
mweinelt opened this issue Jul 6, 2021 · 6 comments
Closed

Broken test with flake8>=3.9.1 #171

mweinelt opened this issue Jul 6, 2021 · 6 comments

Comments

@mweinelt
Copy link

mweinelt commented Jul 6, 2021

After upgrading to flake>=3.9.1 the following test failure came up.

Traceback (most recent call last):
  File "run_tests.py", line 117, in <module>
    main()
  File "run_tests.py", line 34, in main
    errors += test_file(filename, testcase, code, options)
  File "run_tests.py", line 99, in test_file
    parse_options(checker, options)
  File "run_tests.py", line 90, in parse_options
    checker.parse_options(processed_options)
  File "/nix/store/9fggrr07qvlrqqqf2lpy9ynfn30v1ans-python3.8-pep8-naming-0.11.1/lib/python3.8/site-packages/pep8ext_naming.py", line 181, in parse_options
    engine = style_guide.DecisionEngine(options)
  File "/nix/store/mr2dci4kaf4illh63hb264lhn4vp6s1w-python3.8-flake8-3.9.1/lib/python3.8/site-packages/flake8/style_guide.py", line 171, in __init__
    ).union(options.extended_default_ignore)
AttributeError: 'Values' object has no attribute 'extended_default_ignore'

Seems related to this change: PyCQA/flake8#1317

@sigmavirus24
Copy link
Member

I suspect we didn't cut a new release that includes the updates to our test suite yet @jparise ?

@jparise
Copy link
Member

jparise commented Jul 6, 2021

Our usage of extend_default_ignore was introduced in b562e5a, which has yet to be released in a tagged version. I can do that soon (#172).

... but that doesn't explain the error above, which is for the tagged 0.11.1 release. Is there something backwards-incompatible about flake8's 3.9.1's "extended ignore" implementation?

@sigmavirus24
Copy link
Member

I believe our tests mock out things that are internal to Flake8, which I've never liked but it hasn't caused too much trouble. I think the change I made caused those half-mocked things to not have all the detail needed

@sigmavirus24
Copy link
Member

6d62db8 is (I believe) what would fix things

mweinelt added a commit to mweinelt/nixpkgs that referenced this issue Jul 7, 2021
Was broken when bumping flake8 to a version newer than 3.9.0, because
their tests "mock out things that are internal to Flake8".

PyCQA/pep8-naming#171
@jparise
Copy link
Member

jparise commented Sep 16, 2021

I believe this was fixed in the last release. Can you confirm, @mweinelt?

@mweinelt
Copy link
Author

Yes, LGTM. Thanks!

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

No branches or pull requests

3 participants