summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* coroutines: Error when awaiting on coroutine that's being awaitedYury Selivanov2016-03-021-0/+15
| | | | Issue #25888
* Issue #22836: Keep exception reports sensible despite errorsMartin Panter2016-02-282-5/+19
|
* Issue #26367: Have importlib.__init__() raise RuntimeError whenBrett Cannon2016-02-201-370/+371
| | | | | | | 'level' is specified but no __package__. This brings the function inline with builtins.__import__(). Thanks to Manuel Jacob for the patch.
* Issue #25698: Prevent possible replacing imported module with the empty oneSerhiy Storchaka2016-02-101-2/+6
| | | | if the stack is too deep.
* Issue #26198: Fixed error messages for some argument parsing errors.Serhiy Storchaka2016-02-071-12/+20
| | | | | Fixed the documented about buffer overflow error for "es#" and "et#" format units.
* Issue #4806: Avoid masking original TypeError in call with * unpackingMartin Panter2016-01-311-8/+10
| | | | Based on patch by Hagen Fürstenau and Daniel Urban.
* code_richcompare() now uses the constants typesVictor Stinner2016-01-221-48/+10
| | | | | | | | | Issue #25843: When compiling code, don't merge constants if they are equal but have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now correctly compiled to two different functions: f1() returns 1 (int) and f2() returns 1.0 (int), even if 1 and 1.0 are equal. Add a new _PyCode_ConstantKey() private function.
* Add _PyThreadState_UncheckedGet()Victor Stinner2016-01-203-21/+22
| | | | | | | | | | | | | | | | | | | Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which gets the current thread state, but don't call Py_FatalError() if it is NULL. Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to no more expose complex and private atomic types. Atomic types depends on the compiler or can even depend on compiler options. The new function _PyThreadState_UncheckedGet() allows to get the variable value without having to care of the exact implementation of atomic types. Changes: * Replace direct usage of the _PyThreadState_Current variable with a call to _PyThreadState_UncheckedGet(). * In pystate.c, replace direct usage of the _PyThreadState_Current variable with the PyThreadState_GET() macro for readability. * Document also PyThreadState_Get() in pystate.h
* merge 3.4Benjamin Peterson2016-01-011-1/+1
|\
| * merge 3.3Benjamin Peterson2016-01-011-1/+1
| |\
| | * 2016 will be another year of writing copyrighted codeBenjamin Peterson2016-01-011-1/+1
| | |
* | | make recording and reporting errors and nonlocal and global directives more ↵Benjamin Peterson2015-12-291-8/+16
| | | | | | | | | | | | robust (closes #25973)
* | | Issue #20440: More use of Py_SETREF.Serhiy Storchaka2015-12-271-8/+5
| | | | | | | | | | | | | | | This patch is manually crafted and contains changes that couldn't be handled automatically.
* | | Issue #20440: Applied yet one patch for using Py_SETREF.Serhiy Storchaka2015-12-271-3/+1
| | | | | | | | | | | | The patch is automatically generated, it replaces the code that uses Py_CLEAR.
* | | Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-243-8/+4
| | | | | | | | | | | | macro Py_SETREF.
* | | Issue #25899: Converted non-ASCII characters in docstrings and manpageSerhiy Storchaka2015-12-181-2/+2
| | | | | | | | | | | | to ASCII replacements. Original patch by Chris Angelico.
* | | Fix a couple of typos in code commentsMartin Panter2015-12-171-2/+2
| | |
* | | 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 #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 #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.
* | | 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.
* | | 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()
* | | 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.
* | | 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.
* | | 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.
* | | 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.
* | | 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 #25160: Fix import_init() comments and messagesVictor Stinner2015-09-181-3/+4
| | | | | | | | | | | | import_init() imports the "_imp" module, not the "imp" module.
* | | compute stack effect of BUILD_MAP correctly (closes #25060)Benjamin Peterson2015-09-112-2/+2
| | |
* | | Merge from 3.5.0 branch.Steve Dower2015-09-071-2/+70
|\ \ \
| * | | Issue #24305: Prevent import subsystem stack frames from being countedLarry Hastings2015-09-061-2/+70
| | | | | | | | | | | | | | | | by the warnings.warn(stacklevel=) parameter.
* | | | Merge 3.4 (create_stdio)Victor Stinner2015-09-041-42/+37
|\ \ \ \ | | |/ / | |/| |
| * | | Fix race condition in create_stdio()Victor Stinner2015-09-041-40/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #24891: Fix a race condition at Python startup if the file descriptor of stdin (0), stdout (1) or stderr (2) is closed while Python is creating sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set to None if the creation of the object failed, instead of raising an OSError exception. Initial patch written by Marco Paolini.
| * | | Issue #24728: Fix building without threads.Berker Peksag2015-07-271-0/+4
| | | | | | | | | | | | | | | | Patch by Louis Dassy.
* | | | Issue #24993: Handle import error in namereplace error handlerVictor Stinner2015-09-031-7/+5
| | | | | | | | | | | | | | | | | | | | Handle PyCapsule_Import() failure (exception) in PyCodec_NameReplaceErrors(): return immedialty NULL.
* | | | oops, rename pymonotonic_new() to pymonotonic()Victor Stinner2015-09-021-3/+3
| | | | | | | | | | | | | | | | | | | | I was not supposed to commit the function with the name pymonotonic_new(). I forgot to rename it.
* | | | Issue #24707: Remove assertion in monotonic clockVictor Stinner2015-09-021-10/+0
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Don't check anymore at runtime that the monotonic clock doesn't go backward. Yes, it happens. It occurs sometimes each month on a Debian buildbot slave running in a VM. The problem is that Python cannot do anything useful if a monotonic clock goes backward. It was decided in the PEP 418 to not fix the system, but only expose the clock provided by the OS.
* | | Issue #24975: Fix AST compilation for PEP 448 syntax.Yury Selivanov2015-09-011-2/+4
| | |
* | | Rebuilt Clinic generated code.Larry Hastings2015-08-252-3/+3
| | |