Something in rpm changed recently and pylint is no longer able to handle the rpm.RPMTAG_* constants. I don't see anything obvious in the commit log so I need some help figuring this out. python3-rpm-4.15.0-0.beta.2.fc31.2.x86_64 python3-pylint-2.3.1-2.fc31.noarch A simple reproducer is: #!/usr/bin/python3 import rpm print(rpm.RPMTAG_NAME) pylint-3 ./test-rpm.py ************* Module test-rpm test-rpm.py:1:0: C0103: Module name "test-rpm" doesn't conform to snake_case naming style (invalid-name) test-rpm.py:1:0: C0111: Missing module docstring (missing-docstring) test-rpm.py:4:6: E1101: Module 'rpm' has no 'RPMTAG_NAME' member (no-member) Running the program works fine, and they are also available when running python3 interactively.
python3-rpm is an EPEL7 only component, reassigning to rpm (it has python3-rpm subpackage in Fedora)
I can't reproduce on Fedora 30 (running a development snapshot of rpm which is slightly newer than the F31 beta): [pmatilai🎩︎sopuli ~]$ rpm -q python3-rpm python3-pylint python3-rpm-4.15.90-0.git14694.1.fc30.x86_64 python3-pylint-2.3.1-1.fc30.noarch [pmatilai🎩︎sopuli ~]$ pylint-3 test-rpm.py ************* Module test-rpm test-rpm.py:1:0: C0103: Module name "test-rpm" doesn't conform to snake_case naming style (invalid-name) test-rpm.py:1:0: C0111: Missing module docstring (missing-docstring) ------------------------------------------------------------------ Obviously this is not conclusive, but makes me suspect it's something else than rpm at fault. The only even remotely related change in rpm-python that I can think of is re-merging the lib, build and sign modules back into one, but this shouldn't be visible to users at all unless pylint has some rpm-specific "knowledge" in it (which would seem highly peculiar too)
...but I certainly can reproduce on rawhide: [pmatilai@localhost tmp]$ uname -r 5.3.0-0.rc3.git1.1.fc31.x86_64 [pmatilai@localhost tmp]$ pylint-3 test-rpm.py ************* Module test-rpm test-rpm.py:1:0: C0103: Module name "test-rpm" doesn't conform to snake_case naming style (invalid-name) test-rpm.py:1:0: C0111: Missing module docstring (missing-docstring) test-rpm.py:3:6: E1101: Module 'rpm' has no 'RPMTAG_NAME' member (no-member) Since the code works just fine it seems more like an analyzer problem, but it'd be good to understand the underlying issue before passing judgement. Pavlina, please investigate.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.
The RPMTAG_NAME member actually is available from the rpm module, it's just pylint that complains about it for some reason. Unless I'm missing something, this appears to be a problem with pylint so I'm reassigning.
Cannot reproduce on current updated f31 with pylint 2.4.4. Please reopen if you can.
I'm still seeing this on fully updated Fedora 31 and on rawhide. On F31 I have these versions installed: python3-pylint-2.3.1-2.fc31.noarch python3-lazy-object-proxy-1.4.3-1.fc31.x86_64 python3-wrapt-1.11.2-2.fc31.x86_64 python3-astroid-2.3.3-4.gitace7b29.fc31.noarch python3-typed_ast-1.4.0-2.fc31.x86_64 (There is no 2.4.4 available for f31, even though I see one was built in koji) On rawhide I have: python3-pylint-2.4.4-2.fc32.noarch python3-lazy-object-proxy-1.4.3-2.fc32.x86_64 python3-wrapt-1.11.2-4.fc32.x86_64 python3-astroid-2.3.3-6.gitace7b29.fc32.noarch python3-typed_ast-1.4.1-1.fc32.x86_64
How strange. I'll get that out.
FEDORA-2020-5172449b3b has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5172449b3b
I've filed a pylint bug and put together a repo of dockerfiles demonstrating the problem. https://github.com/PyCQA/pylint/issues/3371 https://github.com/bcl/pylint-rpm-1739167 Looking at the rpm code I can't spot any changes that would have broken this, and I'm seeing it happen with pylint 2.4.4 and with 2.3.1 on rawhide and f31 (I also installed the new 2.4.4 build on f31 and it was still happening). I don't see it on F30. I also reproduced it on a RHEL8 system by installing pylint 2.4.4 via pip.
This is so weird. I have the same package versions as you on f31 and can't reproduce. Thanks for taking this upstream.
I have no idea why this behavior changed, but upstream suggests adding '--extension-pkg-whitelist=rpm' which works for my simple reproducer. So I guess we can close this.
Odd. Ok.
pylint-2.4.4-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5172449b3b
pylint-2.4.4-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.