Uh oh!
There was an error while loading. Please reload this page.
gh-90095: Make .pdbrc work properly and add some reasonable tests - #110496
Conversation
Delengowski
commented
Mar 9, 2024
I'd really like to echo that this become included. I myself wanted to take a crack this and am excited to see a PR open for it. Defining commands in |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
gaogaotiantian
commented
Mar 11, 2024
Do we consider this as a bug @iritkatriel ? (backport?) |
iritkatriel
commented
Mar 11, 2024
Could backporting break working code? |
Delengowski
commented
Mar 11, 2024
@iritkatriel thank you reviewing this and getting it merged. @gaogaotiantian thank you for taking up this implementation. |
bedevere-bot
commented
Mar 11, 2024
|
bedevere-bot
commented
Mar 11, 2024
|
gaogaotiantian
commented
Mar 12, 2024
I don't think so. This change only affects |
Thanks @gaogaotiantian for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Thanks @gaogaotiantian for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @gaogaotiantian and @iritkatriel, I could not cleanly backport this to |
Sorry, @gaogaotiantian and @iritkatriel, I could not cleanly backport this to |
GH-116660 is a backport of this pull request to the 3.11 branch. |
…ble tests (pythonGH-110496) (cherry picked from commit 44f9a84) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
…ble tests (pythonGH-110496) (cherry picked from commit 44f9a84) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
GH-116661 is a backport of this pull request to the 3.12 branch. |
pdb -cand.pdbrcworks in a very weird way now.cmd.Cmdhascmdqueuewhich is perfect for loading user defined commands yet we decided to make our own path to hack it. This makes the special commands likecommandsor;;fail because they rely on somecmd.Cmdmechanics.This PR utilizes
cmdqueue(and fixed where it was used wrong) which fixed the problem mentioned in #90095. With this implementation, the commands in.pdbrcand passed in with-care treated almost exactly the same as the commands the users type in.Two existing tests related to
.pdbrcare removed as ... they were not testing they thought they were.test_read_pdbrc_with_ascii_encodingsimply does not make sense - it basically tests that system with ascii encoding can't print unicode - it has almost nothing to do with pdb. It has nothing to do with enforcing.pdbrcto beutf-8.test_readrc_kwargpasses only because the commands in.pdbrcdoes not execute - I don't understand what's the point of the test.Reasonable tests are added with the PR to test
.pdbrc. The testing framework is improved a bit to make writing.pdbrctests easier.