[issue39624] Trace greedy replaces $prefix and $exec_prefix

STINNER Victor report at bugs.python.org
Mon Feb 17 04:43:11 EST 2020


STINNER Victor <vstinner at python.org> added the comment:

> These should *not* be replaced:
>
> r"not/a/$prefix"
> r"$prefix spacevar/subdir"

Honestly, I don't see an issue to replace $prefix in these examples.

These examples seem artificial. The paths are not user provided: they are hardcoded paths from the sysconfig module:

    if opts.ignore_dir:
        _prefix = sysconfig.get_path("stdlib")
        _exec_prefix = sysconfig.get_path("platstdlib")

I'm not even sure if it's worth it to fix this issue, it's unclear to me how you could get r"$prefixvar/subdir" from sysconfig.get_path("stdlib").

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39624>
_______________________________________


More information about the Python-bugs-list mailing list