Skip to content

Latest commit

 

History

History
872 lines (613 loc) · 17.4 KB

3.8.0a3.rst

File metadata and controls

872 lines (613 loc) · 17.4 KB

Changes urlsplit() to raise ValueError when the URL contains characters that decompose under IDNA encoding (NFKC-normalization) into characters that affect how the URL is parsed.

Don't send cookies of domain A without Domain attribute to domain B when domain A is a suffix match of domain B while using a cookiejar with :class:`http.cookiejar.DefaultCookiePolicy` policy. Patch by Karthikeyan Singaravelan.

Fix a possible double decref in _ctypes.c's PyCArrayType_new().

Fix a possible crash when creating a new dictionary.

Fix a possible crash in structseq_repr().

Fix bug in parsermodule when parsing a state in a DFA that has two or more arcs with labels of the same type. Patch by Pablo Galindo.

repr(structseq) is no longer limited to 512 bytes.

Fix a possible null pointer dereference in merge_consts_recursive(). Patch by Zackery Spytz.

At Python initialization, the current directory is no longer prepended to :data:`sys.path` if it has been removed.

Python initialization now fails with an error, rather than silently truncating paths, if a path is too long.

Python initialization now fails if decoding pybuilddir.txt configuration file fails at startup.

Fix leak in _PyRuntimeState_Fini. Contributed by Stéphane Wirtel.

The builtin :func:`compile` can now handle AST objects that contain assignment expressions. Patch by Pablo Galindo.

Improved error message for too much positional arguments in some builtin functions.

New empty dict uses fewer memory for now. It used more memory than empty dict created by dict.clear(). And empty dict creation and deletion is about 2x faster. Patch by Inada Naoki.

Fix an unlikely memory leak on conversion from string to float in the function _Py_dg_strtod() used by float(str), complex(str), :func:`pickle.load`, :func:`marshal.load`, etc.

Update Unicode databases to version 12.0.0.

Fix a segfault occurring when sorting a list of heterogeneous values. Patch contributed by Rémi Lapeyre and Elliot Gorokhovsky.

Cleaned up left-over vestiges of Python 2 unbound method handling in method objects and documentation. Patch by Martijn Pieters

Add a new interpreter-specific dict and expose it in the C-API via PyInterpreterState_GetDict(). This parallels PyThreadState_GetDict(). However, extension modules should continue using PyModule_GetState() for their own internal per-interpreter state.

Add a feature_version flag to ast.parse() (documented) and compile() (hidden) that allows tweaking the parser to support older versions of the grammar. In particular, if feature_version is 5 or 6, the hacks for the async and await keyword from PEP 492 are reinstated. (For 7 or higher, these are unconditionally treated as keywords, but they are still special tokens rather than NAME tokens that the parser driver recognizes.)

Use UTF-8 as the system encoding on VxWorks.

The :meth:`~object.__index__` special method will be used instead of :meth:`~object.__int__` for implicit conversion of Python numbers to C integers. Using the __int__() method in implicit conversions has been deprecated.

Retire pgen and use a modified version of pgen2 to generate the parser. Patch by Pablo Galindo.

The class documentation created by pydoc now has a separate section for readonly properties.

The typing.NamedTuple() class has deprecated the _field_types attribute in favor of the __annotations__ attribute which carried the same information. Also, both attributes were converted from OrderedDict to a regular dict.

Fix :mod:`asyncio` ssl memory issues caused by circular references

Add method to statistics.NormalDist for computing the inverse cumulative normal distribution.

collections.namedtuple() misspelled the name of an attribute. To be consistent with typing.NamedTuple, the attribute name should have been "_field_defaults" instead of "_fields_defaults". For backwards compatibility, both spellings are now created. The misspelled version may be removed in the future.

"unicode_internal" codec is removed. It was deprecated since Python 3.3. Patch by Inada Naoki.

Raise ModuleNotFoundError in pyclbr when a module can't be found. Thanks to 'mental' for the bug report.

Switch the default format used for writing tars with :mod:`tarfile` to the modern POSIX.1-2001 pax standard, from the vendor-specific GNU. Contributed by C.A.M. Gerlach.

Fix integer overflows in the array module. Patch by Stephan Hohe.

Add _signal module support for VxWorks.

:mod:`logging` does not silently ignore RecursionError anymore. Patch contributed by Rémi Lapeyre.

Add a kind field to ast.Constant. It is 'u' if the literal has a 'u' prefix (i.e. a Python 2 style unicode literal), else None.

The :mod:`pdb` debug command now gracefully handles all exceptions.

Fix format strings used for stderrprinter and re.Match reprs. Patch by Stephan Hohe.

Fix CFLAGS in customize_compiler() of distutils.sysconfig: when the CFLAGS environment variable is defined, don't override CFLAGS variable with the OPT variable anymore. Initial patch written by David Malcolm.

Update ensurepip to install pip 19.0.3 and setuptools 40.8.0.

Release GIL when closing :class:`~mmap.mmap` objects.

Fix two unlikely reference leaks in _hashopenssl. The leaks only occur in out-of-memory cases.

Add overlap() method to statistics.NormalDist. Computes the overlapping coefficient for two normal distributions.

Default buffer size used by shutil.copyfileobj() is changed from 16 KiB to 64 KiB on non-Windows platform to reduce system call overhead. Contributed by Inada Naoki.

Fix pdb with skip=... when stepping into a frame without a __name__ global. Patch by Anthony Sottile.

shutil.copytree(copy_function=...) erroneously pass DirEntry instead of a path string.

Ensure custom :func:`warnings.formatwarning` function can receive line as positional argument. Based on patch by Tashrif Billah.

Resolve potential name clash with libm's sinpi(). Patch by Dmitrii Pasechnik.

Clean up reference to async generator in Lib/types. Patch by Henry Chen.

:class:`FileCookieJar` supports :term:`path-like object`. Contributed by Stéphane Wirtel

Enum has been fixed to correctly handle empty strings and strings with non-Latin characters (ie. 'α', 'א') without crashing. Original patch contributed by Maxwell. Assisted by Stéphane Wirtel.

Add args and kwargs properties to mock call objects. Contributed by Kumar Akshay.

pprint.pp has been added to pretty-print objects with dictionary keys being sorted with their insertion order by default. Parameter sort_dicts has been added to pprint.pprint, pprint.pformat and pprint.PrettyPrinter. Contributed by Rémi Lapeyre.

Implement __getitem__ for _NamespacePath. Patch by Anthony Sottile.

Clean up code which checked presence of os.stat / os.lstat / os.chmod which are always present. Patch by Anthony Sottile.

Librates the return value of a ProcessPoolExecutor _process_worker after it's no longer needed to free memory

Use :func:`multiprocessing.connection.wait` instead of polling each 0.2 seconds for worker updates in :class:`multiprocessing.Pool`. Patch by Pablo Galindo.

Store the venv prompt in pyvenv.cfg.

Don't set cookie for a request when the request path is a prefix match of the cookie's path attribute but doesn't end with "/". Patch by Karthikeyan Singaravelan.

Calls to a child function created with :func:`unittest.mock.create_autospec` should propagate to the parent. Patch by Karthikeyan Singaravelan.

Fix C++ extension compilation on AIX

Declare the path of the Python binary for the usage of Tools/scripts/serve.py when executing make -C Doc/ serve. Contributed by Stéphane Wirtel

Improve documentation about converting datetime.timedelta to scalars.

A new entry was added to the Core Language Section of the Programming FAQ, which explaines the usage of slash(/) in the signature of a function. Patch by Lysandros Nikolaou

test_posix.PosixUidGidTests: add tests for invalid uid/gid type (str). Initial patch written by David Malcolm.

Fix test_re.test_locale_flag(): use locale.getpreferredencoding() rather than locale.getlocale() to get the locale encoding. With some locales, locale.getlocale() returns the wrong encoding.

Fix race condition in test_socket.

Fix leaks that led to build failure when configured with address sanitizer.

Add TEST_EXTENSIONS constant to setup.py to allow to not build test extensions like _testcapi.

Fix setup.py on macOS: only add /usr/include/ffi to include directories of _ctypes, not for all extensions.

Enable build system to cross-build for VxWorks RTOS.

Fixed decoders for the following code pages: 50220, 50221, 50222, 50225, 50227, 50229, 57002 through 57011, 65000 and 42.

Don't honor POSIX HOME in os.path.expanduser on windows. Patch by Anthony Sottile.

Fix name collisions due to #define timezone _timezone in PC/pyconfig.h.

Use dict unpacking in idlelib.

Remove fgBg param of idlelib.config.GetHighlight(). This param was only used twice and changed the return type.

Fix IDLE autocomplete & calltip popup colors. Prevent conflicts with Linux dark themes (and slightly darken calltip background).

For the grep module, add tests for findfiles, refactor findfiles to be a module-level function, and refactor findfiles to use os.walk.

Add docstrings to IDLE search modules.

Remove colorizer.ColorDelegator.close_when_done and the corresponding argument of .close(). In IDLE, both have always been None or False since 2007.

Avoid blurry IDLE application icon on macOS with Tk 8.6. Patch by Kevin Walzer.

Refactor class variables to instance variables in colorizer.

Increase test coverage of idlelib.autocomplete by 30%. Patch by Louie Lu

Fix py-list and py-bt commands of python-gdb.py on gdb7.

Fix freeze script on Windows.

Raise DeprecationWarning when '#' formats are used for building or parsing values without PY_SSIZE_T_CLEAN.

The whole coreconfig.h header is now excluded from Py_LIMITED_API. Move functions definitions into a new internal pycore_coreconfig.h header.