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
Guido van Rossum
74ea204634
GH-88968: Add notes about socket ownership transfers ( #97936 )
2022-10-05 16:42:01 -07:00
Brett Cannon
c206e53bb7
gh-65961: Raise `DeprecationWarning` when `__package__` differs from `__spec__.parent` ( #97879 )
...
Also remove `importlib.util.set_package()` which was already slated for removal.
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2022-10-05 15:00:45 -07:00
Simon Legner
2016bc54a2
docs(typing): add "see PEP 675" to LiteralString ( #97926 )
2022-10-05 13:08:07 -07:00
Barry Warsaw
5dc3599135
gh-97850: Remove all known instances of module_repr() ( #97876 )
...
Remove all known instances of module_repr()
2022-10-05 11:42:26 -07:00
Tshepang Mbambo
815008a3a5
I changed my surname early this year ( #96671 )
...
* I recently changed my name
* Update ACKS
2022-10-05 11:16:45 -07:00
Adam Turner
0031e62973
gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) ( #97768 )
...
:c:type:`<C type>` -> :c:expr:`<C type>`
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-10-05 11:01:14 -07:00
180909
d6062d1170
GH-95172 Make the same version `versionadded` oneline ( #95172 )
...
* Make the same version versionadded oneline
* Format versionadded for enum.rst
* Format versionadded
A single line versionadded was reading better.
Co-authored-by: Senthil Kumaran <senthil@python.org>
2022-10-05 10:52:59 -07:00
Adam Turner
0e72606dd4
gh-93738: Documentation C syntax (Function glob patterns -> literal markup) ( #97774 )
2022-10-05 08:22:28 -07:00
Serhiy Storchaka
e3ef400be7
gh-74696: Pass root_dir to custom archivers which support it (GH-94251)
...
Co-authored-by: Éric <merwok@netwok.org>
2022-10-05 12:48:59 +03:00
Jia Junjie
4b83cd0b22
gh-97661: Improve accuracy of sqlite3.Cursor.fetchone docs ( #97662 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-05 10:47:54 +02:00
Guido van Rossum
8079bef56f
GH-96704: Add {Task,Handle}.get_context(), use it in call_exception_handler() ( #96756 )
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-10-04 23:49:10 -07:00
Adam Turner
c70c8b6976
gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> :c:expr:`PyTypeObject*`) ( #97778 )
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-04 17:56:20 -07:00
Athos Ribeiro
0ceafa7fa4
Add re.VERBOSE flag documentation example ( #97678 )
...
The current re.VERBOSE documentation example leaves space for ambiguous
interpretation. One may read that spaces within the `(?:` token are
spaces inside the non-capturing group (such as `(?: )`). This patch
removes the ambiguity by including examples after the statement.
2022-10-04 17:39:42 -07:00
Shahriar Heidrich
395b66a0ae
gh-97654: Add auto exception chaining example to tutorial ( #97703 )
...
Add auto exception chaining example to tutorial
2022-10-04 17:36:04 -07:00
C.A.M. Gerlach
4e731814d7
gh-95913: Copyedit/improve Implementation Changes What's New section ( #97720 )
...
* Add and refine reST/Sphinx syntax for implementation changes section
* Clarify and refine wording in the Implementation Changes section
* Elide unnecessary comma
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-05 02:03:58 +02:00
Adam Turner
6b3d4db02e
gh-93738: Documentation C syntax (:c:type: to :c:expr:, misc. cases) ( #97775 )
...
* :c:type: to :c:expr:
* Update Doc/whatsnew/2.4.rst
2022-10-04 16:32:27 -07:00
Adam Turner
192d401ba5
gh-93738: Documentation C syntax (:c:type:`FILE` -> :c:expr:`FILE`) ( #97769 )
...
:c:type:`FILE` -> :c:expr:`FILE`
2022-10-04 16:27:29 -07:00
Adam Turner
8b211b4cdb
gh-93738: Documentation C syntax (:c:type:`TYPE` -> :c:expr:`TYPE`) ( #97770 )
...
:c:type:`TYPE` -> :c:expr:`TYPE`
2022-10-04 16:26:36 -07:00
Adam Turner
a0f5599aac
gh-93738: Documentation C syntax (Use `c:struct`) ( #97772 )
...
Use `c:struct`
2022-10-04 16:26:14 -07:00
Adam Turner
fa59bda8d3
gh-93738: Documentation C syntax (:c:data:`view->obj` -> :c:expr:`view->obj`) ( #97773 )
...
:c:data:`view->obj` -> :c:expr:`view->obj`
2022-10-04 16:18:09 -07:00
C.A.M. Gerlach
a77d9dedcd
gh-95913: Copyedit/improve Other Language Changes What's New section ( #97719 )
...
* Add/refine cross references to items in other lang changes section
* Unify context manager exception changes into single non-repetitive item
* More clearly describe the intent and consequences of the -P option
* Apply minor clarifications & copyedits to rest of section
* Tweak the formatting of module references
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-05 01:16:37 +02:00
Adam Turner
0bf6a617ed
gh-93738: Documentation C syntax (:c:type:`PyObject` -> :c:expr:`PyObject`) ( #97776 )
...
:c:type:`PyObject` -> :c:expr:`PyObject`
2022-10-04 16:13:03 -07:00
Adam Turner
4ebb025031
gh-93738: Documentation C syntax (:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`) ( #97777 )
...
:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`
2022-10-04 16:12:22 -07:00