Serhiy Storchaka
9fa4a120f0
Issue #26729 : Fixed __text_signature__ for sorted().
...
Patch by Erik Welch.
2017-01-23 12:30:59 +02:00
Serhiy Storchaka
ad9422559f
Issue #26729 : Fixed __text_signature__ for sorted().
...
Patch by Erik Welch.
2017-01-23 12:30:35 +02:00
Serhiy Storchaka
3a1042567c
Issue #26729 : Fixed __text_signature__ for sorted().
...
Patch by Erik Welch.
2017-01-23 12:29:47 +02:00
Serhiy Storchaka
228b12edcc
Issue #28999 : Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
...
possible. Patch is writen with Coccinelle.
2017-01-23 09:47:21 +02:00
Serhiy Storchaka
7cf8bebb07
Issue #29331 : Simplified argument parsing in sorted() and list.sort().
2017-01-21 23:05:00 +02:00
Serhiy Storchaka
299dc239fe
Issue #29327 : Fixed a crash when pass the iterable keyword argument to sorted().
2017-01-20 08:35:18 +02:00
Serhiy Storchaka
398ef5c08f
Issue #29327 : Fixed a crash when pass the iterable keyword argument to sorted().
2017-01-20 08:33:06 +02:00
INADA Naoki
bd584f169f
Issue #29296 : convert print() to METH_FASTCALL
...
* Replace PyArg_ParseTupleAndKeywords() with _PyArg_ParseStackAndKeywords()
which is more efficient to parse keywords, since it decodes only keywords
(char*) from UTF-8 once, instead of decoding at each call.
* METH_FASTCALL avoids the creation of a temporary tuple to pass positional
arguments.
Patch written by INADA Naoki, pushed by Victor Stinner.
2017-01-19 12:50:34 +01:00
Victor Stinner
a8cb515a29
Rephrase !PyErr_Occurred() comment: may=>can
...
Issue #29259 .
2017-01-18 14:12:51 +01:00
Victor Stinner
5a60ecaa7a
sorted() uses METH_FASTCALL
2017-01-17 15:17:49 +01:00
Victor Stinner
fda6d0acf0
next() uses FASTCALL
2017-01-17 04:09:14 +01:00
Victor Stinner
84b388bb80
getattr() uses METH_FASTCALL
2017-01-17 03:52:27 +01:00
Serhiy Storchaka
1741441649
Issue #29029 : Speed up processing positional arguments in
...
PyArg_ParseTupleAndKeywords(), _PyArg_ParseTupleAndKeywordsFast() and like.
2017-01-17 10:07:25 +02:00
Victor Stinner
0c4a828cad
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
...
Issue #29286 . Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using "boring" positional arguments.
Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain
consistent with the clinic code.
2017-01-17 02:21:47 +01:00
Victor Stinner
fe54dd8a08
Add _PyArg_UnpackStack() function helper
...
Issue #29286 .
2017-01-17 02:33:55 +01:00
Victor Stinner
259f0e4437
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
...
Issue #29286 . Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using only positional arguments.
2017-01-17 01:35:17 +01:00
Victor Stinner
29d39cc8f5
Add _PyArg_NoStackKeywords() helper function
...
Issue #29286 . Similar to _PyArg_NoKeywords(), but expects a tuple of keyword
names, instead of a dict.
2017-01-17 01:40:01 +01:00
Victor Stinner
6518a93cb1
Add _PyArg_ParseStack() helper function
...
Issue #29286 . Function similar to PyArg_ParseTuple(), but uses a C array of
PyObject* to pass arguments. Don't support the compatibility mode.
2017-01-17 01:29:49 +01:00
Victor Stinner
3e1fad6913
Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords
...
Issue #29286 .
2017-01-17 01:29:01 +01:00
Victor Stinner
c0083fc47d
Rename keywords to kwargs in getargs.c
...
Issue #29029 . Patch written by Serhiy Storchaka.
2017-01-17 00:37:42 +01:00
Victor Stinner
80ab22fa2c
Cleanup getargs.c
...
Factorize argument checks in:
* vgetargskeywordsfast()
* vgetargskeywordsfast_impl()
2017-01-16 23:16:47 +01:00
Victor Stinner
773dc6dd06
__build_class__() builtin uses METH_FASTCALL
2017-01-16 23:46:26 +01:00
INADA Naoki
015bce64b3
Issue #26110 : Add document for LOAD_METHOD and CALL_METHOD opcode.
...
Changed stack layout bit for "easy to explain."
2017-01-16 17:23:30 +09:00
Victor Stinner
231d1f3439
_PyEval_EvalCodeWithName(): remove redundant check
...
Replace the runtime check with an assertion (just in case).
2017-01-11 02:12:06 +01:00
Victor Stinner
415c5107be
Inline call_function()
...
Issue #29227 : Inline call_function() into _PyEval_EvalFrameDefault() using
Py_LOCAL_INLINE to reduce the stack consumption.
It reduces the stack consumption, bytes per call, before => after:
test_python_call: 1152 => 1040 (-112 B)
test_python_getitem: 1008 => 976 (-32 B)
test_python_iterator: 1232 => 1120 (-112 B)
=> total: 3392 => 3136 (- 256 B)
2017-01-11 00:54:57 +01:00
Victor Stinner
035ba5da3e
Issue #29157 : Prefer getrandom() over getentropy()
...
Copy and then adapt Python/random.c from default branch. Difference between 3.5
and default branches:
* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK
* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and
remembers that getrandom() doesn't work.
* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
works in non-blocking mode on Python 3.5
2017-01-09 11:18:53 +01:00
Victor Stinner
ff558f5aba
Issue #29157 : Prefer getrandom() over getentropy()
...
* dev_urandom() now calls py_getentropy(). Prepare the fallback to support
getentropy() failure and falls back on reading from /dev/urandom.
* Simplify dev_urandom(). pyurandom() is now responsible to call getentropy()
or getrandom(). Enhance also dev_urandom() and pyurandom() documentation.
* getrandom() is now preferred over getentropy(). The glibc 2.24 now implements
getentropy() on Linux using the getrandom() syscall. But getentropy()
doesn't support non-blocking mode. Since getrandom() is tried first, it's not
more needed to explicitly exclude getentropy() on Solaris. Replace:
"if defined(HAVE_GETENTROPY) && !defined(sun)"
with "if defined(HAVE_GETENTROPY)"
* Enhance py_getrandom() documentation. py_getentropy() now supports ENOSYS,
EPERM & EINTR
2017-01-07 00:07:45 +01:00
Victor Stinner
b27df6faa5
Issue #29157 : enhance py_getrandom() documentation
2017-01-06 11:39:15 +01:00
Victor Stinner
de2f1ea124
py_getentropy() now supports ENOSYS, EPERM & EINTR
...
Issue #29157 .
2017-01-06 11:33:18 +01:00
Victor Stinner
2f7964393d
Issue #29157 : getrandom() is now preferred over getentropy()
...
The glibc now implements getentropy() on Linux using the getrandom() syscall.
But getentropy() doesn't support non-blocking mode.
Since getrandom() is tried first, it's not more needed to explicitly exclude
getentropy() on Solaris. Replace:
if defined(HAVE_GETENTROPY) && !defined(sun)
with
if defined(HAVE_GETENTROPY)
2017-01-06 11:26:01 +01:00
Victor Stinner
a49a2078e8
Issue #29157 : Simplify dev_urandom()
...
pyurandom() is now responsible to call getentropy() or getrandom().
Enhance also dev_urandom() and pyurandom() documentation.
2017-01-06 11:17:52 +01:00
Victor Stinner
dcdb60e4b3
Issue #29157 : dev_urandom() now calls py_getentropy()
...
Prepare the fallback to support getentropy() failure and falls back on reading
from /dev/urandom.
2017-01-06 11:16:20 +01:00
Victor Stinner
865a0f621f
Optimize _PyFunction_FastCallDict() when kwargs is {}
...
Issue #28839 : Optimize _PyFunction_FastCallDict() when kwargs is an empty
dictionary, avoid the creation of an useless empty tuple.
2017-01-03 02:01:42 +01:00
Benjamin Peterson
646bf754e3
merge 3.6 ( #29057 )
2017-01-01 22:30:35 -06:00
Benjamin Peterson
46322587ec
merge 3.5 ( #29057 )
2017-01-01 22:30:26 -06:00
Benjamin Peterson
493ac1bbe0
only include sys/random.h if it seems like it might have something useful ( #29057 )
2017-01-01 22:29:36 -06:00
Benjamin Peterson
6784be1d00
merge 3.6
2017-01-01 22:08:51 -06:00
Benjamin Peterson
5848e72ee1
merge 3.5
2017-01-01 22:08:44 -06:00
Benjamin Peterson
4365833d11
merge 3.4
2017-01-01 22:08:33 -06:00
Benjamin Peterson
b6e2142b0c
merge 3.3
2017-01-01 22:07:37 -06:00
Benjamin Peterson
e527dd34bc
ring in 2017 for Python
2017-01-01 22:04:13 -06:00
INADA Naoki
9c15776fac
Issue #29049 : Remove unnecessary Py_DECREF
2016-12-26 18:52:46 +09:00
INADA Naoki
6a3cedf8dd
Issue #29049 : Fix refleak introduced by f5eb0c4f5d37.
2016-12-26 18:01:46 +09:00
INADA Naoki
5a625d0aa6
Issue #29049 : Call _PyObject_GC_TRACK() lazily when calling Python function.
...
Calling function is up to 5% faster.
2016-12-24 20:19:08 +09:00
Benjamin Peterson
38f225dd48
merge 3.6 ( #28932 )
2016-12-19 23:55:24 -08:00
Benjamin Peterson
b0eb986eb2
merge 3.5 ( #28932 )
2016-12-19 23:54:57 -08:00
Benjamin Peterson
fb2ae15c67
add a specific configure check for sys/random.h ( closes #28932 )
2016-12-19 23:54:25 -08:00
Martin Panter
b46edf35f3
Issue #25677 : Merge SyntaxError caret positioning from 3.6
2016-12-19 06:46:12 +00:00
Martin Panter
619555d77b
Issue #25677 : Merge SyntaxError caret positioning from 3.5
2016-12-19 06:46:01 +00:00
Serhiy Storchaka
5bb8b9134b
Issue #18896 : Python function can now have more than 255 parameters.
...
collections.namedtuple() now supports tuples with more than 255 elements.
2016-12-16 19:19:02 +02:00
Serhiy Storchaka
5ab81d787f
Issue #28959 : Added private macro PyDict_GET_SIZE for retrieving the size of dict.
2016-12-16 16:18:57 +02:00
Xavier de Gaye
31eaf49ed9
Merge 3.6.
2016-12-15 21:01:52 +01:00
Xavier de Gaye
76febd0792
Issue #26919 : On Android, operating system data is now always encoded/decoded
...
to/from UTF-8, instead of the locale encoding to avoid inconsistencies with
os.fsencode() and os.fsdecode() which are already using UTF-8.
2016-12-15 20:59:58 +01:00
Victor Stinner
bc08ab4598
Add _PY_FASTCALL_SMALL_STACK constant
...
Issue #28870 : Add a new _PY_FASTCALL_SMALL_STACK constant, size of "small
stacks" allocated on the C stack to pass positional arguments to
_PyObject_FastCall().
_PyObject_Call_Prepend() now uses a small stack of 5 arguments (40 bytes)
instead of 8 (64 bytes), since it is modified to use _PY_FASTCALL_SMALL_STACK.
2016-12-15 12:40:53 +01:00
Yury Selivanov
f2392133eb
Issue #26110 : Add LOAD_METHOD/CALL_METHOD opcodes.
...
Special thanks to INADA Naoki for pushing the patch through
the last mile, Serhiy Storchaka for reviewing the code, and to
Victor Stinner for suggesting the idea (originally implemented
in the PyPy project).
2016-12-13 19:03:51 -05:00
Steve Dower
21e033466b
Issue #28896 : Disable WindowsRegistryFinder by default.
2016-12-12 11:19:03 -08:00
Steve Dower
10beb3cfef
Issue #28896 : Disable WindowsRegistryFinder by default.
2016-12-12 11:17:59 -08:00
Serhiy Storchaka
0f6373c34f
Issue #28739 : f-string expressions no longer accepted as docstrings and
...
by ast.literal_eval() even if they do not include subexpressions.
2016-12-11 19:39:36 +02:00
Serhiy Storchaka
4cc30ae313
Issue #28739 : f-string expressions no longer accepted as docstrings and
...
by ast.literal_eval() even if they do not include subexpressions.
2016-12-11 19:37:19 +02:00
Serhiy Storchaka
26817a8490
Issue #28512 : Fixed setting the offset attribute of SyntaxError by
...
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
2016-12-11 14:44:21 +02:00
Serhiy Storchaka
8114f21668
Issue #28512 : Fixed setting the offset attribute of SyntaxError by
...
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
2016-12-11 14:43:18 +02:00
Serhiy Storchaka
8b58339eb2
Issue #28512 : Fixed setting the offset attribute of SyntaxError by
...
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
2016-12-11 14:39:01 +02:00
Martin Panter
ca3263c50c
Issue #25677 : Correct syntax error caret for indented blocks.
...
Based on patch by Michael Layzell.
2016-12-11 00:18:36 +00:00
Victor Stinner
59a73276e9
Backed out changeset 99c34e47348b
...
The change broke test_gdb.
2016-12-09 18:51:13 +01:00
Victor Stinner
22f18750a5
Issue #20185 : Convert _warnings.warn() to Argument Clinic
...
Fix warn_explicit(): interpret source=None as source=NULL.
2016-12-09 18:08:18 +01:00
Victor Stinner
0ca246c5e7
Inline PyEval_EvalFrameEx() in callers
...
The PEP 523 modified PyEval_EvalFrameEx(): it's now an indirection to
interp->eval_frame().
Inline the call in performance critical code. Leave PyEval_EvalFrame()
unchanged, this function is only kept for backward compatibility.
2016-12-09 17:12:17 +01:00
Victor Stinner
55ba38a480
Use _PyObject_CallMethodIdObjArgs()
...
Issue #28915 : Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() in various modules when the format string was
only made of "O" formats, PyObject* arguments.
_PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and
doesn't have to parse a format string.
2016-12-09 16:09:30 +01:00
Victor Stinner
7e42541d08
Use _PyObject_CallMethodIdObjArgs()
...
Issue #28915 : Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() when the format string only use the format 'O'
for objects, like "(O)".
_PyObject_CallMethodIdObjArgs() avoids the code to parse a format string and
avoids the creation of a temporary tuple.
2016-12-09 00:36:19 +01:00
Victor Stinner
e9abde4642
Add _Py_VaBuildStack() function
...
Issue #28915 : Similar to Py_VaBuildValue(), but work on a C array of PyObject*,
instead of creating a tuple.
2016-12-09 00:29:49 +01:00
Victor Stinner
b551b6c9f0
modsupport: replace int with Py_ssize_t
...
Issue #28915 : Py_ssize_t type is better for indexes. The compiler might emit
more efficient code for i++. Py_ssize_t is the type of a PyTuple index for
example.
Replace also "int endchar" with "char endchar".
2016-12-09 00:27:22 +01:00
Victor Stinner
e9aae2dcc5
modsupport: replace int with Py_ssize_t
...
Issue #28915 .
2016-12-09 00:24:47 +01:00
Victor Stinner
f17c3de263
Use _PyObject_CallNoArg()
...
Replace:
PyObject_CallFunctionObjArgs(callable, NULL)
with:
_PyObject_CallNoArg(callable)
2016-12-06 18:46:19 +01:00
Victor Stinner
a5ed5f000a
Use _PyObject_CallNoArg()
...
Replace:
PyObject_CallObject(callable, NULL)
with:
_PyObject_CallNoArg(callable)
2016-12-06 18:45:50 +01:00
Victor Stinner
2d0eb65f45
Uniformize argument names of "call" functions
...
Issue #28838 : Rename parameters of the "calls" functions of the Python C API.
* Rename 'callable_object' and 'func' to 'callable': any Python callable object
is accepted, not only Python functions
* Rename 'method' and 'nameid' to 'name' (method name)
* Rename 'o' to 'obj'
* Move, fix and update documentation of PyObject_CallXXX() functions
in abstract.h
* Update also the documentaton of the C API (update parameter names)
2016-12-06 16:27:24 +01:00
Victor Stinner
7bfb42d5b7
Issue #28858 : Remove _PyObject_CallArg1() macro
...
Replace
_PyObject_CallArg1(func, arg)
with
PyObject_CallFunctionObjArgs(func, arg, NULL)
Using the _PyObject_CallArg1() macro increases the usage of the C stack, which
was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this
issue.
2016-12-05 17:04:32 +01:00
Nick Coghlan
d77e5b7211
Merge #23722 from 3.6
2016-12-05 16:59:22 +10:00
Nick Coghlan
19d246745d
Issue #23722 : improve __classcell__ compatibility
...
Handling zero-argument super() in __init_subclass__ and
__set_name__ involved moving __class__ initialisation to
type.__new__. This requires cooperation from custom
metaclasses to ensure that the new __classcell__ entry
is passed along appropriately.
The initial implementation of that change resulted in abruptly
broken zero-argument super() support in metaclasses that didn't
adhere to the new requirements (such as Django's metaclass for
Model definitions).
The updated approach adopted here instead emits a deprecation
warning for those cases, and makes them work the same way they
did in Python 3.5.
This patch also improves the related class machinery documentation
to cover these details and to include more reader-friendly
cross-references and index entries.
2016-12-05 16:47:55 +10:00
Victor Stinner
de4ae3d486
Backed out changeset b9c9691c72c5
...
Issue #28858 : The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
2016-12-04 22:59:09 +01:00
Victor Stinner
d6958ac6c0
Add sys.getandroidapilevel()
...
Issue #28740 : Add sys.getandroidapilevel(): return the build time
API version of Android as an integer.
Function only available on Android.
2016-12-02 01:13:46 +01:00
Victor Stinner
4778eab1f2
Replace PyObject_CallFunction() with fastcall
...
Replace
PyObject_CallFunction(func, "O", arg)
and
PyObject_CallFunction(func, "O", arg, NULL)
with
_PyObject_CallArg1(func, arg)
Replace
PyObject_CallFunction(func, NULL)
with
_PyObject_CallNoArg(func)
_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
2016-12-01 14:51:04 +01:00
Victor Stinner
842cfff321
WITH_CLEANUP_START uses fastcall
...
Modify WITH_CLEANUP_START bytecode: replace PyObject_CallFunctionObjArgs() with
_PyObject_FastCall().
2016-12-01 14:45:31 +01:00
Victor Stinner
27580c1fb5
Replace PyObject_CallFunctionObjArgs() with fastcall
...
* PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func)
* PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg)
PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires
extra work to "parse" C arguments to build a C array of PyObject*.
_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
This change is part of the fastcall project. The change on listsort() is
related to the issue #23507 .
2016-12-01 14:43:22 +01:00
Serhiy Storchaka
3d85fae91f
Issue #28823 : Simplified compiling with opcode BUILD_MAP_UNPACK.
2016-11-28 20:56:37 +02:00
Victor Stinner
b69ee8c386
call_function(): document PyMethod optimization
2016-11-28 18:32:31 +01:00
Victor Stinner
048afd98b3
Remove CALL_PROFILE special build
...
Issue #28799 :
* Remove the PyEval_GetCallStats() function.
* Deprecate the untested and undocumented sys.callstats() function.
* Remove the CALL_PROFILE special build
Use the sys.setprofile() function, cProfile or profile module to profile
function calls.
2016-11-28 11:59:04 +01:00
Serhiy Storchaka
214678e44b
Issue #12844 : More than 255 arguments can now be passed to a function.
2016-11-28 10:52:05 +02:00
Victor Stinner
ed6de7345e
Merge 3.6
2016-11-24 22:33:49 +01:00
Victor Stinner
f7d199ff32
Fix _PyGen_yf()
...
Issue #28782 : Fix a bug in the implementation ``yield from`` when checking
if the next instruction is YIELD_FROM. Regression introduced by WORDCODE
(issue #26647 ).
Reviewed by Serhiy Storchaka and Yury Selivanov.
2016-11-24 22:33:01 +01:00
Raymond Hettinger
3fa28fd075
merge
2016-11-22 11:50:56 -08:00
Raymond Hettinger
64e2f9ac86
Issue #27100 : Fix ref leak
2016-11-22 11:50:40 -08:00
Raymond Hettinger
9af740b99a
merge
2016-11-21 17:24:58 -08:00
Raymond Hettinger
a3fec1543d
Issue #27100 : With statement reports missing __enter__ before __exit__. (Contributed by Jonathan Ellington.)
2016-11-21 17:24:23 -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
85b0f5beb1
Added the const qualifier to char* variables that refer to readonly internal
...
UTF-8 represenatation of Unicode objects.
2016-11-20 10:16:47 +02:00
Serhiy Storchaka
a98c4a984b
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
...
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
2016-11-20 09:13:40 +02:00
Serhiy Storchaka
06515833fe
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
...
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
2016-11-20 09:13:07 +02:00
Serhiy Storchaka
f6f1591808
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:48:30 +02:00
Serhiy Storchaka
e20973926a
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:48:07 +02:00
Serhiy Storchaka
144f77a981
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:47:21 +02:00
Xavier de Gaye
002d61fea7
Issue #28746 : Merge 3.6
2016-11-19 16:20:31 +01:00
Xavier de Gaye
ec5d3cd533
Issue #28746 : Fix the set_inheritable() file descriptor method on platforms
...
that do not have the ioctl FIOCLEX and FIONCLEX commands
2016-11-19 16:19:29 +01: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
Xavier de Gaye
afa94a5a3e
Issue #26920 : Merge 3.6
2016-11-16 07:26:10 +01:00
Xavier de Gaye
b445ad7b04
Issue #26920 : Fix not getting the locale's charset upon initializing the interpreter,
...
on platforms that do not have langinfo
2016-11-16 07:24:20 +01:00
Victor Stinner
d5f599a392
Merge 3.6
2016-11-15 09:12:36 +01:00
Victor Stinner
f9cca365c7
Fix warn_invalid_escape_sequence()
...
Issue #28691 : Fix warn_invalid_escape_sequence(): handle correctly
DeprecationWarning raised as an exception. First clear the current exception to
replace the DeprecationWarning exception with a SyntaxError exception.
Unit test written by Serhiy Storchaka.
2016-11-15 09:12:10 +01:00
Ned Deily
cf767ab4da
Issue #28676 : merge from 3.6
2016-11-12 16:39:52 -05:00
Ned Deily
7d895d3c37
Issue #28676 : merge from 3.5
2016-11-12 16:38:03 -05:00
Ned Deily
7ae4112649
Issue #28676 : Prevent missing 'getentropy' declaration warning on macOS.
...
Patch by Gareth Rees.
2016-11-12 16:35:48 -05:00
Raymond Hettinger
c32f9db846
Issue #28665 : Use macro form of PyCell_GET/SET
2016-11-12 04:10:35 -05:00
Raymond Hettinger
b2b154374d
merge
2016-11-11 04:32:11 -08:00
Raymond Hettinger
13527123a1
Issue #28665 : Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF giving a 40% speedup.
2016-11-11 04:31:18 -08: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
Victor Stinner
0cae609847
Use PyThreadState_GET() in performance critical code
...
It seems like _PyThreadState_UncheckedGet() is not inlined as expected, even
when using gcc -O3.
2016-11-11 01:43:56 +01:00
Yury Selivanov
228722ad20
Merge 3.6 (issue #26182 )
2016-11-08 16:54:39 -05:00
Yury Selivanov
1a9d687a49
Issue #26182 : Fix ia refleak in code that raises DeprecationWarning.
2016-11-08 16:54:18 -05:00
Serhiy Storchaka
818b5cc6db
Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.
...
Every opcode should end with DISPATCH() or goto error.
2016-11-08 23:14:00 +02:00
Serhiy Storchaka
4678b2f448
Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.
...
Every opcode should end with DISPATCH() or goto error.
2016-11-08 23:13:36 +02:00
Serhiy Storchaka
70b72f0f96
Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.
...
Every opcode should end with DISPATCH() or goto error.
2016-11-08 23:12:46 +02:00
Yury Selivanov
0ee446c894
Merge 3.6 (issue #27243 )
2016-11-08 15:15:42 -05:00
Yury Selivanov
2edd8a1e2c
Issue #27243 : Change PendingDeprecationWarning -> DeprecationWarning.
...
As it was agreed in the issue, __aiter__ returning an awaitable
should result in PendingDeprecationWarning in 3.5 and in
DeprecationWarning in 3.6.
2016-11-08 15:13:07 -05:00
Eric V. Smith
9a8e569865
Merge from 3.6.
2016-11-07 17:57:48 -05:00
Eric V. Smith
9b88fdf4f0
Fixed issue #28633 : segfault when concatenating bytes literal and f-string.
2016-11-07 17:54:01 -05:00
Ned Deily
7d76c906f7
Issue #28616 : merge from 3.5
2016-11-04 17:07:06 -04:00
Ned Deily
da4887a88d
Issue #28616 : Correct help for sys.version_info releaselevel component.
...
Patch by Anish Tambe.
2016-11-04 17:03:34 -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
Ned Deily
e37c1cbf66
Issue #28616 : merge from 3.6
2016-11-04 17:07:47 -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
Serhiy Storchaka
42bcbf76f7
Issue #28517 : Fixed of-by-one error in the peephole optimizer that caused
...
keeping unreachable code.
2016-10-25 09:32:04 +03:00
Serhiy Storchaka
7db3c48833
Issue #28517 : Fixed of-by-one error in the peephole optimizer that caused
...
keeping unreachable code.
2016-10-25 09:30:43 +03:00
Serhiy Storchaka
cb33a01bbc
Issue #28510 : Clean up decoding error handlers.
...
Since PyUnicodeDecodeError_GetObject() always returns bytes, following
PyBytes_AsString() can be replaced with PyBytes_AS_STRING().
2016-10-23 09:44:50 +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
Serhiy Storchaka
c4189a04a8
Issue #28410 : Keep the traceback of original exception in _PyErr_ChainExceptions().
2016-10-21 16:21:02 +03:00
Serhiy Storchaka
b0426cd8c4
Issue #28410 : Keep the traceback of original exception in _PyErr_ChainExceptions().
2016-10-21 16:20:43 +03:00
Serhiy Storchaka
9e373be1bc
Issue #28410 : Keep the traceback of original exception in _PyErr_ChainExceptions().
2016-10-21 16:19:59 +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
Victor Stinner
d65f42a132
Issue #21955 : Please don't try to optimize int+int
2016-10-20 12:18:10 +02:00
Serhiy Storchaka
60c838b27c
Issue #23782 : Fixed possible memory leak in _PyTraceback_Add() and exception
...
loss in PyTraceBack_Here().
2016-10-18 13:27:54 +03:00
Serhiy Storchaka
df0fd74ae8
Issue #23782 : Fixed possible memory leak in _PyTraceback_Add() and exception
...
loss in PyTraceBack_Here().
2016-10-18 13:26:25 +03:00
Serhiy Storchaka
04eb777279
Issue #23782 : Fixed possible memory leak in _PyTraceback_Add() and exception
...
loss in PyTraceBack_Here().
2016-10-18 13:23:18 +03:00
Raymond Hettinger
4186222e63
Minor fix-up to apply the stack adjustment macros consistent with the other opcodes
2016-10-15 19:03:06 -07:00
Serhiy Storchaka
5665301bae
Issue #28257 : Improved error message when pass a non-mapping as a var-keyword
...
argument.
2016-10-07 23:32:41 +03:00
Serhiy Storchaka
579de19228
Issue #24098 : Fixed possible crash when AST is changed in process of
...
compiling it.
2016-10-07 21:56:24 +03:00
Serhiy Storchaka
5e80855af3
Issue #24098 : Fixed possible crash when AST is changed in process of
...
compiling it.
2016-10-07 21:55:49 +03:00
Serhiy Storchaka
cf3806026b
Issue #24098 : Fixed possible crash when AST is changed in process of
...
compiling it.
2016-10-07 21:51:28 +03:00
Berker Peksag
419968c235
Issue #27358 : Merge from 3.6
2016-10-02 13:08:47 +03:00
Berker Peksag
8e9045d0d8
Issue #27358 : Fix typo in error message
2016-10-02 13:08:25 +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
Serhiy Storchaka
be9cddb302
Issue #27942 : String constants now interned recursively in tuples and frozensets.
2016-09-30 10:36:15 +03:00
Serhiy Storchaka
3738c2d8ae
Issue #27942 : String constants now interned recursively in tuples and frozensets.
2016-09-30 10:23:01 +03:00
Serhiy Storchaka
00a0fc1144
Issue #27942 : String constants now interned recursively in tuples and frozensets.
2016-09-30 10:07:26 +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
c019158a4c
Issue #27703 : Got rid of unnecessary NULL checks in do_raise() in release mode.
...
Patch by Xiang Zhang.
2016-09-27 11:37:10 +03:00
Christian Heimes
517507c6d5
Issue #28100 : Refactor error messages, patch by Ivan Levkivskyi
2016-09-23 20:26:30 +02:00
Serhiy Storchaka
208bbd29d3
Silence GCC warning.
...
The code was correct, but GCC is not enough clever.
2016-09-22 19:59:46 +03:00
Serhiy Storchaka
63dc548109
Issue #28086 : Single var-positional argument of tuple subtype was passed
...
unscathed to the C-defined function. Now it is converted to exact tuple.
2016-09-22 19:41:20 +03:00
Christian Heimes
2f2fee19ec
va_end() all va_copy()ed va_lists.
2016-09-21 11:37:27 +02:00
Benjamin Peterson
0c21214f3e
replace usage of Py_VA_COPY with the (C99) standard va_copy
2016-09-20 20:39:33 -07:00
Victor Stinner
75024c6589
(Merge 3.5) Catch EPERM error in py_getrandom()
...
Issue #27955 : Fallback on reading /dev/urandom device when the getrandom()
syscall fails with EPERM, for example when blocked by SECCOMP.
2016-09-20 22:49:52 +02:00
Victor Stinner
6d8bc46cc0
Catch EPERM error in py_getrandom()
...
Issue #27955 : Fallback on reading /dev/urandom device when the getrandom()
syscall fails with EPERM, for example when blocked by SECCOMP.
2016-09-20 22:46:02 +02:00
Victor Stinner
af59732102
Cleanup random.c
...
Issue #27955 : modify py_getrnadom() and dev_urandom()
* Add comments from Python 3.7
* PEP 7 style: add {...}
2016-09-20 22:26:18 +02:00
Benjamin Peterson
286987bbac
delete dead code
2016-09-18 23:49:51 -07:00
Steve Dower
74f4af7ac3
Issue #27932 : Prevent memory leak in win32_ver().
2016-09-17 17:27:48 -07:00
Steve Dower
1ec262be80
Issue #27932 : Prevent memory leak in win32_ver().
2016-09-17 17:25:42 -07:00
Yury Selivanov
8987c9d219
Issue #26182 : Raise DeprecationWarning for improper use of async/await keywords
2016-09-15 12:50:23 -04:00
Benjamin Peterson
995026a8a9
merge 3.5 ( #28119 )
2016-09-13 22:46:15 -07:00
Benjamin Peterson
59e5e0dca2
improve type-safe of and prevent double-frees in get_locale_info ( #28119 )
2016-09-13 22:43:45 -07:00
Christian Heimes
f051e43b22
Issue #28126 : Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().
2016-09-13 20:22:02 +02:00
Victor Stinner
57f91ac95a
Document kwnames in _PyObject_FastCallKeywords() and _PyStack_AsDict()
...
Issue #27213 .
2016-09-12 13:37:07 +02:00
Victor Stinner
eece2229e2
Issue #27213 : Fix reference leaks
2016-09-12 11:16:37 +02:00
Eric V. Smith
09835dcdbb
Make an f-string error message more exact and consistent.
2016-09-11 18:58:20 -04:00
Serhiy Storchaka
b72810583e
Issue #27213 : Fixed different issues with reworked CALL_FUNCTION* opcodes.
...
* BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK_WITH_CALL no longer generated with
single tuple or dict.
* Restored more informative error messages for incorrect var-positional and
var-keyword arguments.
* Removed code duplications in _PyEval_EvalCodeWithName().
* Removed redundant runtime checks and parameters in _PyStack_AsDict().
* Added a workaround and enabled previously disabled test in test_traceback.
* Removed dead code from the dis module.
2016-09-12 00:52:40 +03:00
Guido van Rossum
015d874626
Issue #28076 : Variable annotations should be mangled for private names.
...
By Ivan Levkivskyi.
2016-09-11 09:45:24 -07:00
Serhiy Storchaka
a1e9ab34a9
Fixed refactoring bug in dd046963bd42 (issue27129).
2016-09-11 15:19:12 +03:00
Serhiy Storchaka
ab8740058a
Issue #27129 : Replaced wordcode related magic constants with macros.
2016-09-11 13:48:15 +03:00
Nick Coghlan
944368e1cc
Issue #23722 : Initialize __class__ from type.__new__()
...
The __class__ cell used by zero-argument super() is now initialized
from type.__new__ rather than __build_class__, so class methods
relying on that will now work correctly when called from metaclass
methods during class creation.
Patch by Martin Teichmann.
2016-09-11 14:45:49 +10:00
Benjamin Peterson
4eef505064
Backed out changeset 3934e070c9db
2016-09-10 17:04:36 -07:00
Victor Stinner
54de2b1edd
Fix check_force_ascii()
...
Issue #27938 : Normalize aliases of the ASCII encoding, because
_Py_normalize_encoding() now correctly normalize encoding names.
2016-09-09 23:11:52 -07:00
Łukasz Langa
fef7e94fa1
Don't run garbage collection on interpreter exit if it was explicitly disabled
...
by the user.
2016-09-09 21:47:46 -07:00
Victor Stinner
c7454ff5fc
Issue #27810 : Fix getargs.c compilation on Windows
2016-09-09 20:56:52 -07:00
Benjamin Peterson
819a46f33a
fix export of size_t parse stack function
2016-09-09 20:45:06 -07:00
Victor Stinner
37e4ef7b17
Issue #27810 : Rerun Argument Clinic on all modules
2016-09-09 20:00:13 -07:00
Victor Stinner
f0ccbbbc57
Emit METH_FASTCALL code in Argument Clinic
...
Issue #27810 :
* Modify vgetargskeywordsfast() to work on a C array of PyObject* rather than
working on a tuple directly.
* Add _PyArg_ParseStack()
* Argument Clinic now emits code using the new METH_FASTCALL calling convention
2016-09-09 17:40:38 -07:00
Victor Stinner
a9efb2f56e
Add METH_FASTCALL calling convention
...
Issue #27810 : Add a new calling convention for C functions:
PyObject* func(PyObject *self, PyObject **args,
Py_ssize_t nargs, PyObject *kwnames);
Where args is a C array of positional arguments followed by values of keyword
arguments. nargs is the number of positional arguments, kwnames are keys of
keyword arguments. kwnames can be NULL.
2016-09-09 17:40:22 -07:00
Benjamin Peterson
eb0dfa9251
make invalid_comma_and_underscore a real prototype
2016-09-09 20:14:05 -07:00
Eric V. Smith
89e1b1aae0
Issue 27080: PEP 515: add '_' formatting option.
2016-09-09 23:06:47 -04:00
Benjamin Peterson
f5781958af
add dtrace inline stubs
2016-09-09 19:48:47 -07:00
Benjamin Peterson
4ba5c88a3f
just start with an int rather than casting
2016-09-09 19:31:12 -07:00
Eric V. Smith
451d0e38fc
Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces.
2016-09-09 21:56:20 -04:00
Łukasz Langa
a785c87d6e
DTrace support: function calls, GC activity, line execution
...
Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc.
Largely based by an initial patch by Jesús Cea Avión, with some
influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's
unification patch.
Things deliberately left out for simplicity:
- ustack helpers, I have no way of testing them at this point since
they are Solaris-specific
- PyFrameObject * in function__entry/function__return, this is
SystemTap-specific
- SPARC support
- dynamic tracing
- sys module dtrace facility introspection
All of those might be added later.
2016-09-09 17:37:37 -07:00
Benjamin Peterson
75f94a7dff
remove more READ_TIMESTAMP
2016-09-09 15:03:18 -07:00
Benjamin Peterson
1cfe1d1f53
remove READ_TIMESTAMP macro
2016-09-09 15:02:11 -07:00
Benjamin Peterson
4fd64b9a6a
remove ceval timestamp support
2016-09-09 14:57:58 -07:00
Brett Cannon
a721abac29
Issue #26331 : Implement the parsing part of PEP 515.
...
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Victor Stinner
ae8b69c410
Issue #27810 : Add _PyCFunction_FastCallKeywords()
...
Use _PyCFunction_FastCallKeywords() in ceval.c: it allows to remove a lot of
code from ceval.c which was only used to call C functions.
2016-09-09 14:07:44 -07:00
Eric Snow
50fd89806f
Issue #24320 : Drop an old setuptools-induced hack.
2016-09-09 13:30:54 -07:00
Victor Stinner
d873572095
Add _PyObject_FastCallKeywords()
...
Issue #27830 : Add _PyObject_FastCallKeywords(): avoid the creation of a
temporary dictionary for keyword arguments.
Other changes:
* Cleanup call_function() and fast_function() (ex: rename nk to nkwargs)
* Remove now useless do_call(), replaced with _PyObject_FastCallKeywords()
2016-09-09 12:36:44 -07:00
Victor Stinner
f9b760f48a
Rework CALL_FUNCTION* opcodes
...
Issue #27213 : Rework CALL_FUNCTION* opcodes to produce shorter and more
efficient bytecode:
* CALL_FUNCTION now only accepts position arguments
* CALL_FUNCTION_KW accepts position arguments and keyword arguments, but keys
of keyword arguments are packed into a constant tuple.
* CALL_FUNCTION_EX is the most generic, it expects a tuple and a dict for
positional and keyword arguments.
CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW opcodes have been removed.
2 tests of test_traceback are currently broken: skip test, the issue #28050 was
created to track the issue.
Patch by Demur Rumed, design by Serhiy Storchaka, reviewed by Serhiy Storchaka
and Victor Stinner.
2016-09-09 10:17:08 -07:00
Yury Selivanov
52c4e7cc84
Issue #28008 : Implement PEP 530 -- asynchronous comprehensions.
2016-09-09 10:36:01 -07:00
Guido van Rossum
6cff8744a0
Issue #27999 : Make "global after use" a SyntaxError, and ditto for nonlocal.
...
Patch by Ivan Levkivskyi.
2016-09-09 09:36:26 -07:00
Yury Selivanov
87672d777a
Issue #28003 : Fix a compiler warning
2016-09-09 00:05:42 -07:00
Yury Selivanov
50c584f50b
ceval: tighten the code of STORE_ANNOTATION
2016-09-08 23:38:21 -07:00
Yury Selivanov
eb6364557f
Issue #28003 : Implement PEP 525 -- Asynchronous Generators.
2016-09-08 22:01:51 -07:00
Yury Selivanov
f8cb8a16a3
Issue #27985 : Implement PEP 526 -- Syntax for Variable Annotations.
...
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
Christian Heimes
a78b627e2b
Fix potential NULL pointer dereference in _imp_create_builtin
...
PyModule_GetDef() can return NULL. Let's check the return value properly
like in the other five cases.
CID 1299590
2016-09-09 00:25:03 +02:00
Eric Snow
4f29e75289
Issue #24254 : Drop cls.__definition_order__.
2016-09-08 15:11:11 -07:00
Christian Heimes
45af0c83da
Fix potential NULL pointer dereference in update_symbols()
...
symtable_analyze() calls analyze_block() with bound=NULL. Theoretically
that NULL can be passed down to update_symbols(). update_symbols() may
deference NULL and pass it to PySet_Contains()
2016-09-09 00:22:28 +02:00
Raymond Hettinger
4c483ad52b
Merge
2016-09-08 14:45:40 -07:00
Raymond Hettinger
262b6793e0
Issue #26020 : Fix evaluation order for set literals
2016-09-08 14:40:36 -07:00
Martin Panter
0be894b2f6
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
2016-09-07 12:03:06 +00:00
Senthil Kumaran
32d374215a
[backport to 3.5] - issue26896 - Disambiguate uses of "importer" with "finder".
2016-09-07 00:52:20 -07:00
Raymond Hettinger
f0f1c239e4
Issue 27936: Fix inconsistent round() behavior between float and int
2016-09-03 01:55:11 -07:00
Raymond Hettinger
f0afe77c52
Issue #27909 : Fix INCREF for possible NULL value
2016-08-31 08:44:11 -07:00
Steve Dower
3929499914
Issue #1602 : Windows console doesn't input or print Unicode (PEP 528)
...
Closes #17602 : Adds a readline implementation for the Windows console
2016-08-30 21:22:36 -07:00
Steve Dower
940f33a50f
Issue #23524 : Finish removing _PyVerify_fd from sources
2016-09-08 11:21:54 -07:00
Eric Snow
f3fd06a2e4
Issue #28026 : Raise ImportError when exec_module() exists but create_module() is missing.
2016-09-08 11:12:31 -07:00
Steve Dower
cc16be85c0
Issue #27781 : Change file system encoding on Windows to UTF-8 (PEP 529)
2016-09-08 10:35:16 -07:00
Brett Cannon
035a100382
Issue #26667 : Add path-like object support to importlib.util.
2016-09-07 18:39:18 -07:00
Brett Cannon
52794db825
Issue #27911 : Remove some unnecessary error checks in import.c.
...
Thanks to Xiang Zhang for the patch.
2016-09-07 17:00:43 -07:00
Eric Snow
46f97b85a8
Issue #15767 : Use ModuleNotFoundError.
2016-09-07 16:56:15 -07:00
Brett Cannon
5c4de2863b
Add the co_extra field and accompanying APIs to code objects.
...
This completes PEP 523.
2016-09-07 11:16:41 -07:00
Benjamin Peterson
2f8bfef158
replace PY_SIZE_MAX with SIZE_MAX
2016-09-07 09:26:18 -07:00
Victor Stinner
e66987e626
os.urandom() now blocks on Linux
...
Issue #27776 : The os.urandom() function does now block on Linux 3.17 and newer
until the system urandom entropy pool is initialized to increase the security.
This change is part of the PEP 524.
2016-09-06 16:33:52 -07:00
Brett Cannon
eaecc692df
Issue #27974 : Remove importlib._bootstrap._ManageReload.
...
Class was dead code. Thanks to Xiang Zhang for the patch.
2016-09-06 16:20:46 -07:00
Benjamin Peterson
ca47063998
replace Py_(u)intptr_t with the c99 standard types
2016-09-06 13:47:26 -07:00
Benjamin Peterson
9b3d77052f
replace Python aliases for standard integer types with the standard integer types ( #17884 )
2016-09-06 13:24:00 -07:00
Benjamin Peterson
5d75f441ef
dtoa.c: remove code for platforms with 64-bit integers ( #17884 )
2016-09-06 12:44:21 -07:00
Serhiy Storchaka
ea525a2d1a
Issue #27078 : Added BUILD_STRING opcode. Optimized f-strings evaluation.
2016-09-06 22:07:53 +03:00
Benjamin Peterson
4fe55106d1
require standard int types to be defined ( #17884 )
2016-09-06 11:58:01 -07:00
Benjamin Peterson
af580dff4a
replace PY_LONG_LONG with long long
2016-09-06 10:46:49 -07:00
Victor Stinner
3466bde1cc
Avoid calling functions with an empty string as format string
...
Directly pass NULL rather than an empty string.
2016-09-05 18:16:01 -07:00
Victor Stinner
ad8c83ad6b
Avoid inefficient way to call functions without argument
...
Don't pass "()" format to PyObject_CallXXX() to call a function without
argument: pass NULL as the format string instead. It avoids to have to parse a
string to produce 0 argument.
2016-09-05 17:53:15 -07:00
Benjamin Peterson
ed4aa83ff7
require a long long data type ( closes #27961 )
2016-09-05 17:44:18 -07:00
Brett Cannon
3cebf93872
Implement the frame evaluation API aspect of PEP 523.
2016-09-05 15:33:46 -07:00
Larry Hastings
10108a7b9a
Issue #27355 : Removed support for Windows CE. It was never finished,
...
and Windows CE is no longer a relevant platform for Python.
2016-09-05 15:11:23 -07:00
Eric Snow
92a6c170e6
Issue #24254 : Preserve class attribute definition order.
2016-09-05 14:50:11 -07:00
Eric V. Smith
6a4efce7a5
Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
2016-09-03 09:18:34 -04:00
Raymond Hettinger
3b09cd64e0
Merge
2016-09-03 01:55:39 -07:00
Raymond Hettinger
74942c9252
Merge
2016-08-31 08:44:26 -07:00
Raymond Hettinger
15f44ab043
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
2016-08-30 10:47:49 -07:00
Serhiy Storchaka
1f9326196e
Issue #27818 : Speed up parsing width and precision in format() strings for
...
numbers. Patch by Stefan Behnel.
2016-08-29 15:57:26 +03:00
Raymond Hettinger
f74c33ad5c
Merge
2016-08-25 21:12:16 -07:00
Raymond Hettinger
7ea386e56e
Issue 19504: Change "customise" to "customize" American spelling.
2016-08-25 21:11:50 -07:00
Victor Stinner
e90bdb19f2
Issue #27830 : Revert, remove _PyFunction_FastCallKeywords()
2016-08-25 23:26:50 +02:00
Victor Stinner
577e1f8cb4
Add _PyObject_FastCallKeywords()
...
Issue #27830 : Similar to _PyObject_FastCallDict(), but keyword arguments are
also passed in the same C array than positional arguments, rather than being
passed as a Python dict.
2016-08-25 00:29:32 +02:00
Victor Stinner
74319ae219
Use Py_ssize_t type for number of arguments
...
Issue #27848 : use Py_ssize_t rather than C int for the number of function
positional and keyword arguments.
2016-08-25 00:04:09 +02:00
Victor Stinner
cdb5cee980
Issue #27809 : map_next() uses fast call
...
Use a small stack allocated in the C stack for up to 5 iterator functions,
otherwise allocates a stack on the heap memory.
2016-08-24 01:45:13 +02:00
Victor Stinner
f0cba67d0b
Backed out changeset 70f88b097f60 (map_next)
2016-08-24 00:54:47 +02:00
Victor Stinner
a9ba1ab21b
Issue #27809 : map_next() uses fast call
...
Use a small stack allocated in the C stack for up to 5 iterator functions,
otherwise allocates a stack on the heap memory.
2016-08-23 17:56:06 +02:00
Victor Stinner
d1c2a8e2b5
Issue #27809 : builtin___build_class__() uses fast call
2016-08-23 01:34:35 +02:00
Victor Stinner
6e2333dfdf
PyEval_CallObjectWithKeywords() doesn't inc/decref
...
Issue #27809 : PyEval_CallObjectWithKeywords() doesn't increment temporary the
reference counter of the args tuple (positional arguments). The caller already
holds a strong reference to it.
2016-08-23 00:25:01 +02:00
Victor Stinner
f45a56150b
Issue #27809 : PyErr_SetImportError() uses fast call
2016-08-23 00:04:41 +02:00
Victor Stinner
3a84097291
Add _PyErr_CreateException()
...
Issue #27809 : Helper function optimized to create an exception: use fastcall
whenever possible.
2016-08-22 23:59:08 +02:00
Victor Stinner
463b86a881
Issue #27809 : Use _PyObject_FastCallDict()
...
Modify:
* init_subclass()
* builtin___build_class__()
Fix also a bug in init_subclass(): check for super() failure.
2016-08-22 23:33:13 +02:00
Victor Stinner
155ea65e5c
PyEval_CallObjectWithKeywords() uses fast call with kwargs
...
Issue #27809 . _PyObject_FastCallDict() now supports keyword arguments, and so
the args==NULL fast-path can also be used when kwargs is not NULL.
2016-08-22 23:26:00 +02:00
Victor Stinner
2990fa11bc
Issue #27809 : Use _PyObject_FastCallDict()
...
Modify:
* builtin_sorted()
* classmethoddescr_call()
* methoddescr_call()
* wrapperdescr_call()
2016-08-22 23:21:55 +02:00
Victor Stinner
6fea7f7ffc
Issue #27809 : Cleanup _PyEval_EvalCodeWithName()
...
* Rename nm to name
* PEP 7: add { ... } to if/else blocks
2016-08-22 23:17:30 +02:00
Victor Stinner
b900939186
_PyFunction_FastCallDict() supports keyword args
...
Issue #27809 :
* Rename _PyFunction_FastCall() to _PyFunction_FastCallDict()
* Rename _PyCFunction_FastCall() to _PyCFunction_FastCallDict()
* _PyFunction_FastCallDict() now supports keyword arguments
2016-08-22 23:15:44 +02:00
Victor Stinner
559bb6a713
Rename _PyObject_FastCall() to _PyObject_FastCallDict()
...
Issue #27809 :
* Rename _PyObject_FastCall() function to _PyObject_FastCallDict()
* Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1()
macros calling _PyObject_FastCallDict()
2016-08-22 22:48:54 +02:00
Berker Peksag
c98afb7a26
Issue #27587 : Merge from 3.5
2016-08-22 18:07:02 +03:00
Berker Peksag
4b7b565c58
Issue #27587 : Move null pointer check earlier in _PyState_AddModule()
...
This was found by PVS-Studio:
V595 The 'def' pointer was utilized before it was verified
against nullptr. Check lines: 286, 292. pystate.c 286
Initial patch by Christian Heimes.
2016-08-22 18:05:56 +03:00
Victor Stinner
2eedc119c2
Optimize call to Python function without argument
...
Issue #27128 . When a Python function is called with no arguments, but all
parameters have a default value: use default values as arguments for the fast
path.
2016-08-22 12:29:42 +02:00
Victor Stinner
a88b2f4e5e
Fix reference leak in tb_printinternal()
...
Issue #26823 .
2016-08-20 03:05:13 +02:00
Victor Stinner
c3ccaae6f3
sys_pyfile_write_unicode() now uses fast call
...
Issue #27128 .
2016-08-20 01:24:22 +02:00
Victor Stinner
78da82bf3e
call_trampoline() now uses fast call
...
Issue #27128 .
2016-08-20 01:22:57 +02:00
Victor Stinner
71cb64acc2
PyErr_PrintEx() now uses fast call
...
Issue #27128 .
2016-08-20 00:57:43 +02:00
Victor Stinner
df142fdc4b
import_name() now uses fast call
...
Issue #27128 : import_name() now calls _PyObject_FastCall() to avoid the
creation of a temporary tuple.
2016-08-20 00:44:42 +02:00
Victor Stinner
8a31c82093
Fix PyObject_Call() parameter names
...
Issue #27128 : arg=>args, kw=>kwargs.
Same change for PyEval_CallObjectWithKeywords().
2016-08-19 17:12:23 +02:00
Victor Stinner
3f745bf1d9
PyEval_CallObjectWithKeywords() uses fast call
...
Issue #27128 : Modify PyEval_CallObjectWithKeywords() to use
_PyObject_FastCall() when args==NULL and kw==NULL. It avoids the creation of a
temporary empty tuple for positional arguments.
2016-08-19 16:42:42 +02:00
Victor Stinner
9be7e7b52f
Add _PyObject_FastCall()
...
Issue #27128 : Add _PyObject_FastCall(), a new calling convention avoiding a
temporary tuple to pass positional parameters in most cases, but create a
temporary tuple if needed (ex: for the tp_call slot).
The API is prepared to support keyword parameters, but the full implementation
will come later (_PyFunction_FastCall() doesn't support keyword parameters
yet).
Add also:
* _PyStack_AsTuple() helper function: convert a "stack" of parameters to
a tuple.
* _PyCFunction_FastCall(): fast call implementation for C functions
* _PyFunction_FastCall(): fast call implementation for Python functions
2016-08-19 16:11:43 +02:00
Victor Stinner
0a6996d87d
Merge 3.5 (fix raise)
2016-08-18 18:14:15 +02:00
Victor Stinner
eec9331b20
Fix SystemError in "raise" statement
...
Issue #27558 : Fix a SystemError in the implementation of "raise" statement.
In a brand new thread, raise a RuntimeError since there is no active
exception to reraise.
Patch written by Xiang Zhang.
2016-08-18 18:13:10 +02:00
Ned Deily
dc35cda2de
Issue #27594 : Prevent assertion error when running test_ast with coverage
...
enabled: ensure code object has a valid first line number.
Patch suggested by Ivan Levkivskyi.
2016-08-17 17:18:33 -04:00
Victor Stinner
17061a99b0
Use Py_ssize_t in _PyEval_EvalCodeWithName()
...
Issue #27128 , #18295 : replace int type with Py_ssize_t for index variables used
for positional arguments. It should help to avoid integer overflow and help to
emit better machine code for "i++" (no trap needed for overflow).
Make also the total_args variable constant.
2016-08-16 23:39:42 +02:00
Victor Stinner
c70200165c
Issue #27128 : Cleanup _PyEval_EvalCodeWithName()
...
* Add comments
* Add empty lines for readability
* PEP 7 style for if block
* Remove useless assert(globals != NULL); (globals is tested a few lines
before)
2016-08-16 23:40:29 +02:00
Victor Stinner
3ee933f1c3
Issue #27776 : dev_urandom(raise=0) now closes the file descriptor on error
2016-08-16 18:27:44 +02:00
Victor Stinner
6974cf2c27
Issue #27776 : Cleanup random.c
...
Merge dev_urandom_python() and dev_urandom_noraise() functions to reduce code
duplication.
2016-08-16 18:46:38 +02:00
Victor Stinner
cecdd9634b
Issue #27776 : _PyRandom_Init() doesn't call PyErr_CheckSignals() anymore
...
Modify py_getrandom() to not call PyErr_CheckSignals() if raise is zero.
_PyRandom_Init() is called very early in the Python initialization, so it's
safer to not call PyErr_CheckSignals().
2016-08-16 15:19:09 +02:00
Victor Stinner
4bad3b622e
Issue #27776 : Cleanup random.c
...
* Add pyurandom() helper function to factorize the code
* don't call Py_FatalError() in helper functions, but only in _PyRandom_Init()
if pyurandom() failed, to uniformize the code
2016-08-16 15:23:58 +02:00
Nick Coghlan
d00342347e
Issue #26823 : Abbreviate recursive tracebacks
...
Large sections of repeated lines in tracebacks are now abbreviated as
"[Previous line repeated {count} more times]" by both the traceback
module and the builtin traceback rendering.
Patch by Emanuel Barry.
2016-08-15 13:11:34 +10:00
Serhiy Storchaka
9171a8b4ce
Issue #27574 : Decreased an overhead of parsing keyword arguments in functions
...
implemented with using Argument Clinic.
2016-08-14 10:52:18 +03:00
Raymond Hettinger
08eef3ff49
Re-linewrap comments
2016-08-07 20:20:33 -07:00
Martin Panter
02b75abf73
Merge spelling and grammar fixes from 3.5
2016-08-05 01:51:39 +00:00
Martin Panter
69332c1a64
Fix spelling and grammar in documentation and code comments
2016-08-04 13:07:31 +00:00
Serhiy Storchaka
133138a284
Issue #22557 : Now importing already imported modules is up to 2.5 times faster.
2016-08-02 22:51:21 +03:00
Martin Panter
d2f87472fe
Issue #17596 : MINGW: add wincrypt.h in Python/random.c
...
Based on patch by Roumen Petrov.
2016-07-29 04:00:44 +00:00
Martin Panter
36261d7446
Issue #16191 : Merge comment fixes from 3.5
2016-07-18 08:25:01 +00:00
Martin Panter
95f53c13ce
Issue #16191 : Fix up references to renamed variables
2016-07-18 08:23:26 +00:00
Serhiy Storchaka
caaf53e748
Issue #27419 : Added temporary workaround for subinterpreters.
2016-07-17 14:16:04 +03:00
Serhiy Storchaka
80ab069f1b
Issue #27419 : Added temporary workaround for subinterpreters.
2016-07-17 14:15:28 +03:00
Serhiy Storchaka
7905f99a27
Issue #27419 : Standard __import__() no longer look up "__import__" in globals
...
or builtins for importing submodules or "from import". Fixed a crash if
raise a warning about unabling to resolve package from __spec__ or
__package__.
2016-07-17 12:51:34 +03:00
Serhiy Storchaka
b3b65e618c
Issue #27419 : Standard __import__() no longer look up "__import__" in globals
...
or builtins for importing submodules or "from import". Fixed handling an
error of non-string package name.
2016-07-17 12:47:17 +03:00
Brett Cannon
b2f8a801c2
Check in update for importlib_external.h
2016-07-16 10:46:10 -07:00
Brett Cannon
7ca63cb7cc
Fix regressions introduced by fixes for issue #27083 .
2016-07-16 10:44:13 -07:00
Brett Cannon
b3e73b30ff
Merge for #27083
2016-07-15 11:55:21 -07:00
Benjamin Peterson
ce7b27d169
merge 3.5 ( #27514 )
2016-07-14 22:02:09 -07:00
Benjamin Peterson
e09ed5419b
make too many nested blocks be a SyntaxError instead of a SystemError ( closes #27514 )
...
Patch by Ammar Askar.
2016-07-14 22:00:03 -07:00
Brett Cannon
2247e5c48c
Update frozen importlib code
2016-07-08 16:44:54 -07:00
Brett Cannon
fdcdd9ed80
Issue #26896 : Disambiguate uses of "importer" with "finder".
...
Thanks to Oren Milman for the patch.
2016-07-08 11:00:00 -07:00
Serhiy Storchaka
2954f83999
- Issue #27332 : Fixed the type of the first argument of module-level functions
...
generated by Argument Clinic. Patch by Petr Viktorin.
2016-07-07 18:20:03 +03:00
Serhiy Storchaka
1a2b24f02d
Issue #27332 : Fixed the type of the first argument of module-level functions
...
generated by Argument Clinic. Patch by Petr Viktorin.
2016-07-07 17:35:15 +03:00
Serhiy Storchaka
7e160ce356
Issue #23034 : The output of a special Python build with defined COUNT_ALLOCS,
...
SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by default. It can
be re-enabled using the "-X showalloccount" option. It now outputs to stderr
instead of stdout.
2016-07-03 21:03:53 +03:00
Serhiy Storchaka
fbd1523525
Issue #27352 : Correct the validation of the ImportFrom AST node and simplify
...
the implementation of the IMPORT_NAME opcode.
2016-06-27 21:39:12 +03:00
Serhiy Storchaka
da9c513414
Issue #27255 : Added more predictions in ceval.c.
2016-06-27 18:58:57 +03:00
Serhiy Storchaka
cfdfbb4d3c
Issue #27342 : Replaced some Py_XDECREFs with Py_DECREFs.
...
Patch by Xiang Zhang.
2016-06-18 09:44:03 +03:00
Victor Stinner
d7292b5e9f
Issue #27336 : Fix compilation on Windows
...
Replace "#if WITH_THREAD" with "#ifdef WITH_THREAD".
2016-06-17 12:29:00 +02:00
Berker Peksag
531396c764
Issue #27336 : Fix compilation failures --without-threads
2016-06-17 13:25:01 +03:00
Victor Stinner
a63073a807
Merge 3.5
2016-06-17 00:01:30 +02:00
Victor Stinner
ec721f3305
py_getrandom(): use long type for the syscall() result
...
Issue #27278 . It should fix a conversion warning.
In practice, the Linux kernel doesn't return more than 32 MB per call to the
getrandom() syscall.
2016-06-16 23:53:47 +02:00
Serhiy Storchaka
607f8a5e28
Issue #27301 : Fixed incorrect return codes for errors in compile.c.
2016-06-15 20:07:53 +03:00
Serhiy Storchaka
694de3bff7
Issue #27301 : Fixed incorrect return codes for errors in compile.c.
2016-06-15 20:06:07 +03:00
Victor Stinner
d017176209
Merge 3.5
2016-06-14 16:36:00 +02:00
Victor Stinner
c72828ba33
cleanup random.c
...
Casting Py_ssize_t to Py_ssize_t is useless.
2016-06-14 16:35:49 +02:00
Victor Stinner
370f5136d4
Merge 3.5 (os.urandom, issue #27278 )
2016-06-14 16:33:17 +02:00
Victor Stinner
b98a36e8f3
Fix os.urandom() using getrandom() on Linux
...
Issue #27278 : Fix os.urandom() implementation using getrandom() on Linux.
Truncate size to INT_MAX and loop until we collected enough random bytes,
instead of casting a directly Py_ssize_t to int.
2016-06-14 16:31:35 +02:00
doko@ubuntu.com
5553231b91
- Issue #23968 : Rename the platform directory from plat-$(MACHDEP) to
...
plat-$(PLATFORM_TRIPLET).
Rename the config directory (LIBPL) from config-$(LDVERSION) to
config-$(LDVERSION)-$(PLATFORM_TRIPLET).
Install the platform specifc _sysconfigdata module into the platform
directory and rename it to include the ABIFLAGS.
2016-06-14 08:55:19 +02:00
Serhiy Storchaka
64204de04c
Issue #27095 : Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes.
...
Patch by Demur Rumed.
2016-06-12 17:36:24 +03:00
Serhiy Storchaka
5697c4b641
Comment fixes extracted from patch by Demur Rumed.
2016-06-12 17:02:10 +03:00
Serhiy Storchaka
cf2ad55511
Issue #27286 : Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode. Calling
...
function with generalized unpacking (PEP 448) and conflicting keyword names
could cause undefined behavior.
2016-06-12 09:35:13 +03:00
Serhiy Storchaka
3c317e76a2
Issue #27286 : Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode. Calling
...
function with generalized unpacking (PEP 448) and conflicting keyword names
could cause undefined behavior.
2016-06-12 09:22:01 +03:00
Serhiy Storchaka
6a7506a77f
Issue #27140 : Added BUILD_CONST_KEY_MAP opcode.
2016-06-12 00:39:41 +03:00
Serhiy Storchaka
f41b82fb19
Issue #26282 : PyArg_ParseTupleAndKeywords() and Argument Clinic now support
...
positional-only and keyword parameters in the same function.
2016-06-09 16:30:29 +03:00
Martin Panter
596357de23
Merge comment fix from 3.5
2016-06-10 08:38:56 +00:00
Martin Panter
39b1025356
Fix typo and move comment to appropriate condition
2016-06-10 08:07:11 +00:00
Yury Selivanov
711d25db48
Merge 3.5 (issue #27243 )
2016-06-09 15:13:16 -04:00
Yury Selivanov
a6f6edbda8
Issue #27243 : Fix __aiter__ protocol
2016-06-09 15:08:31 -04:00
Serhiy Storchaka
5dee6551e2
Issue #26305 : Argument Clinic now uses braces in C code as required by PEP 7.
2016-06-09 16:16:06 +03:00
Victor Stinner
cfb1961f61
py_getrandom(): use char* instead of void* for the destination
...
Fix a "gcc -pedantic" warning on "buffer += n" because buffer type is void*.
2016-06-08 10:16:50 +02:00
Victor Stinner
9ff9cbd600
Merge 3.5 (os.urandom)
2016-06-07 11:25:43 +02:00
Victor Stinner
dddf4849ec
os.urandom() doesn't block on Linux anymore
...
Issue #26839 : On Linux, os.urandom() now calls getrandom() with GRND_NONBLOCK
to fall back on reading /dev/urandom if the urandom entropy pool is not
initialized yet. Patch written by Colm Buckley.
2016-06-07 11:21:42 +02:00
Martin Panter
19409197e2
Merge typo fixes from 3.5
2016-06-04 05:26:40 +00:00
Martin Panter
3ee6270262
Fix typos in code comment and documentation
2016-06-04 04:57:19 +00:00
Serhiy Storchaka
76c4161b92
Issue #27138 : Regenerate Python/importlib_external.h.
2016-05-28 14:48:19 +03:00
Serhiy Storchaka
c7385f31d3
Issue #27138 : Regenerate Python/importlib_external.h.
2016-05-28 14:46:13 +03:00
Martin Panter
3e04d5b306
Issue #27076 : Merge spelling from 3.5
2016-05-26 06:03:19 +00:00
Martin Panter
46f50726a0
Issue #27076 : Doc, comment and tests spelling fixes
...
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Serhiy Storchaka
74f2fe6489
Fixed the use of _Py_IS_ALIGNED (issue #27097 ).
2016-05-25 20:35:44 +03:00
Serhiy Storchaka
f60bf5f7d6
Issue #27097 : Python interpreter is now about 7% faster due to optimized
...
instruction decoding. Based on patch by Demur Rumed.
2016-05-25 20:02:01 +03:00