Skip to content

Comments

Fix bytes<->str mixing in python3.#986

Merged
goldshtn merged 2 commits intoiovisor:masterfrom
r4f4:bytes2str
Mar 26, 2017
Merged

Fix bytes<->str mixing in python3.#986
goldshtn merged 2 commits intoiovisor:masterfrom
r4f4:bytes2str

Conversation

@r4f4
Copy link
Contributor

@r4f4 r4f4 commented Feb 17, 2017

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.

@drzaeus77
Copy link
Contributor

[buildbot, test this please]

@goldshtn
Copy link
Contributor

goldshtn commented Mar 3, 2017

@r4f4 Can you please rebase and force-push so we can get this merged?

@goldshtn
Copy link
Contributor

@r4f4 Can you please take a look at the build failure and also rebase this so we can get this merged?

@r4f4
Copy link
Contributor Author

r4f4 commented Mar 21, 2017

Sure, I'm looking into it.

@goldshtn goldshtn merged commit 78948e4 into iovisor:master Mar 26, 2017
@goldshtn
Copy link
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)
@r4f4
Copy link
Contributor Author

r4f4 commented Mar 28, 2017

@goldshtn It seems the internal library finding is working again, so I'm sending a patch for the remaining tools.

@r4f4
Copy link
Contributor Author

r4f4 commented Mar 28, 2017

Well, never mind. The whole thing was reverted.

@goldshtn
Copy link
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
juergenhoetzel added a commit to juergenhoetzel/bcc that referenced this pull request Jun 21, 2018
yonghong-song pushed a commit that referenced this pull request Jun 22, 2018
juergenhoetzel added a commit to juergenhoetzel/bcc that referenced this pull request Jun 23, 2018
juergenhoetzel added a commit to juergenhoetzel/bcc that referenced this pull request Jun 25, 2018
yonghong-song pushed a commit that referenced this pull request Jun 25, 2018
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
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.

3 participants