Bug 2272977 - fedmsg fails to build with pytest 8: ValueError: You must set the ssldir and certname keyword arguments.
Summary: fedmsg fails to build with pytest 8: ValueError: You must set the ssldir and ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: fedmsg
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-04-03 14:20 UTC by Tomáš Hrnčiar
Modified: 2024-04-03 14:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-04-03 14:20:32 UTC
fedmsg fails to build with pytest 8.

=================================== FAILURES ===================================
_____________________ TestCryptoGPG.test_failed_validation _____________________

self = <fedmsg.tests.test_crypto_gpg.TestCryptoGPG testMethod=test_failed_validation>

    def test_failed_validation(self):
        message = dict(msg='awesome')
>       signed = fedmsg.crypto.sign(message, **self.config)

fedmsg/tests/test_crypto_gpg.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
fedmsg/crypto/__init__.py:207: in sign
    return _implementation.sign(message, **config)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

message = {'msg': 'awesome'}, ssldir = None, certname = None
config = {'crypto_backend': 'gpg', 'gpg_home': '/builddir/build/BUILD/fedmsg-1.1.7/fedmsg/tests/test_certs/gpg', 'gpg_signing_key': 'DA19B4EC'}
error = 'You must set the ssldir and certname keyword arguments.'

    def sign(message, ssldir=None, certname=None, **config):
        """Insert two new fields into the message dict and return it.
    
        Those fields are:
    
            - 'signature' - the computed RSA message digest of the JSON repr.
            - 'certificate' - the base64 X509 certificate of the sending host.
    
        Arg:
            message (dict): An unsigned message to sign.
            ssldir (str): The absolute path to the directory containing the SSL certificates to
                use.
            certname (str): The name of the key pair to sign the message with. This corresponds to
                the filenames within ``ssldir`` sans prefixes. The key pair must be named
                ``<certname>.key`` and ``<certname>.crt``
        Returns:
            dict: The signed message.
        """
        if ssldir is None or certname is None:
            error = "You must set the ssldir and certname keyword arguments."
>           raise ValueError(error)
E           ValueError: You must set the ssldir and certname keyword arguments.

fedmsg/crypto/x509_ng.py:73: ValueError

https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07247560-fedmsg/

For all our attempts to build fedmsg with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/fedmsg/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change
proposal https://fedoraproject.org/wiki/Changes/Pytest_8

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


Note You need to log in before you can comment on or make changes to this bug.