summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-35017, socketserver: don't accept request after shutdown (GH-9952)Denis Ledoux2018-10-262-0/+6
| | | | | | | | | | | | | | Prior to this revision, after the shutdown of a `BaseServer`, the server accepted a last single request if it was sent between the server socket polling and the polling timeout. This can be problematic for instance for a server restart for which you do not want to interrupt the service, by not closing the listening socket during the restart. One request failed because of this behavior. Note that only one request failed, following requests were not accepted, as expected.
* Simplify the warning for http.server. (#10116)Senthil Kumaran2018-10-261-4/+2
|
* bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094)Victor Stinner2018-10-262-0/+6
| | | | | | | | | | Visual Studio solution: Set InlineFunctionExpansion to OnlyExplicitInline ("/Ob1" option) on all projects (in pyproject.props) in Debug mode on Win32 and x64 platforms to expand functions marked as inline. This change should make Python compiled in Debug mode a little bit faster on Windows. On Unix, GCC uses -Og optimization level for ./configure --with-pydebug.
* bpo-35059: Convert PyObject_INIT() to function (GH-10077)Victor Stinner2018-10-268-16/+33
| | | | | * Convert PyObject_INIT() and PyObject_INIT_VAR() macros to static inline functions. * Fix usage of these functions: cast to PyObject* or PyVarObject*.
* bpo-34890: Make iscoroutinefunction, isgeneratorfunction and ↵Pablo Galindo2018-10-266-12/+61
| | | | | | | | | | | isasyncgenfunction work with functools.partial (GH-9903) inspect.isfunction() processes both inspect.isfunction(func) and inspect.isfunction(partial(func, arg)) correctly but some other functions in the inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction) lack this functionality. This commits adds a new check in the mentioned functions in the inspect module so they can work correctly with arbitrarily nested partial functions.
* bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)Stéphane Wirtel2018-10-2617-17/+19
|
* bpo-35054: Add more index entries for symbols. (GH-10064)Serhiy Storchaka2018-10-2626-64/+466
|
* bpo-9263: _Py_NegativeRefcount() use _PyObject_AssertFailed() (GH-10109)Victor Stinner2018-10-262-10/+8
| | | | _Py_NegativeRefcount() now uses _PyObject_AssertFailed() to dump the object to help debugging.
* bpo-35053: Define _PyTraceMalloc_NewReference in object.h (GH-10107)Victor Stinner2018-10-253-4/+7
| | | | | | _PyTraceMalloc_NewReference() is now called by _Py_NewReference(), so move its definition to object.h. Moreover, define it even if Py_LIMITED_API is defined, since _Py_NewReference() is also exposed even if Py_LIMITED_API is defined.
* bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960)Max Bélanger2018-10-254-0/+18
| | | | The MagicMock class supports many magic methods, but not __fspath__. To ease testing with modules such as os.path, this function is now supported by default.
* bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. ↵Stéphane Wirtel2018-10-252-3/+2
| | | | | (GH-10098) https://bugs.python.org/issue35038
* Fix grammar in using/unix build instruction docs (GH-10009)Stéphane Wirtel2018-10-251-4/+4
|
* bpo-9263: Dump Python object on GC assertion failure (GH-10062)Victor Stinner2018-10-256-13/+179
| | | | | | | | | | | | | | | | | | | | | | | Changes: * Add _PyObject_AssertFailed() function. * Add _PyObject_ASSERT() and _PyObject_ASSERT_WITH_MSG() macros. * gc_decref(): replace assert() with _PyObject_ASSERT_WITH_MSG() to dump the faulty object if the assertion fails. _PyObject_AssertFailed() calls: * _PyMem_DumpTraceback(): try to log the traceback where the object memory has been allocated if tracemalloc is enabled. * _PyObject_Dump(): log repr(obj). * Py_FatalError(): log the current Python traceback. _PyObject_AssertFailed() uses _PyObject_IsFreed() heuristic to check if the object memory has been freed by a debug hook on Python memory allocators. Initial patch written by David Malcolm. Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
* bpo-35059: Add Py_STATIC_INLINE() macro (GH-10093)Victor Stinner2018-10-256-38/+94
| | | | | | | | | * Add Py_STATIC_INLINE() macro to declare a "static inline" function. If the compiler supports it, try to always inline the function even if no optimization level was specified. * Modify pydtrace.h to use Py_STATIC_INLINE() when WITH_DTRACE is not defined. * Add an unit test on Py_DECREF() to make sure that _Py_NegativeRefcount() reports the correct filename.
* bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082)Tim Graham2018-10-253-1/+5
| | | Regression in b0bf51b32240369ccb736dc32ff82bb96f375402.
* bpo-32321: Add pure Python fallback for functools.reduce (GH-8548)madman-bob2018-10-253-36/+80
|
* bpo-35053: Add Include/tracemalloc.h (GH-10091)Victor Stinner2018-10-257-37/+54
| | | | | | | * Modify object.h to ensure that pymem.h is included, to get _Py_tracemalloc_config variable. * Move _PyTraceMalloc_XXX() functions to tracemalloc.h, they need PyObject type. Break circular dependency between pymem.h and object.h.
* bpo-35053: Enhance tracemalloc to trace free lists (GH-10063)Victor Stinner2018-10-257-51/+157
| | | | | | | | | | | | tracemalloc now tries to update the traceback when an object is reused from a "free list" (optimization for faster object creation, used by the builtin list type for example). Changes: * Add _PyTraceMalloc_NewReference() function which tries to update the Python traceback of a Python object. * _Py_NewReference() now calls _PyTraceMalloc_NewReference(). * Add an unit test.
* importlib: Fix typo in SourceLoader.path_stats docstring (GH-10052)Quentin2018-10-252-1500/+1500
|
* bpo-28015: Support LTO build with clang (GH-9908)serge-sans-paille2018-10-244-83/+235
| | | | | | | | | | .o generated by clang in LTO mode actually are LLVM bitcode files, which leads to a few errors during configure/build step: - add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used to build autoconf test case, and some are not compatible with clang LTO (they assume binary in the .o, not bitcode) - force llvm-ar instead of ar, as ar is not aware of .o files generated by clang -flto
* configparser doc: Properly label ConfigParser attributes (GH-9930)Ned Batchelder2018-10-241-3/+3
|
* importlib doc: Fix approximated import_module() code (GH-9945)orlnub1232018-10-241-1/+1
| | | The spec gets stored on modules with the __spec__ attribute, not spec.
* bpo-35027, distutils doc: Correct note on setup.py change in Python 3.7 ↵TilmanK2018-10-241-3/+2
| | | | (GH-10032)
* turtledemo/penrose.py: remove unused clock() calls (GH-10033)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-10-241-3/+0
| | | Actually time calculations were remove in commit 891a1f8.
* Use f-strings in asyncio-task code examples (GH-10035)Mariatta2018-10-241-6/+6
| | | Replace str.format with f-strings in the code examples of asyncio-task documentation.
* bpo-32797: improve documentation of linecache.getline (GH-9540)jdemeyer2018-10-241-4/+7
|
* bpo-33899: Mention tokenize behavior change in What's New (GH-10073)Tal Einat2018-10-243-0/+21
|
* bpo-30863: Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(). ↵Serhiy Storchaka2018-10-232-123/+123
| | | | | | (GH-2599) They no longer cache the wchar_t* representation of string objects.
* bpo-34794: Fix a leak in Tkinter. (GH-10025)Serhiy Storchaka2018-10-232-3/+3
| | | Based on the investigation by Xiang Zhang.
* Fix error handling bugs in _elementtree.c. (GH-10060)Zackery Spytz2018-10-231-11/+11
| | | | References could leak, NULL could be dereferenced, and the Expat parser could be double freed when some errors raised.
* bpo-9263: _PyObject_Dump() detects freed memory (GH-10061)Victor Stinner2018-10-234-24/+75
| | | | | | | | | _PyObject_Dump() now uses an heuristic to check if the object memory has been freed: log "<freed object>" in that case. The heuristic rely on the debug hooks on Python memory allocators which fills the memory with DEADBYTE (0xDB) when memory is deallocated. Use PYTHONMALLOC=debug to always enable these debug hooks.
* Add macos-team as a code owner (GH-10045)Ned Deily2018-10-231-0/+4
|
* bpo-34980: P/Invoke QueryFullProcessImageName to get process names (GH-9901)Jeremy Kloth2018-10-231-10/+25
|
* bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523)Zsolt Cserna2018-10-232-6/+12
| | | | | | | | | | Fix the documentation of copy2, as it does not copy file ownership (user and group), only mode, mtime, atime and flags. The original text was confusing to developers as it suggested that this command is the same as 'cp -p', but according to cp(1), '-p' copies file ownership as well. Clarify which metadata is copied by shutil.copystat in its docstring.
* bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973)matthewbelisle-wf2018-10-232-18/+24
| | | https://bugs.python.org/issue35028
* bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042)Josh Snyder2018-10-231-2/+2
|
* bpo-34482: test datetime classes' handling of non-UTF-8-encodable strings ↵Alexey Izbyshev2018-10-231-0/+40
| | | | (GH-8878)
* bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809)Andrei Petre2018-10-231-5/+6
|
* bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959)Paul Ganssle2018-10-223-76/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use _PyUnicode_Copy in sanitize_isoformat_str * Use repr in fromisoformat error message This reverses commit 67b74a98b2 per Serhiy Storchaka's suggestion: I suggested to use %R in the error message because including the raw string can be confusing in the case of empty string, or string containing trailing whitespaces, invisible or unprintable characters. We agree that it is better to change both the C and pure Python versions to use repr. * Retain non-sanitized dtstr for error printing This does not create an extra string, it just holds on to a reference to the original input string for purposes of creating the error message. * PEP 7 fixes to from_isoformat * Separate handling of Unicode and other errors In the initial implementation, errors other than encoding errors would both raise an error indicating an invalid format, which would not be true for errors like MemoryError. * Drop needs_decref from _sanitize_isoformat_str Instead _sanitize_isoformat_str returns a new reference, even to the original string.
* Fix issue 34551 - remove redundant store (#9009)Eric Lippert2018-10-221-1/+1
| | | The assignment of i/2 to nk is redundant because on this code path, nk is already the size of the dictionary, and i is already twice the size of the dictionary. I've replaced the store with an assertion that i/2 is nk.
* bpo-29843: raise AttributeError if given negative _length_ (GH-10029)Tal Einat2018-10-223-10/+43
| | | | | | | | Raise ValueError OverflowError in case of a negative _length_ in a ctypes.Array subclass. Also raise TypeError instead of AttributeError for non-integer _length_. Co-authored-by: Oren Milman <orenmn@gmail.com>
* bpo-34081: Fix wrong example link that was linking to distutils (GH-8248)Xtreak2018-10-213-2/+3
|
* bpo-35036: Remove empty log line in the suspicious.py tool (GH-10024)Xtreak2018-10-211-1/+0
| | | | Previous to commit ee171a2 the logline was working because of self.info() (now deprecated) defaults to an empty message.
* bpo-34984: Improve error messages for bytes and bytearray constructors. ↵Serhiy Storchaka2018-10-213-6/+25
| | | | (GH-9874)
* bpo-34973: Fix crash in bytes constructor. (GH-9841)Serhiy Storchaka2018-10-213-35/+88
| | | Constructing bytes from mutating list could cause a crash.
* bpo-8525: help() on a type now shows builtin subclasses (GH-5066)Sanyam Khurana2018-10-213-0/+140
| | | | | For builtin types with builtin subclasses, help() on the type now shows up to 4 of the subclasses. This partially replaces the exception hierarchy information previously displayed in Python 2.7.
* bpo-35029: Replace the SyntaxWarning exception with a SyntaxError. (GH-9999)Serhiy Storchaka2018-10-213-11/+42
| | | | If SyntaxWarning was raised as an exception, it will be replaced with a SyntaxError for better error reporting.
* Update codeowners to match experts list change (#10022)Nick Coghlan2018-10-211-1/+1
|
* closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in ↵Max Bélanger2018-10-212-0/+6
| | | | | timemodule.c. (GH-9961) Guard the `CLOCK_GETTIME` et al macros in `timemodule` based on the availability of the parent functions
* Remove ">>>" from testsetup. (GH-10017)Benjamin Peterson2018-10-201-1/+1
| | | Fixes doc build breakage from 890a4b92933be8e7c554222d99ef829c88fa8637.