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

πŸ’… Address all instances of BytesWarning #648

Merged
1 commit merged into from
Mar 13, 2024

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Mar 12, 2024

Things like byte-to-int comparisons and interpolation of bytes into str were present in the code base. This patch fixes that by making sure that the variables are always of compatible types in these cases.

❓ What kind of change does this PR introduce?

  • 🐞 bug fix
  • 🐣 feature
  • πŸ“‹ docs update
  • πŸ“‹ tests/coverage improvement
  • πŸ“‹ refactoring
  • πŸ’₯ other

πŸ“‹ What is the related issue number (starting with #)

N/A

❓ What is the current behavior? (You can also link to an open issue here)

Currently, a BytesWarning is emitted. Mostly in tests, but there's one place where it's happening in the HTTP parser too.

❓ What is the new behavior (if this is a feature change)?

BytesWarning no more!

πŸ“‹ Other information:

N/A

πŸ“‹ Contribution checklist:

(If you're a first-timer, check out
this guide on making great pull requests)

  • I wrote descriptive pull request text above
  • I think the code is well written
  • I wrote good commit messages
  • I have squashed related commits together after
    the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences

This change is Reviewable

Things like byte-to-int comparisons and interpolation of bytes into
str were present in the code base. This patch fixes that by making
sure that the variables are always of compatible types in these cases.
@webknjaz webknjaz added bug Something is broken enhancement Improvement backport-8.x πŸ€– Trigger automatic backporting into the `maint/8.x` release branch by the Patchback robot labels Mar 12, 2024
@webknjaz webknjaz self-assigned this Mar 12, 2024
@webknjaz webknjaz closed this pull request by merging all changes into cherrypy:main in 37c2196 Mar 13, 2024

This comment was marked as resolved.

@webknjaz webknjaz removed the backport-8.x πŸ€– Trigger automatic backporting into the `maint/8.x` release branch by the Patchback robot label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant