lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 20 Jan 2019 12:27:55 -0700
From:   Jonathan Corbet <corbet@....net>
To:     Tony Jones <tonyj@...e.de>
Cc:     Seeteena Thoufeek <s1seetee@...ux.vnet.ibm.com>,
        peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] perf scripts python: Add Python 3 support to
 exported-sql-viewer.py

On Fri, 18 Jan 2019 16:45:04 -0800
Tony Jones <tonyj@...e.de> wrote:

> On 1/17/19 1:45 AM, Seeteena Thoufeek wrote:
> 
> > +if sys.version_info[0] < 3:
> > +    import cPickle
> > +else:
> > +    import _pickle as cPickle  
> 
> Do you really need this?
> 
> pickle is already in Python2.

Did you mean in Python3?  I would agree that using it is better than
importing the semi-hidden _pickle module.

That said, I'll echo the questions about testing.  Pickle works in
Python3, but it is fraught with all kinds of bytes/str and encoding
issues; I've found it sufficiently fragile in practice that I really just
try to avoid it.  How have you verified that this script works under both
versions of Python?

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