diff options
| -rw-r--r-- | CHANGELOG.rst | 9 | ||||
| -rw-r--r-- | setup.py | 16 | ||||
| -rw-r--r-- | src/cryptography/__about__.py | 2 | ||||
| -rw-r--r-- | src/cryptography/hazmat/primitives/_asymmetric.py | 17 | ||||
| -rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/padding.py | 10 | ||||
| -rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/rsa.py | 2 | ||||
| -rw-r--r-- | vectors/cryptography_vectors/__about__.py | 2 |
7 files changed, 45 insertions, 13 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 15f945497..5fb6c47b1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,15 @@ Changelog ========= +.. _v3-4-1: + +3.4.1 - 2021-02-07 +~~~~~~~~~~~~~~~~~~ + +* Fixed a circular import issue. +* Added additional debug output to assist users seeing installation errors + due to outdated ``pip`` or missing ``rustc``. + .. _v3-4: 3.4 - 2021-02-07 @@ -10,7 +10,21 @@ import sys from setuptools import find_packages, setup -from setuptools_rust import RustExtension +try: + from setuptools_rust import RustExtension +except ImportError: + print( + """ + =============================DEBUG ASSISTANCE========================== + If you are seeing an error here please try the following to + successfully install cryptography: + + Upgrade to the latest pip and try again. This will fix errors for most + users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip + =============================DEBUG ASSISTANCE========================== + """ + ) + raise base_dir = os.path.dirname(__file__) diff --git a/src/cryptography/__about__.py b/src/cryptography/__about__.py index 2e71757c5..339a9349f 100644 --- a/src/cryptography/__about__.py +++ b/src/cryptography/__about__.py @@ -21,7 +21,7 @@ __summary__ = ( ) __uri__ = "https://github.com/pyca/cryptography" -__version__ = "3.4" +__version__ = "3.4.1" __author__ = "The Python Cryptographic Authority and individual contributors" __email__ = "cryptography-dev@python.org" diff --git a/src/cryptography/hazmat/primitives/_asymmetric.py b/src/cryptography/hazmat/primitives/_asymmetric.py new file mode 100644 index 000000000..cdadbdeff --- /dev/null +++ b/src/cryptography/hazmat/primitives/_asymmetric.py @@ -0,0 +1,17 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +import abc + + +# This exists to break an import cycle. It is normally accessible from the +# asymmetric padding module. + + +class AsymmetricPadding(metaclass=abc.ABCMeta): + @abc.abstractproperty + def name(self) -> str: + """ + A string naming this padding (e.g. "PSS", "PKCS1"). + """ diff --git a/src/cryptography/hazmat/primitives/asymmetric/padding.py b/src/cryptography/hazmat/primitives/asymmetric/padding.py index a3b850ff5..301c64c92 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/padding.py +++ b/src/cryptography/hazmat/primitives/asymmetric/padding.py @@ -3,21 +3,13 @@ # for complete details. -import abc import typing from cryptography.hazmat.primitives import hashes +from cryptography.hazmat.primitives._asymmetric import AsymmetricPadding from cryptography.hazmat.primitives.asymmetric import rsa -class AsymmetricPadding(metaclass=abc.ABCMeta): - @abc.abstractproperty - def name(self) -> str: - """ - A string naming this padding (e.g. "PSS", "PKCS1"). - """ - - class PKCS1v15(AsymmetricPadding): name = "EMSA-PKCS1-v1_5" diff --git a/src/cryptography/hazmat/primitives/asymmetric/rsa.py b/src/cryptography/hazmat/primitives/asymmetric/rsa.py index 375356002..213e518db 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/rsa.py +++ b/src/cryptography/hazmat/primitives/asymmetric/rsa.py @@ -12,12 +12,12 @@ from cryptography.exceptions import UnsupportedAlgorithm, _Reasons from cryptography.hazmat.backends import _get_backend from cryptography.hazmat.backends.interfaces import RSABackend from cryptography.hazmat.primitives import _serialization, hashes +from cryptography.hazmat.primitives._asymmetric import AsymmetricPadding from cryptography.hazmat.primitives.asymmetric import ( AsymmetricSignatureContext, AsymmetricVerificationContext, utils as asym_utils, ) -from cryptography.hazmat.primitives.asymmetric.padding import AsymmetricPadding class RSAPrivateKey(metaclass=abc.ABCMeta): diff --git a/vectors/cryptography_vectors/__about__.py b/vectors/cryptography_vectors/__about__.py index bed5270de..82e697fd6 100644 --- a/vectors/cryptography_vectors/__about__.py +++ b/vectors/cryptography_vectors/__about__.py @@ -18,7 +18,7 @@ __summary__ = "Test vectors for the cryptography package." __uri__ = "https://github.com/pyca/cryptography" -__version__ = "3.4" +__version__ = "3.4.1" __author__ = "The Python Cryptographic Authority and individual contributors" __email__ = "cryptography-dev@python.org" |
