Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

pyopenssl

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyopenssl - npm Package Compare versions

Comparing version
24.3.0
to
25.0.0
+15
-0
CHANGELOG.rst

@@ -7,2 +7,17 @@ Changelog

25.0.0 (2025-01-12)
-------------------
Backward-incompatible changes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Deprecations:
^^^^^^^^^^^^^
Changes:
^^^^^^^^
- Corrected type annotations on ``Context.set_alpn_select_callback``, ``Context.set_session_cache_mode``, ``Context.set_options``, ``Context.set_mode``, ``X509.subject_name_hash``, and ``X509Store.load_locations``.
- Deprecated APIs are now marked using ``warnings.deprecated``. ``mypy`` will emit deprecation notices for them when used with ``--enable-error-code deprecated``.
24.3.0 (2024-11-27)

@@ -9,0 +24,0 @@ -------------------

+29
-2

@@ -1,4 +0,4 @@

Metadata-Version: 2.1
Metadata-Version: 2.2
Name: pyOpenSSL
Version: 24.3.0
Version: 25.0.0
Summary: Python wrapper module around the OpenSSL library

@@ -32,2 +32,3 @@ Home-page: https://pyopenssl.org/

Requires-Dist: cryptography<45,>=41.0.5
Requires-Dist: typing-extensions>=4.9; python_version < "3.13" and python_version >= "3.8"
Provides-Extra: test

@@ -40,2 +41,13 @@ Requires-Dist: pytest-rerunfailures; extra == "test"

Requires-Dist: sphinx_rtd_theme; extra == "docs"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

@@ -89,2 +101,17 @@ ========================================================

25.0.0 (2025-01-12)
-------------------
Backward-incompatible changes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Deprecations:
^^^^^^^^^^^^^
Changes:
^^^^^^^^
- Corrected type annotations on ``Context.set_alpn_select_callback``, ``Context.set_session_cache_mode``, ``Context.set_options``, ``Context.set_mode``, ``X509.subject_name_hash``, and ``X509Store.load_locations``.
- Deprecated APIs are now marked using ``warnings.deprecated``. ``mypy`` will emit deprecation notices for them when used with ``--enable-error-code deprecated``.
24.3.0 (2024-11-27)

@@ -91,0 +118,0 @@ -------------------

+5
-4

@@ -16,5 +16,3 @@ [tool.coverage.run]

[tool.coverage.report]
exclude_also = [
"assert False",
]
exclude_also = ["assert False"]
show_missing = true

@@ -24,3 +22,2 @@

warn_unused_configs = true
follow_imports = "skip"
strict = true

@@ -40,2 +37,6 @@

[[tool.mypy.overrides]]
module = ["pretend"]
ignore_missing_imports = true
[tool.pytest.ini_options]

@@ -42,0 +43,0 @@ addopts = "-r s --strict-markers"

@@ -98,2 +98,6 @@ #!/usr/bin/env python

"cryptography>=41.0.5,<45",
(
"typing-extensions>=4.9; "
"python_version < '3.13' and python_version >= '3.8'"
),
],

