Patchwork D12269: setup: remove ssl check that only matters on 2.7

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 3:45 p.m.
Message ID <differential-rev-PHID-DREV-xmixphx5bxc7zwocd4ob-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50608/
State New
Headers show

Comments

phabricator - March 2, 2022, 3:45 p.m.
durin42 created this revision.
durin42 added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12269

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: durin42, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -43,19 +43,6 @@ 
 
 import ssl
 
-try:
-    ssl.SSLContext
-except AttributeError:
-    error = """
-The `ssl` module does not have the `SSLContext` class. This indicates an old
-Python version which does not support modern security features (which were
-added to Python 2.7 as part of "PEP 466"). Please make sure you have installed
-at least Python 2.7.9 or a Python version with backports of these security
-features.
-"""
-    printf(error, file=sys.stderr)
-    sys.exit(1)
-
 # ssl.HAS_TLSv1* are preferred to check support but they were added in Python
 # 3.7. Prior to CPython commit 6e8cda91d92da72800d891b2fc2073ecbc134d98
 # (backported to the 3.7 branch), ssl.PROTOCOL_TLSv1_1 / ssl.PROTOCOL_TLSv1_2