summaryrefslogtreecommitdiffstats
path: root/Lib/trace.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-21016: pydoc and trace use sysconfig (GH-18476)Miss Islington (bot)2020-02-121-3/+3
| | | | | | | | | | | bpo-21016, bpo-1294959: The pydoc and trace modules now use the sysconfig module to get the path to the Python standard library, to support uncommon installation path like /usr/lib64/python3.9/ on Fedora. Co-Authored-By: Jan Matějek <jmatejek@suse.com> (cherry picked from commit 4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.7] bpo-36492: Fix passing special keyword arguments to some functions. ↵Serhiy Storchaka2019-04-011-1/+13
| | | | | | | | | | | | | | | | | | | | | | | (GH-12637) (GH-12645) The following arguments can be passed as keyword arguments for passing to other function if the corresponding required argument is passed as positional: - "func" in functools.partialmethod(), weakref.finalize(), profile.Profile.runcall(), cProfile.Profile.runcall(), bdb.Bdb.runcall(), trace.Trace.runfunc() and curses.wrapper(). - "function" in unittest.addModuleCleanup() and unittest.TestCase.addCleanup(). - "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor and concurrent.futures.ProcessPoolExecutor. - "callback" in contextlib.ExitStack.callback(), contextlib.AsyncExitStack.callback() and contextlib.AsyncExitStack.push_async_callback(). - "c" and "typeid" in multiprocessing.managers.Server.create(). - "obj" in weakref.finalize(). (cherry picked from commit 42a139ed88c487f325a241c6ee8b308b3c045975)
* bpo-35133: Fix mistakes when concatenate string literals on different lines. ↵Miss Islington (bot)2018-11-051-2/+2
| | | | | | | | | | | | (GH-10284) Two kind of mistakes: 1. Missed space. After concatenating there is no space between words. 2. Missed comma. Causes unintentional concatenating in a list of strings. (cherry picked from commit 34fd4c20198dea6ab2fe8dc6d32d744d9bde868d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-34171: Prevent creating Lib/trace.cover when run the trace module. (GH-8841)Miss Islington (bot)2018-08-251-10/+4
| | | | | (cherry picked from commit c406d5cd74002964a64c3eb7d9e2445a7fd3a03f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-31908: Fix output of cover files for trace module command-line tool. ↵Miss Islington (bot)2018-05-011-23/+16
| | | | | | | | (GH-4205) Previously emitted cover files only when --missing option was used. (cherry picked from commit 47ab15470d72367694d7758004067313ae022f0e) Co-authored-by: Michael Selik <mike@selik.org>
* bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)Miss Islington (bot)2018-02-171-1/+1
| | | | | (cherry picked from commit 9f4223261fd129ad7b9a09b2b0d625d1bb90b22b) Co-authored-by: Kyle Altendorf <sda@fstab.net>
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-15/+9
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-30166: Import command-line parsing modules only when needed. (#1293)Serhiy Storchaka2017-05-041-1/+2
|
* More typo fixes for 3.6Martin Panter2016-06-041-1/+1
|
* Issue22642 - Convert trace module's option handling mechanism from getopt to ↵Senthil Kumaran2016-01-131-205/+134
| | | | | | argparse. Patch contributed by SilentGhost.
* Issue #26069: Remove the deprecated apis in the trace module.Senthil Kumaran2016-01-111-43/+0
|
* Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-1/+1
| | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* Issue #22831: Use "with" to avoid possible fd leaks.Serhiy Storchaka2015-04-041-20/+20
|
* Issue #22043: time.monotonic() is now always availableVictor Stinner2014-09-021-4/+1
| | | | | threading.Lock.acquire(), threading.RLock.acquire() and socket operations now use a monotonic clock, instead of the system clock, when a timeout is used.
* Fixes #10541: regrtest -T is brokenAlexander Belopolsky2014-06-291-9/+10
| | | | | | * makes test_trace tests restore the tracefunc after they run * write_results() in trace module will not terminate if lnotab cannot be found.
* Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-0/+0
|\ | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang lines in the unittestgui and checkpip scripts.
| * Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-0/+0
| | | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang line to use python3 executable in the unittestgui script.
* | Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-2/+2
| |
* | Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-141-2/+2
| | | | | | | | ModuleNotFoundError.
* | #17143: merge with 3.3.Ezio Melotti2013-02-151-0/+1
|\ \ | |/
| * #17143: fix a missing import in the trace module. Initial patch by Berker ↵Ezio Melotti2013-02-151-0/+1
| | | | | | | | Peksag.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-5/+5
|/
* trace: remove unused imports.Florent Xicluna2012-07-071-3/+0
|
* Close #14690: Use monotonic clock instead of system clock in the sched,Victor Stinner2012-05-301-3/+7
| | | | subprocess and trace modules.
* Implemented PEP 405 (Python virtual environments).Vinay Sajip2012-05-261-4/+4
|
* Make the trace module ignore modules whose names start with "<" andBrett Cannon2012-04-111-2/+1
| | | | end with ">", i.e. follow convention.
* Prevent deprecation warningÉric Araujo2011-04-171-1/+1
|
* Issue #10371: Deprecated undocumented functions in the trace module.Alexander Belopolsky2010-11-201-20/+63
|
* Issue #10335: Add tokenize.open(), detect the file encoding usingVictor Stinner2010-11-091-3/+2
| | | | tokenize.detect_encoding() and open it in read only mode.
* Streamlined code in trace.Ignore and added unit tests.Alexander Belopolsky2010-11-081-19/+16
|
* Issue #10329: The trace module writes reports using the input Python scriptVictor Stinner2010-11-071-4/+5
| | | | | encoding, instead of the locale encoding. Patch written by Alexander Belopolsky.
* Issue #10330: trace module can now be used with python built without threads.Alexander Belopolsky2010-11-061-5/+18
|
* close files correctlyBenjamin Peterson2010-10-301-11/+12
|
* Reverted inadvertent change that slipped into r85695Alexander Belopolsky2010-10-181-1/+0
|
* Issue #10117: Tools/scripts/reindent.py now accepts source files thatAlexander Belopolsky2010-10-181-0/+1
| | | | | use encoding other than ASCII or UTF-8. Source encoding is preserved when reindented code is written to a file.
* Issue 9941: Minor code cleanup before implementing the context manager feature:Alexander Belopolsky2010-09-271-21/+11
| | | | | | | - Eliminated code repetition between run and runctx; - Removed redundant calls to dict.key; - Removed unused "blabbed" attribute; - Simplified the loop in write_results_file().
* Issue #9936: Fixed executable lines' search in the trace module.Alexander Belopolsky2010-09-241-8/+2
|
* Issue #9315: Fix for the trace module to record correct class nameAlexander Belopolsky2010-09-131-8/+4
| | | | when tracing methods. Unit tests. Patch by Eli Bendersky.
* Fix softspace relic.Georg Brandl2010-08-021-2/+2
|
* Get rid of spurious "threading" entries in trace output.Georg Brandl2010-08-021-2/+2
|
* #4943: do not try to include drive letters (and colons) when looking for a ↵Georg Brandl2010-08-011-1/+3
| | | | probably module name.
* #1690103: fix initial namespace for code run with trace.main().Georg Brandl2010-08-011-1/+8
|
* Issue #9323: Fixed a bug in trace.py that resulted in loosing the nameAlexander Belopolsky2010-07-211-6/+3
| | | | of the script being traced. Patch by Eli Bendersky.
* Issue #9282: Fixed --listfuncs option of trace.py. Thanks EliAlexander Belopolsky2010-07-201-1/+2
| | | | Bendersky for the patch.
* convert shebang lines: python -> python3Benjamin Peterson2010-03-111-1/+1
|
* #6666: fix bug in trace.py that applied the list of ignored dirs only to 1st ↵Andrew M. Kuchling2010-02-221-1/+1
| | | | file
* #5656: detect correct encoding of files when reporting coverage in trace.py, ↵Georg Brandl2009-04-011-9/+17
| | | | and ignore files in the temporary directory when reporting.
* The trace module was trying to turn ints into ints since co_lnotab was changedBrett Cannon2009-01-301-1/+1
| | | | to a bytes object.
* Bug #2606: Avoid calling .sort() on a dict_keys object.Martin v. Löwis2008-04-101-9/+3
|
* Merged revisions ↵Christian Heimes2008-02-281-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61038,61042-61045,61047,61050,61053,61055-61056,61061-61062,61066,61068,61070,61081-61095 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r61081 | neal.norwitz | 2008-02-26 09:04:59 +0100 (Tue, 26 Feb 2008) | 7 lines Speed up this test by about 99%. Remove sleeps and replace with events. (This may fail on some slow platforms, but we can fix those cases which should be relatively isolated and easier to find now.) Move two test cases that didn't require a server to be started to a separate TestCase. These tests were taking 3 seconds which is what the timeout was set to. ........ r61082 | christian.heimes | 2008-02-26 09:18:11 +0100 (Tue, 26 Feb 2008) | 1 line The contains function raised a gcc warning. The new code is copied straight from py3k. ........ r61084 | neal.norwitz | 2008-02-26 09:21:28 +0100 (Tue, 26 Feb 2008) | 3 lines Add a timing flag to Trace so you can see where slowness occurs like waiting for socket timeouts in test_smtplib :-). ........ r61086 | christian.heimes | 2008-02-26 18:23:51 +0100 (Tue, 26 Feb 2008) | 3 lines Patch #1691070 from Roger Upole: Speed up PyArg_ParseTupleAndKeywords() and improve error msg My tests don't show the promised speed up of 10%. The code is as fast as the old code for simple cases and slightly faster for complex cases with several of args and kwargs. But the patch simplifies the code, too. ........ r61087 | georg.brandl | 2008-02-26 20:13:45 +0100 (Tue, 26 Feb 2008) | 2 lines #2194: fix some typos. ........ r61088 | raymond.hettinger | 2008-02-27 00:40:50 +0100 (Wed, 27 Feb 2008) | 1 line Add itertools.combinations(). ........ r61089 | raymond.hettinger | 2008-02-27 02:08:04 +0100 (Wed, 27 Feb 2008) | 1 line One too many decrefs. ........ r61090 | raymond.hettinger | 2008-02-27 02:08:30 +0100 (Wed, 27 Feb 2008) | 1 line Larger test range ........ r61091 | raymond.hettinger | 2008-02-27 02:44:34 +0100 (Wed, 27 Feb 2008) | 1 line Simply the sample code for combinations(). ........