Skip to content

gdb-pretty-print not working with python < 3.9, because of removeprefix #4691

@bitFiedler

Description

@bitFiedler

Description

If gdb uses python version < 3.9 the pretty printer do not work because of the missing implementation of 'removeprefix'.

This function is only available since python version 3.9.

I can reproduce this bug by using latest version of CLion 2024.3.4, because they are using python version 3.8.

Reproduction steps

try to pretty print nlohmann object.
that occurs in an exception because the string obj do not have a function called removeprefix

Expected vs. actual results

pretty print should work if python version is < 3.9

Minimal code example

Error messages

Compiler and operating system

linux, CLion 2024.3.4

Library version

latest from branch develop

Validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugsolution: proposed fixa fix for the issue has been proposed and waits for confirmation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions