Commit Graph

26805 Commits

Author SHA1 Message Date
Terry Jan Reedy 04dfc6fa90
gh-106232: Make timeit doc command lines compatible with Windows. (#106296)
Command Prompt (CMD Shell) and older versions of PowerShell
require double quotes and single quotes inside the string.
This form also works on linux and macOS.
2023-06-30 22:34:31 -04:00
F3eQnxN3RriK a8ae73965b
gh-101100: Docs: Fix references to several numeric dunders (#106278)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-30 15:27:09 +01:00
Victor Stinner 80b3d8f337
gh-106023: Remove _PyObject_FastCallTstate() function (#106273) 2023-06-30 12:28:59 +02:00
Victor Stinner f3cf2ddd8d
gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (#106272)
Deprecate Py_HasFileSystemDefaultEncoding variable.
2023-06-30 11:57:06 +02:00
Victor Stinner 2efdd2a14e
gh-106023: Remove _PyObject_FastCall() function (#106265) 2023-06-30 11:46:43 +02:00
Brandt Bucher 7b2d94d875
GH-106008: Make implicit boolean conversions explicit (GH-106003) 2023-06-29 13:49:54 -07:00
hms 8bff940ad6
gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)
This enables super-instruction formation,
removal of checks for uninitialized variables,
and frees up an instruction.
2023-06-29 09:34:00 -07:00
F3eQnxN3RriK 18f51f91e2
gh-101100: Fix reference to `parse_args` in `optparse.rst` (#105265) 2023-06-28 15:30:26 +03:00
F3eQnxN3RriK bbf722dcd3
gh-101100: Fix reference to asynchronous methods (#106172) 2023-06-28 10:43:11 +00:00
Sam Bull 6b52a581c1
gh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` docs (#105995) 2023-06-28 16:08:15 +05:30
lightdrk 541a10f9ed
Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task.rst` (#106136)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-27 23:21:38 -06:00
Victor Stinner 3f8483cad2
gh-106168: PyTuple_SET_ITEM() now checks the index (#106164)
PyTuple_SET_ITEM() and PyList_SET_ITEM() now check the index argument
with an assertion if Python is built in debug mode or is built with
assertions.

* list_extend() and _PyList_AppendTakeRef() now set the list size
  before calling PyList_SET_ITEM().
* PyStructSequence_GetItem() and PyStructSequence_SetItem() now check
  the index argument: must be lesser than REAL_SIZE(op).
* PyStructSequence_GET_ITEM() and PyStructSequence_SET_ITEM() are now
  aliases to PyStructSequence_GetItem() and
  PyStructSequence_SetItem().
2023-06-28 03:45:57 +02:00
Nikita Sobolev 33608fd67d
gh-92788: Add docs for `ast.Module`, `ast.Expression`, and others (#101055) 2023-06-27 06:43:49 -07:00
Raymond Hettinger a8210b6df1
GH-105774: Clarify operation of normalize() (GH-106093) 2023-06-26 23:12:22 -05:00
Łukasz Langa d3af83b934
Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (#96146)" (#105948)
This reverts commit 1f0eafa844.
2023-06-26 20:35:53 +02:00
Roderich Schupp 512f299e55
gh-106107: document correct error that's raised when a mutable default value for a field is detected (gh-106109) 2023-06-26 14:00:21 -04:00
Barney Gale 219effa876
GH-105793: Add follow_symlinks argument to `pathlib.Path.is_dir()` and `is_file()` (GH-105794)
Brings `pathlib.Path.is_dir()` and `in line with `os.DirEntry.is_dir()`, which
will be important for implementing generic path walking and globbing.
Likewise `is_file()`.
2023-06-26 17:58:17 +01:00
Paul Moore 5d4dbf0e30
gh-106111: Remove zipapp documentation on creating a Windows executable (#106112)
Remove zipapp documentation on creating a Windows executable
2023-06-26 18:14:20 +02:00
Victor Stinner c075a1974b
gh-105927: Deprecate PyWeakref_GetObject() function (#106006)
Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
2023-06-26 12:10:53 +02:00
Alex Waygood 3eeb8c8906
Improve typing docs on the type of class objects (#106081) 2023-06-26 00:13:48 -07:00
Victor Stinner 00e75a3372
gh-106084: Remove old PyObject call aliases (#106085)
Remove old aliases which were kept backwards compatibility with
Python 3.8:

* _PyObject_CallMethodNoArgs()
* _PyObject_CallMethodOneArg()
* _PyObject_CallOneArg()
* _PyObject_FastCallDict()
* _PyObject_Vectorcall()
* _PyObject_VectorcallMethod()
* _PyVectorcall_Function()

Update code which used these aliases to use new names.
2023-06-26 08:08:12 +02:00
Alex Waygood 93a970ffbc
gh-106046: Improve error message from `os.fspath` if `__fspath__` is set to `None` (#106082) 2023-06-26 00:06:12 +01:00
Erlend E. Aasland bef1c8761e
Docs: add links to 'callable' term in sqlite3 docs (#106072) 2023-06-25 02:02:59 +02:00
Gregory P. Smith 19d6511b0b
gh-106033: [docs] Improve C API GetItem & HasAttr notes. (#106047)
Use a note:: tag so that these dict and object API deficiencies show up clearly.

A caution:: tag was considered, but our current python docs rendering doesn't do much with that (no box or color change).  warning:: seemed too extreme.  note looks good.
2023-06-24 16:29:26 -07:00
Barney Gale 4a6c84fc1e
GH-104375: Use `versionchanged` to describe new arguments in pathlib docs (GH-104376) 2023-06-24 16:14:09 +01:00
Eamon Tracey 8ef0ee4ebc
Typing docs: fix typo in annotating tuples comment (#106048) 2023-06-23 21:34:05 +01:00
Irit Katriel d8ca5a11bc
gh-105730: support more callables in ExceptionGroup.split() and subgroup() (#106035) 2023-06-23 19:47:47 +01:00
Alex Waygood 968435ddb1
Typing docs: improve the guidance on annotating tuples (#106021) 2023-06-23 15:33:20 +01:00
Alex Waygood a72683ba8e
Docs: Avoid a DeprecationWarning in `pyspecific.py` when running with Sphinx >=6.1 (#105886)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-23 08:58:45 +01:00
Barney Gale a8006706f7
GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)
This new exception type is raised instead of `NotImplementedError` when
a path operation is not supported. It can be raised from `Path.readlink()`,
`symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future
version of pathlib, it will be raised by `AbstractPath` for these methods
and others, such as `AbstractPath.mkdir()` and `unlink()`.
2023-06-22 14:35:51 +01:00
Victor Stinner 18a7c86697
gh-104212: Explain how to port imp.load_source() (#105978)
Explain how to port removed imp.load_source() to importlib in What's
New in Python 3.12.
2023-06-22 00:18:31 +02:00
Irit Katriel a2392720d6
gh-84436: update docs on Py_None/Py_True/Py_False/Py_Ellipsis becoming immortal (#105195) 2023-06-21 21:13:25 +01:00
Mathieu Dupuy c5a722be5f
stdtypes.rst: remove a period (#105959) 2023-06-21 15:21:37 +01:00
Sviatoslav Sydorenko eaa6702280
Use CSV-separated outputs @ get-changed-files @ CI (#105151)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-21 13:42:59 +03:00
Victor Stinner 9c44656feb
gh-105927: Add PyWeakref_GetRef() function (#105932)
Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(),
PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
2023-06-21 11:40:09 +02:00
Victor Stinner 4d140e5e06
Add Py_TYPE() to Doc/data/refcounts.dat (#105949) 2023-06-20 23:57:54 +02:00
Victor Stinner 03f1a132ee
gh-105922: Add PyImport_AddModuleRef() function (#105923)
* Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and
  PyImport_AddModuleObject().
* pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with
  PyImport_AddModuleRef(name).
2023-06-20 08:48:14 +02:00
Victor Stinner 7a56a4148c
gh-104212: Explain how to port imp code to importlib (#105905) 2023-06-19 16:13:11 +02:00
Alex Waygood 4426279a43
typing docs: Improve the intro to each section (#105901) 2023-06-19 00:54:29 +01:00
Erlend E. Aasland 6849acb3fe
gh-105875: Require SQLite 3.15.2 or newer (#105876)
SQLite 3.15.2 was released 2016-11-28.
2023-06-19 00:29:08 +02:00
Hugo van Kemenade bc07c8f096
Docs: move sphinx-lint to pre-commit (#105750) 2023-06-18 11:52:05 +00:00
Erlend E. Aasland dba7217511
gh-105844: Use devguide terminology to denote versions (#105882) 2023-06-18 12:25:23 +02:00
Irit Katriel 14d01262da
gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and replace by their new versions (#105865) 2023-06-17 17:00:16 +01:00
Carl Meyer b356a4749a
gh-105678: document SET_FUNCTION_ATTRIBUTE (#105843) 2023-06-16 12:36:59 -05:00
Erlend E. Aasland 0bffe1acd7
gh-105844: Consistently use 'minor version' for X.Y versions (#105851) 2023-06-16 10:41:47 +02:00
chgnrdv 0d0963737a
Fix inaccuracies in "Assorted Topics" section of "Defining Extension Types" tutorial (#104969) 2023-06-16 07:10:59 +00:00
Alex Doe 486b52a315
bpo-44530: Document the change in MAKE_FUNCTION behavior (#93189)
* bpo-44530: Document the change in MAKE_FUNCTION behavior

Fixes dis module documentation for MAKE_FUNCTION due to 2f180ce2cb (bpo-44530, released as part of 3.11) removes the qualified name at TOS
2023-06-15 19:04:57 -05:00
Alex Waygood da911a6b22
More reorganisation of the typing docs (#105787) 2023-06-15 06:52:18 +01:00
Alex Waygood 006a453205
Improve docs for `typing.dataclass_transform` (#105792) 2023-06-15 06:51:42 +01:00
Mark Shannon 1d857da7f0
GH-77273: Better bytecodes for f-strings (GH-6132) 2023-06-14 16:15:08 +01:00