summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | 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-121-3/+26
|\ \ \ \ | |/ / /
| * | | sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-121-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-261-4/+10
|\ \ \ \ | |/ / /
| * | | make opening brace of container literals and comprehensions correspond to ↵Benjamin Peterson2015-09-261-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
| | | |
* | | | Fixed error creation if the problem is an empty expression in an f-string: ↵Eric V. Smith2015-09-241-6/+5
| | | | | | | | | | | | | | | | use ast_error instead of PyErr_SetString.
* | | | Move f-string compilation of the expression earlier, before the conversion ↵Eric V. Smith2015-09-231-15/+51
| | | | | | | | | | | | | | | | character and format_spec are checked. This allows for error messages that more closely match what a user would expect.
* | | | Issue #24779: Remove unused rawmode parameter to unicode_decode.Eric V. Smith2015-09-211-6/+3
| | | |
* | | | Issue #24965: Implement PEP 498 "Literal String Interpolation". ↵Eric V. Smith2015-09-194-57/+1218
| | | | | | | | | | | | | | | | Documentation is still needed, I'll open an issue for that.
* | | | Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom()Victor Stinner2015-09-181-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.
* | | | Issue #25155: Add _PyTime_AsTimevalTime_t() functionVictor Stinner2015-09-181-19/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge 3.5 (imp/_imp)Victor Stinner2015-09-181-3/+4
|\ \ \ \ | |/ / /
| * | | Issue #25160: Fix import_init() comments and messagesVictor Stinner2015-09-181-3/+4
| | | | | | | | | | | | | | | | import_init() imports the "_imp" module, not the "imp" module.
* | | | merge 3.5 (#25060)Benjamin Peterson2015-09-112-2/+2
|\ \ \ \ | |/ / /
| * | | compute stack effect of BUILD_MAP correctly (closes #25060)Benjamin Peterson2015-09-112-2/+2
| | | |
* | | | pytime: oops, fix typos on WindowsVictor Stinner2015-09-101-2/+2
| | | |
* | | | pytime: add _PyTime_check_mul_overflow() macro to avoid undefined behaviourVictor Stinner2015-09-101-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overflow test in test_FromSecondsObject() fails on FreeBSD 10.0 buildbot which uses clang. clang implements more aggressive optimization which gives different result than GCC on undefined behaviours. Check if a multiplication will overflow, instead of checking if a multiplicatin had overflowed, to avoid undefined behaviour. Add also debug information if the test on overflow fails.
* | | | New try to fix test_time.test_AsSecondsDouble() on x86 buildbots.Victor Stinner2015-09-101-2/+7
| | | | | | | | | | | | | | | | Use volatile keyword in _PyTime_AsSecondsDouble()