Commit Graph

28823 Commits

Author SHA1 Message Date
Hugo van Kemenade 933f21c3c9
gh-85957: Add missing MIME types for images with RFCs (#126966) 2024-11-18 20:13:20 +02:00
Serhiy Storchaka f7ef0203d4
gh-123803: Support arbitrary code page encodings on Windows (GH-123804)
If the cpXXX encoding is not directly implemented in Python, fall back
to use the Windows-specific API codecs.code_page_encode() and
codecs.code_page_decode().
2024-11-18 17:45:25 +00:00
Joseph Martinot-Lagarde ce453e6c2f
Doc: Reorganize math module documentation (#126337)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-11-18 08:57:32 +01:00
beavailable 0c5c80928c
gh-126896: Fix docs about `asyncio.start_server()` (#126897) 2024-11-17 11:32:35 -08:00
Hood Chatham 2313f84210
GH-126748: amend configure.rst description for the 'build_wasm' make target (#126687)
Clarified the documentation around how the build_wasm target is selected.
2024-11-16 09:46:39 +08:00
Hood Chatham 544b001b23
gh-126691: Remove --with-emscripten-target (#126787)
This unifies the code for nodejs and the code for the browser. After this
commit, the browser example doesn't work; this will be fixed in a
subsequent update.
2024-11-16 09:44:05 +08:00
Alex Gaynor d6bcc154e9
Added a warning to the urljoin docs, indicating that it is not safe to use with attacker controlled URLs (GH-126659)
This was flagged to me at a party today by someone who works in red-teaming as a frequently encountered footgun. Documenting the potentially unexpected behavior seemed like a good place to start.
2024-11-15 18:09:05 -05:00
Beomsoo Kim 94a7a4e22f
Docs: Miscellaneous corrections to simple statements in the language reference (GH-126720)
* Replace: The :keyword:`global` -> The :keyword:`global` statement
Add :keyword: when it's needed

* Replace repeated links with duoble backticks
2024-11-15 13:02:34 -08:00
Seth Michael Larson a2c180f4e7
Add PEP 761 to What's New (#126550)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-15 15:54:56 +00:00
Bénédikt Tran 612ac283b8
gh-122549: Add platform.invalidate_caches() (#122547)
Allow to invalidate platform's cached results.
2024-11-15 13:52:56 +00:00
Petr Viktorin d00f7b1b9d
gh-125063: marshal: Add version 5, improve documentation (GH-126829)
* Document that slices can be marshalled
* Deduplicate and organize the list of supported types
  in docs
* Organize the type code list in marshal.c, to make
  it more obvious that this is a versioned format
* Back-fill some historical info

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2024-11-15 13:48:57 +01:00
Bénédikt Tran e17486982c
gh-89083: small docs fixup for UUIDv8 (#126857) 2024-11-15 14:26:38 +02:00
RUANG (James Roy) 1e3497e745
gh-126061: add new functions to `refcounts.dat` (#126788) 2024-11-14 15:04:38 +01:00
Petr Viktorin ff0ef0a54b
gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance (GH-126182)
* gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance

This changes nothing changes for CPython supported platforms,
but hints how to deal with platforms that stick to the letter of
the spec.
It also marks `socket.getaddrinfo` as a wrapper around `getaddrinfo(3)`;
specifically, workarounds to make the function work consistently across
platforms are out of scope in its code.

Include wording similar to the POSIX's “by providing options and by
limiting the returned information”, which IMO suggests that the
hints limit the resulting list compared to the defaults, *but* can
be interpreted differently. Details are added in a note.

Specifically say that this wraps the underlying C function. So, the
details are in OS docs. The “full range of results” bit goes away.

Use `AF_UNSPEC` rather than zero for the *family* default, although
I don't think a system where it's nonzero would be very usable.

Suggest setting proto and/or type (with examples, as the appropriate
values aren't obvious). Say why you probably want to do that that
on all systems; mention the behavior on the “letter of the spec”
systems.

Suggest that the results should be tried in order, which is,
AFAIK best practice -- see RFC 6724 section 2, and its predecessor
from 2003 (which are specific to IP, but indicate how people use this):

> Well-behaved applications SHOULD iterate through the list of
> addresses returned from `getaddrinfo()` until they find a working address.


Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-11-14 09:31:14 +01:00
John Marshall e0692f1165
Document that return-less user-defined functions return None (#126769)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-11-14 07:47:24 +00:00
Colin Watson 73e34b6808
Doc: Recommend shlex.quote alongside pipes removal (#126570)
One of the most common reasons I see the old `pipes` module still in use
when porting to Python 3.13 is for the undocumented `pipes.quote`
function, which can easily be replaced with `shlex.quote`.  I think it's
worth specifically calling this out, since being directed to the
`subprocess` module would be confusing in this case.
2024-11-14 05:01:35 +00:00
Wulian 6a93a1adbb
gh-126731: Update outdated project information in `pprint.pp` doc (#126732) 2024-11-13 20:58:06 -08:00
Serhiy Storchaka 35010b8cf2
gh-126390: Support for preserving order of options and nonoption arguments in gnu_getopt() (GH-126393) 2024-11-13 22:50:46 +02:00
Peter Bierma d00878b06a
gh-123619: Add an unstable C API function for enabling deferred reference counting (GH-123635)
Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-11-13 13:27:16 +00:00
Taneli Hukkinen 29b5323c45
gh-126175: Add attributes to TOMLDecodeError. Deprecate free-form `__init__` args (GH-126428) 2024-11-13 13:52:16 +01:00
Serhiy Storchaka 7577307ebd
gh-116897: Deprecate generic false values in urllib.parse.parse_qsl() (GH-116903)
Accepting objects with false values (like 0 and []) except empty strings
and byte-like objects and None in urllib.parse functions parse_qsl() and
parse_qs() is now deprecated.
2024-11-12 21:10:29 +02:00
Bénédikt Tran 03924b5dee
gh-89083: add support for UUID version 8 (RFC 9562) (#123224)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-12 19:08:49 +01:00
Hugo van Kemenade 91f4908798
gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
RUANG (James Roy) 8ff7efb46d
gh-126061: Add PyLong_IsPositive/Zero/Negative() functions (#126065)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-12 14:18:06 +01:00
Sayandip Dutta abb90ba46c
gh-125916: Allow functools.reduce() 'initial' to be a keyword argument (#125917) 2024-11-12 13:11:58 +00:00
Sahil Prajapati 599bfc986d
gh-84852: Add MIME types for .eot, ,otf, .ttf, .woff and .woff2 fonts (#20199)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-12 08:48:38 +02:00
Beomsoo Kim 494360afd0
gh-58749: Remove incorrect language spec claims about the global statement (GH-126523)
* Removes erroneous explanation of the `global` statement restrictions; a name declared as global can be subsequently bound using any kind of name binding operation.
* Updates `test_global.py` to also test various name-binding scenarios for global
variables to ensure correct behavior
2024-11-12 10:11:40 +10:00
Ned Batchelder 036930d844
Docs: re-create pages for removed modules to document their removal. (#126622)
Will also need to change the redirects that were created here:
https://github.com/python/psf-salt/pull/521/files
2024-11-11 17:49:48 -05:00
Hugo van Kemenade 3c6d2d1230
gh-89416: Add RFC 9559 MIME types for Matroska formats (#126412)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-11-11 21:08:54 +00:00
Gregory P. Smith 4f3253a0cc
gh-84559: gh-103134: Whats new 3.14 entries for multiprocessing. (GH-126697) 2024-11-11 19:19:08 +00:00
谭九鼎 6e25eb1541
Update documentation links to Microsoft's documentation pages (GH-126379) 2024-11-11 17:10:49 +00:00
Serhiy Storchaka 25aee21aa8
gh-126374: Add support of options with optional arguments in the getopt module (GH-126375) 2024-11-11 18:29:28 +02:00
Rafael Fontenelle 82269c7d58
Add missing fullstop `.` to whatsnew/3.8.rst (GH-126553) 2024-11-10 22:59:23 -08:00
vivodi 25257d61cf
gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665) 2024-11-10 22:47:56 -08:00
Pedro Fonini 434b29767f
gh-126543: Docs: change "bound type var" to "bounded" when used in the context of the 'bound' kw argument to TypeVar (#126584) 2024-11-10 16:40:25 -08:00
Kirill Podoprigora f435de6765
gh-126647: `Doc/using/configure.rst`: Add an entry for ``--enable-experimental-jit`` option (#126648)
Add an entry for the ``--enable-experimental-jit`` option in ``Doc/using/configure.rst``.
This was added as an experimental option in CPython 3.13.
Possible values for it:
* `no` - don't build the JIT.
* `yes` - build the JIT.
* `yes-off` - build the JIT but disable it by default.
* `interpreter` - don't build the JIT but enable tier 2 interpreter instead.


Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-10 23:44:56 +02:00
Hugo van Kemenade 450db61a78
Postpone `module.__loader__` deprecation to Python 3.16 (#126482) 2024-11-09 16:48:33 -08:00
RUANG (James Roy) 75ffac296e
gh-125298: Remove misleading text in os.kill documentation (GH-125749)
Windows has not accepted process handles in many releases.
2024-11-08 15:29:16 +00:00
Richard Hansen e3510bd3dd
Doc: C API: Demote sections to subsections for consistency (#126535)
The entire file should be a single section; the headings below the
first heading should be subsections.
2024-11-07 16:29:31 +01:00
Gregory P. Smith 1fe67df8e3
gh-48020: [docs] Remove the logging howto suggested future FileHandler multiprocessing support (GH-126531)
Docs: Remove the logging howto potential promise of multiprocessing support in the future.

Stick to the facts and suggestions, don't provide hope where we're not going to
implement complexity that we'd rather the user implement themselves when
needed.
2024-11-07 01:57:01 -08:00
Kamil Turek 9cba47d9f1
gh-122838: Document missing opcodes (#123073) 2024-11-06 12:16:13 +00:00
Cody Maloney 6431f379b8
gh-120754: Add to `io` optimization to what's new (#126466) 2024-11-06 07:54:40 +01:00
Barney Gale ff8349979c
GH-124985: Document that `pathlib.Path.copy()` uses copy-on-write. (#125861) 2024-11-05 18:43:43 +00:00
Richard Hansen 407c0366d9
Doc: C API: Delete claim that `PyObject_Init` is GC-aware (#126418) 2024-11-05 15:18:46 +05:30
Lukas Geiger 3d4fda2165
gh-119793: Prefer `map(..., strict=True)` over starmap/zip in examples (#126407) 2024-11-05 08:53:32 +01:00
Victor Stinner 4a0d574273
gh-120057: Add os.reload_environ() function (#126268)
Replace the os.environ.refresh() method with a new
os.reload_environ() function.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-11-05 08:43:34 +01:00
lit d960226547
gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (#125437)
Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
2024-11-05 02:58:15 +00:00
Mikhail Efimov e5a4b402ae
Doc: Fix typo in documentation for ``MAKE_FUNCTION`` opcode (#126396) 2024-11-04 19:28:05 +02:00
Hugo van Kemenade eac41c5ddf
gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (#126392) 2024-11-04 18:49:59 +02:00
Nice Zombies 3032fcd90e
gh-119793: Add optional length-checking to `map()` (GH-120471)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2024-11-04 15:00:19 +01:00