FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix issue with cformat converting bytes to string for bytesinner by MegasKomnenos · Pull Request #4760 · RustPython/RustPython · GitHub

Fix issue with cformat converting bytes to string for bytesinner - #4760

Merged
youknowone merged 2 commits into
RustPython:mainfrom
MegasKomnenos:test_bytes
Mar 25, 2023
Merged

Fix issue with cformat converting bytes to string for bytesinner#4760
youknowone merged 2 commits into
RustPython:mainfrom
MegasKomnenos:test_bytes

Conversation

MegasKomnenos commented Mar 25, 2023
edited by youknowone
Loading

Copy link
Copy Markdown
Contributor

This is a follow-up of the following PR
#4746

It addresses the failing test case for test_mod, where,

b'...%(foo)b...' % {b'foo':b"abc"}

caused invalid key error for 'foo'

The cause of this issue was that individual tokens in bytesinner were converted to string before being used for string formatting, but the token being addressed was expected to be in bytes.

It was addressed by making sure that it is treated as bytes.

youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

looks good, thank you!

youknowone merged commit 887ffd1 into RustPython:main Mar 25, 2023
youknowone added C-bug Something isn't working A-stdlib z-ca-2023 Tag to track contrubution-academy 2023 labels Mar 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-stdlib C-bug Something isn't working z-ca-2023 Tag to track contrubution-academy 2023

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL