Skip to content

Fix bytes warning in ast constants #4376

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

Merged
merged 2 commits into from
Apr 25, 2025

Conversation

tybug
Copy link
Member

@tybug tybug commented Apr 25, 2025

Closes #4375

I was trying to avoid a Constants class (partially out of performance concerns, though I think it's ok in practice), but after writing several helper methods like add_constants, a class started to make more sense.

@tybug tybug requested review from DRMacIver and Zac-HD as code owners April 25, 2025 04:42
@tybug tybug changed the title fix bytes warning Fix bytes warning in ast constants Apr 25, 2025
Comment on lines +196 to +199
# this test doubles as a regression test for
# https://github.com/HypothesisWorks/hypothesis/issues/4375. Fail on comparisons
# between bytes and str.
subprocess.check_call([sys.executable, "-bb", str(p)])
Copy link
Member

Choose a reason for hiding this comment

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

nice!

@Zac-HD Zac-HD merged commit b9586ff into HypothesisWorks:master Apr 25, 2025
118 of 119 checks passed
@tybug tybug deleted the fix-bytes-warning branch April 25, 2025 05:34
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.

Constant extraction generates BytesWarning in some cases
2 participants