Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-138405

libsemanage - DeprecationWarning: builtin type SwigPyPacked + SwigPyObject

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • No
    • Moderate
    • 1
    • rhel-security-selinux
    • 1
    • QE ack
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • SELINUX 260128: 17
    • Hide

      There should be no deprecation warnings when importing the semanage python module.

      Show
      There should be no deprecation warnings when importing the semanage python module.
    • None
    • Automated
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      The warning was found thanks to inspiration from the anaconda team (RHEL-82838).

      Please provide the package NVR for which the bug is seen:

      libsemanage-3.9-1.el10.x86_64
      python3-libsemanage-3.9-1.el10.x86_64

      How reproducible is this bug?

      Always

      Steps to reproduce:

      Minimal reproducer for the swigvarlink DeprecationWarning

      #!/usr/bin/env python3
      import warnings
      warnings.simplefilter('always')
      import semanage
      

      Actual results:

      # python3
      Python 3.12.12 (main, Oct 10 2025, 00:00:00) [GCC 14.3.1 20250617 (Red Hat 14.3.1-2)] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import warnings
      >>> warnings.simplefilter('always')
      >>> import semanage
      <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
      <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
      >>>
      

      Expected results:

      An empty output is expected

      Source of the issue

      The warning is caused by code generated with the affected SWIG:

      A rebuild against the fixed SWIG will resolve it.

              rh-ee-vsyncako Veronika Syncakova
              jplesnik@redhat.com Jitka Plesnikova
              Vit Mojzis Vit Mojzis
              Milos Malik Milos Malik
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: