Commit 3b5deb01 authored by Łukasz Langa's avatar Łukasz Langa

Python 3.8.0b1

parent 8d0ef0b5
......@@ -36,7 +36,7 @@ import suspicious
ISSUE_URI = 'https://bugs.python.org/issue%s'
SOURCE_URI = 'https://github.com/python/cpython/tree/master/%s'
SOURCE_URI = 'https://github.com/python/cpython/tree/3.8/%s'
# monkey-patch reST parser to disable alphabetic and roman enumerated lists
from docutils.parsers.rst.states import Body
......
......@@ -19,11 +19,11 @@
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 8
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
#define PY_RELEASE_SERIAL 4
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
#define PY_RELEASE_SERIAL 1
/* Version as a string */
#define PY_VERSION "3.8.0a4+"
#define PY_VERSION "3.8.0b1"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
......
This diff is collapsed.
This diff is collapsed.
To embed Python into an application, a new ``--embed`` option must be passed to
``python3-config --libs --embed`` to get ``-lpython3.8`` (link the application
to libpython). To support both 3.8 and older, try ``python3-config --libs
--embed`` first and fallback to ``python3-config --libs`` (without ``--embed``)
if the previous command fails.
Add a pkg-config ``python-3.8-embed`` module to embed Python into an
application: ``pkg-config python-3.8-embed --libs`` includes ``-lpython3.8``.
To support both 3.8 and older, try ``pkg-config python-X.Y-embed --libs`` first
and fallback to ``pkg-config python-X.Y --libs`` (without ``--embed``) if the
previous command fails (replace ``X.Y`` with the Python version).
On the other hand, ``pkg-config python3.8 --libs`` no longer contains
``-lpython3.8``. C extensions must not be linked to libpython (except on
Android, case handled by the script); this change is backward incompatible on
purpose.
The :c:func:`PyEval_ReInitThreads` function has been removed from the C API.
It should not be called explicitly: use :c:func:`PyOS_AfterFork_Child` instead.
Add new type flag ``Py_TPFLAGS_METHOD_DESCRIPTOR`` for objects behaving like
unbound methods. These are objects supporting the optimization given by the
``LOAD_METHOD``/``CALL_METHOD`` opcodes. See PEP 590.
``Py_Main()`` now returns the exitcode rather than calling
``Py_Exit(exitcode)`` when calling ``PyErr_Print()`` if the current
exception type is ``SystemExit``.
Implement :pep:`590`: Vectorcall: a fast calling protocol for CPython.
This is a new protocol to optimize calls of custom callable objects.
Update :c:func:`PyObject_CallMethodObjArgs` and ``_PyObject_CallMethodIdObjArgs``
to use ``_PyObject_GetMethod`` to avoid creating a bound method object in many
cases.
Patch by Michael J. Sullivan.
Fix crashes when attempting to use the *modulo* parameter when ``__ipow__``
is implemented in C.
Implement the :pep:`587` "Python Initialization Configuration".
Port binascii to PEP 489 multiphase initialization.
Patch by Marcel Plch.
Remove cross-version binary compatibility requirement in tp_flags.
Expose :func:`copy_file_range` as a low level API in the :mod:`os` module.
Do not clear :data:`sys.flags` and :data:`sys.float_info` during shutdown.
Patch by Zackery Spytz.
Added new trashcan macros to deal with a double deallocation that could occur
when the `tp_dealloc` of a subclass calls the `tp_dealloc` of a base class
and that base class uses the trashcan mechanism. Patch by Jeroen Demeyer.
Added fix for broken symlinks in combination with pathlib
\ No newline at end of file
Add native thread ID (TID) to threading.Thread objects (supported platforms: Windows, FreeBSD, Linux, macOS)
\ No newline at end of file
Fix incorrect use of ``%p`` in format strings.
Patch by Zackery Spytz.
A long-since-meaningless check for ``getpid() == main_pid`` was removed
from Python's internal C signal handler.
pymalloc returns memory blocks aligned by 16 bytes, instead of 8 bytes, on
64-bit platforms to conform x86-64 ABI. Recent compilers assume this alignment
more often. Patch by Inada Naoki.
Save the live exception during import.c's ``remove_module()``.
Add a ``=`` feature f-strings for debugging. This can precede ``!s``,
``!r``, or ``!a``. It produces the text of the expression, followed by
an equal sign, followed by the repr of the value of the expression. So
``f'{3*9+15=}'`` would be equal to the string ``'3*9+15=42'``. If
``=`` is specified, the default conversion is set to ``!r``, unless a
format spec is given, in which case the formatting behavior is
unchanged, and __format__ will be used.
Removed ``__str__`` implementations from builtin types :class:`bool`,
:class:`int`, :class:`float`, :class:`complex` and few classes from the
standard library. They now inherit ``__str__()`` from :class:`object`.
Move PyRuntimeState.warnings into per-interpreter state (via "module
state").
Correct return type for UserList slicing operations. Patch by Michael Blahay,
Erick Cervantes, and vaultah
Implement PEP 578, adding sys.audit, io.open_code and related APIs.
The ``compile()`` builtin functions now support the ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag, which allow to compile sources that contains top-level ``await``, ``async with`` or ``async for``. This is useful to evaluate async-code from with an already async functions; for example in a custom REPL.
\ No newline at end of file
The ``FrameType`` stack is now correctly cleaned up if the execution ends
with a return and the stack is not empty.
Avoid caching attributes of classes which type defines mro() to avoid a hard
cache invalidation problem.
Allow computation of modular inverses via three-argument ``pow``: the second
argument is now permitted to be negative in the case where the first and
third arguments are relatively prime.
A :exc:`SyntaxError` is now raised if a code blocks that will be optimized
away (e.g. if conditions that are always false) contains syntax errors.
Patch by Pablo Galindo.
Fix possible signed integer overflow when handling slices.
Fix a crash when calling a C function with a keyword dict (``f(**kwargs)``)
and changing the dict ``kwargs`` while that function is running.
Treat line continuation at EOF as a ``SyntaxError`` by Anthony Sottile.
Store text appearing after a `# type: ignore` comment in the AST. For
example a type ignore like `# type: ignore[E1000]` will have the string
`"[E1000]"` stored in its AST node.
Only accept text after `# type: ignore` if the first character is ASCII.
This is to disallow things like `# type: ignoreé`.
:c:func:`PyErr_WriteUnraisable` now creates a traceback object if there is
no current traceback. Moreover, call :c:func:`PyErr_NormalizeException` and
:c:func:`PyException_SetTraceback` to normalize the exception value. Ignore any
error.
Implement :func:`socket.if_nameindex()`, :func:`socket.if_nametoindex()`, and
:func:`socket.if_indextoname()` on Windows.
Added new ``replace()`` method to the code type (:class:`types.CodeType`).
The `bytes.hex`, `bytearray.hex`, and `memoryview.hex` methods as well as
the `binascii.hexlify` and `b2a_hex` functions now have the ability to
include an optional separator between hex bytes. This functionality was
inspired by MicroPython's hexlify implementation.
Improve the AST for "debug" f-strings, which use '=' to print out the source
of the expression being evaluated. Delete expr_text from the FormattedValue
node, and instead use a Constant string node (possibly merged with adjacent
constant expressions inside the f-string).
Fix possible overflow in ``wrap_lenfunc()`` when
``sizeof(long) < sizeof(Py_ssize_t)`` (e.g., 64-bit Windows).
Freeing a great many small objects could take time quadratic in the number of arenas, due to using linear search to keep ``obmalloc.c``'s list of usable arenas sorted by order of number of free memory pools. This is accomplished without search now, leaving the worst-case time linear in the number of arenas. For programs where this quite visibly matters (typically with more than 100 thousand small objects alive simultaneously), this can greatly reduce the time needed to release their memory.
\ No newline at end of file
Fix crash in PyAST_FromNodeObject() when flags is NULL.
\ No newline at end of file
Implemented per opcode cache mechanism and ``LOAD_GLOBAL`` instruction use
it. ``LOAD_GLOBAL`` is now about 40% faster. Contributed by Yury Selivanov,
and Inada Naoki.
Add native thread ID (TID) support to OpenBSD.
\ No newline at end of file
Constructors of :class:`int`, :class:`float` and :class:`complex` will now
use the :meth:`~object.__index__` special method, if available and the
corresponding method :meth:`~object.__int__`, :meth:`~object.__float__`
or :meth:`~object.__complex__` is not available.
Make the *co_argcount* attribute of code objects represent the total number
of positional arguments (including positional-only arguments). The value of
*co_posonlyargcount* can be used to distinguish which arguments are
positional only, and the difference (*co_argcount* - *co_posonlyargcount*)
is the number of positional-or-keyword arguments. Patch by Pablo Galindo.
All structseq objects are now tracked by the garbage collector. Patch by
Pablo Galindo.
Allow unpacking in the right hand side of annotated assignments. In
particular, ``t: Tuple[int, ...] = x, y, *z`` is now allowed.
Expand object.__doc__ (docstring) to make it clearer.
Modify pydoc.py so that help(object) lists object methods
(for other classes, help omits methods of the object base class.)
Added documentation for func factorial to indicate that returns integer values
Make `codecs.StreamRecoder.writelines` take a list of bytes.
Clarify that `copy()` is not part of the `MutableSequence` ABC.
Remove deprecation and document urllib.parse.unwrap(). Patch contributed by
Rémi Lapeyre.
Add detail to the documentation on the `pty.spawn` function.
\ No newline at end of file
More of the legacy distutils documentation has been either pruned, or else
more clearly marked as being retained solely until the setuptools
documentation covers it independently.
Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold as per PEP 495.
Patch by Edison Abahurire.
\ No newline at end of file
Add a note to the ``curses.addstr()`` documentation to warn that multiline
strings can cause segfaults because of an ncurses bug.
What's new now mentions SSLContext.hostname_checks_common_name instead of
SSLContext.host_flags.
Improve version added references in ``typing`` module - by Anthony Sottile.
Improve documentation of the stdin, stdout, and stderr arguments of of the
``asyncio.subprocess_exec`` function to specficy which values are supported.
Also mention that decoding as text is not supported.
Add a few tests to verify that the various values passed to the std*
arguments actually work.
Clarify that some types have unstable constructor signature between Python
versions.
In browser.py, remove extraneous sorting by line number since dictionary was
created in line number order.
When saving a file, call os.fsync() so bits are flushed to e.g. USB drive.
Print any argument other than None or int passed to SystemExit or
sys.exit().
Replace now redundant .context_use_ps1 with .prompt_last_line. This finishes
change started in bpo-31858.
``_thread.interrupt_main()`` now avoids setting the Python error status
if the ``SIGINT`` signal is ignored or not handled by Python.
``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) are now escaped in
protocol 0 pickles of Unicode strings. This allows to load them without loss
from files open in text mode in Python 2.
Added a ``__copy__()`` to ``collections.UserList`` and
``collections.UserDict`` in order to correctly implement shallow copying of
the objects. Patch by Bar Harel.
Changed :func:`unittest.mock.patch.dict` to return the patched
dictionary when used as context manager. Patch by Vadim Tsander.
trace.py can now run modules via python3 -m trace -t --module module_name
Added support for ZIP files with disks set to 0. Such files are commonly created by builtin tools on Windows when use ZIP64 extension.
Patch by Francisco Facioni.
Allow :class:`mmap.mmap` objects to access the madvise() system call
(through :meth:`mmap.mmap.madvise`).
:class:`pathlib.Path.unlink` now accepts a *missing_ok* parameter to avoid a
:exc:`FileNotFoundError` from being raised. Patch by Robert Buchholz.
Added support for bytes and path-like objects in :func:`subprocess.Popen`
on Windows. The *args* parameter now accepts a :term:`path-like object` if
*shell* is ``False`` and a sequence containing bytes and path-like objects.
The *executable* parameter now accepts a bytes and :term:`path-like object`.
The *cwd* parameter now accepts a bytes object.
Based on patch by Anders Lorentsen.
Change ThreadPoolExecutor to use existing idle threads before spinning up new ones.
\ No newline at end of file
:meth:`asyncio.AbstractEventLoop.create_datagram_endpoint`:
Do not connect UDP socket when broadcast is allowed.
This allows to receive replies after a UDP broadcast.
The :mod:`shlex` module now exposes :func:`shlex.join`, the inverse of
:func:`shlex.split`. Patch by Bo Bayles.
Fix a bug in :class:`codecs.StreamRecoder` where seeking might leave old data in a
buffer and break subsequent read calls. Patch by Ammar Askar.
Performance of :func:`functools.reduce` is slightly improved. Patch by
Sergey Fedoseev.
Fix serialization of messages containing encoded strings when the
policy.linesep is set to a multi-character string. Patch by Jens Troeger.
dataclasses.InitVar: Exposes the type used to create the init var.
Added AsyncMock to support using unittest to mock asyncio coroutines.
Patch by Lisa Roach.
Add debugging helpers to ssl module. It's now possible to dump key material
and to trace TLS protocol. The default and stdlib contexts also support
SSLKEYLOGFILE env var.
Fixed permission errors in :class:`~tempfile.TemporaryDirectory` clean up.
Previously ``TemporaryDirectory.cleanup()`` failed when non-writeable or
non-searchable files or directories were created inside a temporary
directory.
Implement :func:`math.comb` that returns binomial coefficient, that computes
the number of ways to choose k items from n items without repetition and
without order.
Patch by Yash Aggarwal and Keller Fuchs.
:func:`unittest.mock.mock_open` results now respects the argument of read([size]).
Patch contributed by Rémi Lapeyre.
Fix :meth:`asyncio.SelectorEventLoop.subprocess_exec()` leaks file descriptors
if ``Popen`` fails and called with ``stdin=subprocess.PIPE``.
Patch by Niklas Fiekas.
Asyncio: Remove inner callback on outer cancellation in shield
This diff is collapsed.
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