Package Details: python2-pyopenssl 21.0.0-6

Git Clone URL: https://aur.archlinux.org/python2-pyopenssl.git (read-only, click to copy)
Package Base: python2-pyopenssl
Description: Wrapper module for OpenSSL (legacy Python 2 version)
Upstream URL: https://pypi.org/project/pyopenssl/21.0.0/
Licenses: Apache
Submitter: MarsSeed
Maintainer: tallero
Last Packager: MarsSeed
Votes: 3
Popularity: 0.030471
First Submitted: 2022-06-13 21:43 (UTC)
Last Updated: 2022-07-07 01:18 (UTC)

Latest Comments

LaughingMan commented on 2023-04-28 15:27 (UTC)

@Genstar @ynikitenko Those errors were caused by python2-cryptography being broken. Update that and this package should hopefully pass its tests.

ynikitenko commented on 2023-04-07 13:54 (UTC) (edited on 2023-04-07 13:58 (UTC) by ynikitenko)

Problem with check() (installing this as a dependency of python2-pip).

platform linux2 -- Python 2.7.18, pytest-4.6.11, py-1.11.0, pluggy-0.13.1 -- /usr/bin/python2
/home/yaroslav/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography import utils, x509
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 204, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/terminal.py", line 588, in pytest_sessionstart
INTERNALERROR>     config=self.config, startdir=self.startdir
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/yaroslav/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/tests/conftest.py", line 10, in pytest_report_header
INTERNALERROR>     import OpenSSL.SSL
INTERNALERROR>   File "/home/yaroslav/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/__init__.py", line 8, in <module>
INTERNALERROR>     from OpenSSL import crypto, SSL
INTERNALERROR>   File "/home/yaroslav/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/crypto.py", line 17, in <module>
INTERNALERROR>     from OpenSSL._util import (
INTERNALERROR>   File "/home/yaroslav/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/_util.py", line 6, in <module>
INTERNALERROR>     from cryptography.hazmat.bindings.openssl.binding import Binding
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
INTERNALERROR>     from cryptography.hazmat.bindings._openssl import ffi, lib
INTERNALERROR> ImportError: /usr/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: FIPS_mode
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python2-pyopenssl

Genstar commented on 2022-11-13 03:48 (UTC) (edited on 2022-11-13 03:49 (UTC) by Genstar)

Problem at check() with the openssl library:

-- Using LC_ALL=C.UTF-8 locale to ensure UTF-8 filesystem encoding is used in Python 2
running pytest
running egg_info
creating src/pyOpenSSL.egg-info
writing requirements to src/pyOpenSSL.egg-info/requires.txt
writing src/pyOpenSSL.egg-info/PKG-INFO
writing top-level names to src/pyOpenSSL.egg-info/top_level.txt
writing dependency_links to src/pyOpenSSL.egg-info/dependency_links.txt
writing manifest file 'src/pyOpenSSL.egg-info/SOURCES.txt'
reading manifest file 'src/pyOpenSSL.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching '.readthedocs.yml'
no previously-included directories found matching 'doc/_build'
writing manifest file 'src/pyOpenSSL.egg-info/SOURCES.txt'
running build_ext
======================================================== test session starts =========================================================
platform linux2 -- Python 2.7.18, pytest-4.6.11, py-1.11.0, pluggy-0.13.1 -- /usr/bin/python2
/home/genstar/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography import utils, x509
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 204, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/terminal.py", line 588, in pytest_sessionstart
INTERNALERROR>     config=self.config, startdir=self.startdir
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/genstar/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/tests/conftest.py", line 10, in pytest_report_header
INTERNALERROR>     import OpenSSL.SSL
INTERNALERROR>   File "/home/genstar/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/__init__.py", line 8, in <module>
INTERNALERROR>     from OpenSSL import crypto, SSL
INTERNALERROR>   File "/home/genstar/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/crypto.py", line 17, in <module>
INTERNALERROR>     from OpenSSL._util import (
INTERNALERROR>   File "/home/genstar/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/src/OpenSSL/_util.py", line 6, in <module>
INTERNALERROR>     from cryptography.hazmat.bindings.openssl.binding import Binding
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
INTERNALERROR>     from cryptography.hazmat.bindings._openssl import ffi, lib
INTERNALERROR> ImportError: /usr/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: ERR_new

tpaniaki commented on 2022-06-16 09:28 (UTC)

It worked. Thank you.

MarsSeed commented on 2022-06-16 00:55 (UTC) (edited on 2022-06-16 00:56 (UTC) by MarsSeed)

@jfk I've pushed an update for the encoding used in tests; please kindly check if it resolves the issue.

Though first you might have to install python2-scandir by skipping the tests for that.

Because currently that has the same problem as was reported here, and to test this package, that one is needed via checkdepends.

To install python2-scandir without testing it, you can run the following:

yay -Syu --asdeps --mflags '--nocheck' python2-scandir

After that, please try to install this package with the regular yay command and report back to me if the problem still persists or not.

tpaniaki commented on 2022-06-15 13:15 (UTC)

Some building issues reported here:

======================================================= ERRORS =======================================================
_______________________________________ ERROR collecting tests/test_crypto.py ________________________________________
tests/test_crypto.py:2227: in <module>
    class TestX509Store(object):
tests/test_crypto.py:2272: in TestX509Store
    b"/cafile" + NON_ASCII.encode(sys.getfilesystemencoding()),
E   UnicodeEncodeError: 'ascii' codec can't encode character u'\u2603' in position 0: ordinal not in range(128)
_________________________________________ ERROR collecting tests/test_ssl.py _________________________________________
tests/test_ssl.py:146: in <module>
    from .test_crypto import (
/usr/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:304: in load_module
    exec(co, mod.__dict__)
tests/test_crypto.py:2227: in <module>
    class TestX509Store(object):
tests/test_crypto.py:2272: in TestX509Store
    b"/cafile" + NON_ASCII.encode(sys.getfilesystemencoding()),
E   UnicodeEncodeError: 'ascii' codec can't encode character u'\u2603' in position 0: ordinal not in range(128)
================================================== warnings summary ==================================================
tests/test_crypto.py:39
tests/test_crypto.py:39
  /home/fabien/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/tests/test_crypto.py:39: DeprecationWarning: PKCS#7 support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
    from OpenSSL.crypto import PKCS7, load_pkcs7_data

tests/test_crypto.py:40
tests/test_crypto.py:40
  /home/fabien/.cache/yay/python2-pyopenssl/src/pyopenssl-21.0.0/tests/test_crypto.py:40: DeprecationWarning: PKCS#12 support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
    from OpenSSL.crypto import PKCS12, load_pkcs12

-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!