Raymond Hettinger
92397d5ead
Add statistics recipe for sampling from an estimated probability density distribution ( #117221 )
2024-03-27 09:04:32 -05:00
Raymond Hettinger
7ebad77ad6
Sync main docs and docstring for median_grouped(). (gh-117214)
2024-03-25 23:49:44 +00:00
Nice Zombies
0821923aa9
gh-117114: Make os.path.isdevdrive available on all platforms (GH-117115)
2024-03-25 22:55:11 +00:00
Raymond Hettinger
9db2a8f914
Minor markup and grammar fixes in the statistics docs (gh-117216)
2024-03-25 09:26:42 -05:00
Kerim Kabirov
f267d5bf2a
GH-115986 Docs: promote pprint.pp usage as a default ( #116614 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-24 07:59:14 -06:00
LilKS
39df773217
gh-101760: Improve the imaplib.IMAP4 example ( #101764 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-03-24 04:01:07 -06:00
Raymond Hettinger
a1e948edba
Add cumulative option for the new statistics.kde() function. ( #117033 )
2024-03-24 04:35:58 -05:00
Barney Gale
72eea512b8
GH-106747: Document another difference between `glob` and `pathlib`. ( #116518 )
...
Document that `path.glob()` might return *path*, whereas
`glob.glob(root_dir=path)` will never return an empty string corresponding
to *path*.
2024-03-22 19:14:09 +00:00
Jakub Stasiak
40d75c2b7f
GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)
...
* GH-113171: Fix "private" (really non-global) IP address ranges
The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).
This patch updates the ranges with what was missing or otherwise
incorrect.
I left 100.64.0.0/10 alone, for now, as it's been made special in [1]
and I'm not sure if we want to undo that as I don't quite understand the
motivation behind it.
The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.
[1] https://github.com/python/cpython/issues/61602
2024-03-22 17:49:56 +01:00
Ned Batchelder
0907871d43
docs: fix over-linking in dataclasses.rst ( #117005 )
2024-03-21 12:47:09 -07:00
Malcolm Smith
1f8b24ef69
gh-71052: Implement `ctypes.util.find_library` on Android (GH-116379)
2024-03-21 14:20:57 +01:00
Hugo van Kemenade
9080e9ed50
gh-101100: Fix Sphinx warnings in `library/pydoc.rst` ( #116913 )
2024-03-19 21:48:08 +02:00
Russell Keith-Magee
408e127159
gh-114099 - Add iOS framework loading machinery. (GH-116454)
...
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-03-19 08:36:19 -04:00
Pierre Ossman (ThinLinc team)
4159644177
gh-113538: Add asycio.Server.{close,abort}_clients (redo) ( #116784 )
...
These give applications the option of more forcefully terminating client
connections for asyncio servers. Useful when terminating a service and
there is limited time to wait for clients to finish up their work.
This is a do-over with a test fix for gh-114432, which was reverted.
2024-03-18 13:15:53 -07:00
Victor Stinner
f6cdc6b4a1
Revert "gh-96844: Improve error message of list.remove (gh-106455)" ( #116956 )
...
This reverts commit 217f47d6e5
.
2024-03-18 13:54:45 +00:00
Jakub Stasiak
2a4cbf17af
GH-65056: Improve the IP address' is_global/is_private documentation (GH-113186)
...
* GH-65056: Improve the IP address' is_global/is_private documentation
It wasn't clear what the semantics of is_global/is_private are and, when
one gets to the bottom of it, it's not quite so simple (hence the
exceptions listed).
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-03-18 13:57:00 +01:00
Barney Gale
0634201f53
GH-116377: Stop raising `ValueError` from `glob.translate()`. ( #116378 )
...
Stop raising `ValueError` from `glob.translate()` when a `**` sub-string
appears in a non-recursive pattern segment. This matches `glob.glob()`
behaviour.
2024-03-17 17:09:35 +00:00
Victor Stinner
8e3c953b3a
gh-73468: Add math.fma() function ( #116667 )
...
Added new math.fma() function, wrapping C99's ``fma()`` operation:
fused multiply-add function.
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2024-03-17 13:58:26 +00:00
jnchen
744c077795
gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852)
...
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
2024-03-16 15:01:45 +02:00
Nikita Sobolev
16349868d3
gh-116782: Mention `__type_params__` in `inspect.getmembers` docs ( #116783 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-15 18:47:46 +03:00
Tian Gao
a50cf6c3d7
gh-90095: Ignore empty lines and comments in `.pdbrc` ( #116834 )
2024-03-15 09:36:04 +00:00
Raymond Hettinger
41e844a4ac
gh-116842: Improve test comment and fix a doctest (gh-116846)
2024-03-14 21:40:36 -05:00
Barney Gale
1904f0a224
GH-113838: Add "Comparison to os.path" section to pathlib docs ( #115926 )
2024-03-15 00:11:49 +00:00
Raymond Hettinger
ab9e322ae1
Minor improvements to the itertools documentation (gh-116833)
2024-03-14 16:39:50 -05:00
Victor Stinner
846ad5a26a
gh-88494: Use QueryPerformanceCounter() for time.monotonic() ( #116781 )
...
On Windows, time.monotonic() now uses the QueryPerformanceCounter()
clock to have a resolution better than 1 us, instead of the
gGetTickCount64() clock which has a resolution of 15.6 ms.
2024-03-14 16:42:41 +01:00
Raymond Hettinger
5ff012a449
Better presentation order for recipes. (gh-116755)
2024-03-13 15:02:56 -05:00
Nir Friedman
7f418fb111
gh-98731: Improvements to the logging documentation (GH-101618)
...
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2024-03-13 15:58:30 +00:00
Raymond Hettinger
e82f6dfae5
Modernize roundrobin() recipe and improve variable names (gh-116710)
2024-03-13 02:12:30 -05:00
Mariusz Felisiak
3f1b6efee9
Docs: fix broken links ( #116651 )
2024-03-12 21:19:33 -07:00
Raymond Hettinger
93a687a373
Minor clarity improvement for the iter_index() recipe. Also add value subsequence tests. (gh-116696)
2024-03-12 21:33:42 -05:00
Raymond Hettinger
126186674e
Beef-up tests for the itertool docs. (gh-116679)
2024-03-12 17:19:58 -05:00
Jelle Zijlstra
290330714b
gh-89547: typing.rst: Add note about change in behavior with ClassVar/Final ( #116686 )
2024-03-12 15:17:53 -07:00
Nikita Sobolev
df4784b3b7
gh-116127: PEP-705: Add `ReadOnly` support for `TypedDict` ( #116350 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-12 07:49:39 -07:00
Guido van Rossum
ba13215eb1
gh-113538: Revert "gh-113538: Add asycio.Server.{close,abort}_clients ( #114432 )" ( #116632 )
...
Revert "gh-113538: Add asycio.Server.{close,abort}_clients (#114432 )"
Reason: The new test doesn't always pass:
https://github.com/python/cpython/pull/116423#issuecomment-1989425489
This reverts commit 1d0d49a7e8
.
2024-03-12 00:31:49 +00:00
Pierre Ossman (ThinLinc team)
1d0d49a7e8
gh-113538: Add asycio.Server.{close,abort}_clients ( #114432 )
...
These give applications the option of more forcefully terminating client
connections for asyncio servers. Useful when terminating a service and
there is limited time to wait for clients to finish up their work.
2024-03-11 12:43:30 -07:00
Malcolm Smith
872c0714fc
gh-71052: Change Android's `sys.platform` from "linux" to "android"
...
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-03-11 19:25:39 +00:00
Declan
db8f423f58
gh-116535: Fix distracting "TypeError" in example code (gh-116538)
2024-03-09 16:52:57 -05:00
Kerim Kabirov
03f86b1b62
GH-116218 Docs: Add availability information for the 'resource' module ( #116256 )
...
Add availability data to 'resource' module Docs
2024-03-09 10:00:37 +01:00
Nicolas A. Oyarzabal
601f3a7b33
gh-105535 Document potential performance trap during enum creation (GH-107119)
...
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-08 11:22:17 -08:00
infohash
735fc2cbbc
gh-75988: Fix issues with autospec ignoring wrapped object ( #115223 )
...
* set default return value of functional types as _mock_return_value
* added test of wrapping child attributes
* added backward compatibility with explicit return
* added docs on the order of precedence
* added test to check default return_value
2024-03-08 19:14:32 +00:00
Nikita Sobolev
0b647141d5
gh-116349: Deprecate `platform.java_ver` function ( #116471 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-08 11:14:17 +03:00
Serhiy Storchaka
808a77612f
gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298)
2024-03-07 10:05:03 +02:00
William Woodruff
0876b921b2
gh-107361: strengthen default SSL context flags ( #112389 )
...
This adds `VERIFY_X509_STRICT` to make the default
SSL context perform stricter (per RFC 5280) validation, as well
as `VERIFY_X509_PARTIAL_CHAIN` to enforce more standards-compliant
path-building behavior.
As part of this changeset, I had to tweak `make_ssl_certs.py`
slightly to emit 5280-conforming CA certs. This changeset includes
the regenerated certificates after that change.
Signed-off-by: William Woodruff <william@yossarian.net>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-03-06 13:44:58 -08:00
Jason Zhang
ce0ae1d784
gh-115957: Close coroutine if TaskGroup.create_task() raises an error ( #116009 )
2024-03-06 12:20:26 -08:00
Sebastian Pipping
73807eb634
gh-115398: Suggest use of `hasattr` with checking for 3.13 Expat API availability (GH-116278)
...
Suggest use of "hasattr" with checking for 3.13 Expat API availability
2024-03-06 11:08:25 -08:00
Prince Roshan
e800265aa1
gh-107625: configparser: Raise error if a missing value is continued (GH-107651)
...
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-03-06 14:05:54 +00:00
Kerim Kabirov
e205c5cd8f
gh-115986: Fix inaccuracies in pprint docs ( #116104 )
...
Amend wording after gh-116019 was merged.
2024-03-05 22:14:52 +01:00
cui fliter
e7ba6e9dbe
chore: fix typos ( #116345 )
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-03-05 09:05:52 -07:00
Serhiy Storchaka
0064dfa091
gh-115777: Fix double versionadded directives (GH-116269)
2024-03-05 17:41:53 +02:00
Tobias Rautenkranz
60743a9a7e
gh-57141: Add dircmp shallow option (GH-109499)
...
Co-authored-by: Steve Ward <planet36@gmail.com>
Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2024-03-04 17:27:43 +00:00