Fix bytes<->str mixing in python3.#986
Merged
goldshtn merged 2 commits intoiovisor:masterfrom Mar 26, 2017
Merged
Conversation
Contributor
|
[buildbot, test this please] |
Contributor
|
@r4f4 Can you please rebase and force-push so we can get this merged? |
Contributor
|
@r4f4 Can you please take a look at the build failure and also rebase this so we can get this merged? |
Contributor
Author
|
Sure, I'm looking into it. |
Contributor
|
Thanks very for much for this, I've taken the liberty of fixing up the commit message slightly. If you could follow up on the tools you said were showing some problems, it would be great. |
torgil
added a commit
to torgil/bcc
that referenced
this pull request
Mar 27, 2017
Scripts should never assume what codetable an external user has and try to decode. Doing that has huge potential to cause pain and misery for users (a common python3 sickness nowadays). A better option is for python3-users to live with b'' syntax or provide an option --decode=xxx to each script. Revert "Python 3 compatibility fixes around string handling (iovisor#986)" This reverts commit 78948e4. The offending patch produces the following test failure on Jessie with backports 4.9 kernel: Traceback (most recent call last): File "../../tools/slabratetop.py", line 123, in <module> print("%-32s %6d %10d" % (k.name.decode(), v.count, v.size)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc1 in position 2: ordinal not in range(128)
Contributor
Author
|
@goldshtn It seems the internal library finding is working again, so I'm sending a patch for the remaining tools. |
Contributor
Author
|
Well, never mind. The whole thing was reverted. |
Contributor
|
@r4f4 We haven't reverted this, actually. And looks like we're not going to. So -- could you look into patching the remaining tools, like you wrote above? |
r4f4
added a commit
to r4f4/bcc
that referenced
this pull request
Mar 30, 2017
juergenhoetzel
added a commit
to juergenhoetzel/bcc
that referenced
this pull request
Jun 21, 2018
Leftover from #iovisor#986.
juergenhoetzel
added a commit
to juergenhoetzel/bcc
that referenced
this pull request
Jun 21, 2018
Leftover from iovisor#986.
juergenhoetzel
added a commit
to juergenhoetzel/bcc
that referenced
this pull request
Jun 23, 2018
Leftover from iovisor#986.
juergenhoetzel
added a commit
to juergenhoetzel/bcc
that referenced
this pull request
Jun 25, 2018
Leftover from iovisor#986.
CrackerCat
pushed a commit
to CrackerCat/bcc
that referenced
this pull request
Jul 31, 2024
CrackerCat
pushed a commit
to CrackerCat/bcc
that referenced
this pull request
Jul 31, 2024
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tried to fix all the tools I could execute and check the output.
These are the tools missing from this patch: mysql_qslower, btr*, solisten, oomkill, ucalls, uflow, ugc, uthreads, xfs*, zfs*.
I'll open an issue for ucalls, uflow, ugc and uthreads soon, since my fix attempt breaks the internal library finding procedure and I can't figure out why.