Serhiy Storchaka
142566c028
[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)
...
Turn deprecation warnings added in 3.8 into TypeError.
2019-06-05 18:22:31 +03:00
Mario Corchero
354227a1e9
Add option to trace to run modules (GH-5134)
...
Adds a new option in trace that allows tracing runnable modules. It is
exposed as `--module module_name` as `-m` is already in use for another
argument.
2019-06-01 14:49:09 +10:00
Serhiy Storchaka
d53cf99dca
bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)
2019-05-06 22:40:27 +03:00
Serhiy Storchaka
42a139ed88
bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)
...
Deprecated passing the following arguments as keyword arguments:
- "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 the create() method of multiprocessing.managers.Server
and multiprocessing.managers.SharedMemoryServer.
- "obj" in weakref.finalize().
Also allowed to pass arbitrary keyword arguments (even "self" and "func")
if the above arguments are passed as positional argument.
2019-04-01 09:16:35 +03:00
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)
2d1bc537fe
bpo-35202: Remove unused imports in Lib directory. (GH-10445)
2018-11-10 07:45:28 +02:00
Serhiy Storchaka
34fd4c2019
bpo-35133: Fix mistakes when concatenate string literals on different lines. (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.
2018-11-05 16:20:25 +02:00
Serhiy Storchaka
c406d5cd74
bpo-34171: Prevent creating Lib/trace.cover when run the trace module. (GH-8841)
2018-08-25 10:27:55 +03:00
Michael Selik
47ab15470d
bpo-31908: Fix output of cover files for trace module command-line tool. (GH-4205)
...
Previously emitted cover files only when --missing option was used.
2018-05-01 06:46:52 +03:00
Kyle Altendorf
9f4223261f
bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)
2018-02-17 08:32:37 +02: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
Serhiy Storchaka
7e4db2f253
bpo-30166: Import command-line parsing modules only when needed. ( #1293 )
2017-05-04 08:17:47 +03:00
Martin Panter
0f29ad1be5
More typo fixes for 3.6
2016-06-04 05:06:25 +00:00
Senthil Kumaran
436831dbe4
Issue22642 - Convert trace module's option handling mechanism from getopt to argparse.
...
Patch contributed by SilentGhost.
2016-01-13 07:46:54 -08:00
Senthil Kumaran
96b531abd5
Issue #26069 : Remove the deprecated apis in the trace module.
2016-01-11 07:09:42 -08:00
Brett Cannon
f299abdafa
Issue #23731 : Implement PEP 488.
...
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.
2015-04-13 14:21:02 -04:00
Serhiy Storchaka
46ba6c8563
Issue #22831 : Use "with" to avoid possible fd leaks.
2015-04-04 11:01:02 +03:00
Victor Stinner
ae58649721
Issue #22043 : time.monotonic() is now always available
...
threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used.
2014-09-02 23:18:25 +02:00
Alexander Belopolsky
f026dae130
Fixes #10541 : regrtest -T is broken
...
* makes test_trace tests restore the tracefunc after they run
* write_results() in trace module will not terminate if lnotab
cannot be found.
2014-06-29 17:44:05 -04:00
Serhiy Storchaka
8f8ec92de8
Issue #19936 : Added executable bits or shebang lines to Python scripts which
...
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.
2014-01-16 17:33:23 +02:00
Serhiy Storchaka
b992a0e102
Issue #19936 : Added executable bits or shebang lines to Python scripts which
...
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.
2014-01-16 17:15:49 +02:00
Brett Cannon
cd171c8e92
Issue #18200 : Back out usage of ModuleNotFoundError (8d28d44f3a9a)
2013-07-04 17:43:24 -04:00
Brett Cannon
0a140668fa
Issue #18200 : Update the stdlib (except tests) to use
...
ModuleNotFoundError.
2013-06-13 20:57:26 -04:00
Ezio Melotti
10f89329ad
#17143 : merge with 3.3.
2013-02-15 21:22:22 +02:00
Ezio Melotti
23e043fdcd
#17143 : fix a missing import in the trace module. Initial patch by Berker Peksag.
2013-02-15 21:20:50 +02:00
Andrew Svetlov
f7a17b48d7
Replace IOError with OSError ( #16715 )
2012-12-25 16:47:37 +02:00
Florent Xicluna
61ea12c9a0
trace: remove unused imports.
2012-07-07 17:03:52 +02:00
Victor Stinner
949d8c986e
Close #14690 : Use monotonic clock instead of system clock in the sched,
...
subprocess and trace modules.
2012-05-30 13:30:32 +02:00
Vinay Sajip
7ded1f0f69
Implemented PEP 405 (Python virtual environments).
2012-05-26 03:45:29 +01:00
Brett Cannon
9fe92d1de5
Make the trace module ignore modules whose names start with "<" and
...
end with ">", i.e. follow convention.
2012-04-10 21:05:53 -04:00
Éric Araujo
e7d36fe0a6
Prevent deprecation warning
2011-04-17 16:48:52 +02:00
Alexander Belopolsky
44454afbe3
Issue #10371 : Deprecated undocumented functions in the trace module.
2010-11-20 18:21:07 +00:00
Victor Stinner
58c0752a33
Issue #10335 : Add tokenize.open(), detect the file encoding using
...
tokenize.detect_encoding() and open it in read only mode.
2010-11-09 01:08:59 +00:00
Alexander Belopolsky
6672ea9424
Streamlined code in trace.Ignore and added unit tests.
2010-11-08 18:32:40 +00:00
Victor Stinner
64bc3b28a3
Issue #10329 : The trace module writes reports using the input Python script
...
encoding, instead of the locale encoding. Patch written by Alexander
Belopolsky.
2010-11-07 15:47:36 +00:00
Alexander Belopolsky
25b5741383
Issue #10330 : trace module can now be used with python built without threads.
2010-11-06 01:31:16 +00:00
Benjamin Peterson
b2fda23922
close files correctly
2010-10-30 23:51:34 +00:00
Alexander Belopolsky
eebccfb10c
Reverted inadvertent change that slipped into r85695
2010-10-18 15:11:33 +00:00
Alexander Belopolsky
4a98e3b6d0
Issue #10117 : Tools/scripts/reindent.py now accepts source files that
...
use encoding other than ASCII or UTF-8. Source encoding is preserved
when reindented code is written to a file.
2010-10-18 14:43:38 +00:00
Alexander Belopolsky
0ae33611fa
Issue 9941: Minor code cleanup before implementing the context manager feature:
...
- Eliminated code repetition between run and runctx;
- Removed redundant calls to dict.key;
- Removed unused "blabbed" attribute;
- Simplified the loop in write_results_file().
2010-09-27 15:49:20 +00:00
Alexander Belopolsky
ff09ce211f
Issue #9936 : Fixed executable lines' search in the trace module.
2010-09-24 18:03:12 +00:00
Alexander Belopolsky
4d7701729c
Issue #9315 : Fix for the trace module to record correct class name
...
when tracing methods. Unit tests. Patch by Eli Bendersky.
2010-09-13 18:14:34 +00:00
Georg Brandl
dc50c696ab
Fix softspace relic.
2010-08-02 12:40:22 +00:00
Georg Brandl
24085d7940
Get rid of spurious "threading" entries in trace output.
2010-08-02 12:36:24 +00:00
Georg Brandl
120d633871
#4943 : do not try to include drive letters (and colons) when looking for a probably module name.
2010-08-01 14:38:17 +00:00
Georg Brandl
8f9f466505
#1690103 : fix initial namespace for code run with trace.main().
2010-08-01 08:35:29 +00:00
Alexander Belopolsky
3f8ecab589
Issue #9323 : Fixed a bug in trace.py that resulted in loosing the name
...
of the script being traced. Patch by Eli Bendersky.
2010-07-21 17:43:42 +00:00
Alexander Belopolsky
533a167a71
Issue #9282 : Fixed --listfuncs option of trace.py. Thanks Eli
...
Bendersky for the patch.
2010-07-20 19:55:18 +00:00
Benjamin Peterson
90f5ba538b
convert shebang lines: python -> python3
2010-03-11 22:53:45 +00:00
Andrew M. Kuchling
e1f9bebd99
#6666 : fix bug in trace.py that applied the list of ignored dirs only to 1st file
2010-02-22 22:16:58 +00:00
Georg Brandl
33c2881b63
#5656 : detect correct encoding of files when reporting coverage in trace.py, and ignore files in the temporary directory when reporting.
2009-04-01 23:07:29 +00:00