This is an archive of the discontinued Mercurial Phabricator instance.

util: restore the util.pickle symbol
ClosedPublic

Authored by mharbison72 on Mar 30 2022, 1:45 AM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Mar 30 2022, 1:45 AM
mharbison72 added inline comments.Mar 30 2022, 1:49 AM
mercurial/util.py
28

Alternately, we can skip the next patch and just restore pickle = pycompat.pickle. But since there were check-code rules pointing toward util.pickle, I initially thought to cleanup pycompat a bit. That is at odds with the end of the series, which keeps several unused imports in pycompat.

marmoute accepted this revision.Mar 31 2022, 5:33 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.