Benjamin Peterson
9e77f72fb2
shorten capsule name macro; it doesn't need to be so long
11 years ago
Benjamin Peterson
025e9ebd0a
PEP 448: additional unpacking generalizations ( closes #2292 )
Patch by Neil Girdhar.
11 years ago
Benjamin Peterson
deff2b76ec
be more robust against the filters list changing under us ( closes #24096 )
11 years ago
Eric Snow
32439d6eb6
Issue #23911 : Move path-based bootstrap code to a separate frozen module.
11 years ago
Benjamin Peterson
1dfd247c1b
remove the concept of an unoptimized function scope from the compiler, since it can't happen anymore
11 years ago
Gregory P. Smith
f789465eed
Silence a gcc "may be used uninitialized" compiler warning. Not true.
Initializing retval prevents the naive warning.
11 years ago
Gregory P. Smith
5d0ccd2f91
Add missing PyAPI_FUNC macro's to the public functions as other .c files do
in hopes that this fixes the windows extension module link error for modules
trying to call _Py_strhex functions. issue9951.
11 years ago
Gregory P. Smith
e3f6393b52
Add the files missing from c9f1630cf2b1 for issue9951.
hg status should be my friend more often...
11 years ago
Benjamin Peterson
9bdd61338d
remove dead *-import checking code ( closes #24049 )
11 years ago
Serhiy Storchaka
247789cee9
Issue #24007 : Argument Clinic now writes the format of PyArg_Parse*() at the
same line as function name.
11 years ago
Christian Heimes
418fd74f87
Issue #23998 : PyImport_ReInitLock() now checks for lock allocation error
11 years ago
Serhiy Storchaka
d6e53dab86
Fixed error message for the "u#" format code.
11 years ago
Christian Heimes
e8e4283cec
Remove redundant check for tb != NULL to shut up Coverity . It has been set to Py_None a couple of lines earlier.
CID 1291697 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking tb suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
11 years ago
R David Murray
4171bbe687
#23949 : Improve tuple unpacking error messages.
Patch by Arnon Yaari.
11 years ago
Larry Hastings
89964c48d1
Issue #23944 : Argument Clinic now wraps long impl prototypes at column 78.
11 years ago
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.
11 years ago
Steve Dower
8fc8980c96
Issue #23524 : Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.
11 years ago
Serhiy Storchaka
f41f8f9974
Issue #22977 : Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
11 years ago
Victor Stinner
9aa1331c6f
Issue #22585 : os.urandom() now releases the GIL when the getentropy() is used
(OpenBSD 5.6+).
11 years ago
Victor Stinner
81f241ab2e
Issue #23571 : If io.TextIOWrapper constructor fails in _Py_DisplaySourceLine(),
close the binary file to fix a resource warning.
11 years ago
Victor Stinner
84092ac370
Issue #23571 : Fix reentrant call to Py_FatalError()
Flushing sys.stdout and sys.stderr in Py_FatalError() can call again
Py_FatalError(). Add a reentrant flag to detect this case and just abort at the
second call.
11 years ago
Victor Stinner
ec4f9592f5
Issue #23571 : Py_FatalError() now tries to flush sys.stdout and sys.stderr
It should help to see exceptions when stderr if buffered: PyErr_Display() calls
sys.stderr.write(), it doesn't write into stderr file descriptor directly.
11 years ago
Victor Stinner
0e98a76b65
Issue #23571 : Enhance Py_FatalError()
* Display the current Python stack if an exception was raised but the exception
has no traceback
* Disable faulthandler if an exception was raised (before it was only disabled
if no exception was raised)
* To display the current Python stack, call PyGILState_GetThisThreadState()
which works even if the GIL was released
11 years ago
Benjamin Peterson
55c14355ac
fix building without threads ( closes #23877 )
11 years ago
Serhiy Storchaka
92e8af67a8
Issue #23492 : Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
11 years ago
Serhiy Storchaka
1009bf18b3
Issue #23501 : Argumen Clinic now generates code into separate files by default.
11 years ago
Victor Stinner
13019fdef3
Issue #22117 : Add a new _PyTime_FromSeconds() function
Fix also _Py_InitializeEx_Private(): initialize time before initializing
import, import_init() uses the _PyTime API (for thread locks).
11 years ago
Victor Stinner
97f86b82b7
Issue #23836 : Use _Py_write_noraise() to retry on EINTR in _Py_DumpTraceback()
and _Py_DumpTracebackThreads(). Document also these functions to explain that
the caller is responsible to call PyErr_CheckSignals().
11 years ago
Victor Stinner
6f4fae8a95
Issue #23836 : Document functions releasing the GIL in fileutils.c
11 years ago
Victor Stinner
82c3e4599d
Issue #23836 : Add _Py_write_noraise() function
Helper to write() which retries write() if it is interrupted by a signal (fails
with EINTR).
11 years ago
Victor Stinner
62d1c70eff
Issue #22117 , issue #23485 : Fix _PyTime_AsMilliseconds() and
_PyTime_AsMicroseconds() rounding.
Add also unit tests.
11 years ago
Victor Stinner
fa09beb150
Issue #23485 : Add _PyTime_FromMillisecondsObject() function
11 years ago
Victor Stinner
79b74aeb20
Issue #22181 : os.urandom() now releases the GIL when the getrandom()
implementation is used.
11 years ago
Victor Stinner
45cff0c0e6
Issue #22117 : Try to fix rounding in conversion from Python double to _PyTime_t
using the C volatile keyword.
11 years ago
Victor Stinner
e134a7fe36
Issue #23752 : _Py_fstat() is now responsible to raise the Python exception
Add _Py_fstat_noraise() function when a Python exception is not welcome.
11 years ago
Victor Stinner
a695f83f0d
Issue #22117 : Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methods
Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead.
11 years ago
Victor Stinner
bcdd777d3c
Issue #22117 : Add _PyTime_ROUND_CEILING rounding method for timestamps
Add also more tests for ROUNd_FLOOR.
11 years ago
Victor Stinner
edddf991d9
Issue #22117 : Add assertions to _PyTime_AsTimeval() and _PyTime_AsTimespec() to
check that microseconds and nanoseconds fits into the specified range.
11 years ago
Victor Stinner
ea9c0dd2c2
Issue #22117 : Fix usage of _PyTime_AsTimeval()
Add _PyTime_AsTimeval_noraise() function. Call it when it's not possible (or
not useful) to raise a Python exception on overflow.
11 years ago
Victor Stinner
f81f0f9c63
Issue #22117 : Fix rounding and implement _PyTime_ROUND_FLOOR in:
- _PyTime_ObjectToTime_t()
- _PyTime_ObjectToTimespec()
- _PyTime_ObjectToTimeval()
11 years ago
Victor Stinner
1bd18ba9a7
Issue #22117 : Cleanup pytime.c/.h
11 years ago
Victor Stinner
09e5cf28ae
Issue #22117 : Use the _PyTime_t API in _datetime.datetime() constructor
* Remove _PyTime_gettimeofday()
* Add _PyTime_GetSystemClock()
11 years ago
Victor Stinner
cb0c60258b
Issue #22117 : Fix _PyTime_GetMonotonicClock() and
_PyTime_GetSystemClockWithInfo() to not raise an exception and return 0 on
error (it should never occur)
11 years ago
Victor Stinner
02937aab13
Issue #22117 : Add the new _PyTime_ROUND_FLOOR rounding method for the datetime
module. time.clock_settime() now uses this rounding method instead of
_PyTime_ROUND_DOWN to handle correctly dates before 1970.
11 years ago
Victor Stinner
b3b4544070
Issue #22117 : Use the _PyTime_t API for time.clock_settime()
Remove also the now unused _PyTime_AddDouble() function.
11 years ago
Victor Stinner
c337838af7
Issue #22117 : Use the new _PyTime_t API in the select module
11 years ago
Victor Stinner
f5faad2bf0
Issue #22117 : The thread module uses the new _PyTime_t timestamp API
Add also a new _PyTime_AsMicroseconds() function.
threading.TIMEOUT_MAX is now be smaller: only 292 years instead of 292,271
years on 64-bit system for example. Sorry, your threads will hang a *little
bit* shorter. Call me if you want to ensure that your locks wait longer, I can
share some tricks with you.
11 years ago
Victor Stinner
95e9cef6f0
Issue #22117 : Write unit tests for _PyTime_AsTimeval()
* _PyTime_AsTimeval() now ensures that tv_usec is always positive
* _PyTime_AsTimespec() now ensures that tv_nsec is always positive
* _PyTime_AsTimeval() now returns an integer on overflow instead of raising an
exception
11 years ago
Victor Stinner
34dc0f46ae
Issue #22117 : The signal modules uses the new _PyTime_t API
* Add _PyTime_AsTimespec()
* Add unit tests for _PyTime_AsTimespec()
11 years ago
Victor Stinner
a47b881d86
Issue #22117 : time.time() now uses the new _PyTime_t API
* Add _PyTime_GetSystemClockWithInfo()
11 years ago