Serhiy Storchaka
4b1681832b
Issue #22518 : Fixed integer overflow issues in "backslashreplace",
"xmlcharrefreplace", and "surrogatepass" error handlers.
11 years ago
Serhiy Storchaka
2e374098ff
Issue #22518 : Fixed integer overflow issues in "backslashreplace",
"xmlcharrefreplace", and "surrogatepass" error handlers.
11 years ago
Victor Stinner
b86f08f743
faulthandler: enhance dump_ascii() to escape also non-printable ASCII
characters (U+0000..U+001f and U+007f).
11 years ago
Antoine Pitrou
0676a406bf
Issue #18711 : Add a new `PyErr_FormatV` function, similar to `PyErr_Format` but accepting a `va_list` argument.
11 years ago
Serhiy Storchaka
20b39b27d9
Removed redundant casts to `char *`.
Corresponding functions now accept `const char *` (issue #1772673 ).
11 years ago
Georg Brandl
daa910acde
Update importlib.h frozen bytecode (changed due to commit c0ca9d32aed4).
11 years ago
Serhiy Storchaka
8aa8c47db2
Fixed reference leak in the "backslashreplace" error handler.
11 years ago
Antoine Pitrou
e7811fca5e
Closes #11471 : avoid generating a JUMP_FORWARD instruction at the end of an if-block if there is no else-clause.
Original patch by Eugene Toder.
11 years ago
Antoine Pitrou
cb0a006fd1
Issue #4180 : The warnings registries are now reset when the filters are modified.
11 years ago
Nick Coghlan
8fad1676a2
Issue #22166 : clear codec caches in test_codecs
11 years ago
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
12 years ago
Victor Stinner
5789cfbb56
Issue #22043 : Fix pymonotonic(), use tv_usec=-1 as a marker to skip
the monotonic test
12 years ago
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.
12 years ago
Victor Stinner
9bb758cee7
Issue #22043 : Fix _PyTime_gettimeofday() if HAVE_GETTIMEOFDAY
Ensure also that the tv_usec field is consistent: in range [0; 999999].
12 years ago
Victor Stinner
282124b8c4
Closes #22258 : Fix the the internal function set_inheritable() on Illumos.
This platform exposes the function ioctl(FIOCLEX), but calling it fails with
errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable() now falls
back to the slower fcntl() (F_GETFD and then F_SETFD).
12 years ago
Victor Stinner
0011124dc2
Issue #22043 : _PyTime_Init() now checks if the system clock works.
Other changes:
* The whole _PyTime API is private (not defined if Py_LIMITED_API is set)
* _PyTime_gettimeofday_info() also returns -1 on error
* Simplify PyTime_gettimeofday(): only use clock_gettime(CLOCK_REALTIME) or
gettimeofday() on UNIX. Don't fallback to ftime() or time() anymore.
12 years ago
Victor Stinner
7efb83393c
Issue #22287 : On UNIX, _PyTime_gettimeofday() now uses
clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now
depends on the librt library on Solaris and on Linux (only with glibc older
than 2.17).
12 years ago
Victor Stinner
049e509a9f
Issue #22207 : Fix "comparison between signed and unsigned integers" warning in
test checking for integer overflow on Py_ssize_t type: cast explicitly to
size_t.
12 years ago
Victor Stinner
daca3d7e9b
Issue #22206 : Using pthread, PyThread_create_key() now sets errno to ENOMEM and
returns -1 (error) on integer overflow.
12 years ago
Nick Coghlan
f9e227e5a9
Issue #20184 : Add signature introspection for 30 of the builtins
Also adds a test to test_inspect to track progress on builtin
introspection support, to ensure it doesn't regress in the future.
12 years ago
Victor Stinner
98ea54c35c
Issue #22156 : Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
12 years ago
Serhiy Storchaka
547d3bc3a6
Issue #22193 : Added private function _PySys_GetSizeOf() needed to implement
some __sizeof__() methods.
12 years ago
Zachary Ware
9b33872812
Issue #22146 : Fix typo in __build_class__ error message
12 years ago
Victor Stinner
f6a271ae98
Issue #18395 : Rename ``_Py_char2wchar()`` to func:`Py_DecodeLocale`, rename
``_Py_wchar2char()`` to func:`Py_EncodeLocale`, and document these
functions.
12 years ago
Victor Stinner
1db9e7bb19
Issue #22054 : Add os.get_blocking() and os.set_blocking() functions to get and
set the blocking mode of a file descriptor (False if the O_NONBLOCK flag is
set, True otherwise). These functions are not available on Windows.
12 years ago
Nick Coghlan
973fe0ba7a
Issue #18093 : Factor out the programs that embed the runtime
12 years ago
Berker Peksag
d8089e0d04
Issue #16382 : Improve exception message of warnings.warn() for bad category.
Initial patch by Phil Elson.
12 years ago
Victor Stinner
ab826d11a3
Issue #21925 : PyImport_Cleanup(): Remove unused parameter in
PySys_FormatStderr() call
12 years ago
Ned Deily
529ea5d184
Issue #21891 : remove extraneous semicolon.
12 years ago
Benjamin Peterson
59830b6ec4
revert tstate_delete_common, since it's pretty much wrong
12 years ago
Benjamin Peterson
95d75194ac
remove extra call to tstate_delete_common (merge artifact)
12 years ago
Benjamin Peterson
068f81e115
avoid a deadlock with the interpreter head lock and the GIL during finalization
12 years ago
Benjamin Peterson
17548dda51
check if the thread is finalizing after retaking the GIL
12 years ago
Victor Stinner
40ee30181f
Issue #21205 : Add a new ``__qualname__`` attribute to generator, the qualified
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
12 years ago
Terry Jan Reedy
f2fb73f675
Issue #19362 : Tweek len() doc and docstring to expand the indicated range of
arguments. Original patch by Gareth Rees.
12 years ago
Brett Cannon
42535f0104
Fix a parameter name to make sense again
12 years ago
Brett Cannon
2a17bde930
Issue #20383 : Introduce importlib.util.module_from_spec().
Along the way, dismantle importlib._bootstrap._SpecMethods as it was
no longer relevant and constructing the new function required
partially dismantling the class anyway.
12 years ago
Brett Cannon
fd4d0504df
Move import.c to use Clinic file output.
12 years ago
Eric Snow
58cfdd8af8
Issue #21226 : fix a ref leak.
12 years ago
Antoine Pitrou
9961405ed1
Issue #21523 : Fix over-pessimistic computation of the stack effect of some opcodes in the compiler.
This also fixes a quadratic compilation time issue noticeable when compiling
code with a large number of "and" and "or" operators.
12 years ago
Raymond Hettinger
2a54582d72
Issue 20620: Update the min()/max() docs for the new default argument.
Patch provided by Berker Peksag.
12 years ago
Victor Stinner
0d4e01ca07
Issue #13916 : Fix surrogatepass error handler on Windows
12 years ago
Serhiy Storchaka
88d8fb6af6
Issue #13916 : Disallowed the surrogatepass error handler for non UTF-*
encodings.
12 years ago
Victor Stinner
45e8e2f218
Issue #21490 : Add new C macros: Py_ABS() and Py_STRINGIFY()
Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between
pyconfig.h and pymacros.h.
12 years ago
Eric Snow
08197a4616
Issue #21226 : Set all attrs in PyImport_ExecCodeModuleObject.
12 years ago
Antoine Pitrou
9845c7ebc5
Issue #21425 : Fix flushing of standard streams in the interactive interpreter.
12 years ago
Kristján Valur Jónsson
ddf343855d
The PyCOND_TIMEDWAIT must use microseconds for the timeout argument
in order to have the same resolution as pthreads condition variables.
At the same time, it must be large enough to accept 31 bits of
milliseconds, which is the maximum timeout value in the windows API.
A PY_LONG_LONG of microseconds fullfills both requirements.
This closes issue #20737
12 years ago
Kristján Valur Jónsson
33096fe829
The PyCOND_TIMEDWAIT must use microseconds for the timeout argument
in order to have the same resolution as pthreads condition variables.
At the same time, it must be large enough to accept 31 bits of
milliseconds, which is the maximum timeout value in the windows API.
A PY_LONG_LONG of microseconds fullfills both requirements.
This closes issue #20737
12 years ago
Tim Golden
b8ac3e1a20
Issue21393 Use CryptReleaseContext to release Crypt handle on Windows
12 years ago
Victor Stinner
d50c3f3f3a
Issue #21393 : random.c: on Windows, close the hCryptProv handle at exit
12 years ago