Commit Graph

2718 Commits

Author SHA1 Message Date
Raymond Hettinger 4ea37703ac Merge 2016-11-21 14:24:51 -08:00
Raymond Hettinger f89854f89c Issue 28751: Fix comments in code.h. (Contributed by Ned Batchelder). 2016-11-21 14:24:32 -08:00
Serhiy Storchaka b57d9eac41 Issue #28748: Private variable _Py_PackageContext is now of type "const char *"
rather of "char *".
2016-11-21 10:25:54 +02:00
Serhiy Storchaka 460bd0d284 Issue #19569: Compiler warnings are now emitted if use most of deprecated
functions.
2016-11-20 12:16:46 +02:00
Serhiy Storchaka 27b74244fb Issue #28701: _PyUnicode_EqualToASCIIId and _PyUnicode_EqualToASCIIString now
require ASCII right argument and assert this condition in debug build.
2016-11-16 20:03:03 +02:00
Serhiy Storchaka a83a6a3275 Issue #28701: _PyUnicode_EqualToASCIIId and _PyUnicode_EqualToASCIIString now
require ASCII right argument and assert this condition in debug build.
2016-11-16 20:02:44 +02:00
Serhiy Storchaka 503db266a5 Issue #21449: Removed private function _PyUnicode_CompareWithId. 2016-11-16 15:56:50 +02:00
Serhiy Storchaka dddec81b2d Issue #21449: Removed private function _PyUnicode_CompareWithId. 2016-11-16 15:56:27 +02:00
Serhiy Storchaka 29a5447360 Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.
The latter function is more readable, faster and doesn't raise exceptions.

Based on patch by Xiang Zhang.
2016-11-16 15:41:31 +02:00
Serhiy Storchaka fab6acd9f5 Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.
The latter function is more readable, faster and doesn't raise exceptions.

Based on patch by Xiang Zhang.
2016-11-16 15:41:11 +02:00
Serhiy Storchaka f5894dd646 Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.
The latter function is more readable, faster and doesn't raise exceptions.

Based on patch by Xiang Zhang.
2016-11-16 15:40:39 +02:00
Serhiy Storchaka 1a73bf365e Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:19:57 +02:00
Serhiy Storchaka 3b73ea1278 Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:19:20 +02:00
Serhiy Storchaka f4934ea77d Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:17:58 +02:00
Victor Stinner c7a8f67411 Issue #28618: Mark dict lookup functions as hot
It's common to see these functions in the top 3 of "perf report".
2016-11-15 15:13:40 +01:00
Victor Stinner c6944e7edc Issue #28618: Make hot functions using __attribute__((hot))
When Python is not compiled with PGO, the performance of Python on call_simple
and call_method microbenchmarks depend highly on the code placement. In the
worst case, the performance slowdown can be up to 70%.

The GCC __attribute__((hot)) attribute helps to keep hot code close to reduce
the risk of such major slowdown. This attribute is ignored when Python is
compiled with PGO.

The following functions are considered as hot according to statistics collected
by perf record/perf report:

* _PyEval_EvalFrameDefault()
* call_function()
* _PyFunction_FastCall()
* PyFrame_New()
* frame_dealloc()
* PyErr_Occurred()
2016-11-11 02:13:35 +01:00
Serhiy Storchaka 85bcf37e15 Issue #23996: Added _PyGen_SetStopIterationValue for safe raising
StopIteration with value. More safely handle non-normalized exceptions
in -_PyGen_FetchStopIterationValue.
2016-11-06 18:47:35 +02:00
Serhiy Storchaka 60e49aa756 Issue #23996: Added _PyGen_SetStopIterationValue for safe raising
StopIteration with value. More safely handle non-normalized exceptions
in -_PyGen_FetchStopIterationValue.
2016-11-06 18:47:03 +02:00
Serhiy Storchaka 24411f8a8d Issue #23996: Added _PyGen_SetStopIterationValue for safe raising
StopIteration with value. More safely handle non-normalized exceptions
in -_PyGen_FetchStopIterationValue.
2016-11-06 18:44:42 +02:00
Ned Deily a9e99b1a54 Start 3.6.0b4 2016-11-01 00:35:39 -04:00
Ned Deily 0ef256c2b0 Version bump for 3.6.0b3 2016-10-31 20:43:30 -04:00
Eric V. Smith 5646648678 Issue 28128: Print out better error/warning messages for invalid string escapes. Backport to 3.6. 2016-10-31 14:46:26 -04:00
Eric V. Smith 42454af094 Issue 28128: Print out better error/warning messages for invalid string escapes. 2016-10-31 09:22:08 -04:00
Yury Selivanov f0bbee6228 Merge 3.6 (issue #28544) 2016-10-28 19:01:46 -04:00
Yury Selivanov 684ef2c888 Issue #28544: Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*` 2016-10-28 19:01:21 -04:00
Yury Selivanov 1b6b6eb453 Merge 3.6 (issue #28544) 2016-10-28 18:49:10 -04:00
Yury Selivanov 833c626e67 Issue #28544: Fix compilation of _asynciomodule.c on Windows 2016-10-28 18:48:50 -04:00
Serhiy Storchaka 2edcd1cba4 Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),
PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
PyUnicode_AsEncodedUnicode().
2016-10-27 21:08:00 +03:00
Serhiy Storchaka 0093907f0e Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),
PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
PyUnicode_AsEncodedUnicode().
2016-10-27 21:05:49 +03:00
Serhiy Storchaka 14ab277632 Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising
new exception with setting current exception as __cause__.

