Shantanu
c39a0c3354
gh-65046: Link to logging cookbook from asyncio docs ( #98207 )
2022-10-11 21:42:57 -07:00
Stanley
3b33c2010a
Formatting fixes in contextlib docs ( #98111 )
2022-10-11 20:56:32 -07:00
MonadChains
e3bf125c81
gh-95276: Add callable entry to the glossary ( #95738 )
2022-10-11 19:41:08 -07:00
Shantanu
ed6344eed0
gh-96130: Rephrase use of "typecheck" verb for clarity ( #98144 )
...
I'm sympathetic to the issue report, especially in case this helps
clarify to new users that Python itself does not do type checking at runtime
2022-10-11 19:37:58 -07:00
Jelle Zijlstra
5ecf961640
gh-98172: Fix formatting in except*
docs ( #98173 )
2022-10-11 09:13:56 -07:00
Julien Palard
4067c6d7fe
gh-86404: Doc: Drop now unused make suspicious and rstlint. (GH-98179)
...
They have been replaced by
[sphinx-lint](https://github.com/sphinx-contrib/sphinx-lint ).
2022-10-11 15:31:33 +02:00
Stanley
f0a680007f
gh-71616: Add note to warn against general translation of saxutils.escape() ( #93450 )
...
* Add note to warn against general translation of saxutils.escape()
* Use more direct wording
2022-10-11 05:27:49 -04:00
Vinay Sajip
6a757da080
gh-88452: Add a warning about non-portability of environments. (GH-98155)
2022-10-10 19:27:52 +01:00
Stanley
187e853690
gh-83940: os docs: Improve wording for getenv/getenvb ( #98113 )
2022-10-10 06:43:01 -07:00
Julien Palard
571e23d991
doc: remove a misleading statement. (GH-98093)
2022-10-10 09:01:16 +02:00
da-woods
c459fedf7c
Fix types in buffer/memoryview docs ( #98118 )
...
The definition of obj in the `Py_buffer` struct is as a PyObject*
ec091bd47e/Include/pybuffer.h (L22)
PyMemoryView_GET_BASE returns `.obj` - thus its return type
should be a PyObject* (or at least a void*). It definitely
doesn't return `Py_buffer`
2022-10-09 17:55:53 -07:00
Stanley
281a3f18cc
gh-56133: copyreg docs: Clarify function/constructor parameter ( #95497 )
2022-10-09 17:51:02 -07:00
Carl Meyer
f1879690aa
Update whatsnew instructions for GitHub ( #98124 )
2022-10-10 00:29:25 +02:00
Géry Ogam
2d2e01aa4c
Minor edits to the Descriptor HowTo Guide (GH-24901)
...
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-10-08 20:54:21 -05:00
Kumar Aditya
d8765284f3
GH-94597: deprecate SafeChildWatcher
, FastChildWatcher
and MultiLoopChildWatcher
child watchers ( #98089 )
2022-10-08 13:52:19 -07:00
Pablo Galindo Salgado
83eb827247
gh-97922: Run the GC only on eval breaker ( #97920 )
2022-10-08 07:57:09 -07:00
Hugo van Kemenade
296313002f
gh-97913 Docs: Add walrus operator to the index ( #97921 )
...
* Add walrus operator to the index
* Add named expression to the index
Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
* Fix indentation and add missing newline
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-08 08:54:16 +02:00
partev
840fd19590
[doc] Fix broken links to C extensions accelerating stdlib modules ( #96914 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-07 22:55:35 -07:00
JasonYZ
6b485629d2
gh-97822: Fix http.server documentation reference to test() function ( #98027 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-10-07 21:46:23 -07:00
Carl Meyer
e82d977eb0
gh-91052: Add PyDict_Unwatch for unwatching a dictionary ( #98055 )
2022-10-07 17:37:46 -07:00
Stanley
0f498f1a95
gh-57179: Add note on symlinks for os.walk ( #94799 )
2022-10-07 15:51:50 -07:00
Stanley
5eaf4d6101
gh-61105: Add default param, note on using cookiejar subclass ( #95427 )
2022-10-07 15:21:13 -07:00
Jelle Zijlstra
0f111f53c1
gh-96073: fix backticks in NEWS entry (GH-98056)
...
Automerge-Triggered-By: GH:JelleZijlstra
2022-10-07 14:44:56 -07:00
Stanley
eed80458e8
gh-91708: Revert params note in urllib.parse.urlparse table ( #96699 )
...
Revert params note in urllib.parse.urlparse table
2022-10-07 12:19:36 -07:00
Stanley
3a7e955858
gh-96265: Fix some formatting in faq/design.rst ( #96924 )
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-07 12:15:41 -07:00
Stanley
fde74be61b
gh-73196: Add namespace/scope clarification for inheritance section ( #92840 )
...
Add namespace/scope clarification for inheritance section
2022-10-07 12:04:14 -07:00
Nikita Sobolev
586cfb0131
gh-97956: Mention generate_global_objects.py
in AC How-To
( #97957 )
2022-10-07 11:54:45 -07:00
180909
c81c64ca58
gh-96959: Update HTTP links which are redirected to HTTPS ( #98039 )
2022-10-07 11:52:45 -07:00
Eric Wieser
c7b2204996
Add a warning message about PyOS_snprintf ( #95993 )
2022-10-07 11:49:53 -07:00
Stanley
676d8ef380
gh-65496: Correct wording on csv's skipinitialspace argument ( #96170 )
2022-10-07 11:15:34 -07:00
Stanley
4a74e6ab38
gh-64921: Clarify wording for open()'s newline arg ( #96171 )
2022-10-07 11:12:08 -07:00
Victor Stinner
002252c4ad
gh-97669: Move difflib examples to Doc/includes/ ( #97964 )
...
Remove diff.py and ndiff.py scripts of Tools/scripts/: move them to
Doc/includes/.
* diff.py and ndiff.py files are no longer executable. Remove also
their shebang ("#!/usr/bin/env python3").
* Remove the -profile command from ndiff.py to simply the code.
* Remove ndiff.py copyright and history command. The Python
documentation examples are distributed under the "Zero Clause BSD
License".
2022-10-07 10:57:48 -07:00
Christopher Chianelli
6592a62ec2
gh-71316: Update dis documentation to include changes to jump arguments (GH-95798)
2022-10-07 14:54:21 +01:00
Raymond Hettinger
e500cc0451
Misc updates to the itertools recipes and tests (GH-98018)
2022-10-07 03:37:21 -05:00
Julien Palard
66cc46b2e4
Doc: sphinx-lint finds two other default roles. (GH-98019)
2022-10-07 09:10:51 +02:00
Barry Warsaw
13d4489142
gh-86298: Ensure that __loader__ and __spec__.loader agree in warnings.warn_explicit() (GH-97803)
...
In `_warnings.c`, in the C equivalent of `warnings.warn_explicit()`, if the module globals are given (and not None), the warning will attempt to get the source line for the issued warning. To do this, it needs the module's loader.
Previously, it would only look up `__loader__` in the module globals. In https://github.com/python/cpython/issues/86298 we want to defer to the `__spec__.loader` if available.
The first step on this journey is to check that `loader == __spec__.loader` and issue another warning if it is not. This commit does that.
Since this is a PoC, only manual testing for now.
```python
# /tmp/foo.py
import warnings
import bar
warnings.warn_explicit(
'warning!',
RuntimeWarning,
'bar.py', 2,
module='bar knee',
module_globals=bar.__dict__,
)
```
```python
# /tmp/bar.py
import sys
import os
import pathlib
# __loader__ = pathlib.Path()
```
Then running this: `./python.exe -Wdefault /tmp/foo.py`
Produces:
```
bar.py:2: RuntimeWarning: warning!
import os
```
Uncomment the `__loader__ = ` line in `bar.py` and try it again:
```
sys:1: ImportWarning: Module bar; __loader__ != __spec__.loader (<_frozen_importlib_external.SourceFileLoader object at 0x109f7dfa0> != PosixPath('.'))
bar.py:2: RuntimeWarning: warning!
import os
```
Automerge-Triggered-By: GH:warsaw
2022-10-06 19:32:53 -07:00
Hugo van Kemenade
fa2d43e518
Docs: Fix backtick errors found by sphinx-lint ( #97998 )
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-06 18:01:30 -07:00
Nikita Sobolev
27025e158c
gh-97850: Remove deprecated functions from importlib.utils
( #97898 )
...
* gh-97850: Remove deprecated functions from `importlib.utils`
* Rebase and remove `set_package` from diff
2022-10-06 17:57:10 -07:00
Xiao Chen
4875433682
Remove extra spaces in custom openSSL documentation. ( #93568 )
2022-10-06 17:42:08 -07:00
Guido van Rossum
09de8d7aaf
GH-90985: Revert "Deprecate passing a message into cancel()" ( #97999 )
...
Reason: we were too hasty in deprecating this.
We shouldn't deprecate it before we have a replacement.
2022-10-06 17:30:27 -07:00
Carl Meyer
a4b7794887
GH-91052: Add C API for watching dictionaries (GH-31787)
2022-10-07 01:08:00 +01:00
Brett Cannon
e1c4d56fdd
gh-65961: Do not rely solely on __cached__
(GH-97990)
...
Make sure `__spec__.cached` (at minimum) can be used.
2022-10-06 15:40:22 -07:00
Brett Cannon
f8edc6ff53
gh-97850: Remove the open issues section from the import reference ( #97935 )
...
Remove the open issues section from the import reference
Tracking in https://github.com/python/cpython/issues/97850 instead.
2022-10-06 14:01:06 -07:00
Hugo van Kemenade
993de50e44
Docs: pin sphinx-lint (GH-97992)
2022-10-06 13:58:41 -07:00
Barry Warsaw
effc25f7f2
Add Pynche's move to the What's new in 3.11 ( #97974 )
...
* Add Pynche's move to the What's new in 3.11
* Update Doc/whatsnew/3.11.rst
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-06 13:29:52 -07:00
Jason R. Coombs
8af04cdef2
gh-97781: Apply changes from importlib_metadata 5. (GH-97785)
...
* gh-97781: Apply changes from importlib_metadata 5.
* Apply changes from upstream
* Apply changes from upstream.
2022-10-06 15:25:24 -04:00
Terry Jan Reedy
2b5f1360ea
gh-86482: Document assignment expression need for ()s ( #23291 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-10-06 12:24:17 -07:00
Adam Turner
f612565bd3
gh-93738: Disallow pre-v3 syntax in the C domain ( #97962 )
...
Also, disable using invalid sphinx-lint 0.6.2.
2022-10-06 10:11:37 -07:00
180909
cd0fde27f9
gh-95986: Fix the example using match keyword ( #95989 )
2022-10-06 09:52:21 -07:00
180909
0d68879104
gh-95691: Doc BufferedWriter and BufferedReader ( #95703 )
2022-10-05 16:57:42 -07:00