- new design discussion section to cover the requirement that the
semantics of locals() itself at function scope be left alone
- propose a C level API that exactly matches Python level
frame.f_locals semantics
- other minor text formatting and wording updates
Changing the frame API semantics based on whether or not a
tracing function is active is tricky to implement and hard
to document clearly, so this simplifies the proposal by
instead having the frame API always expose a write-through
proxy at function scope, and restricting the dynamic
snapshot behaviour to the locals() builtin.
* Deprecate parser module
* Keep fileinput module
* Elaborate why crypt and spwd are dangerous and bad
* Improve sections for cgitb, colorsys, nntplib, and smtpd modules
* The colorsys, crypt, imghdr, sndhdr, and spwd sections now list suitable substitutions.
* Mention that socketserver is going to stay for http.server and xmlrpc.server
The main change is the introduction of "Python Configuration" and
"Isolated Configuration" default configuration which are well better
defined. Replace all macros with functions.
Changes:
* PyPreConfig: no longer uses dynamically memory allocation,
allocator type becomes an enum, add parse_argv and configure_locale
field.
* PyConfig: Remove program field, rename module_search_path_env to
pythonpath_env
* New functions:
* PyPreConfig_InitIsolatedConfig()
* PyPreConfig_InitPythonConfig()
* PyConfig_InitIsolatedConfig()
* PyConfig_InitPythonConfig()
* parse_argv default becomes 0
* Replace Py_INIT_xxx() macros with functions
* Document default values
* Remove PyConfig.dll_path
* Explain how PyConfig preinitializes Python and the relationship
between command line arguments and the pre-initialization.
* Rename use_module_search_paths to module_search_paths_set
* Rename PyInitError_Err() to PyInitError_Error()
* "Pre-initialization" => "Preinitialization"
* Reject preconfig=NULL and config=NULL
* Replace "wchar_t**" with "wchar_t * const *", same for "char**".
* Thomas Wouters is now the BDFL-delegate
* Elaborate the Rationale
* New "Path configuration" section
* New "Python Issues" section
* Add PyWideStringList_Insert() function
* Add PyConfig.configure_c_stdio option.
* Add PyConfig.parse_argv field
* Rename bytes/wide functions. Add "Bytes" to functions taking char*,
remove "Wide" from functions taking wchar_t*. Rename
PyConfig_DecodeLocale() to PyConfig_SetBytesString().
* PyConfig: Rename '_frozen' to 'pathconfig_warnings'
* Re-introduce PyConfig._init_main
* Complete tables of global configuration variables; annotate
variable values which are negated.
* Add default values of all PyPreConfig and PyConfig fields
* Elaborate the Rationale
* Add a few more issues
* Add PyPreConfig.legacy_windows_fs_encoding rules
* Add "Isolate Python" section
* PyConfig_SetString() and PyConfig_SetBytesString() now requires the
configuration as the first argument.
* Rename Py_UnixMain() to Py_BytesMain()
This PR contains mostly minor wording tweaks plus a paragraph explicitly allowing class objects as implementations of protocols, previously there were questions whether it is actually allowed, see python/mypy#4536.
The previous wording could be taken as suggesting that frontends should opt
out of their PEP 517 processing entirely if build-backend was not defined,
whereas it's actually fine to just use the setuptools provided backend that
implements the legacy build semantics.
See bpo-36798.
This update specifies the interplay between f-strings and
the assignment operator. Specifically, it attempts to
clarify how to use assignment operators inside of f-strings.