commit:     ab116ee6850379cf49bcbd95a1f8e68e55dbd715
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 29 14:15:11 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 29 14:37:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab116ee6

dev-python/cryptography: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/cryptography/Manifest                   |   2 -
 .../cryptography/cryptography-3.4.7-r3.ebuild      |  81 ------
 .../files/cryptography-3.4.7-py310.patch           | 301 ---------------------
 3 files changed, 384 deletions(-)

diff --git a/dev-python/cryptography/Manifest b/dev-python/cryptography/Manifest
index 923504bc7b19..aac15e3401d5 100644
--- a/dev-python/cryptography/Manifest
+++ b/dev-python/cryptography/Manifest
@@ -7,9 +7,7 @@ DIST base64-0.13.0.crate 62070 BLAKE2B 
b957f65cdb1e28baeca0cefc92fa98be797409b7d
 DIST bitflags-1.3.2.crate 23021 BLAKE2B 
eb990bb27b2bdeb66fd7212ce582cb36e1c616debbac85df642d0c82b25439e6bf9b1e811fac76b59e58ea3c1bbea6170d03a61e8f9a395e4334a0e2e2987eda
 SHA512 
3c698f757b5cc62f815f9a1cce365c3d2dd88e4db71f331dff8bba86c2865f755b81cb4c9bfc59bd86b7643b0943f9e09a7c4f8ad75eb2ab0e714803d0129f62
 DIST cfg-if-1.0.0.crate 7934 BLAKE2B 
e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b
 SHA512 
0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff
 DIST chrono-0.4.19.crate 155663 BLAKE2B 
c92c273fb6475bbb2546dfb75eaa23321bc8f9a5fa8a7c652f527649b96ff8718fa932f52b500b02a4acae7837df5bdb14f69cb821d4962be2790dbd1d023a54
 SHA512 
a119349bfc2243a249f1d18b1ae548a04b30fecb75913a56f26d1ff8c0eb53097a2674d9141e2094018191cbbc1620843fbddaf52999824e077c1157f0907980
-DIST cryptography-3.4.7.tar.gz 546893 BLAKE2B 
49bc1e098ed1ba0181059b645f6668cda6332d196eaca55270ebce6e07e5bb6ab6724c5050fde20e89b7025773960d74ec782bb875badbbd5dc9a04db0a536f1
 SHA512 
3c4cf64bc0b067ccdbb71efe04c32ac9d673faea6cc4ccd13d6b1b61920be4785806d19359b7657d032a2ff1c011a8b4f16ec4924d9df8a59d1a875a7f844473
 DIST cryptography-37.0.4.tar.gz 585913 BLAKE2B 
3ed76d5cec1dd75ab89e9cae1357eda82b23017406cd84d97ab70d6b598cb3c453e34ea013d35b5a482f032b8513c0245d4273c2201313f42be54e404fa2b598
 SHA512 
9d39a2ec4facffd6d1c1db9267248846071aca8ac3bccba3da2d1a0664c6ce2a38c5245a9b8f62845a83abe6ba2782c43333aa4260960f37dc2eac3789a73575
-DIST cryptography_vectors-3.4.7.tar.gz 35168102 BLAKE2B 
fbefd3ff96548dde012fd290aba1c99d57db376023d486910e486cc9c143461ef1ae9b77824cc03307723d35142f0360bc961b548a4edc02357d3f1a0e7e4e9f
 SHA512 
269b50fa4c5300da6758006d12be42f998630d23053ef9af0eb588fc9e6994b044d8822cff105e338f4d0d746ed0e204a4a9c42f54667e355e1ce86e6754bbe9
 DIST cryptography_vectors-37.0.4.tar.gz 35242881 BLAKE2B 
3b58f12deec978e0d104ee84d2330248fd00291b63ca181a1e4803253e643496ee3cee14ecf84681db60da028543ca50d05968cac4d2c0609ae820b3a02463dd
 SHA512 
