X Tutup
The Wayback Machine - https://web.archive.org/web/20231123162508/https://github.com/python/cpython/issues/112343
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdb unintentionally interpolates strings with convenience variables #112343

Open
salty-horse opened this issue Nov 23, 2023 · 0 comments
Open

pdb unintentionally interpolates strings with convenience variables #112343

salty-horse opened this issue Nov 23, 2023 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@salty-horse
Copy link
Contributor

salty-horse commented Nov 23, 2023

Bug report

Bug description:

Python 3.12 introduced $-prefixed convenience variables to pdb (#103693).

It automatically replaces $-words in strings, which is undocumented. Conversations with @nedbat suggests this is unintended behavior.

(Pdb) p '$in'
'__pdb_convenience_variables["in"]'

This totally breaks MongoDB queries inside pdb, as it makes frequent use of such strings.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

@salty-horse salty-horse added the type-bug An unexpected behavior, bug, or error label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant
X Tutup