Commit 8efa3b69 authored by Łukasz Langa's avatar Łukasz Langa

[blurb] v3.8.0a1

parent f75d59e1
This diff is collapsed.
Fix the python debug build when using COUNT_ALLOCS.
gcc 8 has added a new warning heuristic to detect invalid function casts and
a stock python build seems to hit that warning quite often. The most common
is the cast of a METH_NOARGS function (that uses just one argument) to a
PyCFunction. Fix this by adding a dummy argument to all functions that
implement METH_NOARGS.
The embedding tests can once again be built with clang 6.0
By default, modules configured in `Modules/Setup` are no longer built with
`-DPy_BUILD_CORE`. Instead, modules that specifically need that preprocessor
definition include it in their individual entries.
Add new triplets for mips r6 and riscv variants (used in extension
suffixes).
Enable the verbose build for extension modules, when GNU make is passed
macros on the command line.
C compiler is now correctly detected from the standard environment
variables. --without-gcc and --with-icc options have been removed.
configure's check for "long double" has been simplified
Enable CI builds on Visual Studio Team Services at
https://python.visualstudio.com/cpython
The --with-c-locale-warning configuration flag has been removed. It has had
no effect for about a year.
Ensures module definition files for the stable ABI on Windows are correctly
regenerated.
Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from ``OPT``. This
option emitted annoying warnings when building extension modules written in
C++.
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
Rename Modules/Setup.dist to Modules/Setup, and remove the necessity to copy
the former manually to the latter when updating the local source tree.
The Python shared library is now installed with write permission (mode 0755),
which is the standard way of installing such libraries.
Fix an undefined behaviour in the pthread implementation of
:c:func:`PyThread_start_new_thread`: add a function wrapper to always return
``NULL``.
Fix for case where it was not possible to have both
``HAVE_LINUX_VM_SOCKETS_H`` and ``HAVE_SOCKADDR_ALG`` be undefined.
Make Sphinx warnings as errors in the Docs Makefile.
Add JUnit XML output for regression tests and update Azure DevOps builds.
Fixed SSL module build with OpenSSL & pedantic CFLAGS.
Check for floating-point byte order in configure.ac using compilation tests
instead of executing code, so that these checks work in cross-compiled
builds.
Update the outdated install-sh file to the latest revision from automake
v1.16.1
Restores the use of pyexpatns.h to isolate our embedded copy of the expat C
library so that its symbols do not conflict at link or dynamic loading time
with an embedding application or other extension modules with their own
version of libexpat.
PCbuild: Set InlineFunctionExpansion to OnlyExplicitInline ("/Ob1" option)
in pyproject.props in Debug mode to expand functions marked as inline. This
change should make Python compiled in Debug mode a little bit faster on
Windows.
Fix a compiler error when statically linking `pyexpat` in `Modules/Setup`.
When building Python with clang and LTO, LTO flags are no longer passed into
CFLAGS to build third-party C extensions through distutils.
Avoid leaking the linker flags from Link Time Optimizations (LTO)
into distutils when compiling C extensions.
\ No newline at end of file
``make profile-opt`` no longer replaces ``CFLAGS_NODIST`` with ``CFLAGS``. It
now adds profile-guided optimization (PGO) flags to ``CFLAGS_NODIST``: existing
``CFLAGS_NODIST`` flags are kept.
Fix incorrect Solaris #ifdef checks to look for __sun && __SVR4 instead of sun when compiling.
\ No newline at end of file
Improved Azure Pipelines build steps and now verifying layouts correctly
The _contextvars module is now built into the core Python library on
Windows.
:c:func:`PyUnicode_AsWideChar` and :c:func:`PyUnicode_AsWideCharString` no
longer cache the ``wchar_t*`` representation of string objects.
Document that m_traverse for multi-phase initialized modules can be called
with m_state=NULL, and add a sanity check
Embedding applications may once again call PySys_ResetWarnOptions,
PySys_AddWarnOption, and PySys_AddXOption prior to calling Py_Initialize.
\ No newline at end of file
:c:func:`PyExceptionClass_Name` will now return ``const char *`` instead of
``char *``.
Fixed error messages for :c:func:`PySequence_Size`,
:c:func:`PySequence_GetItem`, :c:func:`PySequence_SetItem` and
:c:func:`PySequence_DelItem` called with a mapping and
:c:func:`PyMapping_Size` called with a sequence.
Py_Main() can again be called after Py_Initialize(), as in Python 3.6.
Added :c:func:`PyCompile_OpcodeStackEffectWithJump`.
Fixed :exc:`SystemError` in :c:func:`PyArg_ParseTupleAndKeywords` when the
``w*`` format unit is used for optional parameter.
Return grammatically correct error message based on argument count.
Patch by Karthikeyan Singaravelan.
Fix pluralization in TypeError messages in getargs.c and typeobject.c:
'1 argument' instead of '1 arguments' and '1 element' instead of '1 elements'.
Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding on
Windows if Py_LegacyWindowsFSEncodingFlag is zero.
Ensure that :c:func:`PyObject_Print` always returns ``-1`` on error. Patch
by Zackery Spytz.
Adds _Py_SetProgramFullPath so embedders may override sys.executable
Creation of a new ``Include/cpython/`` subdirectory.
The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros
have been removed from the public C API.
Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6) based on
Py_LIMITED_API. Patch by Arthur Neufeld.
Internal APIs surrounded by ``#ifdef Py_BUILD_CORE`` have been moved from
``Include/*.h`` headers to new header files ``Include/internal/pycore_*.h``.
``make install`` now also installs the internal API:
``Include/internal/*.h`` header files.
The following C macros have been converted to static inline functions:
:c:func:`Py_INCREF`, :c:func:`Py_DECREF`, :c:func:`Py_XINCREF`,
:c:func:`Py_XDECREF`, :c:func:`PyObject_INIT`, :c:func:`PyObject_INIT_VAR`.
Fix memory leak in :c:func:`PyUnicode_EncodeLocale` and
:c:func:`PyUnicode_EncodeFSDefault` on error handling.
Fixed :c:func:`_PyBytes_Resize` for empty bytes objects.
The :c:func:`PyByteArray_Init` and :c:func:`PyByteArray_Fini` functions have
been removed. They did nothing since Python 2.7.4 and Python 3.2.0, were
excluded from the limited API (stable ABI), and were not documented.
Remove references to 'getsockaddrarg' from various socket error messages.
Patch by Oren Milman.
Fix a crash in `os.utime()` in case of a bad ns argument. Patch by Oren
Milman.
Fix a crash in `ctypes.cast()` in case the type argument is a ctypes
structured data type. Patch by Eryk Sun and Oren Milman.
Fix assertion failures in the ``tell()`` method of ``io.TextIOWrapper``.
Patch by Zackery Spytz.
Fix the ``col_offset`` attribute for ast nodes ``ast.AsyncFor``,
``ast.AsyncFunctionDef``, and ``ast.AsyncWith``. Previously, ``col_offset``
pointed to the keyword after ``async``.
Iterable unpacking is now allowed without parentheses in yield and return
statements, e.g. ``yield 1, 2, 3, *rest``. Thanks to David Cuthbert for the
change and Jordan Chapman for added tests.
Yield expressions are now disallowed in comprehensions and generator
expressions except the expression for the outermost iterable.
New function unicodedata.is_normalized, which can check whether a string is
in a specific normal form.
Simplified the interpreter loop by moving the logic of unrolling the stack
of blocks into the compiler. The compiler emits now explicit instructions
for adjusting the stack of values and calling the cleaning up code for
:keyword:`break`, :keyword:`continue` and :keyword:`return`.
Removed opcodes :opcode:`BREAK_LOOP`, :opcode:`CONTINUE_LOOP`,
:opcode:`SETUP_LOOP` and :opcode:`SETUP_EXCEPT`. Added new opcodes
:opcode:`ROT_FOUR`, :opcode:`BEGIN_FINALLY` and :opcode:`CALL_FINALLY` and
:opcode:`POP_FINALLY`. Changed the behavior of :opcode:`END_FINALLY` and
:opcode:`WITH_CLEANUP_START`.
A :keyword:`continue` statement is now allowed in the :keyword:`finally`
clause.
Fix possible crashing in builtin Unicode decoders caused by write
out-of-bound errors when using customized decode error handlers.
Fix the warning messages for Python/ast_unparse.c. Patch by Stéphane Wirtel
Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
For namespace packages, ensure that both ``__file__`` and
``__spec__.origin`` are set to None.
Remove the new API added in bpo-31356 (gc.ensure_disabled() context
manager).
Don't use temporary variables in cases of list/dict/set comprehensions
Update Valgrind suppression list to account for the rename of
``Py_ADDRESS_IN_RANG`` to ``address_in_range``.
Optimized iterating and containing test for literal lists consisting of
non-constants: ``x in [a, b]`` and ``for x in [a, b]``. The case of all
constant elements already was optimized.
Make error message more revealing when there are non-str objects in ``__all__``.
Importing names from already imported module with "from ... import ..." is
now 30% faster if the module is not a package.
Prevent jumps from 'return' and 'exception' trace events.
Due to unexpected compatibility issues discovered during downstream beta
testing, reverted :issue:`29463`. ``docstring`` field is removed from Module,
ClassDef, FunctionDef, and AsyncFunctionDef ast nodes which was added in
3.7a1. Docstring expression is restored as a first statement in their body.
Based on patch by Inada Naoki.
Fix a crash on fork when using a custom memory allocator (ex: using
PYTHONMALLOC env var). _PyGILState_Reinit() and _PyInterpreterState_Enable()
now use the default RAW memory allocator to allocate a new interpreters mutex
on fork.
Fixed bytecode generation for "async for" with a complex target. A
StopAsyncIteration raised on assigning or unpacking will be now propagated
instead of stopping the iteration.
Fix rare Python crash due to bad refcounting in ``type_getattro()`` if a
descriptor deletes itself from the class. Patch by Jeroen Demeyer.
Added new opcode :opcode:`END_ASYNC_FOR` and fixes the following issues:
* Setting global :exc:`StopAsyncIteration` no longer breaks ``async for``
loops.
* Jumping into an ``async for`` loop is now disabled.
* Jumping out of an ``async for`` loop no longer corrupts the stack.
``math.factorial`` no longer accepts arguments that are not int-like.
Patch by Pablo Galindo.
Improve consistency of errors raised by ``issubclass()`` when called with a
non-class and an abstract base class as the first and second arguments,
respectively. Patch by Josh Bronson.
Changed standard error message for non-pickleable and non-copyable types. It
now says "cannot pickle" instead of "can't pickle" or "cannot serialize".
When using the -m switch, sys.path[0] is now explicitly expanded as the
*starting* working directory, rather than being left as the empty path
(which allows imports from the current working directory at the time of the
import)
Fix ``ma_version_tag`` in dict implementation is uninitialized when copying
from key-sharing dict.
Improved error messages in 'async with' when ``__aenter__()`` or
``__aexit__()`` return non-awaitable object.
Change dict growth function from ``round_up_to_power_2(used*2+hashtable_size/2)`` to
``round_up_to_power_2(used*3)``. Previously, dict is shrinked only when ``used == 0``.
Now dict has more chance to be shrinked.
The C and Python code and the documentation related to tokens are now generated
from a single source file :file:`Grammar/Tokens`.
Intern the names for all anonymous code objects. Patch by Zackery Spytz.
The list constructor will pre-size and not over-allocate when
the input lenght is known.
Improved syntax error messages for unbalanced parentheses.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment