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

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:

  • 3b9ac93 ipalib/x509.py: support Cryptography 43
  • fc57288 ipalib/x509.py: get rid of unicode helper
  • cb008bc ipalib/constants.py: factor out TripleDES use
  • af316dd Get rid of unicode and long helpers in ipa-otptoken-import

ipa-4-12:

  • 531bd05 ipalib/x509.py: support Cryptography 43
  • 7f9c890 ipalib/x509.py: get rid of unicode helper
  • fc02904 ipalib/constants.py: factor out TripleDES use
  • 7b5f3d7 Get rid of unicode and long helpers in ipa-otptoken-import

Log in to comment on this ticket.

Metadata