_PyErr_FormatFromCause(exception, format, args...) is equivalent to Python

    raise exception(format % args) from sys.exc_info()[1]
2016-10-21 17:10:42 +03:00
Serhiy Storchaka 467ab194fc Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising
new exception with setting current exception as __cause__.

_PyErr_FormatFromCause(exception, format, args...) is equivalent to Python

    raise exception(format % args) from sys.exc_info()[1]
2016-10-21 17:09:17 +03:00
Benjamin Peterson a2bc46da14 merge 3.6 2016-10-20 22:39:39 -07:00
Benjamin Peterson 4510e6de9d mark dtrace stubs as static inline; remove stubs
C99 inline semantics don't work everywhere. (https://bugs.python.org/issue28092)
We don't want these to have external visibility anyway.
2016-10-20 22:37:00 -07:00
Benjamin Peterson 27271149b4 merge 3.6 2016-10-10 23:21:10 -07:00
Benjamin Peterson 1609997796 prefix freegrammar (closes #28413) 2016-10-10 23:21:02 -07:00
Ned Deily a4f45bb0c4 Start 3.6.0b3 2016-10-10 20:46:40 -04:00
Ned Deily 7e16af499b Version bump for 3.6.0b2 2016-10-10 16:09:08 -04:00
Serhiy Storchaka ad72467bef Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().
Original patch by Xiang Zhang.
2016-10-02 21:30:59 +03:00
Serhiy Storchaka b3648576cd Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().
Original patch by Xiang Zhang.
2016-10-02 21:30:35 +03:00
Serhiy Storchaka cc164232aa Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().
Original patch by Xiang Zhang.
2016-10-02 21:29:26 +03:00
Serhiy Storchaka 2e84de3638 Issue #27358: Optimized merging var-keyword arguments and improved error
message when pass a non-mapping as a var-keyword argument.
2016-10-02 11:07:29 +03:00
Serhiy Storchaka e036ef8fa2 Issue #27358: Optimized merging var-keyword arguments and improved error
message when pass a non-mapping as a var-keyword argument.
2016-10-02 11:06:43 +03:00
Serhiy Storchaka 775a0ea0da Issue #28257: Improved error message when pass a non-iterable as
a var-positional argument.  Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
2016-10-02 10:34:46 +03:00
Serhiy Storchaka 7344285c19 Issue #28257: Improved error message when pass a non-iterable as
a var-positional argument.  Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
2016-10-02 10:33:46 +03:00
Alexander Belopolsky 3e7a3cb903 Issue #28148: Stop using localtime() and gmtime() in the time module.
Introduced platform independent _PyTime_localtime API that is similar
to POSIX localtime_r, but available on all platforms.  Patch by Ed
Schouten.
2016-09-28 17:31:35 -04:00
Alexander Belopolsky 9f518cd01a Merged from 3.6 2016-09-28 17:32:31 -04:00
Serhiy Storchaka 4e3aab7c73 Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
PyMapping_Keys and PyMapping_Values.  Based on patch by Xiang Zhang.
2016-09-26 20:54:24 +03:00
Serhiy Storchaka 4781b59185 Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
PyMapping_Keys and PyMapping_Values.  Based on patch by Xiang Zhang.
2016-09-26 20:53:27 +03:00
Serhiy Storchaka 1d480bea9c Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
PyMapping_Keys and PyMapping_Values.  Based on patch by Xiang Zhang.
2016-09-26 20:52:41 +03:00
Benjamin Peterson 637d1e2b0a merge 3.6 2016-09-20 20:39:44 -07:00