The Windows-specific subprocess.STARTUPINFO class now accepts
keyword-only arguments to its constructor to set the various
data attributes.
Patch by Subhendu Ghosh.
* bpo-16285: Update urllib quoting to RFC 3986
urllib.parse.quote is now based on RFC 3986, and hence
includes `'~'` in the set of characters that is not escaped
by default.
Patch by Christian Theune and Ratnadeep Debnath.
When checking for the default X web browser, xdg-settings
may emit messages on stderr if some components (such as
kreadconfig5) are unavailable. These messages aren't of
interest to Python, so we just ignore them.
- Add 'preferred' argument to webbrowser.register
- Use xdg-settings to specify preferred X browser
The first change replaces the existing undocumented tri-state
'try_order' parameter with the documented boolean keyword-only
'preferred' parameter. Setting it to True places the browser at the
front of the list, preferring it as the return to a subsequent get() call.
The second change adds a private `_os_preferred_browser` setting
and then uses that to make the default browser reported by
`xdg-settings` first in the try list when running under X (or
another environment that sets the `DISPLAY` variable).
This avoids the problem where the first entry in the tryorder
queue otherwise defaults to xdg-open, which doesn't support
the "new window" option.
bpo-29463 added optional "docstring" field to 4 AST types.
While it is optional, it breaks backward compatibility because AST constructor
requires number of positional argument is same to number of fields.
AST types accepts empty arguments, and incomplete keyword arguments.
But it's not big problem because field can be filled after creation, and checked when compiling.
So stop requiring complete set of fields for positional arguments too.
When you use `'%s' % SubClassOfStr()`, where `SubClassOfStr.__rmod__` exists, the reverse operation is ignored as normally such string formatting operations use the `PyUnicode_Format()` fast path. This patch tests for subclasses of `str` first and picks the slow path in that case.
Patch by Martijn Pieters.
* bpo-29463: Add docstring field to some AST nodes.
ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now. It was first statement of there body.
* fix document. thanks travis!
* doc fixes
sock_addr_t is used to define the minimum size of any socket address on
the stack. Let's make sure that an AF_ALG address always fits. Coverity
complains because in theory, AF_ALG might be larger than any of the other
structs. In practice it already fits.
Closes Coverity CID 1398948, 1398949, 1398950
Signed-off-by: Christian Heimes <christian@python.org>
Nick Coghlan said on bpo-28814:
> inspect.getargvalues() and inspect.formatargvalues() were deprecated
> in Python 3.5 as part of implementing bpo-20438
> This is incorrect, as these are *frame* introspection related functions,
> not callable introspection ones. The documentation and implementation
> layout is confusing though, as they're interleaved with the callable
> introspection operation
This commit undeprecates these functions and adds a note to ignore
previous deprecation notices.