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
Serhiy Storchaka
b0f80b0312
Issue #26647 : Python interpreter now uses 16-bit wordcode instead of bytecode.
...
Patch by Demur Rumed.
2016-05-24 09:15:14 +03:00
Serhiy Storchaka
2a95219bc4
Issue #26168 : Fixed possible refleaks in failing Py_BuildValue() with the "N"
...
format unit.
2016-05-20 22:31:50 +03:00
Serhiy Storchaka
13e602ea0f
Issue #26168 : Fixed possible refleaks in failing Py_BuildValue() with the "N"
...
format unit.
2016-05-20 22:31:14 +03:00
Victor Stinner
744c34e2ea
Cleanup import.c
...
* Replace PyUnicode_RPartition() with PyUnicode_FindChar() and
PyUnicode_Substring() to avoid the creation of a temporary tuple.
* Use PyUnicode_FromFormat() to build a string and avoid the single_dot ('.')
singleton
Thanks Serhiy Storchaka for your review.
2016-05-20 11:36:13 +02:00
Victor Stinner
4a3443be43
Merge 3.5 (issue #27057 )
2016-05-19 16:48:06 +02:00
Victor Stinner
3116cc44af
Fix os.set_inheritable() on Android
...
Issue #27057 : Fix os.set_inheritable() on Android, ioctl() is blocked by
SELinux and fails with EACCESS. The function now falls back to fcntl().
Patch written by Michał Bednarski.
2016-05-19 16:46:18 +02:00
Berker Peksag
094c9c921c
Issue #23275 : Allow () = iterable assignment syntax
...
Documentation updates by Martin Panter.
2016-05-18 08:44:29 +03:00
Benjamin Peterson
ed64d6b4a5
regen importlib bytecode
2016-05-16 22:54:05 -07:00
Benjamin Peterson
5b2b3aae2a
merge 3.5 ( #26991 )
2016-05-16 22:53:44 -07:00
Benjamin Peterson
ad887cf7d1
fix possible refleak in MAKE_FUNCTION ( closes #26991 )
...
Patch by Xiang Zhang.
2016-05-16 22:52:40 -07:00
Serhiy Storchaka
4b23494ded
Issue #27039 : Fixed bytearray.remove() for values greater than 127.
...
Based on patch by Joe Jevnik.
2016-05-16 22:24:03 +03:00
Serhiy Storchaka
ce41287e99
Issue #18531 : Single var-keyword argument of dict subtype was passed
...
unscathed to the C-defined function. Now it is converted to exact dict.
2016-05-08 23:36:44 +03:00
Martin Panter
1ce738e08f
Merge typo fixes from 3.5
2016-05-08 14:02:35 +00:00
Martin Panter
4c35964b76
Corrections for a/an in code comments and documentation
2016-05-08 13:53:41 +00:00
Serhiy Storchaka
24182a3aaa
Restored parameter name "self" since gdb needs exact specific parameter names.
2016-05-05 16:21:35 +03:00
Serhiy Storchaka
c2f7d87897
Issue #26932 : Fixed support of RTLD_* constants defined as enum values,
...
not via macros (in particular on Android). Patch by Chi Hsuan Yen.
2016-05-04 09:44:44 +03:00
Serhiy Storchaka
7a9579c0ce
Got rid of redundand "self" parameter declarations.
...
Argument Clinic is now able to infer all needed information.
2016-05-02 13:45:20 +03:00
Serhiy Storchaka
2e310b4c38
Regenerate Argument Clinic code for issue #26874 .
2016-05-01 20:34:00 +03:00
Serhiy Storchaka
df071730bb
Regenerate Argument Clinic code for issue #26874 .
2016-05-01 20:33:24 +03:00
Berker Peksag
aa9d369707
Issue #23960 : Cleanup args and kwargs on error in PyErr_SetImportError
...
Patch by Ofer Schwarz.
2016-05-01 09:06:57 +03:00
Berker Peksag
ec766d3c15
Issue #23960 : Cleanup args and kwargs on error in PyErr_SetImportError
...
Patch by Ofer Schwarz.
2016-05-01 09:06:36 +03:00
Zachary Ware
5031a67821
Closes #26874 : Merge with 3.5
2016-04-28 14:40:08 -05:00
Zachary Ware
7f227d9087
Issue #26874 : Simplify the divmod docstring
2016-04-28 14:39:50 -05:00
Zachary Ware
54559b6511
Closes #26874 : Merge with 3.5
2016-04-28 14:25:32 -05:00
Zachary Ware
4d4160af6a
Issue #26874 : Fix divmod docstring
2016-04-28 14:24:55 -05:00
Stefan Krah
144da4ec85
Issue #22747 : Workaround for systems without langinfo.h.
2016-04-26 01:56:50 +02:00
Stefan Krah
1845d144bc
Issue #17905 : Do not guard locale include with HAVE_LANGINFO_H.
2016-04-25 21:38:53 +02:00
Serhiy Storchaka
79d6e8de9e
Issue #26802 : Optimized calling a function with *args only positional arguments.
...
Patch by Joe Jevnik.
2016-04-19 23:37:17 +03:00
Victor Stinner
a858bbde03
Avoid fcntl() if possible in set_inheritable()
...
Issue #26770 : set_inheritable() avoids calling fcntl() twice if the FD_CLOEXEC
is already set/cleared. This change only impacts platforms using the fcntl()
implementation of set_inheritable() (not Linux nor Windows).
2016-04-17 16:51:52 +02:00
Serhiy Storchaka
b6a9c9761c
Issue #26778 : Fixed "a/an/and" typos in code comment, documentation and error
...
messages.
2016-04-17 09:39:28 +03:00
Serhiy Storchaka
6a7b3a77b4
Issue #26778 : Fixed "a/an/and" typos in code comment and documentation.
2016-04-17 08:32:47 +03:00
Martin Panter
cda80940ed
Issue #15984 : Merge PyUnicode doc from 3.5
2016-04-15 02:27:11 +00:00
Martin Panter
6245cb3c01
Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
...
This affects documentation, code comments, and a debugging messages.
2016-04-15 02:14:19 +00:00
Serhiy Storchaka
23c5cbbdde
fs_unicode_converter is no longer used.
2016-04-14 12:36:11 +03:00
Serhiy Storchaka
21a663ea28
Issue #26057 : Got rid of nonneeded use of PyUnicode_FromObject().
2016-04-13 15:37:23 +03:00
Victor Stinner
7258176c68
Merge 3.5 (os.urandom)
2016-04-12 22:38:22 +02:00
Victor Stinner
9d24271d86
Fix os.urandom() on Solaris 11.3
...
Issue #26735 : Fix os.urandom() on Solaris 11.3 and newer when reading more than
1,024 bytes: call getrandom() multiple times with a limit of 1024 bytes per
call.
2016-04-12 22:28:49 +02:00
Serhiy Storchaka
f01e408c16
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:12:01 +03:00
Serhiy Storchaka
57a01d3a0e
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:05:40 +03:00
Serhiy Storchaka
403002723f
Issue #25339 : PYTHONIOENCODING now has priority over locale in setting the
...
error handler for stdin and stdout.
2016-04-10 14:35:21 +03:00
Serhiy Storchaka
fc43511867
Issue #25339 : PYTHONIOENCODING now has priority over locale in setting the
...
error handler for stdin and stdout.
2016-04-10 14:34:13 +03:00
Serhiy Storchaka
ec39756960
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:50:03 +03:00
Serhiy Storchaka
48842714b9
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:45:48 +03:00
Raymond Hettinger
942302371c
Minor code cleanup for PyArg_UnpackTuple.
2016-03-26 03:02:48 -07:00
Victor Stinner
ca9dbc7d88
makeopcodetargets.py: we need to import Lib/opcode.py
...
Issue #20021 : use importlib.machinery to import Lib/opcode.py and not an opcode
module coming from somewhere else. makeopcodetargets.py is part of the Python
build process and it is run by an external Python program, not the built Python
program.
Patch written by Serhiy Storchaka.
2016-03-26 01:04:37 +01:00
Victor Stinner
a9a852c2b1
Modernize Python/makeopcodetargets.py
...
* Simply use "import opcode" to import the opcode module instead of tricks
using the imp module
* Use context manager for the output file
* Move code into a new main() function
* Replace assert with a regular if to check the number of arguments
* Import modules at top level
2016-03-25 11:54:47 +01:00
Victor Stinner
4f17426437
Fix bug in __import__ during Python shutdown
...
Issue #26637 : The importlib module now emits an ImportError rather than a
TypeError if __import__() is tried during the Python shutdown process but
sys.path is already cleared (set to None).
2016-03-25 00:40:59 +01:00
Victor Stinner
023654fa68
get_warnings_attr(): Fix coverity warning
...
Don't check if the dict key exists before getting the key. Instead get the key
and handle error.
2016-03-23 17:48:22 +01:00
Victor Stinner
1c3069aed6
Rework _Py_DumpASCII() to make Coverity happy
2016-03-23 16:10:07 +01:00
Victor Stinner
976bb4099c
compiler.c: fix compiler warnings on Windows
2016-03-23 11:36:19 +01:00