summaryrefslogtreecommitdiffstats
path: root/Doc
Commit message (Collapse)AuthorAgeFilesLines
* gh-99619: fix error in documentation of ExceptionGroup.derive() (GH-99621)Irit Katriel2022-11-231-6/+27
|
* gh-99650 : Updated argparse docs (GH-99653)ram vikram singh2022-11-221-1/+1
|
* gh-99146 struct module documentation should have more predictable ↵Skip Montanaro2022-11-221-76/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | examples/warnings (GH-99141) * nail down a couple examples to have more predictable output * update a number of things, but this is really just a stash... * added an applications section to describe typical uses for native and machine-independent formats * make sure all format strings use a format prefix character * responding to comments from @gpshead. Not likely finished yet. * This got more involved than I expected... * respond to several PR comments * a lot of wordsmithing * try and be more consistent in use of ``x`` vs ``'x'`` * expand examples a bit * update the "see also" to be more up-to-date * original examples relied on import * so present all examples as if * reformat based on @gpshead comment (missed before) * responding to comments * missed this * one more suggested edit * wordsmithing
* gh-99547: Add isjunction methods for checking if a path is a junction (GH-99548)Charles Machalow2022-11-224-2/+42
|
* gh-93937: Document PyFrame_Check and PyFrame_Type (GH-99695)Petr Viktorin2022-11-221-0/+18
|
* gh-99537: Use Py_SETREF() function in C code (#99656)Victor Stinner2022-11-223-35/+13
| | | | | | | | | | | | | | | Fix potential race condition in code patterns: * Replace "Py_DECREF(var); var = new;" with "Py_SETREF(var, new);" * Replace "Py_XDECREF(var); var = new;" with "Py_XSETREF(var, new);" * Replace "Py_CLEAR(var); var = new;" with "Py_XSETREF(var, new);" Other changes: * Replace "old = var; var = new; Py_DECREF(var)" with "Py_SETREF(var, new);" * Replace "old = var; var = new; Py_XDECREF(var)" with "Py_XSETREF(var, new);" * And remove the "old" variable.
* gh-91053: Add an optional callback that is invoked whenever a function is ↵mpage2022-11-221-0/+60
| | | | modified (#98175)
* GH-92892: Add section about variadic functions to ctypes documentation (#99529)Ronald Oussoren2022-11-221-0/+20
| | | | | | On some platforms, and in particular macOS/arm64, the calling convention for variadic arguments is different from the regular calling convention. Add a section to the documentation to document this.
* gh-47146: Soft-deprecate structmember.h, expose its contents via Python.h ↵Petr Viktorin2022-11-228-109/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-99014) The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. There are no deprecation warnings. Old code can stay unchanged (unless the extra include and non-namespaced macros bother you greatly). Specifically, no uses in CPython are updated -- that would just be unnecessary churn. The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. Its contents are now available just by including ``Python.h``, with a ``Py`` prefix added if it was missing: - `PyMemberDef`, `PyMember_GetOne` and`PyMember_SetOne` - Type macros like `Py_T_INT`, `Py_T_DOUBLE`, etc. (previously ``T_INT``, ``T_DOUBLE``, etc.) - The flags `Py_READONLY` (previously ``READONLY``) and `Py_AUDIT_READ` (previously all uppercase) Several items are not exposed from ``Python.h``: - `T_OBJECT` (use `Py_T_OBJECT_EX`) - `T_NONE` (previously undocumented, and pretty quirky) - The macro ``WRITE_RESTRICTED`` which does nothing. - The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of `Py_AUDIT_READ`. - In some configurations, ``<stddef.h>`` is not included from ``Python.h``. It should be included manually when using ``offsetof()``. The deprecated header continues to provide its original contents under the original names. Your old code can stay unchanged, unless the extra include and non-namespaced macros bother you greatly. There is discussion on the issue to rename `T_PYSSIZET` to `PY_T_SSIZE` or similar. I chose not to do that -- users will probably copy/paste that with any spelling, and not renaming it makes migration docs simpler. Co-Authored-By: Alexander Belopolsky <abalkin@users.noreply.github.com> Co-Authored-By: Matthias Braun <MatzeB@users.noreply.github.com>
* gh-99662: fix typo in typing.TypeVarTuple docs (#99672)GabrielAnguita2022-11-221-1/+1
|
* GH-95815: Document less specific error for os.remove (#99571)Ronald Oussoren2022-11-211-1/+1
| | | | | | | os.remove can raise PermissionError instead of IsADirectoryError, when the object to be removed is a directory (in particular on macOS). This reverts a change done in #14262.
* Doc: Make functions.html readable again. (GH-99476)Julien Palard2022-11-191-60/+60
|
* gh-99284: [ctypes] remove `_use_broken_old_ctypes_structure_semantics_` ↵Nikita Sobolev2022-11-191-0/+4
| | | | | (GH-99285) It was untested and undocumented. No code has been found in the wild that ever used it.
* gh-85073: Add some missing links to source (GH-99363)Stanley2022-11-188-0/+22
| | | Add some missing links to source from Python docs
* Doc: Replace question mark with fullstop (#99558)Rafael Fontenelle2022-11-181-1/+1
| | | | The sentence "Set the LC_CTYPE locale to the user preferred locale." should end with a period instead of a question mark.
* Doc: Fix broken link to emscripten networking website (#99531)Alexander Ryabov2022-11-181-1/+1
| | | There was an extra `>` in the url.
* gh-99553: fix bug where an ExceptionGroup subclass can wrap a BaseException ↵Irit Katriel2022-11-181-0/+4
| | | | (GH-99572)
* Misc copyedits in docs on built-in types (GH-24466)Adorilson Bezerra2022-11-171-10/+14
| | | | | | | | | | | | # DOC: Improvements in library/stdtypes This PR does the following: 1. Replaces :meth: by :func: around repr function 2. Adds links to Unicode Standard site 3. Makes explicit "when" you can call the `iskeyword` function. The previous text could cause confusion to readers, especially those with English as a second language. The reader could understand that the `isidentifier` method calls the `iskeyword` function. Now, it is explicit that the dev can do it. 4. Replaces a URL with an inline link. Automerge-Triggered-By: GH:AlexWaygood
* gh-99377: Revert audit events for thread state creation and free, because ↵Steve Dower2022-11-171-13/+0
| | | | the GIL is not properly held at these times (GH-99543)
* gh-99377: Add audit events for thread creation and clear (GH-99378)Steve Dower2022-11-162-0/+15
|
* GH-99388: add `loop_factory` parameter to `asyncio.run` (#99462)Kumar Aditya2022-11-142-4/+15
|
* gh-99300: Use Py_NewRef() in Doc/ directory (#99480)Victor Stinner2022-11-143-33/+15
| | | | | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Doc/ directory. Replace PyModule_AddObject() with PyModule_AddObjectRef() to simplify reference counting.
* gh-99289: Add COMPILEALL_OPTS to Makefile (#99291)Victor Stinner2022-11-142-0/+13
| | | | | | | | Add COMPILEALL_OPTS variable in Makefile to override compileall options (default: -j0) in "make install". Also merge the compileall commands into a single command building PYC files for the all optimization levels (0, 1, 2) at once. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Fix misspelling in docs for http.HTTPMethod (#99376)Matt Harasymczuk2022-11-131-7/+16
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-98930: improve the docstring of signal.strsignal (#99290)ram vikram singh2022-11-131-3/+3
| | | | | | | Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError. Closes #98930 Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-91248: Optimize PyFrame_GetVar() (#99252)Victor Stinner2022-11-131-0/+2
| | | | PyFrame_GetVar() no longer creates a temporary dictionary to get a variable.
* gh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour ↵Erlend E. Aasland2022-11-122-17/+161
| | | | | | | | | | (#93823) Introduce the autocommit attribute to Connection and the autocommit parameter to connect() for PEP 249-compliant transaction handling. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* gh-99392: Fix sqlite3 converter recipes (#99393)naglis2022-11-121-3/+22
|
* gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395)Ethan Furman2022-11-122-15/+73
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-94597: add deprecation warnings for subclassing `AbstractChildWatcher` ↵Kumar Aditya2022-11-122-2/+5
| | | | (#99386)
* gh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)Steve Dower2022-11-111-0/+9
|
* gh-84522: Add for-loop to apply-method-to-sequence FAQ (#94660)Samuel Sloniker2022-11-111-3/+15
|
* gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (#98437)Wei-Hsiang (Matt) Wang2022-11-111-4/+4
| | | | | fix(doc-tools): use sphinx.locale._ as gettext() for backward-compatibility in pyspecific.py [why] spinix 5.3 changed locale.translators from a defaultdict(gettext.NullTranslations) to a dict, which leads to failure of pyspecific.py. Use sphinx.locale._ as gettext to fix the issue.
* GH-99183: Document behavior of count() for empty substrings (GH-99339)Raymond Hettinger2022-11-101-0/+6
|
* Update reference to the size of PyPI (#99076)jmcb2022-11-091-2/+2
| | | | | Update reference to the size of PyPI Last changed in 2008 (528576031d9655ca8004260a2bf2c783f77d1da1).
* gh-98724: Fix Py_CLEAR() macro side effects (#99100)Victor Stinner2022-11-092-2/+49
| | | | | | | The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their argument once. If an argument has side effects, these side effects are no longer duplicated. Add test_py_clear() and test_py_setref() unit tests to _testcapi.
* [Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265)Bruno Neyra2022-11-091-1/+1
|
* gh-99238: clarify the type of the env dict. (#99253)Gregory P. Smith2022-11-081-3/+7
|
* gh-91248: Add PyFrame_GetVar() function (#95712)Victor Stinner2022-11-082-0/+23
| | | | | | Add PyFrame_GetVar() and PyFrame_GetVarString() functions to get a frame variable by its name. Move PyFrameObject C API tests from test_capi to test_frame.
* Fix broken link in `asyncio-subprocesses` doc (GH-99214)Mikael Koli2022-11-081-1/+1
| | | | | | | | | | | | | | | | | # Fix broken link in Doc/library/asyncio-subprocess.rst This is a trivial fix in documentation to fix a broken link. There is a broken link in [Doc/library/asyncio-subprocess.rst](https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process) for the function ``wait_for``: ![image](https://user-images.githubusercontent.com/37690409/200388894-fb6b7c42-b2cc-49ec-a239-e3472890db1f.png) I suppose this refers to the function ``asyncio.wait_for`` which is not clear in the docs. This PR fixes the link and the result looks like the following: ![image](https://user-images.githubusercontent.com/37690409/200389483-b4a92105-7d2c-4285-b0fc-78a6dc0be39c.png) Automerge-Triggered-By: GH:AlexWaygood
* gh-72719: Remove asyncore and asynchat modules (#96580)Nikita Sobolev2022-11-086-588/+9
| | | | | Remove modules asyncore and asynchat, which were deprecated by PEP 594. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-92119: ctypes: Print exception class name instead of its representation ↵Kamil Turek2022-11-081-3/+3
| | | | (#98302)
* gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance ↵Petr Viktorin2022-11-071-0/+11
| | | | | | | (GH-99002) The flag is not inherited, but its effect -- a NULL tp_new -- is. Drop hints for people who come here wanting to “disallow instantiation”.
* gh-95389: expose popular ETHERTYPE_* constants in the socket module (#95390)Noam Cohen2022-11-071-2/+34
| | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-98254: Add what's new entry for the improvement in commit ↵Pablo Galindo Salgado2022-11-071-0/+9
| | | | bb56dead336357153a0c3b8cc9d9d6856d2c5a03 (#99197)
* gh-91058: Add what's new entry for the improvement in commit ↵Pablo Galindo Salgado2022-11-071-0/+10
| | | | 7cfbb49fcd4c85f9bab3797302eadf93df490344 (#99198)
* Docs: add argument spec to sqlite3 CLI docs (#99200)Erlend E. Aasland2022-11-071-1/+6
|
* doc: Formatting and typo fixes (#98974)jmcb2022-11-073-10/+10
|
* gh-98586: Add What's New entry and update docs (#99056)Wenzel Jakob2022-11-062-1/+13
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-94286 Fix documentation of print default param (GH-94297)Nouran Ali2022-11-061-1/+1
|