Mercurial > public > mercurial-scm > hg-stable
diff mercurial/formatter.py @ 48961:df56e6bd37f6
py3: use pickle directly
pycompat.pickle abstracted over the different pickle modules in
Python 2 and 3. Now that we're Python 3 only, it is safe to use the
`pickle` module directly. So this commit does that.
As part of this we remove the rules from check-code.py that were
forbidden direct pickle module use.
We retain the `util.pickle` symbol for backwards compatibility, just
in case some extensions were using it.
Differential Revision: https://phab.mercurial-scm.org/D12249
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 01 Mar 2022 20:29:03 -0800 |
parents | d4ba4d51f85f |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/mercurial/formatter.py Wed Mar 02 17:51:27 2022 -0800 +++ b/mercurial/formatter.py Tue Mar 01 20:29:03 2022 -0800 @@ -110,6 +110,7 @@ import contextlib import itertools import os +import pickle from .i18n import _ from .node import ( @@ -133,8 +134,6 @@ stringutil, ) -pickle = util.pickle - def isprintable(obj): """Check if the given object can be directly passed in to formatter's