changeset 48993:225659936fff

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
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 29 Mar 2022 22:22:36 -0400
parents bde2e4ef968a
children e45c39273395
files mercurial/util.py tests/test-check-pyflakes.t
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Tue Mar 29 14:27:45 2022 +0200
+++ b/mercurial/util.py	Tue Mar 29 22:22:36 2022 -0400
@@ -25,6 +25,7 @@
 import locale
 import mmap
 import os
+import pickle  # provides util.pickle symbol
 import re as remod
 import shutil
 import stat
--- a/tests/test-check-pyflakes.t	Tue Mar 29 14:27:45 2022 +0200
+++ b/tests/test-check-pyflakes.t	Tue Mar 29 22:22:36 2022 -0400
@@ -24,4 +24,5 @@
   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)