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().
9 years ago
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]
9 years ago
Serhiy Storchaka
9e373be1bc
Issue #28410 : Keep the traceback of original exception in _PyErr_ChainExceptions().
9 years ago
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.
9 years ago
Victor Stinner
d65f42a132
Issue #21955 : Please don't try to optimize int+int
9 years ago
Serhiy Storchaka
04eb777279
Issue #23782 : Fixed possible memory leak in _PyTraceback_Add() and exception
loss in PyTraceBack_Here().
9 years ago
Raymond Hettinger
4186222e63
Minor fix-up to apply the stack adjustment macros consistent with the other opcodes
9 years ago
Serhiy Storchaka
5665301bae
Issue #28257 : Improved error message when pass a non-mapping as a var-keyword
argument.
9 years ago
Serhiy Storchaka
cf3806026b
Issue #24098 : Fixed possible crash when AST is changed in process of
compiling it.
9 years ago
Berker Peksag
8e9045d0d8
Issue #27358 : Fix typo in error message
9 years ago
Serhiy Storchaka
e036ef8fa2
Issue #27358 : Optimized merging var-keyword arguments and improved error
message when pass a non-mapping as a var-keyword argument.
9 years ago
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.
9 years ago
Serhiy Storchaka
00a0fc1144
Issue #27942 : String constants now interned recursively in tuples and frozensets.
9 years ago
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.
9 years ago
Serhiy Storchaka
c019158a4c
Issue #27703 : Got rid of unnecessary NULL checks in do_raise() in release mode.
Patch by Xiang Zhang.
9 years ago
Christian Heimes
517507c6d5
Issue #28100 : Refactor error messages, patch by Ivan Levkivskyi
9 years ago
Serhiy Storchaka
208bbd29d3
Silence GCC warning.
The code was correct, but GCC is not enough clever.
9 years ago
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.
9 years ago
Christian Heimes
2f2fee19ec
va_end() all va_copy()ed va_lists.
9 years ago
Benjamin Peterson
0c21214f3e
replace usage of Py_VA_COPY with the (C99) standard va_copy
9 years ago
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.
9 years ago
Victor Stinner
af59732102
Cleanup random.c
Issue #27955 : modify py_getrnadom() and dev_urandom()
* Add comments from Python 3.7
* PEP 7 style: add {...}
9 years ago
Benjamin Peterson
286987bbac
delete dead code
9 years ago
Steve Dower
74f4af7ac3
Issue #27932 : Prevent memory leak in win32_ver().
9 years ago
Steve Dower
1ec262be80
Issue #27932 : Prevent memory leak in win32_ver().
9 years ago
Yury Selivanov
8987c9d219
Issue #26182 : Raise DeprecationWarning for improper use of async/await keywords
9 years ago
Benjamin Peterson
59e5e0dca2
improve type-safe of and prevent double-frees in get_locale_info ( #28119 )
9 years ago
Christian Heimes
f051e43b22
Issue #28126 : Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().
9 years ago
Victor Stinner
57f91ac95a
Document kwnames in _PyObject_FastCallKeywords() and _PyStack_AsDict()
Issue #27213 .
9 years ago
Victor Stinner
eece2229e2
Issue #27213 : Fix reference leaks
9 years ago
Eric V. Smith
09835dcdbb
Make an f-string error message more exact and consistent.
9 years ago
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.
9 years ago
Guido van Rossum
015d874626
Issue #28076 : Variable annotations should be mangled for private names.
By Ivan Levkivskyi.
9 years ago
Serhiy Storchaka
a1e9ab34a9
Fixed refactoring bug in dd046963bd42 (issue27129).
9 years ago
Serhiy Storchaka
ab8740058a
Issue #27129 : Replaced wordcode related magic constants with macros.
9 years ago
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.
9 years ago
Benjamin Peterson
4eef505064
Backed out changeset 3934e070c9db
9 years ago
Victor Stinner
54de2b1edd
Fix check_force_ascii()
Issue #27938 : Normalize aliases of the ASCII encoding, because
_Py_normalize_encoding() now correctly normalize encoding names.
9 years ago
Łukasz Langa
fef7e94fa1
Don't run garbage collection on interpreter exit if it was explicitly disabled
by the user.
9 years ago
Victor Stinner
c7454ff5fc
Issue #27810 : Fix getargs.c compilation on Windows
9 years ago
Benjamin Peterson
819a46f33a
fix export of size_t parse stack function
9 years ago
Victor Stinner
37e4ef7b17
Issue #27810 : Rerun Argument Clinic on all modules
9 years ago
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
9 years ago
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.
9 years ago
Benjamin Peterson
eb0dfa9251
make invalid_comma_and_underscore a real prototype
9 years ago
Eric V. Smith
89e1b1aae0
Issue 27080: PEP 515: add '_' formatting option.
9 years ago
Benjamin Peterson
f5781958af
add dtrace inline stubs
9 years ago
Benjamin Peterson
4ba5c88a3f
just start with an int rather than casting
9 years ago
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.
9 years ago
Ł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.
9 years ago