diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-19 00:14:25 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-19 00:14:25 -0300 |
commit | a2f84b028b463e2c9337edad08b173c6699fa558 (patch) | |
tree | 3e26f2bc8276d00179322a1007bc6845efd8a4b8 /game | |
parent | fbf37dcc7251e66334f611bf575d304f28affa15 (diff) | |
download | client-a2f84b028b463e2c9337edad08b173c6699fa558.tar.gz client-a2f84b028b463e2c9337edad08b173c6699fa558.tar.bz2 client-a2f84b028b463e2c9337edad08b173c6699fa558.tar.xz client-a2f84b028b463e2c9337edad08b173c6699fa558.zip |
Update certifi to the last version with Python2.7 support
We're now using Certifi 2020.4.5.1
Diffstat (limited to 'game')
-rw-r--r-- | game/python-extra/certifi/__init__.py | 3 | ||||
-rw-r--r-- | game/python-extra/certifi/__main__.py | 12 | ||||
-rw-r--r-- | game/python-extra/certifi/core.py | 30 |
3 files changed, 45 insertions, 0 deletions
diff --git a/game/python-extra/certifi/__init__.py b/game/python-extra/certifi/__init__.py new file mode 100644 index 0000000..1e2dfac --- /dev/null +++ b/game/python-extra/certifi/__init__.py @@ -0,0 +1,3 @@ +from .core import contents, where + +__version__ = "2020.04.05.1" diff --git a/game/python-extra/certifi/__main__.py b/game/python-extra/certifi/__main__.py new file mode 100644 index 0000000..8945b5d --- /dev/null +++ b/game/python-extra/certifi/__main__.py @@ -0,0 +1,12 @@ +import argparse + +from certifi import contents, where + +parser = argparse.ArgumentParser() +parser.add_argument("-c", "--contents", action="store_true") +args = parser.parse_args() + +if args.contents: + print(contents()) +else: + print(where()) diff --git a/game/python-extra/certifi/core.py b/game/python-extra/certifi/core.py new file mode 100644 index 0000000..56b52a3 --- /dev/null +++ b/game/python-extra/certifi/core.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- + +""" +certifi.py +~~~~~~~~~~ + +This module returns the installation location of cacert.pem or its contents. +""" +import os + +try: + from importlib.resources import read_text +except ImportError: + # This fallback will work for Python versions prior to 3.7 that lack the + # importlib.resources module but relies on the existing `where` function + # so won't address issues with environments like PyOxidizer that don't set + # __file__ on modules. + def read_text(_module, _path, encoding="ascii"): + with open(where(), "r", encoding=encoding) as data: + return data.read() + + +def where(): + f = os.path.dirname(__file__) + + return os.path.join(f, "cacert.pem") + + +def contents(): + return read_text("certifi", "cacert.pem", encoding="ascii") |