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

Replace hash with unsafe_hash #486

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Replace hash with unsafe_hash #486

merged 2 commits into from
Aug 20, 2024

Conversation

kasium
Copy link
Contributor

@kasium kasium commented Aug 5, 2024

@cooperlees
Copy link
Collaborator

Thanks.

Is 3.13 introducing a new type for single char strings or something?

  ======================================================================
  FAIL: test_b907_format_specifier_permutations (__main__.BugbearTestCase.test_b907_format_specifier_permutations)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/runner/work/flake8-bugbear/flake8-bugbear/tests/test_bugbear.py", line 765, in test_b907_format_specifier_permutations
      old = format_string.format("hello")
  ValueError: Unknown format code 'b' for object of type 'str'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/runner/work/flake8-bugbear/flake8-bugbear/tests/test_bugbear.py", line 768, in test_b907_format_specifier_permutations
      visitor.errors == []
  AssertionError: b907 raised for 'b' not valid for string
  
  ----------------------------------------------------------------------

@kasium
Copy link
Contributor Author

kasium commented Aug 5, 2024

Not that I'm aware off. Let me check it tomorrow

@kasium
Copy link
Contributor Author

kasium commented Aug 6, 2024

I cannot reproduce it locally. I think the whole error is misleading. As far as I can tell from the code, the error is, that visitor.errors == [] which sounds like test pollution.

@JelleZijlstra
Copy link
Collaborator

Might be the same AST thing I mentioned in #487

@kasium
Copy link
Contributor Author

kasium commented Aug 6, 2024

I think so, too. I used the latest greates 3.13-dev and everything worked

Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's happy now. Thanks again.

@cooperlees cooperlees merged commit f0eeda8 into PyCQA:main Aug 20, 2024
7 checks passed
henzef added a commit to henzef/flake8-bugbear that referenced this pull request Aug 21, 2024
Due to PyCQA#485 / PyCQA#486, bugbear now requires at least attrs 22.2.0
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.

DeprecationWarning: The hash argument is deprecated in favor of unsafe_hash
3 participants