#9644 Fedora 40 pylint issues with PY2/PY3 compatibility
Opened by abbra. Modified

Using Fedora 40

pylint 3.2.5
astroid 3.2.3
Python 3.12.4 (main, Jun  7 2024, 00:00:00) [GCC 14.1.1 20240607 (Red Hat 14.1.1-5)]

reports hundreds of issues related to pylint identifying uninitialized variable access, mostly in the cases where we handle PY2/PY3 compatibility.

************* Module examples
doc/examples/examples.py:161: [E0606(possibly-used-before-assignment), exshowuser] Possibly using variable 'unicode' before assignment)
...
import six
if six.PY3:
    unicode = str
...
    has_output = (
...
        output.Output('result', dict, 'user entry without DN'),
        output.Output('dn', unicode, 'DN of the user entry', ['no_display']),
    )

There are thousands of issues like this. It looks like pylint started to treat its model of Python environment differently.


master:

  • 3b9ac93f5bc0481998468992adc39a7edc60692e ipalib/x509.py: support Cryptography 43
  • fc5728804b720207a60d68f4b92ccced8de00325 ipalib/x509.py: get rid of unicode helper
  • cb008bc9dc3bfff966f480a329b17544c4614f49 ipalib/constants.py: factor out TripleDES use
  • af316dd6f99c4ffad82e0c8002356c77197bdeff Get rid of unicode and long helpers in ipa-otptoken-import

ipa-4-12:

  • 531bd05de9b3764b90804fcdad3b0b49ceb06110 ipalib/x509.py: support Cryptography 43
  • 7f9c890c049f1151d3225e154fcde9bfed8cebb3 ipalib/x509.py: get rid of unicode helper
  • fc029043401bb852d2bfe8e8eccb926f50627b3b ipalib/constants.py: factor out TripleDES use
  • 7b5f3d79712a84f88ced6e9055bc96c9980b0b20 Get rid of unicode and long helpers in ipa-otptoken-import
Metadata