From 57fef7df1ad3ed2da75e1c70ecd3e2744731d0d1 Mon Sep 17 00:00:00 2001 From: Will Greenberg Date: Mon, 25 Mar 2024 15:47:06 -0700 Subject: [PATCH] Remove unsupported union type syntax --- certbot-ci/certbot_integration_tests/utils/misc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/certbot-ci/certbot_integration_tests/utils/misc.py b/certbot-ci/certbot_integration_tests/utils/misc.py index ce468aab3..a4e8aefec 100644 --- a/certbot-ci/certbot_integration_tests/utils/misc.py +++ b/certbot-ci/certbot_integration_tests/utils/misc.py @@ -21,6 +21,7 @@ from typing import Iterable from typing import List from typing import Optional from typing import Tuple +from typing import Union import warnings from cryptography import x509 @@ -211,7 +212,7 @@ def generate_csr(domains: Iterable[str], key_path: str, csr_path: str, :param str csr_path: path to the CSR that will be generated :param str key_type: type of the key (misc.RSA_KEY_TYPE or misc.ECDSA_KEY_TYPE) """ - key: ec.EllipticCurvePrivateKey | rsa.RSAPrivateKey + key: Union[ec.EllipticCurvePrivateKey, rsa.RSAPrivateKey] if key_type == RSA_KEY_TYPE: # using public exponent 65537 as per # https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/