33098be46d072bf35f72320d64fd244a8ef890e99ae7baa21f9fbbb8d423d60f2711c3c1293830c860ff9bdd79bff910ce4df0f4dc9f363d712b722dab2de7ab
 DIST indoc-0.3.6.crate 9663 BLAKE2B 
ca7a1f4d3cbedbee0ba0a3f19c4b3352ff90927eef744b7e4f1d60855d4dc4265202972e81e0fc06d1222d8d5fb322efc4ef669af7396b251248a1e45c91def2
 SHA512 
e900aa3b001df0fdbf1f543d8b679af317e85a1f95e26fc556213f2826a4f6c82d8c4f3f82de435e3591f8bc14e78eb22668d901dcbe2287f46740e0291afacd
 DIST indoc-impl-0.3.6.crate 7933 BLAKE2B 
93e232e360e8f02943ef9a9cabf16bc863d792d8096b8d9a13a07f0b7b396db590abf83b5444f082317059dad7578ffae974dbc8a7e56fbdbab817b7d2534725
 SHA512 
18406587ee56a09dd2062cee456af697efa903343de42c0ff618a64ddf2bf7efed5da02e7220fed2636c555a6ae18059018f5c3c9b44ba8d3e5a34ea5b53c806

diff --git a/dev-python/cryptography/cryptography-3.4.7-r3.ebuild 
b/dev-python/cryptography/cryptography-3.4.7-r3.ebuild
deleted file mode 100644
index a9867806b571..000000000000
--- a/dev-python/cryptography/cryptography-3.4.7-r3.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} pypy3 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 multiprocessing
-
-VEC_P=cryptography_vectors-${PV}
-DESCRIPTION="Library providing cryptographic recipes and primitives"
-HOMEPAGE="
-       https://github.com/pyca/cryptography/
-       https://pypi.org/project/cryptography/
-"
-SRC_URI="
-       mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
-       test? ( mirror://pypi/c/cryptography_vectors/${VEC_P}.tar.gz )
-"
-
-LICENSE="|| ( Apache-2.0 BSD )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-macos 
~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-RDEPEND="
-       $(python_gen_cond_dep '
-               >=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]
-       ' 'python*')
-"
-BDEPEND="
-       test? (
-               >=dev-python/hypothesis-1.11.4[${PYTHON_USEDEP}]
-               dev-python/iso8601[${PYTHON_USEDEP}]
-               dev-python/pretend[${PYTHON_USEDEP}]
-               dev-python/pyasn1-modules[${PYTHON_USEDEP}]
-               dev-python/pytz[${PYTHON_USEDEP}]
-               dev-python/pytest-subtests[${PYTHON_USEDEP}]
-               dev-python/pytest-xdist[${PYTHON_USEDEP}]
-       )
-"
-
-distutils_enable_tests pytest
-
-DEPEND="
-       >=dev-libs/openssl-1.0.2o-r6:0=
-"
-RDEPEND+=${DEPEND}
-
-PATCHES=(
-       "${FILESDIR}/${P}-py310.patch"
-)
-
-src_prepare() {
-       default
-
-       # avoid automagic dependency on dev-libs/openssl[sslv3]
-       # https://bugs.gentoo.org/789450
-       export CPPFLAGS="${CPPFLAGS} -DOPENSSL_NO_SSL3_METHOD=1"
-
-       # work around availability macros not supported in GCC (yet)
-       if [[ ${CHOST} == *-darwin* ]] ; then
-               local darwinok=0
-               [[ ${CHOST##*-darwin} -ge 16 ]] && darwinok=1
-               sed -e 's/__builtin_available(macOS 10\.12, 
\*)/'"${darwinok}"'/' \
-                       -i src/_cffi_src/openssl/src/osrandom_engine.c || die
-       fi
-
-       # this version does not really use Rust, it just creates a dummy
-       # extension to break stuff
-       export CRYPTOGRAPHY_DONT_BUILD_RUST=1
-       sed -e 's:from setuptools_rust import RustExtension:pass:' \
-               -e '/setup_requires/d' \
-               -i setup.py || die
-}
-
-python_test() {
-       local -x PYTHONPATH=${PYTHONPATH}:${WORKDIR}/${VEC_P}
-       epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
-}

diff --git a/dev-python/cryptography/files/cryptography-3.4.7-py310.patch 
b/dev-python/cryptography/files/cryptography-3.4.7-py310.patch
deleted file mode 100644
index d961af82b774..000000000000
--- a/dev-python/cryptography/files/cryptography-3.4.7-py310.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-diff --git a/src/cryptography/exceptions.py b/src/cryptography/exceptions.py
-index f5860590..3bd98d82 100644
---- a/src/cryptography/exceptions.py
-+++ b/src/cryptography/exceptions.py
-@@ -3,10 +3,10 @@
- # for complete details.
- 
- 
--from enum import Enum
-+from cryptography import utils
- 
- 
--class _Reasons(Enum):
-+class _Reasons(utils.Enum):
-     BACKEND_MISSING_INTERFACE = 0
-     UNSUPPORTED_HASH = 1
-     UNSUPPORTED_CIPHER = 2
-diff --git a/src/cryptography/hazmat/primitives/_serialization.py 
b/src/cryptography/hazmat/primitives/_serialization.py
-index 96a5ed9b..160a6b89 100644
---- a/src/cryptography/hazmat/primitives/_serialization.py
-+++ b/src/cryptography/hazmat/primitives/_serialization.py
-@@ -3,13 +3,14 @@
- # for complete details.
- 
- import abc
--from enum import Enum
-+
-+from cryptography import utils
- 
- # This exists to break an import cycle. These classes are normally accessible
- # from the serialization module.
- 
- 
--class Encoding(Enum):
-+class Encoding(utils.Enum):
-     PEM = "PEM"
-     DER = "DER"
-     OpenSSH = "OpenSSH"
-@@ -18,14 +19,14 @@ class Encoding(Enum):
-     SMIME = "S/MIME"
- 
- 
--class PrivateFormat(Enum):
-+class PrivateFormat(utils.Enum):
-     PKCS8 = "PKCS8"
-     TraditionalOpenSSL = "TraditionalOpenSSL"
-     Raw = "Raw"
-     OpenSSH = "OpenSSH"
- 
- 
--class PublicFormat(Enum):
-+class PublicFormat(utils.Enum):
-     SubjectPublicKeyInfo = "X.509 subjectPublicKeyInfo with PKCS#1"
-     PKCS1 = "Raw PKCS#1"
-     OpenSSH = "OpenSSH"
-@@ -34,7 +35,7 @@ class PublicFormat(Enum):
-     UncompressedPoint = "X9.62 Uncompressed Point"
- 
- 
--class ParameterFormat(Enum):
-+class ParameterFormat(utils.Enum):
-     PKCS3 = "PKCS3"
- 
- 
-diff --git a/src/cryptography/hazmat/primitives/kdf/kbkdf.py 
b/src/cryptography/hazmat/primitives/kdf/kbkdf.py
-index ac36474f..75fe7d51 100644
---- a/src/cryptography/hazmat/primitives/kdf/kbkdf.py
-+++ b/src/cryptography/hazmat/primitives/kdf/kbkdf.py
-@@ -4,7 +4,6 @@
- 
- 
- import typing
--from enum import Enum
- 
- from cryptography import utils
- from cryptography.exceptions import (
-@@ -19,11 +18,11 @@ from cryptography.hazmat.primitives import constant_time, 
hashes, hmac
- from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
- 
- 
--class Mode(Enum):
-+class Mode(utils.Enum):
-     CounterMode = "ctr"
- 
- 
--class CounterLocation(Enum):
-+class CounterLocation(utils.Enum):
-     BeforeFixed = "before_fixed"
-     AfterFixed = "after_fixed"
- 
-diff --git a/src/cryptography/hazmat/primitives/serialization/pkcs7.py 
b/src/cryptography/hazmat/primitives/serialization/pkcs7.py
-index bcd9e330..57aac7e3 100644
---- a/src/cryptography/hazmat/primitives/serialization/pkcs7.py
-+++ b/src/cryptography/hazmat/primitives/serialization/pkcs7.py
-@@ -3,8 +3,8 @@
- # for complete details.
- 
- import typing
--from enum import Enum
- 
-+from cryptography import utils
- from cryptography import x509
- from cryptography.hazmat.backends import _get_backend
- from cryptography.hazmat.primitives import hashes, serialization
-@@ -35,7 +35,7 @@ _ALLOWED_PRIVATE_KEY_TYPES = typing.Union[
- ]
- 
- 
--class PKCS7Options(Enum):
-+class PKCS7Options(utils.Enum):
-     Text = "Add text/plain MIME type"
-     Binary = "Don't translate input data into canonical MIME format"
-     DetachedSignature = "Don't embed data in the PKCS7 structure"
-diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py
-index ef0fc443..9e571cfd 100644
---- a/src/cryptography/utils.py
-+++ b/src/cryptography/utils.py
-@@ -4,6 +4,7 @@
- 
- 
- import abc
-+import enum
- import inspect
- import sys
- import typing
-@@ -162,3 +163,13 @@ int_from_bytes = deprecated(
-     "int_from_bytes is deprecated, use int.from_bytes instead",
-     DeprecatedIn34,
- )
-+
-+
-+# Python 3.10 changed representation of enums. We use well-defined object
-+# representation and string representation from Python 3.9.
-+class Enum(enum.Enum):
-+    def __repr__(self):
-+        return f"<{self.__class__.__name__}.{self._name_}: {self._value_!r}>"
-+
-+    def __str__(self):
-+        return f"{self.__class__.__name__}.{self._name_}"
-diff --git a/src/cryptography/x509/base.py b/src/cryptography/x509/base.py
-index 5505fa3b..e3846c33 100644
---- a/src/cryptography/x509/base.py
-+++ b/src/cryptography/x509/base.py
-@@ -7,9 +7,9 @@ import abc
- import datetime
- import os
- import typing
--from enum import Enum
- 
- from cryptography.hazmat._types import _PRIVATE_KEY_TYPES, _PUBLIC_KEY_TYPES
-+from cryptography import utils
- from cryptography.hazmat.backends import _get_backend
- from cryptography.hazmat.primitives import hashes, serialization
- from cryptography.hazmat.primitives.asymmetric import (
-@@ -66,7 +66,7 @@ def _convert_to_naive_utc_time(time: datetime.datetime) -> 
datetime.datetime:
-         return time
- 
- 
--class Version(Enum):
-+class Version(utils.Enum):
-     v1 = 0
-     v3 = 2
- 
-diff --git a/src/cryptography/x509/certificate_transparency.py 
b/src/cryptography/x509/certificate_transparency.py
-index d51bee92..d80f051a 100644
---- a/src/cryptography/x509/certificate_transparency.py
-+++ b/src/cryptography/x509/certificate_transparency.py
-@@ -5,15 +5,16 @@
- 
- import abc
- import datetime
--from enum import Enum
- 
-+from cryptography import utils
- 
--class LogEntryType(Enum):
-+
-+class LogEntryType(utils.Enum):
-     X509_CERTIFICATE = 0
-     PRE_CERTIFICATE = 1
- 
- 
--class Version(Enum):
-+class Version(utils.Enum):
-     v1 = 0
- 
- 
-diff --git a/src/cryptography/x509/extensions.py 
b/src/cryptography/x509/extensions.py
-index 6cae016a..742f1fa2 100644
---- a/src/cryptography/x509/extensions.py
-+++ b/src/cryptography/x509/extensions.py
-@@ -8,7 +8,6 @@ import datetime
- import hashlib
- import ipaddress
- import typing
--from enum import Enum
- 
- from cryptography import utils
- from cryptography.hazmat._der import (
-@@ -634,7 +633,7 @@ class DistributionPoint(object):
-     crl_issuer = utils.read_only_property("_crl_issuer")
- 
- 
--class ReasonFlags(Enum):
-+class ReasonFlags(utils.Enum):
-     unspecified = "unspecified"
-     key_compromise = "keyCompromise"
-     ca_compromise = "cACompromise"
-@@ -978,7 +977,7 @@ class TLSFeature(ExtensionType):
-         return hash(tuple(self._features))
- 
- 
--class TLSFeatureType(Enum):
-+class TLSFeatureType(utils.Enum):
-     # status_request is defined in RFC 6066 and is used for what is commonly
-     # called OCSP Must-Staple when present in the TLS Feature extension in an
-     # X.509 certificate.
-diff --git a/src/cryptography/x509/name.py b/src/cryptography/x509/name.py
-index a579aa21..9069a9f4 100644
---- a/src/cryptography/x509/name.py
-+++ b/src/cryptography/x509/name.py
-@@ -3,14 +3,13 @@
- # for complete details.
- 
- import typing
--from enum import Enum
- 
- from cryptography import utils
- from cryptography.hazmat.backends import _get_backend
- from cryptography.x509.oid import NameOID, ObjectIdentifier
- 
- 
--class _ASN1Type(Enum):
-+class _ASN1Type(utils.Enum):
-     UTF8String = 12
-     NumericString = 18
-     PrintableString = 19
-diff --git a/src/cryptography/x509/ocsp.py b/src/cryptography/x509/ocsp.py
-index 1c5de73e..bcf210c1 100644
---- a/src/cryptography/x509/ocsp.py
-+++ b/src/cryptography/x509/ocsp.py
-@@ -6,8 +6,8 @@
- import abc
- import datetime
- import typing
--from enum import Enum
- 
-+from cryptography import utils
- from cryptography import x509
- from cryptography.hazmat.primitives import hashes, serialization
- from cryptography.x509.base import (
-@@ -27,12 +27,12 @@ _OIDS_TO_HASH = {
- }
- 
- 
--class OCSPResponderEncoding(Enum):
-+class OCSPResponderEncoding(utils.Enum):
-     HASH = "By Hash"
-     NAME = "By Name"
- 
- 
--class OCSPResponseStatus(Enum):
-+class OCSPResponseStatus(utils.Enum):
-     SUCCESSFUL = 0
-     MALFORMED_REQUEST = 1
-     INTERNAL_ERROR = 2
-@@ -58,7 +58,7 @@ def _verify_algorithm(algorithm):
-         )
- 
- 
--class OCSPCertStatus(Enum):
-+class OCSPCertStatus(utils.Enum):
-     GOOD = 0
-     REVOKED = 1
-     UNKNOWN = 2
-diff --git a/tests/test_cryptography_utils.py 
b/tests/test_cryptography_utils.py
-index 6b795e0c..803997ac 100644
---- a/tests/test_cryptography_utils.py
-+++ b/tests/test_cryptography_utils.py
-@@ -2,6 +2,7 @@
- # 2.0, and the BSD License. See the LICENSE file in the root of this 
repository
- # for complete details.
- 
-+import enum
- import typing
- 
- import pytest
-@@ -51,3 +52,13 @@ class TestCachedProperty(object):
-         assert len(accesses) == 1
-         assert t.t == 14
-         assert len(accesses) == 1
-+
-+
-+def test_enum():
-+    class TestEnum(utils.Enum):
-+        value = "something"
-+
-+    assert issubclass(TestEnum, enum.Enum)
-+    assert isinstance(TestEnum.value, enum.Enum)
-+    assert repr(TestEnum.value) == "<TestEnum.value: 'something'>"
-+    assert str(TestEnum.value) == "TestEnum.value"

Reply via email to