summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
|\ | | | | | | Patch by Erik Welch.
| * Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
| | | | | | | | Patch by Erik Welch.
| * Issue #29157: Prefer getrandom() over getentropy()Victor Stinner2017-01-091-200/+294
| | | | | | | | | | | | | | | | | | | | | | 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
* | Issue #29327: Fixed a crash when pass the iterable keyword argument to sorted().Serhiy Storchaka2017-01-201-1/+2
| |
* | Issue #29157: Prefer getrandom() over getentropy()Victor Stinner2017-01-061-87/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | merge 3.5 (#29057)Benjamin Peterson2017-01-021-1/+1
|\ \ | |/
| * only include sys/random.h if it seems like it might have something useful ↵Benjamin Peterson2017-01-021-1/+1
| | | | | | | | (#29057)
* | merge 3.5Benjamin Peterson2017-01-021-1/+1
|\ \ | |/
| * merge 3.4Benjamin Peterson2017-01-021-1/+1
| |\
| | * merge 3.3Benjamin Peterson2017-01-021-1/+1
| | |\
| | | * ring in 2017 for PythonBenjamin Peterson2017-01-021-1/+1
| | | |
* | | | merge 3.5 (#28932)Benjamin Peterson2016-12-201-1/+1
|\ \ \ \ | |/ / /
| * | | add a specific configure check for sys/random.h (closes #28932)Benjamin Peterson2016-12-201-1/+1
| | | |
* | | | Issue #25677: Merge SyntaxError caret positioning from 3.5Martin Panter2016-12-192-5/+2
|\ \ \ \ | |/ / /
| * | | Issue #25677: Correct syntax error caret for indented blocks.Martin Panter2016-12-112-5/+2
| | | | | | | | | | | | | | | | Based on patch by Michael Layzell.
* | | | Issue #26919: On Android, operating system data is now always encoded/decodedXavier de Gaye2016-12-151-5/+5
| | | | | | | | | | | | | | | | | | | | to/from UTF-8, instead of the locale encoding to avoid inconsistencies with os.fsencode() and os.fsdecode() which are already using UTF-8.
* | | | Issue #28896: Disable WindowsRegistryFinder by default.Steve Dower2016-12-121-56/+53
| | | |
* | | | Issue #28739: f-string expressions no longer accepted as docstrings andSerhiy Storchaka2016-12-112-7/+7
| | | | | | | | | | | | | | | | by ast.literal_eval() even if they do not include subexpressions.
* | | | Issue #28512: Fixed setting the offset attribute of SyntaxError bySerhiy Storchaka2016-12-111-8/+4
|\ \ \ \ | |/ / / | | | | | | | | PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
| * | | Issue #28512: Fixed setting the offset attribute of SyntaxError bySerhiy Storchaka2016-12-111-8/+4
| | | | | | | | | | | | | | | | PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
* | | | Issue #23722: improve __classcell__ compatibilityNick Coghlan2016-12-053-1184/+1218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Fix _PyGen_yf()Victor Stinner2016-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Issue #27100: Fix ref leakRaymond Hettinger2016-11-221-1/+3
| | | |
* | | | Issue #27100: With statement reports missing __enter__ before __exit__. ↵Raymond Hettinger2016-11-221-4/+4
| | | | | | | | | | | | | | | | (Contributed by Jonathan Ellington.)
* | | | Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-207-16/+16
| | | | | | | | | | | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
* | | | Issue #28715: Added error checks for PyUnicode_AsUTF8().Serhiy Storchaka2016-11-202-3/+9
|\ \ \ \ | |/ / /
| * | | Issue #28715: Added error checks for PyUnicode_AsUTF8().Serhiy Storchaka2016-11-202-3/+9
| | | |
* | | | Issue #28746: Fix the set_inheritable() file descriptor method on platformsXavier de Gaye2016-11-191-1/+1
| | | | | | | | | | | | | | | | that do not have the ioctl FIOCLEX and FIONCLEX commands
* | | | Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.Serhiy Storchaka2016-11-162-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang.
| * | | Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.Serhiy Storchaka2016-11-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang.
* | | | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-167-33/+27
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
| * | | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-167-31/+25
| | | | | | | | | | | | | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
* | | | Issue #26920: Fix not getting the locale's charset upon initializing the ↵Xavier de Gaye2016-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | interpreter, on platforms that do not have langinfo
* | | | Fix warn_invalid_escape_sequence()Victor Stinner2016-11-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Issue #28676: merge from 3.5Ned Deily2016-11-121-2/+3
|\ \ \ \ | |/ / /
| * | | Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.Ned Deily2016-11-121-2/+3
| | | | | | | | | | | | | | | | Patch by Gareth Rees.
* | | | Issue #28665: Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF giving a ↵Raymond Hettinger2016-11-111-2/+3
| | | | | | | | | | | | | | | | 40% speedup.
* | | | Issue #26182: Fix ia refleak in code that raises DeprecationWarning.Yury Selivanov2016-11-081-3/+5
| | | |
* | | | Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.Serhiy Storchaka2016-11-081-2/+2
|\ \ \ \ | |/ / / | | | | | | | | Every opcode should end with DISPATCH() or goto error.
| * | | Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.Serhiy Storchaka2016-11-081-1/+1
| | | | | | | | | | | | | | | | Every opcode should end with DISPATCH() or goto error.
* | | | Issue #27243: Change PendingDeprecationWarning -> DeprecationWarning.Yury Selivanov2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | As it was agreed in the issue, __aiter__ returning an awaitable should result in PendingDeprecationWarning in 3.5 and in DeprecationWarning in 3.6.
* | | | Fixed issue #28633: segfault when concatenating bytes literal and f-string.Eric V. Smith2016-11-071-4/+5
| | | |
* | | | Issue #28616: merge from 3.5Ned Deily2016-11-041-1/+1
|\ \ \ \ | |/ / /
| * | | Issue #28616: Correct help for sys.version_info releaselevel component.Ned Deily2016-11-041-1/+1
| | | | | | | | | | | | | | | | Patch by Anish Tambe.
* | | | Issue 28128: Print out better error/warning messages for invalid string ↵Eric V. Smith2016-10-311-5/+61
| | | | | | | | | | | | | | | | escapes. Backport to 3.6.
* | | | Issue #28517: Fixed of-by-one error in the peephole optimizer that causedSerhiy Storchaka2016-10-253-3109/+3106
| | | | | | | | | | | | | | | | keeping unreachable code.
* | | | Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raisingSerhiy Storchaka2016-10-211-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* | | | Issue #28410: Keep the traceback of original exception in ↵Serhiy Storchaka2016-10-211-1/+4
|\ \ \ \ | |/ / / | | | | | | | | _PyErr_ChainExceptions().
| * | | Issue #28410: Keep the traceback of original exception in ↵Serhiy Storchaka2016-10-211-1/+4
| | | | | | | | | | | | | | | | _PyErr_ChainExceptions().
* | | | mark dtrace stubs as static inline; remove stubsBenjamin Peterson2016-10-211-24/+0
| | | | | | | | | | | | | | | | | | | | C99 inline semantics don't work everywhere. (https://bugs.python.org/issue28092) We don't want these to have external visibility anyway.