@@ -100,0 +104,0 @@ extras_require={

@@ -10,3 +10,6 @@ from __future__ import annotations

StrOrBytesPath = Union[str, bytes, os.PathLike]
if sys.version_info >= (3, 9):
StrOrBytesPath = Union[str, bytes, os.PathLike[str], os.PathLike[bytes]]
else:
StrOrBytesPath = Union[str, bytes, os.PathLike]

@@ -13,0 +16,0 @@ binding = Binding()

@@ -5,2 +5,4 @@ """

from __future__ import annotations
import warnings

@@ -7,0 +9,0 @@

@@ -20,3 +20,3 @@ # Copyright (C) AB Strakt

__version__ = "24.3.0"
__version__ = "25.0.0"

@@ -29,2 +29,2 @@ __title__ = "pyOpenSSL"

__license__ = "Apache License, Version 2.0"
__copyright__ = f"Copyright 2001-2024 {__author__}"
__copyright__ = f"Copyright 2001-2025 {__author__}"

@@ -1,4 +0,4 @@

Metadata-Version: 2.1
Metadata-Version: 2.2
Name: pyOpenSSL
Version: 24.3.0
Version: 25.0.0
Summary: Python wrapper module around the OpenSSL library

@@ -32,2 +32,3 @@ Home-page: https://pyopenssl.org/

Requires-Dist: cryptography<45,>=41.0.5
Requires-Dist: typing-extensions>=4.9; python_version < "3.13" and python_version >= "3.8"
Provides-Extra: test

@@ -40,2 +41,13 @@ Requires-Dist: pytest-rerunfailures; extra == "test"

Requires-Dist: sphinx_rtd_theme; extra == "docs"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

@@ -89,2 +101,17 @@ ========================================================

25.0.0 (2025-01-12)
-------------------
Backward-incompatible changes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Deprecations:
^^^^^^^^^^^^^
Changes:
^^^^^^^^
- Corrected type annotations on ``Context.set_alpn_select_callback``, ``Context.set_session_cache_mode``, ``Context.set_options``, ``Context.set_mode``, ``X509.subject_name_hash``, and ``X509Store.load_locations``.
- Deprecated APIs are now marked using ``warnings.deprecated``. ``mypy`` will emit deprecation notices for them when used with ``--enable-error-code deprecated``.
24.3.0 (2024-11-27)

@@ -91,0 +118,0 @@ -------------------

cryptography<45,>=41.0.5
[:python_version < "3.13" and python_version >= "3.8"]
typing-extensions>=4.9
[docs]

@@ -4,0 +7,0 @@ sphinx!=5.2.0,!=5.2.0.post0,!=7.2.5

# Copyright (c) The pyOpenSSL developers
# See LICENSE for details.
import pathlib
from tempfile import mktemp

@@ -9,3 +10,3 @@

def pytest_report_header(config):
def pytest_report_header(config: pytest.Config) -> str:
import cryptography

@@ -16,3 +17,4 @@

return (
f"OpenSSL: {OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION)}\n"
f"OpenSSL: "
f"{OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION)!r}\n"
f"cryptography: {cryptography.__version__}"

@@ -23,3 +25,3 @@ )

@pytest.fixture
def tmpfile(tmpdir):
def tmpfile(tmp_path: pathlib.Path) -> bytes:
"""

@@ -30,2 +32,2 @@ Return UTF-8-encoded bytes of a path to a tmp file.

"""
return mktemp(dir=tmpdir.dirname).encode("utf-8")
return mktemp(dir=tmp_path).encode("utf-8")

@@ -5,3 +5,3 @@ from OpenSSL import version

def test_debug_info():
def test_debug_info() -> None:
"""

@@ -8,0 +8,0 @@ Debug info contains correct data.

@@ -8,2 +8,4 @@ # Copyright (c) Frederick Dean

from __future__ import annotations
import pytest

@@ -16,3 +18,3 @@

@pytest.mark.parametrize("args", [(b"foo", None), (None, 3)])
def test_add_wrong_args(self, args):
def test_add_wrong_args(self, args: tuple[object, object]) -> None:
"""

@@ -23,5 +25,5 @@ `OpenSSL.rand.add` raises `TypeError` if called with arguments not of

with pytest.raises(TypeError):
rand.add(*args)
rand.add(*args) # type: ignore[arg-type]
def test_add(self):
def test_add(self) -> None:
"""

@@ -32,3 +34,3 @@ `OpenSSL.rand.add` adds entropy to the PRNG.

def test_status(self):
def test_status(self) -> None:
"""

@@ -35,0 +37,0 @@ `OpenSSL.rand.status` returns `1` if the PRNG has sufficient entropy,

@@ -11,3 +11,3 @@ import pytest

def test_exception_from_error_queue_nonexistent_reason(self):
def test_exception_from_error_queue_nonexistent_reason(self) -> None:
"""

@@ -14,0 +14,0 @@ :func:`exception_from_error_queue` raises ``ValueError`` when it

@@ -12,144 +12,3 @@ # Copyright (C) Jean-Paul Calderone

def is_consistent_type(theType, name, *constructionArgs):
"""
Perform various assertions about *theType* to ensure that it is a
well-defined type. This is useful for extension types, where it's
pretty easy to do something wacky. If something about the type is
unusual, an exception will be raised.
:param theType: The type object about which to make assertions.
:param name: A string giving the name of the type.
:param constructionArgs: Positional arguments to use with
*theType* to create an instance of it.
"""
assert theType.__name__ == name
assert isinstance(theType, type)
instance = theType(*constructionArgs)
assert type(instance) is theType
return True
class EqualityTestsMixin:
"""
A mixin defining tests for the standard implementation of C{==} and C{!=}.
"""
def anInstance(self):
"""
Return an instance of the class under test. Each call to this method
must return a different object. All objects returned must be equal to
each other.
"""
raise NotImplementedError()
def anotherInstance(self):
"""
Return an instance of the class under test. Each call to this method
must return a different object. The objects must not be equal to the
objects returned by C{anInstance}. They may or may not be equal to
each other (they will not be compared against each other).
"""
raise NotImplementedError()
def test_identicalEq(self):
"""
An object compares equal to itself using the C{==} operator.
"""
o = self.anInstance()
assert o == o
def test_identicalNe(self):
"""
An object doesn't compare not equal to itself using the C{!=} operator.
"""
o = self.anInstance()
assert not (o != o)
def test_sameEq(self):
"""
Two objects that are equal to each other compare equal to each other
using the C{==} operator.
"""
a = self.anInstance()
b = self.anInstance()
assert a == b
def test_sameNe(self):
"""
Two objects that are equal to each other do not compare not equal to
each other using the C{!=} operator.
"""
a = self.anInstance()
b = self.anInstance()
assert not (a != b)
def test_differentEq(self):
"""
Two objects that are not equal to each other do not compare equal to
each other using the C{==} operator.
"""
a = self.anInstance()
b = self.anotherInstance()
assert not (a == b)
def test_differentNe(self):
"""
Two objects that are not equal to each other compare not equal to each
other using the C{!=} operator.
"""
a = self.anInstance()
b = self.anotherInstance()
assert a != b
def test_anotherTypeEq(self):
"""
The object does not compare equal to an object of an unrelated type
(which does not implement the comparison) using the C{==} operator.
"""
a = self.anInstance()
b = object()
assert not (a == b)
def test_anotherTypeNe(self):
"""
The object compares not equal to an object of an unrelated type (which
does not implement the comparison) using the C{!=} operator.
"""
a = self.anInstance()
b = object()
assert a != b
def test_delegatedEq(self):
"""
The result of comparison using C{==} is delegated to the right-hand
operand if it is of an unrelated type.
"""
class Delegate:
def __eq__(self, other):
# Do something crazy and obvious.
return [self]
a = self.anInstance()
b = Delegate()
assert (a == b) == [b]
def test_delegateNe(self):
"""
The result of comparison using C{!=} is delegated to the right-hand
operand if it is of an unrelated type.
"""
class Delegate:
def __ne__(self, other):
# Do something crazy and obvious.
return [self]
a = self.anInstance()
b = Delegate()
assert (a != b) == [b]
# The type name expected in warnings about using the wrong string type.
WARNING_TYPE_EXPECTED = "str"

@@ -45,7 +45,8 @@ [tox]

[testenv:py311-mypy]
extras =
test
deps =
mypy==1.1.1
skip_install = true
mypy
commands =
mypy src
mypy src/ tests/

@@ -52,0 +53,0 @@ [testenv:check-manifest]

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display