Commit Graph

26868 Commits

Author SHA1 Message Date
Erlend E. Aasland 81861fd90b
Docs: Argument Clinic: Add Background and Tutorial top-level sections (#106904)
Add Background as a toplevel section with the following subsections:

- Background
  - The goals of Argument Clinic
  - Basic concepts and usage

Rename "Converting your first function" to Tutorial.

Add anchors for Background, Tutorial, and How-to Guides:

- :ref:`clinic-background`
- :ref:`clinic-tutorial`
- :ref:`clinic-howtos`

Link to these from within the Abstract.

Break the compatibility paragraph out of Abstract and make it a note.

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-21 08:05:41 +02:00
Gregory P. Smith a31dea1feb
gh-106669: Revert "gh-102988: Detect email address parsing errors ... (#105127)" (#106733)
This reverts commit 18dfbd0357.
Adds a regression test from the issue.

See https://github.com/python/cpython/issues/106669.
2023-07-20 20:30:52 -07:00
Makonede 60e83968d5
Fix typo in tkinter docs (#106936)
Signed-off-by: Makonede <61922615+Makonede@users.noreply.github.com>
2023-07-21 00:07:06 +01:00
Jack Nelson 1e1f4e91a9
gh-106882: Note that `asyncio.Server` is only publicly exposed on 3.11+ (#106901)
And later versions of 3.10, 3.9
2023-07-19 20:56:26 +01:00
Barney Gale c6c5665ee0
GH-100502: Add `pathlib.PurePath.pathmod` attribute (GH-106533)
This instance attribute stores the implementation of `os.path` used for
low-level path operations: either `posixpath` or `ntpath`.
2023-07-19 18:59:55 +01:00
Erlend E. Aasland 505eede38d
Docs: Argument Clinic: Group guides about default values (#106872)
Previous ToC layout (excerpt):                                                                                          

    - How to use symbolic default values
    ...
    - How to assign default values to parameter
      - How to use the ``NULL`` default value
      - How to use expressions as default values

New layout:

    - How to assign default values to parameter
      - The ``NULL`` default value
      - Symbolic default values
      - Expressions as default values
2023-07-19 00:46:50 +02:00
Irit Katriel 40f3f11a77
gh-105481: Generate the opcode lists in dis from data extracted from bytecodes.c (#106758) 2023-07-18 19:42:44 +01:00
Victor Stinner 3535ef1eec
gh-106535: Document soft deprecations in What's New In Python 3.13 (#106859) 2023-07-18 17:13:51 +02:00
Erlend E. Aasland 4cb0b9c0a9
Docs: Normalise Argument Clinic advanced topics headings (#106842)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-18 10:50:17 +02:00
Serhiy Storchaka 83ac128490
bpo-42327: C API: Add PyModule_Add() function (GH-23443)
It is a fixed implementation of PyModule_AddObject() which consistently
steals reference both on success and on failure.
2023-07-18 09:42:05 +03:00
Terry Jan Reedy 7aa89e505d
gh-106780: Add __match_args__ to tutorial example (#106784)
Add Point definition with this attribute before example
that needs it.
2023-07-16 23:36:03 -04:00
Raymond Hettinger babb22da5a
Add more recipe tests. Make the factor recipe a bit faster and clearer. (GH-106817) 2023-07-16 21:37:07 -05:00
Jean-Baptiste Poupon 4dc593477a
Fix the french used in the email documentation (GH-106279)
* 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.
2023-07-16 19:14:08 +02:00
Inada Naoki e58960160f
Doc: fix section levels of devmode doc (#106801) 2023-07-16 21:23:54 +09:00
Simone Rubino 83bd568d2b
Doc: devmode: add -Xdev option to example (#106253) 2023-07-16 16:29:58 +09:00
Hugo van Kemenade c02ee45031
Docs search: Replace jQuery with vanilla JavaScript (#106743)
* Replace jQuery with vanilla JavaScript
* Switch 'var' to 'const' or 'let'
2023-07-16 10:26:26 +03:00
Erlend E. Aasland 8c17729489
Docs: Normalize Argument Clinic How-To section capitalization (#106788) 2023-07-16 00:42:58 +02:00
Mathieu Dupuy d46a42fd8e
faq/library: remove outdated section (#105996) 2023-07-15 13:23:10 -07:00
Raymond Hettinger e2ec0bad67
Add more examples to the recipe docs (GH-106782)
Demonstrate that factor() works for large composites and large primes.
2023-07-15 14:43:09 -05:00
Inada Naoki 2566b74b26
gh-81283: compiler: remove indent from docstring (#106411)
Co-authored-by: Éric <merwok@netwok.org>
2023-07-15 19:33:32 +09:00
Alex Waygood 89ec0e9529
gh-106745: typing docs: Clarify that removal of PEP-585 aliases is not currently planned (#106748) 2023-07-14 19:49:02 +01:00
Jason R. Coombs 243fdcb40e
gh-106531: Remove importlib.resources._legacy (#106532)
* gh-106531: Remove importlib.resources._legacy

Syncs with importlib_resources 6.0.

* Remove documentation for removed functionality.
2023-07-14 13:38:28 -04:00
Charlie Zhao 89867d2491
gh-106446: Fix failed doctest in stdtypes (#106447)
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-14 03:38:03 -04:00
Nikita Sobolev 490295d651
gh-105626: Change the default return value of `HTTPConnection.get_proxy_response_headers` (#105628) 2023-07-13 23:55:49 -07:00
Ned Batchelder f014f1567c
docs: clarify Path.suffix (GH-106650) 2023-07-13 20:24:54 +01:00
Alex Waygood 32718f908c
gh-106309: Deprecate typing.no_type_check_decorator (#106312) 2023-07-13 14:30:35 +01:00
Victor Stinner 42bc485a24
gh-105373: Elaborate Pending Removal in What's New in Python 3.13 (#106675)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-12 12:28:10 +02:00
Hugo van Kemenade e8ab0096a5
Add Plausible for docs metrics (#106644) 2023-07-12 05:35:24 +03:00
Mariusz Felisiak f520804b03
gh-96165: Clarify passing ":memory:" in sqlite3.connect() (#106451) 2023-07-11 22:18:19 +02:00
Mariusz Felisiak fc7ff1af45
gh-96165: Clarify omitting the FROM clause in SQLite queries (#106513) 2023-07-11 22:09:04 +02:00
Serhiy Storchaka 4bf43710d1
gh-106307: C API: Add PyMapping_GetOptionalItem() function (GH-106308)
Also add PyMapping_GetOptionalItemString() function.
2023-07-11 23:04:12 +03:00
Serhiy Storchaka 579aa89e68
gh-106521: Add PyObject_GetOptionalAttr() function (GH-106522)
It is a new name of former _PyObject_LookupAttr().

Add also PyObject_GetOptionalAttrString().
2023-07-11 22:13:27 +03:00
RustyNail d0b7e18262
gh-106625 : Add missing code to tutorial 4.6 example (#106623)
* Added missing import statement.

* Update Doc/tutorial/controlflow.rst

* Update Doc/tutorial/controlflow.rst

* Update controlflow.rst

* Make point regular class with __init__.

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-11 13:22:07 -04:00
Petr Viktorin af5cf1e751
gh-103968: What's New: Add porting hints for PyType_From with metaclasses (GH-105698) 2023-07-11 13:20:29 +02:00
Victor Stinner 1f2921b72c
gh-106572: Convert PyObject_DelAttr() to a function (#106611)
* Convert PyObject_DelAttr() and PyObject_DelAttrString() macros to
  functions.
* Add PyObject_DelAttr() and PyObject_DelAttrString() functions to
  the stable ABI.
* Replace PyObject_SetAttr(obj, name, NULL) with
  PyObject_DelAttr(obj, name).
2023-07-11 11:38:22 +02:00
Thomas Dwyer 18dfbd0357
gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API) (#105127)
Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). This fixes or at least ameliorates CVE-2023-27043.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-10 23:00:55 +00:00
Eric Snow a840806d33
gh-105227: Add PyType_GetDict() (GH-105747)
This compensates for static builtin types having `tp_dict` set to `NULL`.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-07-10 18:41:02 +02:00
Riahiamirreza 43389e4a3a
Fix typo in datamodel.rst (#106587) 2023-07-10 17:22:41 +05:30
Hugo van Kemenade 34c14147a2
gh-106487: Allow the 'count' argument of `str.replace` to be a keyword (#106488) 2023-07-10 12:52:36 +03:00
Ned Batchelder dac1e36490
Clarify how topics.py gets created. (#106121)
When changing docs, it was easy to find text in topics.py, and I
wondered whether I was supposed to edit it.  Thankfully, the top of the
file says it's auto-generated, so I knew I didn't have to edit it. But I
didn't know what started the auto-generation process.

It's part of the release process, so I'll leave a note here for future
editors.
2023-07-09 20:41:31 -07:00
Victor Stinner 970982e03d
gh-105733: Fix ctypes What's New entry (#106576) 2023-07-10 04:05:38 +02:00
Alex Waygood ca8b55c7f5
gh-106461: typing: Consolidate docs on `Callable` (#106462) 2023-07-09 21:46:15 +01:00
Victor Stinner ee46cb6aa9
gh-105927: PyWeakref_GetRef() returns 1 on success (#106561)
PyWeakref_GetRef() now returns 1 on success, and return 0 if the
reference is dead.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-09 15:50:26 +00:00
Victor Stinner 1e12c8cfa3
gh-105373: Doc lists pending removals (#106540) 2023-07-09 17:26:26 +02:00
Victor Stinner dcc028d924
gh-105376: Remove logging.warn() and LoggerAdapter.warn() (#106553) 2023-07-09 10:32:50 +02:00
Victor Stinner da98ed0aa0
gh-106535: Soft deprecate the getopt module (#105735)
The getopt module exists since the initial revision of the Python
source code (1990). The optparse module was added to Python 2.3. When
Python 2.7 added the 3rd argparse module, the optparse module was
soft deprecated. Soft deprecate the getopt module.
2023-07-08 17:51:45 +02:00
Owain Davies ec7180bd1b
gh-101880: add link to object.__hash__() in hash() builtin documentation (#101883) 2023-07-08 08:48:33 +00:00
Victor Stinner ffe70c4d1c
gh-105373: Remove C API global config vars in Python 3.14 (#106538)
Schedule the removal of C API global configuration variables in
Python 3.14. Announce the removal to help C extension maintainers to
upgrade their code.
2023-07-08 01:49:20 +02:00
Victor Stinner 1b2938122d
gh-105373: Doc lists pending C API removals (#106537) 2023-07-08 00:50:51 +02:00
Victor Stinner d524b6f61f
gh-106535: Document PEP 387 Soft Deprecation (#106536)
Mark the optparse module as soft deprecated.
2023-07-08 00:03:51 +02:00