Zachary Ware
c4821d62b4
Closes #22869 : Move PyOS_CheckStack back to pythonrun.c
11 years ago
Steve Dower
9b59dd4781
Issue #22869 : Remove duplicate stack check from pythonrun.c
11 years ago
Brett Cannon
b6e2556d8f
Issue #22834 : Have import suppress FileNotFoundError when the current
working directory no longer exists.
Thanks to Martin Panter for the bug report.
11 years ago
Nick Coghlan
d600951748
Issue #22869 : Split pythonrun into two modules
- interpreter startup and shutdown code moved to a new
pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
global flags
11 years ago
Serhiy Storchaka
81f68a7d4b
Issue #22453 : Warn against the use of leaking macro PyObject_REPR().
11 years ago
Serhiy Storchaka
df4518ca4b
Issue #22453 : Removed non-documented macro PyObject_REPR().
11 years ago
Serhiy Storchaka
030e92d1a5
Issue #22193 : Fixed integer overflow error in sys.getsizeof().
Fixed an error in _PySys_GetSizeOf declaration.
11 years ago
Victor Stinner
a5b335e62f
Issue #20597 , #21274 : Remove unused definition of PATH_MAX on GNU/Hurd,
MAXPATHLEN is now preferred.
11 years ago
Victor Stinner
ce43f38ace
Issue #20597 : Remove unused definition of PATH_MAX on Windows, MAXPATHLEN is
now preferred. Patch written by Jeffrey Armstrong.
11 years ago
Steve Dower
f6c69e6cc9
#22734 marshal needs a lower stack depth for debug builds on Windows
11 years ago
Victor Stinner
5e78f4daa8
Issue #22762 : Fix _Py_DisplaySourceLine(), clear the exception if
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
11 years ago
Antoine Pitrou
0373a106a1
Issue #17636 : Circular imports involving relative imports are now supported.
11 years ago
Brett Cannon
5e8b04eefb
Issue #21052 : Don't raise ImportWarning for sys.meta_path or
sys.path_hooks when set to None during interpreter shutdown.
Thanks to Martin Panter for the initial bug report.
11 years ago
Serhiy Storchaka
e2bd2a7186
Issue #21715 : Extracted shared complicated code in the _io module to new
_PyErr_ChainExceptions() function.
11 years ago
Antoine Pitrou
0ddbf4795f
Issue #22462 : Fix pyexpat's creation of a dummy frame to make it appear in exception tracebacks.
Initial patch by Mark Shannon.
11 years ago
R David Murray
861470c836
#16518 : Bring error messages in harmony with docs ("bytes-like object")
Some time ago we changed the docs to consistently use the term 'bytes-like
object' in all the contexts where bytes, bytearray, memoryview, etc are used.
This patch (by Ezio Melotti) completes that work by changing the error
messages that previously reported that certain types did "not support the
buffer interface" to instead say that a bytes-like object is required. (The
glossary entry for bytes-like object references the discussion of the buffer
protocol in the docs.)
11 years ago
Georg Brandl
edc3cbaaba
Copyright year update, add version to licenses.
11 years ago
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.
12 years ago
Antoine Pitrou
cb0a006fd1
Issue #4180 : The warnings registries are now reset when the filters are modified.
12 years ago
Nick Coghlan
8fad1676a2
Issue #22166 : clear codec caches in test_codecs
12 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