Skip to content

Commit

Permalink
ACMEClient has been moved into gufo.acme.clients.base
Browse files Browse the repository at this point in the history
  • Loading branch information
dvolodin7 committed Nov 17, 2023
1 parent 67348a1 commit cefd64a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body:
should be self-contained, i.e., can be copy-pasted into the Python
interpreter or run as-is via `python myproblem.py`.
placeholder: |
from gufo.acme.client import ACMEClient
from gufo.acme.clients.base import ACMEClient
<< your code here >>
render: python
validations:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ To see unreleased changes, please see the [CHANGELOG on the master branch](https

## [Unreleased]

## Changed

* ACMEClient has been moved into `gufo.acme.clients.base`.

## Fixed

* Fixed typo in exception class name.
Expand Down
2 changes: 1 addition & 1 deletion examples/acme_register.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asyncio
import sys

from gufo.acme.client import ACMEClient
from gufo.acme.clients.base import ACMEClient

DIRECTORY = "https://acme-staging-v02.api.letsencrypt.org/directory"

Expand Down
2 changes: 1 addition & 1 deletion examples/acme_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import sys

from gufo.acme.client import ACMEClient
from gufo.acme.clients.base import ACMEClient
from gufo.acme.types import ACMEChallenge

CHALLENGE_DIR = "/www/acme/"
Expand Down
2 changes: 1 addition & 1 deletion examples/get_csr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

from gufo.acme.client import ACMEClient
from gufo.acme.clients.base import ACMEClient


def main(domain: str, private_key_path: str, csr_path: str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion examples/get_private_key.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

from gufo.acme.client import ACMEClient
from gufo.acme.clients.base import ACMEClient


def main(path: str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/gufo/acme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
The package consists of the following modules:
* [acme][gufo.acme.acme] - ACME protocol messages.
* [client][gufo.acme.client] - ACMEClient implementation.
* [clients][gufo.acme.clients] - Various ACME clients imlementations.
* [error][gufo.acme.error] - Error classes.
* [log][gufo.acme.log] - Logging utilities.
* [types][gufo.acme.types] - Package public types.
Expand Down
13 changes: 13 additions & 0 deletions src/gufo/acme/clients/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ---------------------------------------------------------------------
# Gufo ACME: Various clients implementation.
# ---------------------------------------------------------------------
# Copyright (C) 2023, Gufo Labs
# ---------------------------------------------------------------------

"""
Various ACME clients implementations.
The following clients are provided out-of-the-box:
* [base
"""
10 changes: 5 additions & 5 deletions src/gufo/acme/client.py → src/gufo/acme/clients/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
from josepy.jwk import JWK, JWKRSA

# Gufo ACME modules
from . import __version__
from .acme import AcmeJWS
from .error import (
from .. import __version__
from ..acme import AcmeJWS
from ..error import (
ACMEAlreadyRegistered,
ACMEAuthorizationError,
ACMEBadNonceError,
Expand All @@ -57,8 +57,8 @@
ACMEUnauthorizedError,
ACMEUndecodableError,
)
from .log import logger
from .types import ACMEAuthorization, ACMEChallenge, ACMEDirectory, ACMEOrder
from ..log import logger
from ..types import ACMEAuthorization, ACMEChallenge, ACMEDirectory, ACMEOrder

BAD_REQUEST = 400
T = TypeVar("T")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import pytest

# CSR Proxy modules
from gufo.acme.client import ACMEClient
from gufo.acme.clients.base import ACMEClient
from gufo.acme.error import (
ACMEAlreadyRegistered,
ACMEBadNonceError,
Expand Down

0 comments on commit cefd64a

Please sign in to comment.