Commit graph

14842 commits

Author SHA1 Message Date
Miss Islington (bot)
3c1c9ba285
[3.15] Delete mention encoding and errors for importlib.resources.path() (GH-143111) (GH-151014)
(cherry picked from commit fded34d6fe)

Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
2026-06-06 11:59:53 +00:00
Miss Islington (bot)
4a3d6f9793
[3.15] Use time.monotonic in OrderedDict LRU cache example (GH-150986) (#150991)
Use `time.monotonic` in OrderedDict LRU cache example (GH-150986)
(cherry picked from commit ea4c85552b)

Co-authored-by: Ilya Nikolaev <65247719+ilya-nikolaev@users.noreply.github.com>
2026-06-06 01:59:30 +03:00
Miss Islington (bot)
d8af158eb6
[3.15] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) (#150957)
gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328)

Update `RawIOBase` and `FileIO` documentation to match implementation
behavior around `.read`, `.readinto`, `.readall` and `.write`.

In particular:

 - They may make more than one system call (PEP-475)
 - Add warnings if `.write()` requires a wrapping retry loop (see: gh-126606)
    - "Raw I/O" `.write`` may not write all bytes
    - `buffering=0` example results in a "Raw I/O"
(cherry picked from commit e4db68b9c9)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-05 12:09:13 +00:00
Miss Islington (bot)
253c51837f
[3.15] gh-106318: Add doctest role and a 'See also' to the str.split() docs (GH-144367)
(cherry picked from commit a96cba5c4a)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-06-04 14:23:33 +01:00
Miss Islington (bot)
0ad93968fe
[3.15] gh-149473: Emit audit event on calling os.environ.clear() (GH-149768) (#150094)
gh-149473: Emit audit event on calling os.environ.clear() (GH-149768)
(cherry picked from commit 29415c071f)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-06-04 08:47:38 +00:00
Miss Islington (bot)
54bd7c0258
[3.15] gh-132467: Document and test that generic aliases are not classes (GH-133504) (#150854)
gh-132467: Document and test that generic aliases are not classes (GH-133504)
(cherry picked from commit 5915a1fb9d)

Co-authored-by: Abduaziz π <mail@ziyodov.uz>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-06-03 08:26:36 -07:00
Miss Islington (bot)
c69521fdec
[3.15] Fix a typo in SSLSocket docs (GH-150839) (GH-150848)
Fix a typo in `SSLSocket` docs (GH-150839)
(cherry picked from commit 5553e003ca)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
2026-06-03 12:27:56 +00:00
Miss Islington (bot)
accc0c8315
[3.15] gh-148587: Document sys.lazy_modules (GH-150742)
(cherry picked from commit e3fa52d953)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-06-03 09:36:50 +01:00
Miss Islington (bot)
1c2daa08fb
[3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808)
gh-150319: Replace all documentation which says "See PEP 585" (GH-150325)

* Replace all documentation which says "See PEP 585"

The following classes in the stdlib get simple updates:

- array.array
- asyncio.Future
- asyncio.Task
- collections.defaultdict
- collections.deque
- contextvars.ContextVar
- contextvars.Token
- ctypes.Array
- os.DirEntry
- re.Match
- re.Pattern
- string.templatelib.Interpolation
- string.templatelib.Template
- types.MappingProxyType
- queue.SimpleQueue
- weakref.ref

The following classes are documented publicly as functions, and are
therefore updated internally (`__class_getitem__.__doc__`) but not in the
public docs:

- functools.partial
- itertools.chain

The following builtin types have updates to `__class_getitem__.__doc__`
but not to any documentation pages:

- BaseExceptionGroup
- coroutines (from generators)
- dict
- enumerate
- frozendict
- frozenset
- generators (and async generators)
- list
- memoryview
- set
- slice
- tuple

Special cases:

- union objects are now documented as "supporting class-level []",
  rather than anything to do with generics.

- Templates might be generic over a single type (union, in theory) or
  over a TypeVarTuple. As this is not currently fully settled, it is
  marked with a comment and a mild hint that it is a single type is used
  (namely, "type" is singular rather than "types", plural)

* Apply suggestions from code review



* Correct several class getitem docs

And expand the text for tuples.



* Add notes on generic typing of builtins

* Fix typo in tuple.__class_getitem__ docstring

* Typo fix: malformed refs

Fix `generic` links which weren't marked as `:ref:`.

* Strike unnecessary docs on generic-ness



* Apply suggestions from code review

These are applied at both the originally indicated locations and in the
corresponding docstring definitions.



* Update Doc/library/re.rst



* Update Objects/enumobject.c



* Remove tuple generic doc in 'stdtypes' page

This is covered in more detail in the cross-linked typing documentation.
The other copy of this documentation -- in the docstring for
`tuple.__class_getitem__` -- is left in place.

* Fix whitespace around new doc of generics

Per review, do not introduce or remove whitespace such that section
breaks are altered by the introduction of doc on various generic types.

In most cases, this is a removal of an extra line.

In one case (Arrays), it is the reintroduction of a line.

Additionally, two other minor fixes are included:
- incorrect indent on 'defaultdicts'
- make `mappingproxy.__class_getitem__.__doc__` consistent with other
  mapping type generic docs



* Move placement of memoryview generic note

Previous placement was at the end of the main docstring, which is
consistent with other types but places it after a section on various
methods (which makes it read somewhat inconsistently). Moving it up
helps resolve.



* Ensure sphinxdoc does not start sentences lowercase

Lowercase class names at the start of sentences are marked out with the
`class` role. In the case of `deque`, documentation already refers to
these as `Deques`, so this form is preferred.

* Apply suggestions from code review



* Fix line endings and wrap more tightly

Line endings fixed by pre-commit ; also re-wrapped the MappingProxyType
text which was too long.

* Use 'ContextVars' style in sphinx doc

---------
(cherry picked from commit 50fe49c879)

Co-authored-by: Stephen Rosen <sirosen@globus.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <906600+JelleZijlstra@users.noreply.github.com>
Co-authored-by: Alex Waygood <66076021+AlexWaygood@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-06-02 20:40:52 +00:00
Miss Islington (bot)
d5f93ce156
[3.15] gh-141627: Fix BufferedRandom inheritance documentation (GH-141629) (GH-150801)
BufferedRandom does not inherit from BufferedReader and BufferedWriter
in the C implementation.
(cherry picked from commit 551bc2cb5e)

Co-authored-by: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com>
2026-06-02 22:23:15 +03:00
Miss Islington (bot)
0aa9f434ad
[3.15] Fix description of the function parameter of shutil.register_archive_format() (GH-145087) (GH-150804)
(cherry picked from commit 18c6d3ccc3)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2026-06-02 19:20:49 +00:00
Hugo van Kemenade
94a64bbc6c Python 3.15.0b2 2026-06-02 18:28:41 +03:00
Miss Islington (bot)
33b2879c3a
[3.15] gh-149187: Document frozendict() under 'Built-in Functions' (GH-149185)
(cherry picked from commit 86867edb84)

Co-authored-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2026-06-02 15:18:03 +01:00
Miss Islington (bot)
c5248b7acf
[3.15] gh-89554: Document _thread.LockType as a class (GH-150684) (#150785)
gh-89554: Document _thread.LockType as a class (GH-150684)

_thread.LockType is a class (the type of lock objects), but was documented
with the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", move it next to the lock methods, and
document acquire(), release() and locked() as methods of the class.  Keep
the old _thread.lock.* URL fragments working with raw HTML anchors.
(cherry picked from commit e37ce56977)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2026-06-02 13:07:05 +00:00
Miss Islington (bot)
1835400ff5
[3.15] gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754) (#150768)
gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754)

Deleting the `row_factory` or `text_factory` attribute is no longer allowed.
(cherry picked from commit 60fdb3192b)

Co-authored-by: Sepehr Rasouli <sepehrrasouli06@gmail.com>
2026-06-02 09:36:03 +00:00
Miss Islington (bot)
94c58db977
[3.15] gh-123138: Updated email.headerregistry docs to include required keyword parse_tree (GH-134450) (GH-150623)
(cherry picked from commit 2c20f9ce17)

Co-authored-by: Gustaf <79180496+gostak-dd@users.noreply.github.com>
2026-06-02 09:26:05 +00:00
Miss Islington (bot)
35dc248372
[3.15] gh-89554: Document typing.ParamSpecArgs and ParamSpecKwargs as classes (GH-150677) (GH-150763)
Use the directive "class" instead of "data" for ParamSpecArgs and ParamSpecKwargs.
(cherry picked from commit 35c314d2b7)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2026-06-02 08:16:05 +00:00
Miss Islington (bot)
b48cf0ec0c
[3.15] gh-89554: Document standard type objects in types as classes (GH-150676) (GH-150761)
Use the directive and the role "class" instead of "data" for classes
exposed in the types module.
(cherry picked from commit bc055444e4)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2026-06-02 08:11:19 +00:00
Miss Islington (bot)
506b41d458
[3.15] gh-89554: Document weakref type objects as classes (GH-150678) (GH-150760)
Use the "class" directive instead of "data" for ReferenceType,
ProxyType and CallableProxyType.
(cherry picked from commit 10c421970b)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2026-06-02 08:08:01 +00:00
Miss Islington (bot)
ef45089660
[3.15] gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes (GH-150682) (GH-150755)
Always use the directive and the role "class" instead of "data" for
NoneType, NotImplementedType and EllipsisType.
(cherry picked from commit e40190e104)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2026-06-02 08:03:51 +00:00
Miss Islington (bot)
848ba18bcd
[3.15] gh-150228: Improve the PEP 829 batch processing APIs (GH-150542) (#150748)
gh-150228: Improve the PEP 829 batch processing APIs (GH-150542)

* gh-150228: Improve the PEP 829 batch processing APIs

As previously discussed with @ncoghlan and approved for 3.15b2 by @hugovk,
this implements the batch processing APIs for addsitedir() and friends.  We
remove the `defer_processing_start_files` flag which required some implicit
module global state, and promote StartupState to the public documented API.

This also moves the bulk of the module global functions into methods of the
`StartupState` class, so it removes the awkward APIs in 3.15b1.  Now, instances
of this class are an accumulator for startup state, using `StartupState.process()`
to process them.  Callers can now batch up startup state themselves by using
the methods on this class.  The module global functions are shims for this
which preserve the legacy APIs and semantics using the new state class.

This PR also fixes the interleaving regression identified by @ncoghlan in the
same issue.  Now, .pth file sys.path extensions are added to sys.path after
the sitedir that the .pth file is found in, restoring the legacy behavior.

Along the way, I've made a lot of improvements to function docstrings,
site.rst documentation, and comments in the code explaining what's going on.

* Add a note that if known_paths is provided to StartupState.__init__(), it
  will get mutated in place.
* Improve some conditional flows.
* Improve some comments.
* Improve the what's new entry.

* Make test_impl_exec_imports_suppressed_by_matching_start() more robust

Based on PR comment, we need to read both the .pth and .start files, and prove
that the .pth file's import line (which passes a bigger increment) is not
called, but the .start file's entry point (which uses the default increment)
is called.

* As per review, move some methods to the private API

_read_pth_file() and _read_start_file() are not intended to be part of the
public API surface outside of the site module, so even though they are used by
methods outside of the StartupState class, make them privately named.

* Resolve several review feedbacks

* Move a `versionadded`
* Better list comprehension formatting (use the output from
  `ruff format --line-length 78`)

* Add docs for site.makepath() and point the case-normalization requirement to
  this utility function.
* Note that StartupState.process() is not idempotent.

* Address another feedback comment

This time, we get rid of the legacy implementation `reset` local, which was
always difficult to understand, and just implement a return value based on the
processing mode selected.

* Changes based on gh-150228 review

The comment by @encukou that started this change:

```
I still see two red flags here though: an argument that doesn't combine with
other arguments, and (another instance of) changing the return type based on
an argument.

Did you consider adding a StartupState.addsitedir(sitedir) method, instead of
the startup_state argument?
```

As it turns out, this is an even cleaner design.  By moving the bulk of the
previous module global functions into `StartupState` methods, we can get rid
of all the awkward `startup_state` keyword-only arguments which conflict
with `known_path` (Petr's first point).  We can also get rid of the
return value dichotomy (Petr's second point) because now we can preserve
exactly the Python 3.14 API in the module global functions, and implement
the better APIs in the class methods.  We also generally don't have to
pass around `process_known_sitedirs`.

Now the following module global functions are essentially shims around
class methods:

* site.addsitedir() -> StartupState.addsitedir()
* site.addusersitepackages() -> StartupState.addusersitepackages()
* site.addsitepackages() -> StartupState.addsitepackages()
* Additional minor changes
* Remove a now unused parameter

(cherry picked from commit 27ebd9abce)

Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-06-02 02:11:51 +00:00
Miss Islington (bot)
fed5c744df
[3.15] gh-140553: Mark *gettext parameters as positionaly only in documentation (GH-140598)
(cherry picked from commit 1837c17bc7)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-31 20:21:08 +01:00
Miss Islington (bot)
ea58c352b7
[3.15] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150668)
(cherry picked from commit 2f8f569ba9)

Co-authored-by: M. Greyson Christoforo <grey@christoforo.net>
2026-05-31 12:19:43 +00:00
Miss Islington (bot)
2fb2a23cbd
[3.15] gh-150636: Clarify difference between copy.copy() and the copy() methods (GH-150637) (GH-150665)
(cherry picked from commit 1de909b324)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-31 12:16:58 +00:00
Miss Islington (bot)
c5655dfe51
[3.15] Correct frexp() docs for zero and non-finite numbers (GH-149753) (GH-150652)
0.5 <= abs(m) < 1 is only true for finite nonzero numbers
(cherry picked from commit 5b5ffce05c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-05-31 10:04:18 +00:00
Miss Islington (bot)
2ff80c7533
[3.15] gh-131178: Fix mimetypes CLI docs, mention that errors go to stdout (GH-149683) (#150655)
gh-131178: Fix mimetypes CLI docs, mention that errors go to stdout (GH-149683)
(cherry picked from commit 2b94b92394)

Co-authored-by: htjworld <116538001+htjworld@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-05-31 08:14:15 +00:00
Miss Islington (bot)
3084bdc54b
[3.15] gh-150524: Remove outdated note in binascii.a2b_hex() documentation (GH-150525) (GH-150627)
bytes.fromhex() accepts ASCII bytes and bytes-like objects as input since 3.14
(cherry picked from commit af10734907)

Co-authored-by: Joshix-1 <57299889+Joshix-1@users.noreply.github.com>
2026-05-31 10:52:55 +03:00
Miss Islington (bot)
d03250657a
[3.15] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) (GH-150649)
(cherry picked from commit 73d8e9a47c)

Co-authored-by: Patrick Rauscher <prauscher@prauscher.de>
2026-05-31 07:28:45 +00:00
Miss Islington (bot)
9a393438a7
[3.15] gh-149857: Clarify multiprocessing Process argument wording (GH-149919) (#149933)
gh-149857: Clarify multiprocessing Process argument wording (GH-149919)

Use consistent 'picklable' wording
(cherry picked from commit 1bab6c9192)

Co-authored-by: Mani Salahmand <78011313+ManiSalahmand@users.noreply.github.com>
2026-05-31 04:22:11 +00:00
Miss Islington (bot)
ccfa50a078
[3.15] gh-141444:fix broken URLs and examples in urllib.request.rst (GH-144863) (#150642)
gh-141444:fix broken URLs and examples in urllib.request.rst (GH-144863)

* Doc: fix broken URLs and examples in urllib.request.rst (gh-141444)

* Doc: update urllib.request examples to handle gzip compression

---------
(cherry picked from commit 0f1f7c7889)

Co-authored-by: Paper Moon <tangyuan0821@email.cn>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2026-05-30 21:08:20 -07:00
Miss Islington (bot)
187982aa7d
[3.15] gh-150501: Correct inspect.getattr_static docs signature (GH-150504) (#150601)
gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504)
(cherry picked from commit 678fd8452c)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-05-30 09:25:38 +00:00
Miss Islington (bot)
59e709b17e
[3.15] Add a security warning about pydoc's HTTP server (#150573)
(cherry picked from commit 5535c1f9c0)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-29 20:07:29 +01:00
Miss Islington (bot)
0e08bba32e
[3.15] Add prominent crash warning to ctypes docs (GH-150410) (GH-150547)
(cherry picked from commit b53f6ca850)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-28 12:23:56 +02:00
Miss Islington (bot)
28037c2d11
[3.15] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) (GH-150383)
(cherry picked from commit 832afeddce)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
2026-05-25 10:13:01 +00:00
Miss Islington (bot)
c3d21e5a11
[3.15] gh-148932: Docs / profiling.sampling Windows limitations (GH-150272) (#150330)
gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272)
(cherry picked from commit 0f32750fe2)

Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
2026-05-24 12:02:45 +00:00
Miss Islington (bot)
d9d8ee503a
[3.15] gh-150232: update Thread group parameter doc (GH-150283) (#150297)
gh-150232: update Thread group parameter doc (GH-150283)
(cherry picked from commit 82191c6d2c)

Co-authored-by: My-ABC <569817555@qq.com>
2026-05-23 14:04:48 +05:30
Miss Islington (bot)
081187f169
[3.15] gh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269) (GH-150271)
(cherry picked from commit 9df2b6ccc7)

Co-authored-by: Omkar Kabde <omkarkabde@gmail.com>
2026-05-23 00:17:51 +03:00
Miss Islington (bot)
3daf1fad7a
[3.15] gh-149189: Revert "Modern defaults for pprint (GH-149190)" (GH-150249) (#150268)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-22 20:49:36 +00:00
Miss Islington (bot)
f5231469b5
[3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092)
Implementation of python/peps#4968.
(cherry picked from commit 08218030a5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-22 07:44:34 -07:00
Miss Islington (bot)
b039d1bd97
[3.15] gh-133998: Fix gzip file creation when time is out of range (GH-134278) (GH-150221)
(cherry picked from commit 1daad8a163)

Co-authored-by: adang1345 <adang1345@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-22 07:48:42 +00:00
Miss Islington (bot)
591c4ffdd9
[3.15] gh-149995: Update typing.py docstrings and documentation (GH-149996) (#150215)
gh-149995: Update typing.py docstrings and documentation (GH-149996)

Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.

A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
  they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
  annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
  general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
  there was talk of allowing overload only in stubs, but it is now heavily used at
  runtime too and that's more likely to be relevant to users.
(cherry picked from commit f159419ae2)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-22 06:41:43 +00:00
Miss Islington (bot)
dea552c1b6
[3.15] Add summary table to the unicodedata doc (GH-149957) (#150161)
(cherry picked from commit 87a879f4d0)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-20 21:10:21 +01:00
Miss Islington (bot)
653f12b2bf
[3.15] gh-143387: Update docs to reflect the behavior and note the changed version. (GH-150095) (#150106)
gh-143387: Update docs to reflect the behavior and note the changed version. (GH-150095)
(cherry picked from commit 192796cfd4)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2026-05-19 18:03:47 -07:00
Miss Islington (bot)
eb7be9ab52
[3.15] gh-72088: clarify inspect.ismethod and inspect.isfunction (and related) usage with class-level access (GH-150013) (GH-150119)
(cherry picked from commit 0aa59ce2d4)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
2026-05-20 03:00:54 +02:00
Miss Islington (bot)
4baf3e5b0d
[3.15] gh-134887: Add references to locale module for locale-aware number formatting references in string module docs (GH-134888) (GH-150120)
(cherry picked from commit 47723af4e7)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
2026-05-20 02:54:59 +02:00
Miss Islington (bot)
bec4336bad
[3.15] gh-69619: Clarify whitespace definition in str.strip docs (#150049)
(cherry picked from commit 17eb17d43f)

Co-authored-by: Daniil <d.mayorov@innopolis.university>
2026-05-19 18:48:48 +01:00
Miss Islington (bot)
65b255416a
[3.15] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH-150064)
gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994)
(cherry picked from commit ba0aca3bff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
2026-05-19 08:44:35 +00:00
Miss Islington (bot)
28f275f713
[3.15] gh-86533: Restore os.makedirs() ability to apply *mode* recursively (GH-150011) (#150036)
bpo-42367: Restore os.makedirs() and pathlib.mkdir() ability to apply *mode* recursively via a new parent_mode= keyword argument.
(cherry picked from commit 9770e32ce0)

+ Make Path.mkdir parent_mode tests umask-independent

test_mkdir_with_parent_mode, test_mkdir_parent_mode_deep_hierarchy and
test_mkdir_parent_mode_same_as_mode assert exact directory mode bits but
did not pin the process umask.  On buildbots running with a restrictive
umask (e.g. 0o077) the 0o755 leaf was masked down to 0o700, failing the
assertions.  Wrap them in os_helper.temp_umask(0o022), matching the
other umask-aware mkdir tests in this file.

---------

Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-18 22:10:01 -07:00
Miss Islington (bot)
16f8ed5a82
[3.15] gh-95816: Fix TLS version range example in docs (GH-148574) (#150008)
gh-95816: Fix TLS version range example in docs (GH-148574)

docs(ssl): Fix TLS version range example
(cherry picked from commit dbd8985e82)

Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
2026-05-18 14:47:19 -07:00
Miss Islington (bot)
176d0f51cf
[3.15] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804) (GH-149870)
Like IBM00858, CP00858, IBM01140, CP01140.
(cherry picked from commit 20438866ae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-15 15:08:15 +03:00