summaryrefslogtreecommitdiffstats
path: root/Doc/includes
Commit message (Collapse)AuthorAgeFilesLines
* gh-66543: Add mimetypes.guess_file_type() (GH-117258)Serhiy Storchaka2024-05-061-1/+1
|
* gh-114099: Add documentation for iOS platform (GH-117057)Russell Keith-Magee2024-03-282-3/+10
| | | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jacob Coffee <jacob@z7x.org> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org>
* GH-92584: Remove distutils from the newtypes tutorial includes (#108024)Adam Turner2023-08-229-16/+15
|
* gh-91051: fix segfault when using all 8 type watchers (#107853)Carl Meyer2023-08-111-1/+1
|
* gh-86493: Modernize modules initialization code (GH-106858)Serhiy Storchaka2023-07-252-6/+2
| | | | | Use PyModule_Add() or PyModule_AddObjectRef() instead of soft deprecated PyModule_AddObject().
* gh-106996: Add the basics of a turtle graphics tutorial (#107072)Daniele Procida2023-07-231-10/+0
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Fix the french used in the email documentation (GH-106279)Jean-Baptiste Poupon2023-07-161-5/+5
| | | | | | * Fix the french used in the email documentation The french used in one of the example was either machine translated a while ago or written by someone who does not speak french. Fixed it by using grammatically correct french.
* gh-99202: Fix extension type from documentation for compiling in C++20 mode ↵Jeffrey Newman2023-04-064-8/+8
| | | | (#102518)
* GH-99767: update PyTypeObject docs for type watchers (GH-99928)Carl Meyer2022-12-151-0/+3
|
* 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-47146: Soft-deprecate structmember.h, expose its contents via Python.h ↵Petr Viktorin2022-11-223-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-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-96959: Update HTTP links which are redirected to HTTPS (#98039)1809092022-10-071-1/+1
|
* gh-97669: Move difflib examples to Doc/includes/ (#97964)Victor Stinner2022-10-072-0/+170
| | | | | | | | | | | 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".
* gh-82530: Create blank function instead of invalid import for email example ↵Stanley2022-09-261-5/+9
| | | | | (#97529) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-96414: Inline code examples in sqlite3 docs (#96442)Erlend E. Aasland2022-08-3114-335/+0
|
* gh-96121: Merge sqlite3.Row examples into sqlite3.Row class doc (#96122)Erlend E. Aasland2022-08-221-14/+0
| | | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-95273: Improve sqlite3.complete_statement docs (#95840)Erlend E. Aasland2022-08-111-33/+0
| | | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-95451: Update docs for wasm32-emscripten and -wasi platforms (GH-95452)Christian Heimes2022-08-021-0/+7
| | | | | | Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Michael Droettboom <mdboom@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-95273: Move sqlite3 executemany examples from reference to tutorial (#95351)Erlend Egeberg Aasland2022-07-292-43/+0
|
* gh-95273: Condense sqlite3 executescript example (#95383)Erlend Egeberg Aasland2022-07-291-25/+0
|
* gh-90016: Deprecate default sqlite3 adapters and converters (#94276)Erlend Egeberg Aasland2022-07-201-22/+0
| | | Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-90016: Reword sqlite3 adapter/converter docs (#93095)Erlend Egeberg Aasland2022-06-252-31/+7
| | | | | | Also add adapters and converter recipes. Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com
* gh-84623: Remove unused imports (#94132)Victor Stinner2022-06-221-1/+2
|
* gh-92019: Make sqlite3.Blob indexing conform with the norm (#92020)Erlend Egeberg Aasland2022-04-301-2/+2
| | | | | | - get index now returns an int - set index now requires an int in range(0, 256) Resolves #92019
* gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)Erlend Egeberg Aasland2022-04-221-4/+7
| | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
* gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)Oleg Iarygin2022-04-185-5/+5
| | | | Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-69093: Add context manager support to sqlite3.Blob (GH-91562)Erlend Egeberg Aasland2022-04-161-6/+10
|
* gh-91520: Rewrite imghdr inlining for clarity and completeness (#91521)Barry Warsaw2022-04-151-5/+5
| | | | | | | | | | | | | | | | | | | | * Rewrite imghdr inlining for clarity and completeness * Move MIMEImage class back closer to the top of the file since it's the important thing. * Use a decorate to mark a given rule function and simplify the rule function names for clarity. * Copy over all the imghdr test data files into the email package's test data directory. This way when imghdr is actually removed, it won't affect the MIMEImage guessing tests. * Rewrite and extend the MIMEImage tests to test for all supported auto-detected MIME image subtypes. * Remove the now redundant PyBanner048.gif data file. * See https://github.com/python/cpython/pull/91461#discussion_r850313336 Co-authored-by: Oleg Iarygin <dralife@yandex.ru> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
* gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680)Erlend Egeberg Aasland2022-04-151-0/+12
| | | | | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no> Co-authored-by: palaviv <palaviv@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-91217: deprecate imghdr (#91461)Brett Cannon2022-04-131-4/+1
| | | | | | | | | | | | | | * Deprecate imghdr Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * Update Doc/whatsnew/3.11.rst Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * Inline `imghdr` into `email.mime.image` Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Barry Warsaw <barry@python.org>
* gh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)Erlend Egeberg Aasland2022-04-121-0/+46
|
* Update old-style strings to f-strings (GH-30384)David Gilbertson2022-01-041-4/+4
| | | Let me know if this sort of change is unwanted...
* sqlite3: Modernize documentation around unicode and bytes. (GH-28652)Julien Palard2021-10-011-2/+2
|
* bpo-16379: expose SQLite error codes and error names in `sqlite3` (GH-27786)Erlend Egeberg Aasland2021-08-301-1/+4
|
* bpo-44106: Purge unused sqlite3 doc includes (GH-26234)Erlend Egeberg Aasland2021-05-198-138/+0
|
* bpo-44106: Improve sqlite3 example database contents (GH-26027)Erlend Egeberg Aasland2021-05-198-40/+36
|
* bpo-43908: Document Static Types in the C API (GH-25710)Victor Stinner2021-04-291-1/+4
| | | Update also PyTypeObject structure definition in the doc.
* bpo-20364: Improve sqlite3 placeholder docs (GH-25003)Erlend Egeberg Aasland2021-04-141-8/+13
|
* Minor C API documentation improvements. (GH-17696)William Ayd2019-12-251-1/+1
| | | | | | | The added parentheses around the PyIter_Next assignment suppress the following warning which gcc throws without: ``` warning: using the result of an assignment as a condition without parentheses [-Wparentheses] ``` The other change is a typo fix
* bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162)Andrey Doroschenko2019-11-153-3/+3
|
* bpo-26868: Fix example usage of PyModule_AddObject. (#15725)Brandt Bucher2019-09-125-5/+30
| | | | | | | | | | | | | | | | * Add a note to the PyModule_AddObject docs. * Correct example usages of PyModule_AddObject. * Whitespace. * Clean up wording. * 📜🤖 Added by blurb_it. * First code review. * Add < 0 in the tests with PyModule_AddObject
* bpo-36261: Improve example of the preamble field in email docs (GH-14751)Carl Bordum Hansen2019-07-141-1/+1
|
* bpo-36974: document PEP 590 (GH-13450)Jeroen Demeyer2019-06-021-1/+1
|
* bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079)Xtreak2019-05-1925-18/+47
| | | | | The sqlit3.Connection object doesn't call its close() method when it's used as a context manager.
* Doc: define PY_SSIZE_T_CLEAN always (GH-12794)Inada Naoki2019-04-136-0/+6
|
* bpo-24937: Replace the extension module porting HOWTO by links to external ↵Petr Viktorin2018-09-241-134/+0
| | | | projects (GH-9317)
* Removed unused import from tzinfo_examples.py. (GH-7994)Sergey Fedoseev2018-07-051-1/+1
|
* bpo-33958: Doc: Remove unused variable in example (GH-7927)Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)2018-06-281-1/+1
|
* bpo-33201: Modernize "Extension types" doc (GH-6337)Antoine Pitrou2018-04-0711-892/+716
| | | | | | | | | * bpo-33201: Modernize "Extension types" doc * Split tutorial and other topics * Some small fixes * Address some review comments * Rename noddy* to custom* and shoddy to sublist * Fix markup