File: __init__.py

package info (click to toggle)
python-acme 0.28.0-1~deb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,020 kB
  • sloc: python: 4,054; makefile: 173; sh: 37
file content (27 lines) | stat: -rw-r--r-- 872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""ACME protocol implementation.

This module is an implementation of the `ACME protocol`_. Latest
supported version: `draft-ietf-acme-01`_.


.. _`ACME protocol`: https://ietf-wg-acme.github.io/acme

.. _`draft-ietf-acme-01`:
  https://github.com/ietf-wg-acme/acme/tree/draft-ietf-acme-acme-01

"""
import sys

# This code exists to keep backwards compatibility with people using acme.jose
# before it became the standalone josepy package.
#
# It is based on
# https://github.com/requests/requests/blob/1278ecdf71a312dc2268f3bfc0aabfab3c006dcf/requests/packages.py

import josepy as jose

for mod in list(sys.modules):
    # This traversal is apparently necessary such that the identities are
    # preserved (acme.jose.* is josepy.*)
    if mod == 'josepy' or mod.startswith('josepy.'):
        sys.modules['acme.' + mod.replace('josepy', 'jose', 1)] = sys.modules[mod]