Patchwork pyflakes: use pycompat.pickles to prevent error

login
register
mail settings
Submitter Pierre-Yves David
Date June 24, 2016, 1:25 a.m.
Message ID <a40bead90ee0999be32f.1466731554@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/15595/
State Accepted
Headers show

Comments

Pierre-Yves David - June 24, 2016, 1:25 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1466726683 -7200
#      Fri Jun 24 02:04:43 2016 +0200
# Node ID a40bead90ee0999be32fe0b2fdc5d39985c7a57b
# Parent  6d96658a22b0fc1eb210c99c5629dd69fedf3006
pyflakes: use pycompat.pickles to prevent error

The pyflakes in my test box complain about pickle in pycompat.

  mercurial/pycompat.py:17: 'pickle' imported but unused
via Mercurial-devel - June 24, 2016, 10:08 p.m.
Looks good (obviously, since I sent the same patch). Pushed to
"commited", thanks.

On Thu, Jun 23, 2016 at 6:25 PM, Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1466726683 -7200
> #      Fri Jun 24 02:04:43 2016 +0200
> # Node ID a40bead90ee0999be32fe0b2fdc5d39985c7a57b
> # Parent  6d96658a22b0fc1eb210c99c5629dd69fedf3006
> pyflakes: use pycompat.pickles to prevent error
>
> The pyflakes in my test box complain about pickle in pycompat.
>
>   mercurial/pycompat.py:17: 'pickle' imported but unused
>
> diff -r 6d96658a22b0 -r a40bead90ee0 mercurial/pycompat.py
> --- a/mercurial/pycompat.py     Thu Jun 23 18:21:25 2016 +0100
> +++ b/mercurial/pycompat.py     Fri Jun 24 02:04:43 2016 +0200
> @@ -15,6 +15,7 @@ try:
>      pickle.dumps
>  except ImportError:
>      import pickle
> +    pickle.dumps # silence pyflakes
>
>  try:
>      import cStringIO as io
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff -r 6d96658a22b0 -r a40bead90ee0 mercurial/pycompat.py
--- a/mercurial/pycompat.py	Thu Jun 23 18:21:25 2016 +0100
+++ b/mercurial/pycompat.py	Fri Jun 24 02:04:43 2016 +0200
@@ -15,6 +15,7 @@  try:
     pickle.dumps
 except ImportError:
     import pickle
+    pickle.dumps # silence pyflakes
 
 try:
     import cStringIO as io