[continued from previous message]
- :param int filetype: The desired encoding. Should be one of
- `OpenSSL.crypto.FILETYPE_ASN1`,
- `OpenSSL.crypto.FILETYPE_PEM`, or
- `OpenSSL.crypto.FILETYPE_TEXT`.
-
- :returns: Encoded X509 object.
- :rtype: bytes
-
- """
- if isinstance(self.wrapped, crypto.X509):
- return crypto.dump_certificate(filetype, self.wrapped)
-
- # assert in __init__ makes sure this is X509Req
- return crypto.dump_certificate_request(filetype, self.wrapped)
-
- def __eq__(self, other: Any) -> bool:
- if not isinstance(other, self.__class__):
- return NotImplemented
- return self._dump() == other._dump()
-
- def __hash__(self) -> int:
- return hash((self.__class__, self._dump()))
-
- def __repr__(self) -> str:
- return "<{0}({1!r})>".format(self.__class__.__name__, self.wrapped)
-
-
class ComparableKey:
"""Comparable wrapper for ``cryptography`` keys.
diff -Nru python-josepy-1.14.0/tests/b64_test.py python-josepy-2.0.0/tests/b64_test.py
--- python-josepy-1.14.0/tests/b64_test.py 2023-11-01 09:36:41.810268000 -0400
+++ python-josepy-2.0.0/tests/b64_test.py 1969-12-31 19:00:00.000000000 -0500
@@ -1,4 +1,5 @@
"""Tests for josepy.b64."""
+
import sys
from typing import Union
diff -Nru python-josepy-1.14.0/tests/errors_test.py python-josepy-2.0.0/tests/errors_test.py
--- python-josepy-1.14.0/tests/errors_test.py 2023-11-01 09:36:41.810395700 -0400
+++ python-josepy-2.0.0/tests/errors_test.py 1969-12-31 19:00:00.000000000 -0500
@@ -1,4 +1,5 @@
"""Tests for josepy.errors."""
+
import sys
import unittest
diff -Nru python-josepy-1.14.0/tests/init_test.py python-josepy-2.0.0/tests/init_test.py
--- python-josepy-1.14.0/tests/init_test.py 2023-11-01 09:36:41.810521000 -0400
+++ python-josepy-2.0.0/tests/init_test.py 1969-12-31 19:00:00.000000000 -0500
@@ -1,25 +0,0 @@
-import importlib
-import re
-import sys
-import warnings
-
-import pytest
-
-import josepy
-
-
[email protected](sys.version_info[:2] != (3, 7),