This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libstdc++] Use explicit relative imports for the pretty printers
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Matthias Klose <doko at ubuntu dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>, Siva Chandra Reddy <sivachandra at google dot com>
- Date: Fri, 27 Feb 2015 21:16:17 +0000
- Subject: Re: [patch, libstdc++] Use explicit relative imports for the pretty printers
- Authentication-results: sourceware.org; auth=none
- References: <54EE2EED dot 6050602 at ubuntu dot com>
On 25 February 2015 at 20:22, Matthias Klose wrote:
> When gdb is linked/used with Python 3, import of the pretty printers fails:
>
> Traceback (most recent call last):
> File
> "/usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.21-gdb.py",
> line 58, in <module>
> import libstdcxx.v6
> File
> "/usr/lib/i386-linux-gnu/../../share/gcc-5/python/libstdcxx/v6/__init__.py",
> line 19, in <module>
> from printers import register_libstdcxx_printers
> ImportError: No module named 'printers'
> [Inferior 1 (process 6130) exited normally]
>
> Python3 doesn't support implicit relative imports anymore. Use explicit
> relative imports instead. This syntax is compatible with Python 2.5 and newer
> 2.x versions. Ok for the trunk?
OK, thanks.