libstdc++: Fix Python deprecation warning in printers.py
commitb9e98bb9919fa9f07782f23f79b3d35abb9ff542
authorJonathan Wakely <jwakely@redhat.com>
Wed, 16 Oct 2024 08:22:37 +0000 (16 09:22 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 16 Oct 2024 09:09:16 +0000 (16 10:09 +0100)
treeca56245a1f9ffb7cdabb48259518ed4de0adf774
parentcc217a1ecb04c9234b2cce7ba3c27701a050e402
libstdc++: Fix Python deprecation warning in printers.py

python/libstdcxx/v6/printers.py:1355: DeprecationWarning: 'count' is passed as positional argument

The Python docs say:

  Deprecated since version 3.13: Passing count and flags as positional
  arguments is deprecated. In future Python versions they will be
  keyword-only parameters.

Using a keyword argument for count only became possible with Python 3.1
so introduce a new function to do the substitution.

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (strip_fundts_namespace): New.
(StdExpAnyPrinter, StdExpOptionalPrinter): Use it.
libstdc++-v3/python/libstdcxx/v6/printers.py