# HG changeset patch # User Matt Harbison # Date 2022-03-30 02:22:36 # Node ID 225659936fff843a5275d24f54d81189a181fb9d # Parent bde2e4ef968a57749e53c6818e9fbccfccd5b474 util: restore the util.pickle symbol This was accidently dropped in df56e6bd37f6, which started importing pickle directly. That commit explicitly says it will retain it for compatibility with external stuff though. The unused import in pycompat isn't flagged because that module is skipped. Just importing with a comment seemed cleaner than `import X as Y` and then assigning to a `pickle` variable, just to avoid the pyflakes warning. Differential Revision: https://phab.mercurial-scm.org/D12419 diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -25,6 +25,7 @@ import itertools import locale import mmap import os +import pickle # provides util.pickle symbol import re as remod import shutil import stat diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t --- a/tests/test-check-pyflakes.t +++ b/tests/test-check-pyflakes.t @@ -24,4 +24,5 @@ run pyflakes on all tracked files ending mercurial/util.py:*:* undefined name 'file' (glob) (?) mercurial/encoding.py:*:* undefined name 'localstr' (glob) (?) tests/run-tests.py:*:* undefined name 'PermissionError' (glob) (?) + mercurial/util.py:*:* 'pickle' imported but unused (glob)