Mark Shannon
45f5aa8fc7
GH-103082: Filter LINE events in VM, to simplify tool implementation. (GH-104387)
...
When monitoring LINE events, instrument all instructions that can have a predecessor on a different line.
Then check that the a new line has been hit in the instrumentation code.
This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
2023-05-12 12:21:20 +01:00
James Gerity
0449ffe3a4
gh-104301: Allow leading whitespace in disambiguated pdb statements ( #104342 )
2023-05-11 18:12:02 +01:00
Tian Gao
0fc58c66ba
gh-103693: Add convenience variable feature to `pdb` ( #103694 )
2023-05-03 15:04:50 +01:00
Tian Gao
31acfd78a0
gh-103578: Fix pdb reading code with non-utf8 encoding ( #103581 )
...
`pdb` should use `io.open_code` to open code to avoid encoding issue.
2023-04-25 23:04:51 -06:00
Irit Katriel
1c01f8d797
gh-101517: fix line number propagation in code generated for except* ( #103550 )
2023-04-24 21:58:51 +01:00
Tian Gao
7c1b0a46c6
gh-101517: Add regression test for a lineno bug in try/except* impacting pdb ( #103547 )
2023-04-14 21:40:31 +01:00
Tian Gao
2667452945
gh-103225: Fixed zero lineno issue for pdb ( #103265 )
...
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
2023-04-07 18:57:46 +01:00
gaogaotiantian
e375bff037
gh-103068: Check condition expression of breakpoints for pdb ( #103069 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
2023-03-29 12:09:12 +02:00
gaogaotiantian
3606753246
gh-103023: Add SyntaxError check in pdb's `display` command ( #103024 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-03-27 22:37:22 +02:00
gaogaotiantian
ded9a7fc19
gh-102980: Add tests for pdf's display, alias and where commands ( #102981 )
2023-03-24 20:50:06 +00:00
gaogaotiantian
5d677c556f
GH-101673: Fix pdb bug where local variable changes are lost after longlist ( #101674 )
2023-03-12 23:09:55 +00:00
James Gerity
d91de288e7
gh-93696: Locate frozen module source with __file__ ( #93697 )
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-10-25 06:22:53 -07:00
Brandt Bucher
23ee4a8067
gh-94215: Fix error handling for line-tracing events (GH-94681)
...
* Re-enable crasher
* Fix error handling for line-tracing events
* blurb add
2022-07-08 14:40:35 +02:00
Christian Heimes
de5884295e
gh-94215: Add reproducer for segfault in frame_setlineno() (GH-94563)
2022-07-07 12:53:57 +02:00
Kumar Aditya
5b6e5762ca
GH-91742: Fix pdb crash after jump (GH-94171)
2022-06-23 15:19:13 +01:00
Victor Stinner
329afe78c3
gh-57684: Update tests for PYTHONSAFEPATH=1 ( #92358 )
...
Fix tests failing with the PYTHONSAFEPATH=1 env var.
Enhance also -P help in Python usage (python --help).
2022-05-06 03:41:24 +02:00
Christian Heimes
deeaac49e2
bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)
...
- Add requires_fork and requires_subprocess to more tests
- Skip extension import tests if dlopen is not available
- Don't assume that _testcapi is a shared extension
- Skip a lot of socket tests that don't work on Emscripten
- Skip mmap tests, mmap emulation is incomplete
- venv does not work yet
- Cannot get libc from executable
The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
2022-03-22 03:04:36 -07:00
Tom Sparrow
60705cff70
bpo-46434: Handle missing docstrings in pdb help (GH-30705)
2022-01-21 17:00:48 +00:00
Victor Stinner
e08e491a6c
bpo-45208: Make test_pdb.test_checkline_is_not_executable() quiet (GH-28354)
...
test_pdb.test_checkline_is_not_executable() no longer writes output
to stdout.
Remove also unused variables 'f'.
2021-09-15 20:19:31 +02:00
Serhiy Storchaka
851811f577
bpo-5846: Do not use obsolete unittest functions. (GH-28303)
...
Get rid of use of makeSuite() and findTestCases().
Also make test_math and test_threading_local discoverable.
2021-09-13 10:49:53 +03:00
andrei kulakov
53b9458f2e
bpo-44682: Handle invalid arg to pdb's "commands" directive ( #27252 )
2021-07-28 18:55:03 +02:00
Jason R. Coombs
ee03bad25e
bpo-44461: Check early that a pdb target is valid for execution. ( #27227 )
...
* bpo-44461: Fix bug with pdb's handling of import error due to a package which does not have a __main__ module
* 📜 🤖 Added by blurb_it.
* remove "else"
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* If running as a module, first check that it can run as a module. Alternate fix for bpo-44461.
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-07-27 21:51:42 -04:00
Jason R. Coombs
2c20558844
bpo-44554: refactor pdb targets (and internal tweaks) (GH-26992)
...
- Refactor module/script handling to share an interface (check method).
- Import functools and adjust tests for the new line number for find_function.
- Use cached_property for details.
- Add blurb.
Automerge-Triggered-By: GH:jaraco
2021-07-18 18:00:35 -07:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
58248d9437
bpo-41137: Use utf-8 encoding while reading .pdbrc files (GH-21263)
2021-07-08 16:16:08 +09:00
Irit Katriel
d968a638fc
bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656)
2021-07-03 16:33:35 +01:00
huzhaojie
4cb6ba1432
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646)
2021-06-11 16:17:56 +01:00
Daniel Hahler
6544b2532d
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180)
2021-06-10 21:32:04 +01:00
Mark Shannon
54cb63863f
bpo-44348: Move trace-info to thread-state (GH-26623)
...
* Move trace-info to thread state.
* Correct output for pdb when turning on tracing in middle of line
2021-06-10 08:46:59 +01:00
Erlend Egeberg Aasland
8563a7052c
bpo-28528: Fix pdb.checkline() attribute error when 'curframe' is None. ( #25438 )
...
Co-authored-by: Thomas Kluyver <takowl@gmail.com>
2021-05-12 00:26:30 +01:00
Irit Katriel
21b02b5f40
bpo-43960: test_pdb resets breakpoints (GH-25673)
...
Reset global breakpoint state at the beginning of
test_pdb_next_command_in_generator_for_loop() to make it deterministic.
2021-04-28 12:38:29 +02:00
Irit Katriel
aadd4e10fd
bpo-24160: Fix test_pdb refleaks failure (GH-25182)
2021-04-04 16:04:53 +01:00
Irit Katriel
ad442a674c
bpo-24160: Fix breakpoints persistence across multiple pdb sessions (GH-21989)
2021-04-02 09:15:21 -07:00
Irit Katriel
bd4ab8e739
bpo-26053: Fix test_pdb.test_issue26053() (GH-25139)
2021-04-01 21:05:51 +02:00
Irit Katriel
652bfdee94
bpo-26053: Fix args echoed by pdb run command ( #22033 )
2021-04-01 08:25:59 -07:00
Andrey Bienkowski
501d4a51e3
bpo-42383: pdb: do not fail to restart the target if the current directory changed ( #23412 )
...
This commit only adds tests and a news entry. The actual bug was fixed in the earlier commit.
2021-01-25 13:08:01 -08:00
Andrey Bienkowski
8603dfb421
bpo-42384: pdb: correctly populate sys.path[0] (GH-23338)
...
Automerge-Triggered-By: GH:gvanrossum
2021-01-21 17:19:51 -08:00
Pablo Galindo
d6d6371447
bpo-42864: Improve error messages regarding unclosed parentheses (GH-24161)
2021-01-19 23:59:33 +00:00
Mark Shannon
877df851c3
bpo-42246: Partial implementation of PEP 626. (GH-23113)
...
* Implement new line number table format, as defined in PEP 626.
2020-11-12 09:43:29 +00:00
Irit Katriel
022bc7572f
bpo-41609: Fix output of pdb's whatis command for instance methods (GH-21935)
2020-08-27 02:51:12 +02:00
Hai Shi
604bba1f8f
bpo-40275: Use new test.support helper submodules in tests (GH-21452)
2020-08-04 17:51:43 +02:00
Serhiy Storchaka
700cfa8c90
bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035)
2020-06-25 17:56:31 +03:00
Serhiy Storchaka
19fcffa927
bpo-41058: Use source file encoding in pdb.find_function(). (GH-21010)
2020-06-21 11:07:50 +03:00
Daniel Hahler
8d64bfafdf
bpo-36250: ignore ValueError from signal in non-main thread (GH-12251)
...
Authored-By: blueyed <github@thequod.de>
2019-09-09 05:45:58 -05:00
Timothy Hopper
7ea9a85f13
bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
...
Previously pdb checked the $HOME environmental variable
to find the user .pdbrc. If $HOME is not set, the user
.pdbrc would not be found.
Change pdb to use `os.path.expanduser('~')` to determine
the user's home directory. Thus, if $HOME is not set (as
in tox or on Windows), os.path.expanduser('~') falls
back on other techniques for locating the user's home
directory.
This follows pip's implementation for loading .piprc.
Co-authored-by: Dan Lidral-Porter <dlp@aperiodic.org>
2019-08-02 15:20:14 -07:00
Min ho Kim
c4cacc8c5e
Fix typos in comments, docs and test names ( #15018 )
...
* Fix typos in comments, docs and test names
* Update test_pyparse.py
account for change in string length
* Apply suggestion: splitable -> splittable
Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Apply suggestion: splitable -> splittable
Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Apply suggestion: Dealloccte -> Deallocate
Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Update posixmodule checksum.
* Reverse idlelib changes.
2019-07-30 18:16:13 -04:00
Rémi Lapeyre
458560347f
bpo-36969: Make PDB args command display positional only arguments (GH-13459)
2019-05-24 21:44:31 +01:00
Rémi Lapeyre
bf457c7d82
bpo-36969: Make PDB args command display keyword only arguments (GH-13452)
2019-05-20 23:17:30 +01:00
Daniel Hahler
9139f926a8
bpo-13120: fix typo with test_issue13120() method name (GH-12250)
...
Incorrect issue number '13210' added in 539ee5da6f
.
https://bugs.python.org/issue13120
2019-04-01 14:59:50 -07:00
Daniel Hahler
3e936431e2
bpo-35931: Gracefully handle any exception in pdb debug command (GH-12103)
...
This is relevant for `debug doesnotexist()`, which would crash with a
NameError otherwise.
2019-03-11 20:29:04 -07:00
Daniel Hahler
4327705cfa
bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)
...
Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt.
This patch fixes this by pre-compiling the code before passing it to `Pdb.run`.
https://bugs.python.org/issue35931
2019-02-15 12:52:53 -08:00
Brett Cannon
8425de4147
bpo-33562: Check the global asyncio event loop policy isn't set after any tests (GH-7328)
2018-06-01 20:34:09 -07:00
Mario Corchero
38bfa8418f
bpo-32691: Use mod_spec.parent when running modules with pdb (GH-5474)
...
Previously the module name was used, which broke relative imports when pdb was run against a plain module or submodule.
2018-02-03 16:40:11 +10:00
Andrew Svetlov
4f4ef0acba
Add a test for pdb until command in coroutine ( #5427 )
2018-01-29 16:17:45 +02:00
Yury Selivanov
9ee1bf9ab5
bpo-32650: Add an asyncgen pdb test ( #5406 )
2018-01-28 22:43:46 -05:00
Pablo Galindo
c7ab581db2
bpo-32650 Add support for async generators and more test for coroutines in pdb ( #5403 )
2018-01-28 20:31:00 -05:00
Pablo Galindo
4687702442
bpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400)
2018-01-29 02:25:05 +02:00
Mario Corchero
fcf8b4c102
bpo-32206: Update pdb usage to include new module option (GH-5111)
2018-01-28 14:58:47 +10:00
Mario Corchero
9f1e5f1b7f
bpo-32206: Pdb can now run modules (GH-4752)
...
Add a new argument "-m" to the pdb module to allow
users to run `python -m pdb -m my_module_name`.
This relies on private APIs in the runpy module to work,
but we can get away with that since they're both part of
the standard library and can be updated together if
the runpy internals get refactored.
2018-01-06 17:53:05 +10:00
Barry Warsaw
35425d638c
bpo-31389 Add an optional `header` argument to pdb.set_trace() ( #3438 )
...
* Give pdb.set_trace() an optional `header` argument
* What's new.
* Give pdb.set_trace() an optional `header` argument
* What's new.
2017-09-22 12:29:42 -04:00
Antoine Pitrou
a6a4dc816d
bpo-31370: Remove support for threads-less builds ( #3385 )
...
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Xavier de Gaye
291417da7f
Issue #20766 : Merge with 3.5.
2016-10-12 20:16:05 +02:00
Xavier de Gaye
10e54aeaa2
Issue #20766 : Fix references leaked by pdb in the handling of SIGINT handlers.
2016-10-12 20:13:24 +02:00
Xavier de Gaye
02e247fbe1
Issue #28338 : Restore test_pdb doctests.
2016-10-02 11:42:22 +02:00
Victor Stinner
bc6262675c
Issue #18401 : Fix test_pdb on Windows
...
* Use "with Popen" to cleanup properly the process
* Use support.temp_cwd() to properly change the working directory
* Use environ.pop() to cleanup the code
2016-09-09 23:22:09 -07:00
Victor Stinner
11ea04491d
Issue #18401 : Fix test_pdb if $HOME is not set
...
HOME is not set on Windows for example.
Use also textwrap.dedent() for the script.
2016-09-09 22:56:54 -07:00
Łukasz Langa
2eb6eca3e5
Issue #18401 : pdb tests don't read ~/.pdbrc anymore
...
Patch by Martin Matusiak and Sam Kimbrel.
2016-09-09 22:21:17 -07:00
Martin Panter
3e04d5b306
Issue #27076 : Merge spelling from 3.5
2016-05-26 06:03:19 +00:00
Martin Panter
46f50726a0
Issue #27076 : Doc, comment and tests spelling fixes
...
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Serhiy Storchaka
e437a10d15
Issue #23277 : Remove unused imports in tests.
2016-04-24 21:41:02 +03:00
Terry Jan Reedy
ca3f435fe6
Issue #16180 : Exit pdb if file has syntax error, instead of trapping user
...
in an infinite loop. Patch by Xavier de Gaye.
2015-09-05 19:13:26 -04:00
Serhiy Storchaka
a16de5dbf5
Issue #23821 : Fixed test_pdb failure under -O.
2015-04-01 16:58:19 +03:00
Victor Stinner
047b7ae566
Issue #22390 : Remove files created by tests
2014-10-05 17:37:41 +02:00
Antoine Pitrou
c04d468333
Issue #20746 : Fix test_pdb to run in refleak mode (-R). Patch by Xavier de Gaye.
2014-08-11 21:40:38 -04:00
Guido van Rossum
8820c239f7
Better behavior when stepping over yield[from]. Fixes issue 16596. By Xavier de Gaye.
2013-11-21 11:30:06 -08:00
Georg Brandl
6e22055ee1
pdb: modernize find_function() and add tests for it.
...
Closes #18714 .
2013-10-13 20:51:47 +02:00
R David Murray
78d692f98e
18764: remove the problematic 'print' alias for the PDB 'p' command.
...
So that it no longer shadows the print function.
Patch by Connor Osborn, doc and test changes by R. David Murray.
2013-10-10 17:23:26 -04:00
Brett Cannon
9529fbfd36
Issue #17177 : Stop using imp in a bunch of tests
2013-06-15 17:11:25 -04:00
Andrew Svetlov
f0efea0841
Issue #17463 : Fix test discovery for test_pdb.py
2013-03-18 10:09:50 -07:00
Andrew Svetlov
f0eb7adc7f
Merge: skip pdb test for #13120 if threading is not available.
2012-12-05 15:06:54 +02:00
Andrew Svetlov
96bc04369a
Skip pdb test for #13120 if threading is not available.
2012-12-05 15:06:23 +02:00
Andrew Svetlov
1dfb5c1cf3
Merge issue #13120 : Allow to call pdb.set_trace() from thread.
...
Patch by Ilya Sandler.
2012-12-04 21:10:20 +02:00
Andrew Svetlov
539ee5da6f
Issue #13120 : Allow to call pdb.set_trace() from thread.
...
Patch by Ilya Sandler.
2012-12-04 21:08:28 +02:00
Georg Brandl
b4c8902a87
#13183 : backport fixes to test_pdb to 3.2 branch
2012-05-06 11:50:00 +02:00
Martin v. Löwis
67880cc962
Issue #13183 : Revert 0b53b70a40a0 (reenable test on windows)
2012-05-02 07:41:22 +02:00
Senthil Kumaran
bf6c19598a
fix closes issue13183 - windows test failure
2012-05-02 08:01:02 +08:00
Senthil Kumaran
cb172041d3
fix windows test failure - issue13183
2012-05-02 08:00:22 +08:00
Georg Brandl
b613a3d458
Disable test_13183 temporarily on Windows for 3.3a3 release.
2012-05-01 09:57:34 +02:00
Georg Brandl
4bde9caf74
test_pdb: fix failure of test_issue13183 in debug mode, and make sure files are cleaned up.
2012-05-01 09:21:16 +02:00
Senthil Kumaran
417c3848d5
issue13183 - Fix pdb skipping frames after hitting a breakpoint and running step. Patch by Xavier de Gaye
2012-05-01 10:37:11 +08:00
Senthil Kumaran
42d7081806
issue13183 - Fix pdb skipping frames after hitting a breakpoint and running step. Patch by Xavier de Gaye
2012-05-01 10:07:49 +08:00
Brett Cannon
31f5929c1e
Issue #10990 : Prevent tests from clobbering a set trace function.
...
Many tests simply didn't care if they unset a pre-existing trace function. This
made test coverage impossible. This patch fixes various tests to put back any
pre-existing trace function. It also introduces test.support.no_tracing as a
decorator which will temporarily unset the trace function for tests which
simply fail otherwise.
Thanks to Kristian Vlaardingerbroek for helping to find the cause of various
trace function unsets.
2011-02-21 19:29:56 +00:00
Georg Brandl
34748cd6a8
Fix test suite to not activate new sigint behavior in pdb.
2010-12-04 17:11:36 +00:00
Senthil Kumaran
6f1070485f
Fix #10561 - Fix pdb behavior. Delete the breakpoints by breakpoint number.
...
Handle multiple breakpoints at same line. Update docs/test.
Patch by Xavier de Gaye.
2010-11-29 11:54:17 +00:00
Brian Curtin
994ad6c775
Fix ResourceWarning from subprocess pipe.
2010-11-05 15:38:47 +00:00
Georg Brandl
a8fbc6a521
Import test_pdb with its full name, so that running python -m test.test_pdb succeeds.
2010-07-31 11:52:46 +00:00
Georg Brandl
e1e8df1082
Fix pdb test failures on the buildbots.
2010-07-31 08:14:16 +00:00
Georg Brandl
0a9c3e91dc
Show the traceback line numbers as well as the current line numbers if an exception is being debugged. Courtesy of pdb++ by Antonio Cuni. Also document -> and >> markers for "list".
2010-07-30 18:46:38 +00:00
Georg Brandl
cdf66a9a7c
Test that "source" with nonexisting things works as expected.
2010-07-30 18:15:16 +00:00
Georg Brandl
e59ca2afe3
Add "longlist" and "source" commands, ideas borrowed from pdb++ by Antonio Cuni.
2010-07-30 17:04:28 +00:00
Georg Brandl
0d08962659
Several enhancements to pdb and its test suite.
...
* added basic test for basic commands
* removed duplication of command docs, and moved them to their implementation
* unified and useful display of exceptions
* output messages and errors using overridable methods (also fixes #1503502 )
2010-07-30 16:00:46 +00:00