[Bug 1215851] New: code generated by swig < 4.0.0 is incompatible with Python 3.12
https://bugzilla.suse.com/show_bug.cgi?id=1215851 Bug ID: 1215851 Summary: code generated by swig < 4.0.0 is incompatible with Python 3.12 Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.5 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Python Assignee: python-maintainers@suse.com Reporter: mcepl@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- Created attachment 869858 --> https://bugzilla.suse.com/attachment.cgi?id=869858&action=edit _log.txt Code generated by swig < 4.0.0 (all Leap and SLE) generates code importing `imp` module, which has been deprecated in 3.4 (i.e., in all our supported Pythons 3) and removed in 3.12. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215851 Matej Cepl <mcepl@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |python-maintainers@suse.com Assignee|python-maintainers@suse.com |kkaempf@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215851 Matej Cepl <mcepl@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://github.com/swig/swi | |g/issues/1621 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215851 https://bugzilla.suse.com/show_bug.cgi?id=1215851#c1 Klaus Kämpf <kkaempf@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mcepl@suse.com Status|NEW |IN_PROGRESS Flags| |needinfo?(mcepl@suse.com) --- Comment #1 from Klaus Kämpf <kkaempf@suse.com> --- We can push https://build.opensuse.org/package/show/devel:tools:building/swig to Leap 15 or try to remove the "import imp". However, I'm a Python illiterate ... -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215851 https://bugzilla.suse.com/show_bug.cgi?id=1215851#c2 Markéta Machová <mmachova@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmachova@suse.com --- Comment #2 from Markéta Machová <mmachova@suse.com> --- @kkaempf Hi, I think replacing `import imp` by `import importlib as imp` should fix the problem, it is only a bit dirty :) . The code would then work only on Python 3, if you want to keep it Python 2-compatible, you'll have to be more verbose: ``` try: import importlib as imp except ImportError: import imp ``` The same with possible occurences of `import * from imp` -> `import * from importlib` and variations. But as I said, it is a bit dirty. If there are no serious problems in pushing a new version to Leap, please go ahead and update. Matěj, do you want to add something? -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215851 https://bugzilla.suse.com/show_bug.cgi?id=1215851#c3 Steve Kowalik <steven.kowalik@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |steven.kowalik@suse.com --- Comment #3 from Steve Kowalik <steven.kowalik@suse.com> --- importlib does not have the same API as imp, so I'm against that idea. I'm still thinking how best to approach it. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1215851 https://bugzilla.suse.com/show_bug.cgi?id=1215851#c5 Matej Cepl <mcepl@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |INVALID --- Comment #5 from Matej Cepl <mcepl@suse.com> --- This should be closed a long time ago, it was my PEBKAC. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com