Skip to content

Commit

Permalink
Prep for 2.7.2 (certbot#9808)
Browse files Browse the repository at this point in the history
* helpful: fix handling of abbreviated ConfigArgparse arguments (certbot#9796)

* helpful: fix handling of abbreviated ConfigArgparse arguments

ConfigArgparse allows for "abbreviated" arguments, i.e. just the prefix
of an argument, but it doesn't set the argument sources in these cases.
This commit checks for those cases and sets the sources appropriately.

* failing to find an action raises an error instead of logging

* Update changelog

* Add handling for short arguments, fix equals sign handling

These were silently being dropped before, possibly leading to instances
of `NamespaceConfig.set_by_user()` returning false negatives.

(cherry picked from commit 11e17ef)

* Fix finish_release.py (certbot#9800)

* response is value

* rename vars

(cherry picked from commit a96fb4b)

* Merge pull request certbot#9762 from certbot/docs/yaml-config

Add YAML files for Readthedocs requirements

(cherry picked from commit 44046c7)

* Update Lexicon requirements to stabilize certbot-dns-ovh behavior (certbot#9802)

* Update minimum Lexicon version required for certbot-dns-ovh

* Add types

* FIx mypy

* Fix lint

* Fix BOTH lint and mypy

(cherry picked from commit 5cf5f36)

* simplify code (certbot#9807)

(cherry picked from commit 6f7b5ab)

* Include linting fixes from 8a95c03

---------

Co-authored-by: Will Greenberg <[email protected]>
Co-authored-by: Alexis <[email protected]>
Co-authored-by: Adrien Ferrand <[email protected]>
  • Loading branch information
4 people authored Oct 19, 2023
1 parent 07b1b0d commit e407419
Show file tree
Hide file tree
Showing 35 changed files with 670 additions and 76 deletions.
33 changes: 33 additions & 0 deletions acme/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
11 changes: 2 additions & 9 deletions certbot-ci/certbot_integration_tests/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,8 @@


def _suppress_x509_verification_warnings() -> None:
try:
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
except ImportError:
# Handle old versions of request with vendorized urllib3
# pylint: disable=no-member
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings( # type: ignore[attr-defined]
InsecureRequestWarning)
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)


def check_until_timeout(url: str, attempts: int = 30) -> None:
Expand Down
6 changes: 4 additions & 2 deletions certbot-ci/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
'pywin32>=300 ; sys_platform == "win32"',
'pyyaml',
'pytz>=2019.3',
'requests',
# requests unvendored its dependencies in version 2.16.0 and this code relies on that for
# calling `urllib3.disable_warnings`.
'requests>=2.16.0',
'setuptools',
'types-python-dateutil'
'types-python-dateutil',
]

setup(
Expand Down
33 changes: 33 additions & 0 deletions certbot-dns-cloudflare/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
33 changes: 33 additions & 0 deletions certbot-dns-digitalocean/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
33 changes: 33 additions & 0 deletions certbot-dns-dnsimple/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys

import pytest
from requests import Response
from requests.exceptions import HTTPError

from certbot.compat import os
Expand All @@ -16,7 +17,7 @@
class AuthenticatorTest(test_util.TempDirTestCase,
dns_test_common_lexicon.BaseLexiconDNSAuthenticatorTest):

LOGIN_ERROR = HTTPError('401 Client Error: Unauthorized for url: ...')
LOGIN_ERROR = HTTPError('401 Client Error: Unauthorized for url: ...', response=Response())

def setUp(self):
super().setUp()
Expand Down
33 changes: 33 additions & 0 deletions certbot-dns-dnsmadeeasy/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from unittest import mock

import pytest
from requests import Response
from requests.exceptions import HTTPError

from certbot.compat import os
Expand All @@ -19,8 +20,8 @@
class AuthenticatorTest(test_util.TempDirTestCase,
dns_test_common_lexicon.BaseLexiconDNSAuthenticatorTest):

DOMAIN_NOT_FOUND = HTTPError(f'404 Client Error: Not Found for url: {DOMAIN}.')
LOGIN_ERROR = HTTPError(f'403 Client Error: Forbidden for url: {DOMAIN}.')
DOMAIN_NOT_FOUND = HTTPError(f'404 Client Error: Not Found for url: {DOMAIN}.', response=Response())
LOGIN_ERROR = HTTPError(f'403 Client Error: Forbidden for url: {DOMAIN}.', response=Response())

def setUp(self):
super().setUp()
Expand Down
33 changes: 33 additions & 0 deletions certbot-dns-gehirn/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from unittest import mock

import pytest
from requests import Response
from requests.exceptions import HTTPError

from certbot.compat import os
Expand All @@ -20,8 +21,8 @@
class AuthenticatorTest(test_util.TempDirTestCase,
dns_test_common_lexicon.BaseLexiconDNSAuthenticatorTest):

DOMAIN_NOT_FOUND = HTTPError(f'404 Client Error: Not Found for url: {DOMAIN}.')
LOGIN_ERROR = HTTPError(f'401 Client Error: Unauthorized for url: {DOMAIN}.')
DOMAIN_NOT_FOUND = HTTPError(f'404 Client Error: Not Found for url: {DOMAIN}.', response=Response())
LOGIN_ERROR = HTTPError(f'401 Client Error: Unauthorized for url: {DOMAIN}.', response=Response())

def setUp(self):
super().setUp()
Expand Down
33 changes: 33 additions & 0 deletions certbot-dns-google/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
33 changes: 33 additions & 0 deletions certbot-dns-linode/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ../tools/requirements.txt
Loading

0 comments on commit e407419

Please sign in to comment.