Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 688B

12345678910111213141516171819
  1. import sys
  2. try:
  3. # Our match_hostname function is the same as 3.5's, so we only want to
  4. # import the match_hostname function if it's at least that good.
  5. if sys.version_info < (3, 5):
  6. raise ImportError("Fallback to vendored code")
  7. from ssl import CertificateError, match_hostname
  8. except ImportError:
  9. try:
  10. # Backport of the function from a pypi module
  11. from backports.ssl_match_hostname import CertificateError, match_hostname
  12. except ImportError:
  13. # Our vendored copy
  14. from ._implementation import CertificateError, match_hostname
  15. # Not needed, but documenting what we provide.
  16. __all__ = ('CertificateError', 'match_hostname')