Serhiy Storchaka
208bbd29d3
Silence GCC warning.
...
The code was correct, but GCC is not enough clever.
2016-09-22 19:59:46 +03: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
Steve Dower
1ec262be80
Issue #27932 : Prevent memory leak in win32_ver().
2016-09-17 17:25:42 -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
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
Raymond Hettinger
7ea386e56e
Issue 19504: Change "customise" to "customize" American spelling.
2016-08-25 21:11:50 -07: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
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
Martin Panter
69332c1a64
Fix spelling and grammar in documentation and code comments
2016-08-04 13:07:31 +00:00
Martin Panter
95f53c13ce
Issue #16191 : Fix up references to renamed variables
2016-07-18 08:23:26 +00:00
Serhiy Storchaka
80ab069f1b
Issue #27419 : Added temporary workaround for subinterpreters.
2016-07-17 14:15:28 +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
7ca63cb7cc
Fix regressions introduced by fixes for issue #27083 .
2016-07-16 10:44:13 -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
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
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
694de3bff7
Issue #27301 : Fixed incorrect return codes for errors in compile.c.
2016-06-15 20:06:07 +03: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
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
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
Martin Panter
39b1025356
Fix typo and move comment to appropriate condition
2016-06-10 08:07:11 +00:00
Yury Selivanov
a6f6edbda8
Issue #27243 : Fix __aiter__ protocol
2016-06-09 15:08:31 -04: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
3ee6270262
Fix typos in code comment and documentation
2016-06-04 04:57:19 +00:00
Serhiy Storchaka
c7385f31d3
Issue #27138 : Regenerate Python/importlib_external.h.
2016-05-28 14:46:13 +03: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
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
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
Benjamin Peterson
ed64d6b4a5
regen importlib bytecode
2016-05-16 22:54:05 -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
Martin Panter
4c35964b76
Corrections for a/an in code comments and documentation
2016-05-08 13:53:41 +00:00
Serhiy Storchaka
df071730bb
Regenerate Argument Clinic code for issue #26874 .
2016-05-01 20:33:24 +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
7f227d9087
Issue #26874 : Simplify the divmod docstring
2016-04-28 14:39:50 -05:00
Zachary Ware
4d4160af6a
Issue #26874 : Fix divmod docstring
2016-04-28 14:24:55 -05: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
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
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
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
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
48842714b9
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:45:48 +03:00
Victor Stinner
244e12088d
Use Py_uintptr_t for atomic pointers
...
Issue #26161 : Use Py_uintptr_t instead of void* for atomic pointers in
pyatomic.h. Use atomic_uintptr_t when <stdatomic.h> is used.
Using void* causes compilation warnings depending on which implementation of
atomic types is used.
2016-01-22 14:09:55 +01:00
Victor Stinner
a2e5e044af
Py_FatalError: disable faulthandler earlier
...
Issue #26563 : Py_FatalError: disable faulthandler before trying to flush
sys.stdout and sys.stderr.
2016-03-16 23:19:15 +01:00
Victor Stinner
4ddee7f5fd
Fix Py_FatalError() if called without the GIL
...
Issue #26558 : If Py_FatalError() is called without the GIL, don't try to print
the current exception, nor try to flush stdout and stderr: only dump the
traceback of Python threads.
2016-03-14 16:53:12 +01:00
Yury Selivanov
c724bae51c
coroutines: Error when awaiting on coroutine that's being awaited
...
Issue #25888
2016-03-02 11:30:46 -05:00