| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
small negative value. (#4003)
|
|
|
|
|
|
|
|
| |
* Rewrite win_perf_counter() to only use integers internally.
* Add _PyTime_MulDiv() which compute "ticks * mul / div"
in two parts (int part and remaining) to prevent integer overflow.
* Clock frequency is checked at initialization for integer overflow.
* Enhance also pymonotonic() to reduce the precision loss on macOS
(mach_absolute_time() clock).
|
|
|
| |
Patch by Pablo.
|
|
|
|
|
|
|
|
| |
time.clock() and time.perf_counter() now use again C double
internally.
Remove also _PyTime_GetWinPerfCounterWithInfo(): use
_PyTime_GetPerfCounterDoubleWithInfo() instead on Windows.
|
|
|
|
|
| |
* Move _PyTime_overflow() at the top
* Move assertion on numerator into _PyTime_ObjectToDenominator()
* PEP 7: add { ... } to if blocks
|
|
|
|
|
| |
* Add _PyTime_GetPerfCounter()
* Use _PyTime_GetPerfCounter() for -X importtime
|
|
|
|
| |
(#3834)
|
| |
|
|
|
|
|
|
|
|
|
| |
See PEP 539 for details.
Highlights of changes:
- Add Thread Specific Storage (TSS) API
- Document the Thread Local Storage (TLS) API as deprecated
- Update code that used TLS API to use TSS API
|
| |
|
| |
|
|
|
|
| |
(#3891)
|
|
|
| |
Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
|
|
|
| |
Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests. Closes bpo-31353
|
| |
|
|
|
|
| |
unbuffered. (#1667)
|
|
|
|
|
| |
On Windows, Py_FatalError() now limits the size to 256 bytes of the
buffer used to call OutputDebugStringW(). Previously, the size
depended on the length of the error message.
|
|
|
|
|
|
| |
It shows show import time of each module.
It's useful for optimizing startup time.
Typical usage: python -X importtime -c 'import requests'
|
|
|
|
| |
unicodedata.normalize(). (#3767)
|
|
|
|
|
| |
Importlib was instrumented with two dtrace probes to profile import timing.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
| |
(forgot to remove it in #3219)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Class execution requires that __prepare__() methods return
a proper execution namespace. Check for that immediately
after calling __prepare__(), rather than passing it through
to the code execution machinery and potentially triggering
SystemError (in debug builds) or a cryptic TypeError
(in release builds).
Patch by Oren Milman.
|
|
|
|
| |
__name__ global. (#3717)
|
|
|
|
| |
warnings.warn_explicit. (#3219)
|
|
|
|
| |
is not a string. (#3257)
|
|
|
|
| |
attribute. (#3620)
|
|
|
|
|
|
| |
* Trivial cleanups following bpo-31370
* Also cleanup the "importlib._bootstrap_external" module
|
|
|
|
|
| |
The concrete PyDict_* API is used to interact with PyInterpreterState.modules in a number of places. This isn't compatible with all dict subclasses, nor with other Mapping implementations. This patch switches the concrete API usage to the corresponding abstract API calls.
We also add a PyImport_GetModule() function (and some other helpers) to reduce a bunch of code duplication.
|
|
|
|
|
|
|
| |
* Add Py_UNREACHABLE() as an alias to abort().
* Use Py_UNREACHABLE() instead of assert(0)
* Convert more unreachable code to use Py_UNREACHABLE()
* Document Py_UNREACHABLE() and a few other macros.
|
|
|
|
|
| |
A bunch of code currently uses PyInterpreterState.modules directly instead of PyImport_GetModuleDict(). This complicates efforts to make changes relative to sys.modules. This patch switches to using PyImport_GetModuleDict() uniformly. Also, a number of related uses of sys.modules are updated for uniformity for the same reason.
Note that this code was already reviewed and merged as part of #1638. I reverted that and am now splitting it up into more focused parts.
|
|
|
|
|
| |
Resolves bpo-31420.
(This was accidentally reverted when in #3565.)
|
|
|
| |
PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
|
|
|
|
| |
exception with a bad __module__ attribute. (#3539)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop warnoptions from PyInterpreterState.
* Drop xoptions from PyInterpreterState.
* Don't set warnoptions and _xoptions again.
* Decref after adding to sys.__dict__.
* Drop an unused macro.
* Check sys.xoptions *before* we delete it.
|
|
|
|
|
| |
warnings.defaultaction. (#3496)
Patch by Oren Milman.
|
|
|
|
|
| |
This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c
parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be
rounded into finite floats. Tests were added to very this behavior.
|
|
|
|
| |
not a dictionary. (#3485)
|
|
|
|
|
|
|
|
|
|
| |
* Fix #26669
* Modify NaN check function and error message
* Fix pytime.c when arg is nan
* fix whitespace
|
| |
|
| |
|
|
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
|
|
|
|
|
|
|
|
| |
f_trace_lines: enable/disable line trace events
f_trace_opcodes: enable/disable opcode trace events
These are intended primarily for testing of the interpreter
itself, as they make it much easier to emulate signals
arriving at unfortunate times.
|
| |
|
| |
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
| |
For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly.
|
|
|
|
|
| |
(#3377)" (#3383)
This reverts commit 833860615bedfd2484ac0623d6f01ff0578ba09f, as it broke Windows builds.
|
|
|
| |
Windows buildbots started failing due to include-related errors.
|