- 28 Oct, 2018 16 commits
-
-
Terry Jan Reedy authored
Add a paragraph in "Help and preferences", "Help sources" subsection.
-
Pablo Galindo authored
The list() constructor isn't taking full advantage of known input lengths or length hints. This commit makes the constructor pre-size and not over-allocate when the input size is known (the input collection implements __len__). One on the main advantages is that this provides 12% difference in memory savings due to the difference between overallocating and allocating exactly the input size. For efficiency purposes and to avoid a performance regression for small generators and collections, the size of the input object is calculated using __len__ and not __length_hint__, as the later is considerably slower.
-
Serhiy Storchaka authored
-
Raymond Hettinger authored
-
Serhiy Storchaka authored
-
Alexey Izbyshev authored
* Fix potential division by zero in BZ2_Malloc() * Avoid division by zero in PyLzma_Malloc() * Avoid division by zero and integer overflow in PyZlib_Malloc() Reported by Svace static analyzer.
-
Terry Jan Reedy authored
-
-
Xiang Zhang authored
-
Pablo Galindo authored
Configuring python with ./configure --with-pydebug CFLAGS="-D COUNT_ALLOCS -O0" makes "make smelly" fail as some symbols were being exported without the "Py_" or "_Py" prefixes.
-
Serhiy Storchaka authored
Some projects (e.g. Chameleon) create ast.Str containing an instance of the str subclass.
-
Serhiy Storchaka authored
-
Andrés Delfino authored
Fix a bug I introduced in #9864 by which coroutines are treated as synonymous of function coroutines. Also, fix the same mistake (coroutines == function coroutines) already present in other parts of the reference. I'm very sorry for the hassle.
-
Terry Jan Reedy authored
We now use git and backporting instead of hg and forward merging.
-
Terry Jan Reedy authored
There is only one trivial change to idle.rst. Nearly all the changes to help.html are the elimination of chapter and section numbers on headers due to changes in the build system. help.py no longer requires header numbering.
-
jdemeyer authored
-
- 27 Oct, 2018 5 commits
-
-
Steve Dower authored
-
Andreas Pelme authored
Referring to ``pytest`` as ``py.test`` is deprecated.
-
nsrip authored
-
Serhiy Storchaka authored
They return encoded bytes and are Python 2 artifacts.
-
Terry Jan Reedy authored
Specify that blocks are non-overlapping. Change '!=' to '<'.
-
- 26 Oct, 2018 17 commits
-
-
Stéphane Wirtel authored
-
Quentin Agren authored
Since `SourceFileLoader.set_data()` catches exceptions raised by `_write_atomic()` and logs an informative message consequently, always logging successful outcome in 'SourceLoader.get_code()' seems redundant. https://bugs.python.org/issue35024
-
Benjamin Peterson authored
"threadsafe"
-
Victor Stinner authored
Use _PyObject_ASSERT() in: * _PyDict_CheckConsistency() * _PyType_CheckConsistency() * _PyUnicode_CheckConsistency() _PyObject_ASSERT() dumps the faulty object if the assertion fails to help debugging.
-
Victor Stinner authored
Replace assert() with _PyObject_ASSERT() in Objects/typeobject.c to dump the faulty object on assertion failure to ease debugging.
-
Victor Stinner authored
Replace assert() with _PyObject_ASSERT() in Modules/gcmodule.c to dump the faulty object on assertion failure to ease debugging. Fix also indentation of a large comment. Initial patch written by David Malcolm. Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
-
Victor Stinner authored
Replace assert() with _PyObject_ASSERT() in Objects/object.c to dump the faulty object on assertion failure to ease debugging.
-
Victor Stinner authored
Declare functions with EXTINLINE: * mpd_del() * mpd_uint_zero() * mpd_qresize() * mpd_qresize_zero() * mpd_minalloc() These functions are implemented with "inline" or "ALWAYS_INLINE", but declared without inline which cause linker error on Visual Studio in Debug mode when using /Ob1.
-
Andrés Delfino authored
-
Denis Ledoux authored
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.
-
Senthil Kumaran authored
-
Victor Stinner authored
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.
-
Victor Stinner authored
* Convert PyObject_INIT() and PyObject_INIT_VAR() macros to static inline functions. * Fix usage of these functions: cast to PyObject* or PyVarObject*.
-
Pablo Galindo authored
bpo-34890: Make iscoroutinefunction, isgeneratorfunction and 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.
-
Stéphane Wirtel authored
-
Serhiy Storchaka authored
-
Victor Stinner authored
_Py_NegativeRefcount() now uses _PyObject_AssertFailed() to dump the object to help debugging.
-
- 25 Oct, 2018 2 commits
-
-
Victor Stinner authored
_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.
-
Max Bélanger authored
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.
-