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
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
f0f1c239e4
Issue 27936: Fix inconsistent round() behavior between float and int
2016-09-03 01:55:11 -07:00
Raymond Hettinger
74942c9252
Merge
2016-08-31 08:44:26 -07:00
Raymond Hettinger
f0afe77c52
Issue #27909 : Fix INCREF for possible NULL value
2016-08-31 08:44:11 -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