# HG changeset patch # User Gregory Szorc # Date 2022-02-21 19:36:04 # Node ID f98da13492127dea07f56b4b65e5ac5c44515fa2 # Parent 32ac127c999f3bc51a501310a2c70bc1850773cc policy: remove Python 2.7 compatibility code Differential Revision: https://phab.mercurial-scm.org/D12344 diff --git a/mercurial/policy.py b/mercurial/policy.py --- a/mercurial/policy.py +++ b/mercurial/policy.py @@ -53,11 +53,8 @@ if '__pypy__' in sys.builtin_module_name policy = b'cffi' # Environment variable can always force settings. -if sys.version_info[0] >= 3: - if 'HGMODULEPOLICY' in os.environ: - policy = os.environ['HGMODULEPOLICY'].encode('utf-8') -else: - policy = os.environ.get('HGMODULEPOLICY', policy) +if 'HGMODULEPOLICY' in os.environ: + policy = os.environ['HGMODULEPOLICY'].encode('utf-8') def _importfrom(pkgname, modname):