Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1705467 - pki-core FTBFS with Python 3.8
Summary: pki-core FTBFS with Python 3.8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pki-core
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthew Harmsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-02 11:12 UTC by Miro Hrončok
Modified: 2019-10-31 20:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-07 22:23:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (738.46 KB, text/plain)
2019-05-02 11:12 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2019-05-02 11:12:02 UTC
Created attachment 1561533 [details]
Full log from Copr

pki-core 10.6.9-3.fc31 fails to rebuild with Python 3.8. The actual failure is very hard to see from the logs, but it doesn't look like bz1675668. Full log attached.

The log ends with:


Your code has been rated at 10.00/10

error: Bad exit status from /var/tmp/rpm-tmp.Ojj4Ct (%install)

Comment 1 Dinesh Prasanth 2019-05-02 14:43:28 UTC
This seems to be a lint issue reported by pylint:

Snip of the error:
=================

+ echo 'Scanning Python code with pylint'
+ /usr/bin/python3 ../tools/pylint-build-scan.py rpm --prefix /builddir/build/BUILDROOT/pki-core-10.6.9-3.fc31.x86_64
************* Module pki.crypto
pki/crypto.py:60:8: W0107: Unnecessary pass statement (unnecessary-pass)
pki/crypto.py:385:8: W0107: Unnecessary pass statement (unnecessary-pass)
************* Module pki.key
pki/key.py:1119:8: W0107: Unnecessary pass statement (unnecessary-pass)

Comment 2 Alex Scheel 2019-05-02 14:49:36 UTC
May I suggest we disable pylint & friends at downstream build time? I understand why it is there (upstream drives CI with RPM builds), but it'd be nice not to FTBFS just because pylint keeps changing what they consider good code. These are warnings anyways, not errors. IMO, they should be informational. 


My 2c.

Comment 3 Dinesh Prasanth 2019-05-02 14:55:41 UTC
Upon doing a quick diff between 10.6 and 10.7(master), this seems to be solved in 10.7... We will be releasing PKI 10.7 early next week which should solve this issue.

@cipherboy, to improvise your idea, since we have a good upstream CI, we could still keep the pylint in upstream CI and disable it when executed in koji environment. Also, the OP has observed this in COPR. I don't think we want to disable it in COPR environment.


Reference:
==========


$ git diff DOGTAG_10_6_BRANCH master base/common/python/pki/key.py
diff --git a/base/common/python/pki/key.py b/base/common/python/pki/key.py
index 55a80935a..3a9e2368e 100644
--- a/base/common/python/pki/key.py
+++ b/base/common/python/pki/key.py
@@ -1116,7 +1116,6 @@ class KeyClient(object):
 
            The function will return the tuple (KeyData, None)
         """
-        pass
 
     @pki.handle_exceptions()
     def retrieve_key_by_pkcs12(self, key_id, certificate, passphrase):





$ git diff DOGTAG_10_6_BRANCH master base/common/python/pki/crypto.py
diff --git a/base/common/python/pki/crypto.py b/base/common/python/pki/crypto.py
index edb32c044..a5fe3f707 100644
--- a/base/common/python/pki/crypto.py
+++ b/base/common/python/pki/crypto.py
@@ -57,7 +57,6 @@ class CryptoProvider(six.with_metaclass(abc.ABCMeta, object)):
 
     def __init__(self):
         """ Constructor """
-        pass
 
     @abc.abstractmethod
     def initialize(self):
@@ -382,7 +381,6 @@ class CryptographyCryptoProvider(CryptoProvider):
         Any operations here that need to be performed before crypto
         operations.
         """
-        pass
 
     def get_supported_algorithm_keyset(self):
         """ returns highest supported algorithm keyset """

Comment 4 Miro Hrončok 2019-05-02 18:38:20 UTC
(In reply to Alex Scheel from comment #2)
> May I suggest we disable pylint & friends at downstream build time?

Yes please! Keep doing linting upstream, but don't FTBFS in Fedora just because linter rules have changed.

Comment 5 Dinesh Prasanth 2019-05-07 22:23:17 UTC
We have a successful build on Rawhide for PKI 10.7.0: https://koji.fedoraproject.org/koji/buildinfo?buildID=1264487

The lint has been removed from downstream through this commit: https://src.fedoraproject.org/rpms/pki-core/c/b2dea936acb4afe45d585d8c2db036901dc9de32?branch=master

Closing it as Current release


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