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
connection.py: BytesWarning: Comparison between bytes and string: if SKIP_HEADER not in values: #2071
Comments
Nice catch, we'll have to enable this in our test suite and remove the issue. |
Ping. This is causing a lot of cron spam for a lot of our users. |
Breaks
|
@mgorny Can you please clarify what Gentoo cron spam is? The issue here is that |
@pquentin, I mean one of our most important tools happen to trigger this, and many users run it via cron in quiet mode. Now that Python suddenly started outputting this warning, quiet mode is no longer quiet and people are getting mails from cron that something is wrong. |
This was released as part of urllib3 1.26.3. Sorry for the noise! |
Subject
Starting with the 1.26 series, I started receiving a
BytesWarning
in my project's test suite.I run my test suite with Python's
-b
option to help catch misuses of bytes and string objects. My hunch is that urllib3 is sometimes treating headers as bytes and other times as string and then comparing them with each other.Environment
Describe your environment.
At least, paste here the output of:
Steps to Reproduce
This is reproducible using urllib3's own test suite:
Invoke using:
Expected Behavior
No
ByteWarning
emitted.Actual Behavior
The text was updated successfully, but these errors were encountered: