summaryrefslogtreecommitdiff
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failureMartin Panter2015-11-303-17/+41
|
* Issue #25557: Refactor _PyDict_LoadGlobal()Victor Stinner2015-11-201-2/+9
| | | | | Don't fallback to PyDict_GetItemWithError() if the hash is unknown: compute the hash instead. Add also comments to explain the optimization a little bit.
* Merge 3.5 (pytime)Victor Stinner2015-11-101-3/+3
|\
| * pytime.c: rename pygettimeofday_new() to pygettimeofday()Victor Stinner2015-11-101-3/+3
| | | | | | | | I forgot to rename it in my previous refactoring of pytime.c.
| * Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-062-8/+32
| | | | | | | | compiling AST from Python objects.
* | Issue #25558: Use compile-time asserts.Serhiy Storchaka2015-11-072-14/+13
| |
* | Issue #24802: Merge null termination fixes from 3.5Martin Panter2015-11-071-16/+32
|\ \ | |/
| * Issue #24802: Merge null termination fixes from 3.4 into 3.5Martin Panter2015-11-071-16/+32
| |\
| | * Issue #24802: Copy bytes-like objects to null-terminated buffers if necessaryMartin Panter2015-11-071-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | This avoids possible buffer overreads when int(), float(), compile(), exec() and eval() are passed bytes-like objects. Similar code is removed from the complex() constructor, where it was not reachable. Patch by John Leitch, Serhiy Storchaka and Martin Panter.
* | | Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-062-8/+32
| | | | | | | | | | | | compiling AST from Python objects.
* | | Reuse Py_STRINGIFY() macro in sre_lib.h and dynload_win.c.Serhiy Storchaka2015-11-051-4/+2
| | |
* | | Issue #25556: Add assertions to PyObject_GetItem() to ensure that an exceptionVictor Stinner2015-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | is raised when it returns NULL. Simplify also ceval.c: rely on the fact that PyObject_GetItem() raised an exception when it returns NULL.
* | | Merge 3.5Victor Stinner2015-11-051-0/+4
|\ \ \ | |/ /
| * | Issue #25556: Fix LOAD_GLOBAL bytecode when globals type is not dict and theVictor Stinner2015-11-051-0/+4
| | | | | | | | | | | | | | | | | | requested name doesn't exist in globals: clear the KeyError exception before calling PyObject_GetItem(). Fail also if the raised exception is not a KeyError.
* | | sysmodule.c: reuse Py_STRINGIFY() macroVictor Stinner2015-11-051-6/+2
| | |
* | | Issue 25483: Add an opcode to make f-string formatting more robust.Eric V. Smith2015-11-034-169/+194
| | |
* | | Issue #25523: Merge a-to-an corrections from 3.5Martin Panter2015-11-022-2/+2
|\ \ \ | |/ /
| * | Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5Martin Panter2015-11-022-2/+2
| |\ \ | | |/
| | * Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-022-2/+2
| | | | | | | | | | | | | | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed or edited some other way to fix the grammar.
* | | Merge 3.5 (sys.setrecursionlimit)Victor Stinner2015-10-131-3/+26
|\ \ \ | |/ /
| * | sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-131-3/+26
| | | | | | | | | | | | | | | | | | | | | Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new recursion limit is too low depending at the current recursion depth. Modify also the "lower-water mark" formula to make it monotonic. This mark is used to decide when the overflowed flag of the thread state is reset.
| * | Close #24784: Fix compilation without thread supportVictor Stinner2015-10-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add "#ifdef WITH_THREAD" around cals to: * PyGILState_Check() * _PyImport_AcquireLock() * _PyImport_ReleaseLock()
* | | Close #24784: Fix compilation without thread supportVictor Stinner2015-10-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add "#ifdef WITH_THREAD" around cals to: * PyGILState_Check() * _PyImport_AcquireLock() * _PyImport_ReleaseLock()
* | | Issue #24402: Merge input() fix from 3.5Martin Panter2015-10-101-1/+3
|\ \ \ | |/ /
| * | Issue #24402: Merge input() fix from 3.4 into 3.5Martin Panter2015-10-101-1/+3
| |\ \ | | |/
| | * Issue #24402: Fix input() when stdout.fileno() fails; diagnosed by EryksunMartin Panter2015-10-101-1/+3
| | | | | | | | | | | | Also factored out some test cases into a new PtyTests class.
* | | Hoist constant expression out of the inner loop.Raymond Hettinger2015-10-091-3/+3
| | |
* | | Make comparison more consistentRaymond Hettinger2015-10-091-1/+1
| | |
* | | One more typo in a commentMartin Panter2015-10-071-1/+1
| | |
* | | Merge typo fixes from 3.5Martin Panter2015-10-071-1/+1
|\ \ \ | |/ /
| * | Merge typo fixes from 3.4 into 3.5Martin Panter2015-10-071-1/+1
| |\ \ | | |/
| | * Various minor typos in documentation and commentsMartin Panter2015-10-071-2/+2
| | |
| * | Issue #25280: Import trace messages emitted in verbose (-v) mode are noSerhiy Storchaka2015-10-011-56/+57
| |\ \ | | |/ | | | | | | longer formatted twice.
| | * Issue #25280: Import trace messages emitted in verbose (-v) mode are noSerhiy Storchaka2015-10-011-57/+58
| | | | | | | | | | | | longer formatted twice.
* | | Update importlib_external.hVictor Stinner2015-10-011-56/+57
| | |
* | | Merge 3.5Victor Stinner2015-10-011-0/+2
|\ \ \ | |/ /
| * | Merge 3.4 (os.urandom)Victor Stinner2015-10-011-0/+2
| |\ \ | | |/
| | * Issue #25003: os.urandom() doesn't use getentropy() on Solaris becauseVictor Stinner2015-10-011-4/+8
| | | | | | | | | | | | | | | getentropy() is blocking, whereas os.urandom() should not block. getentropy() is supported since Solaris 11.3.
* | | Merge 3.5Victor Stinner2015-10-011-2/+2
|\ \ \ | |/ /
| * | Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom()Victor Stinner2015-10-011-15/+34
| | | | | | | | | | | | | | | | | | function instead of the getentropy() function. The getentropy() function is blocking to generate very good quality entropy, os.urandom() doesn't need such high-quality entropy.
* | | Fix _PyTime_AsTimevalStruct_impl() on OpenBSDVictor Stinner2015-10-011-2/+3
| | | | | | | | | | | | | | | | | | On the x86 OpenBSD 5.8 buildbot, the integer overflow check is ignored. Copy the tv_sec variable into a Py_time_t variable instead of "simply" casting it to Py_time_t, to fix the integer overflow check.
* | | Backout change 28d3bcb1bad6: "Try to fix _PyTime_AsTimevalStruct_impl() onVictor Stinner2015-09-301-3/+2
| | | | | | | | | | | | | | | OpenBSD", I'm not sure that the change was really needed. I read the test result of an old build because the OpenBSD was 100 builds late.
* | | Issue #25171: Fix compilation issue on OpenBSD in random.cVictor Stinner2015-09-301-3/+3
| | | | | | | | | | | | Patch written by Remi Pointel.
* | | Issue #18174: Explain why is_valid_fd() uses dup() instead of fstat()Victor Stinner2015-09-291-0/+3
| | |
* | | Try to fix _PyTime_AsTimevalStruct_impl() on OpenBSDVictor Stinner2015-09-291-2/+3
| | | | | | | | | | | | It looks like the check for integer overflow doesn't work on x86 OpenBSD 5.8.
* | | merge 3.5 (#25131)Benjamin Peterson2015-09-251-4/+10
|\ \ \ | |/ /
| * | make opening brace of container literals and comprehensions correspond to ↵Benjamin Peterson2015-09-251-4/+10
| | | | | | | | | | | | the line number and col offset of the AST node (closes #25131)
| * | Issue #25155: Fix _PyTime_Divide() roundingVictor Stinner2015-09-181-3/+8
| | | | | | | | | | | | | | | _PyTime_Divide() rounding was wrong: copy code from Python default which has now much better unit tests.
| * | Issue #25155: Add _PyTime_AsTimevalTime_t() functionVictor Stinner2015-09-181-38/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the tv_sec field of the timeval structure has the type C long, whereas it has the type C time_t on all other platforms. A C long has a size of 32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not enough to store an Epoch timestamp after the year 2038. Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now(): convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t. It allows to support dates after the year 2038 on Windows. Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of seconds when rounding the number of microseconds.
* | | Issue #25186: Remove duplicated function from importlib._bootstrap_externalBrett Cannon2015-09-251-2497/+2480
| | |