D12344: policy: remove Python 2.7 compatibility code
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri Mar 4 03:33:00 UTC 2022
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12344
AFFECTED FILES
mercurial/policy.py
CHANGE DETAILS
diff --git a/mercurial/policy.py b/mercurial/policy.py
--- a/mercurial/policy.py
+++ b/mercurial/policy.py
@@ -53,11 +53,8 @@
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):
To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list