| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
| |
Fix typo in ast docs: ParamSpec defaults
|
|
|
|
|
|
|
|
|
| |
Specify that it is valid for floats and ints with 'd' presentation and an error otherwise.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Remove documentation for `pathlib.Path.scandir()`, and rename the method to
`_scandir()`. In the private pathlib ABCs, make `iterdir()` abstract and
call it from `_scandir()`.
It's not worthwhile to add this method at the moment - see discussion:
https://discuss.python.org/t/ergonomics-of-new-pathlib-path-scandir/71721
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
|
|
| |
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
| |
|
| |
|
|
|
|
|
|
| |
(GH-123380)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
| |
Previously, `traceback.print_list` didn't have a documentation entry and was not exposed in `traceback.__all__`. Now it has a documentation entry and is exposed in `__all__`.
|
| |
|
| |
|
| |
|
|
|
|
| |
stream cannot immediately return bytes. (GH-122933)
|
| |
|
|
|
|
|
|
|
| |
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
|
|
|
| |
Reformat paragraphs, add backquotes, and directives.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Generally, mixed-mode arithmetic combining real and complex variables should
be performed directly, not by first coercing the real to complex, lest the sign
of zero be rendered uninformative; the same goes for combinations of pure
imaginary quantities with complex variables." (c) Kahan, W: Branch cuts for
complex elementary functions.
This patch implements mixed-mode arithmetic rules, combining real and
complex variables as specified by C standards since C99 (in particular,
there is no special version for the true division with real lhs
operand). Most C compilers implementing C99+ Annex G have only these
special rules (without support for imaginary type, which is going to be
deprecated in C2y).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#127194)
When handed an absolute Windows path such as `C:\foo` or `//server/share`,
the `urllib.request.pathname2url()` function returns a URL with an
authority section, such as `///C:/foo` or `//server/share` (or before
GH-126205, `////server/share`). Only the `file:` prefix is omitted.
But when handed an absolute POSIX path such as `/etc/hosts`, or a Windows
path of the same form (rooted but lacking a drive), the function returns a
URL without an authority section, such as `/etc/hosts`.
This patch corrects the discrepancy by adding a `//` prefix before
drive-less, rooted paths when generating URLs.
|
|
|
| |
In `socket.ioctl`, `:platform:` -> `.. availability::`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions have long sown confusion among Python developers. The
existing documentation says they deal with URL path components, but that
doesn't fit the evidence on Windows:
>>> pathname2url(r'C:\foo')
'///C:/foo'
>>> pathname2url(r'\\server\share')
'////server/share' # or '//server/share' as of quite recently
If these were URL path components, they would imply complete URLs like
`file://///C:/foo` and `file://////server/share`. Clearly this isn't right.
Yet the implementation in `nturl2path` is deliberate, and the
`url2pathname()` function correctly inverts it.
On non-Windows platforms, the behaviour until quite recently is to simply
quote/unquote the path without adding or removing any leading slashes. This
behaviour is compatible with *both* interpretations -- 1) the value is a
URL path component (existing docs), and 2) the value is everything
following `file:` (this commit)
The conclusion I draw is that these functions operate on everything after
the `file:` prefix, which may include an authority section. This is the
only explanation that fits both the Windows and non-Windows behaviour.
It's also a better match for the function names.
|
|
|
|
| |
groups (#127186)
|
|
|
|
|
| |
Stop converting Windows drive letters to uppercase in
`urllib.request.pathname2url()` and `url2pathname()`. This behaviour is
unnecessary and inconsistent with pathlib's file URI implementation.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Name without a PATHEXT extension is only searched if the mode does not
include X_OK.
* Support multi-component PATHEXT extensions (e.g. ".foo.bar").
* Support files without extensions in PATHEXT contains dot-only extension
(".", "..", etc).
* Support PATHEXT extensions that end with a dot (e.g. ".foo.").
|
|
|
|
|
|
|
|
|
|
| |
(GH-125891)
The usage parameter of argparse.ArgumentParser no longer
affects the default value of the prog parameter in subparsers.
Previously the full custom usage of the main parser was used as
the prog prefix in subparsers.
|
|
|
|
| |
`ctypes` doc (#127099)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add register() to argparse docs
* Add newline
* Formatting
* Fix codeblock
* Move section
* Add signature
* Add newline
* Fix indent
* Fix indent take 2
* Rephrase
* Simplify language
* Address PR comments
* Add references to register in type and action
* Remove unnecessary reference
* Rephrase and add success case
|
|
|
|
|
|
| |
Adjust `pathname2url()` to encode embedded colon characters in Windows
paths, rather than bailing out with an `OSError`.
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
|
|
|
|
| |
It now returns multiple era description segments separated by semicolons.
Previously it only returned the first segment on platforms with Glibc.
|
| |
|
|
|
| |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
| |
|