Skip to content

Commit cb46954

Browse files
Deploy preview for PR 1214 🛫
1 parent 603602b commit cb46954

File tree

585 files changed

+9103
-9017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

585 files changed

+9103
-9017
lines changed

pr-preview/pr-1214/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: d6751eade72bed0b8f7a3e9e8373c012
3+
config: 429e5f11a7c447b979c1ef472ceffa09
44
tags: b5e2c454ba7771976391ed0cecdde553

pr-preview/pr-1214/_sources/library/pkgutil.rst.txt

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,24 +151,48 @@ support.
151151
:meth:`get_data <importlib.abc.ResourceLoader.get_data>` API. The
152152
*package* argument should be the name of a package, in standard module format
153153
(``foo.bar``). The *resource* argument should be in the form of a relative
154-
filename, using ``/`` as the path separator. The parent directory name
155-
``..`` is not allowed, and nor is a rooted name (starting with a ``/``).
154+
filename, using ``/`` as the path separator.
156155

157156
The function returns a binary string that is the contents of the specified
158157
resource.
159158

159+
This function uses the :term:`loader` method
160+
:func:`~importlib.abc.FileLoader.get_data`
161+
to support modules installed in the filesystem, but also in zip files,
162+
databases, or elsewhere.
163+
160164
For packages located in the filesystem, which have already been imported,
161165
this is the rough equivalent of::
162166

163167
d = os.path.dirname(sys.modules[package].__file__)
164168
data = open(os.path.join(d, resource), 'rb').read()
165169

170+
Like the :func:`open` function, :func:`!get_data` can follow parent
171+
directories (``../``) and absolute paths (starting with ``/`` or ``C:/``,
172+
for example).
173+
It can open compilation/installation artifacts like ``.py`` and ``.pyc``
174+
files or files with :func:`reserved filenames <os.path.isreserved>`.
175+
To be compatible with non-filesystem loaders, avoid using these features.
176+
177+
.. warning::
178+
179+
This function is intended for trusted input.
180+
It does not verify that *resource* "belongs" to *package*.
181+
182+
If you use a user-provided *resource* path, consider verifying it.
183+
For example, require an alphanumeric filename with a known extension, or
184+
install and check a list of known resources.
185+
166186
If the package cannot be located or loaded, or it uses a :term:`loader`
167187
which does not support :meth:`get_data <importlib.abc.ResourceLoader.get_data>`,
168188
then ``None`` is returned. In particular, the :term:`loader` for
169189
:term:`namespace packages <namespace package>` does not support
170190
:meth:`get_data <importlib.abc.ResourceLoader.get_data>`.
171191

192+
.. seealso::
193+
194+
The :mod:`importlib.resources` module provides structured access to
195+
module resources.
172196

173197
.. function:: resolve_name(name)
174198

pr-preview/pr-1214/_static/documentation_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const DOCUMENTATION_OPTIONS = {
2-
VERSION: '3.14.3',
2+
VERSION: '3.14.4',
33
LANGUAGE: 'zh-TW',
44
COLLAPSE_INDEX: false,
55
BUILDER: 'html',
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
33
<ShortName>Python</ShortName>
4-
<Description>搜尋 Python 3.14.3 說明文件</Description>
4+
<Description>搜尋 Python 3.14.4 說明文件</Description>
55
<InputEncoding>utf-8</InputEncoding>
66
<Url type="text/html" method="get"
77
template="https://docs.python.org/3.14/search.html?q={searchTerms}"/>
8-
<LongName>Python 3.14.3 說明文件</LongName>
8+
<LongName>Python 3.14.4 說明文件</LongName>
99
<Image height="16" width="16" type="image/x-icon">https://www.python.org/images/favicon16x16.ico</Image>
1010
</OpenSearchDescription>

pr-preview/pr-1214/about.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

8-
<title>關於這份說明文件 &#8212; Python 3.14.3 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>關於這份說明文件 &#8212; Python 3.14.4 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
99

1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
1111
<link rel="stylesheet" type="text/css" href="_static/classic.css?v=234b1a7c" />
1212
<link rel="stylesheet" type="text/css" href="_static/pydoctheme.css?v=82640b3f" />
1313
<link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="_static/pygments_dark.css?v=5349f25f" />
1414

15-
<script src="_static/documentation_options.js?v=e2c088d7"></script>
15+
<script src="_static/documentation_options.js?v=9e923c91"></script>
1616
<script src="_static/doctools.js?v=9bcbadda"></script>
1717
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
1818
<script src="_static/translations.js?v=cbf116e0"></script>
1919

2020
<script src="_static/sidebar.js"></script>
2121

2222
<link rel="search" type="application/opensearchdescription+xml"
23-
title="在 Python 3.14.3 說明文件 中搜尋"
23+
title="在 Python 3.14.4 說明文件 中搜尋"
2424
href="_static/opensearch.xml"/>
2525
<link rel="author" title="關於這些文件" href="#" />
2626
<link rel="index" title="索引" href="genindex.html" />
@@ -169,7 +169,7 @@ <h3>導航</h3>
169169

170170
</li>
171171
<li id="cpython-language-and-version">
172-
<a href="index.html">3.14.3 Documentation</a> &#187;
172+
<a href="index.html">3.14.4 Documentation</a> &#187;
173173
</li>
174174

175175
<li class="nav-item nav-item-this"><a href="">關於這份說明文件</a></li>
@@ -312,7 +312,7 @@ <h3>導航</h3>
312312

313313
</li>
314314
<li id="cpython-language-and-version">
315-
<a href="index.html">3.14.3 Documentation</a> &#187;
315+
<a href="index.html">3.14.4 Documentation</a> &#187;
316316
</li>
317317

318318
<li class="nav-item nav-item-this"><a href="">關於這份說明文件</a></li>
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 4月 07, 2026 (00:29 UTC)。
359+
最後更新於 4月 08, 2026 (00:30 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1214/bugs.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

8-
<title>處理錯誤 (Bug) &#8212; Python 3.14.3 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>處理錯誤 (Bug) &#8212; Python 3.14.4 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
99

1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
1111
<link rel="stylesheet" type="text/css" href="_static/classic.css?v=234b1a7c" />
1212
<link rel="stylesheet" type="text/css" href="_static/pydoctheme.css?v=82640b3f" />
1313
<link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="_static/pygments_dark.css?v=5349f25f" />
1414

15-
<script src="_static/documentation_options.js?v=e2c088d7"></script>
15+
<script src="_static/documentation_options.js?v=9e923c91"></script>
1616
<script src="_static/doctools.js?v=9bcbadda"></script>
1717
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
1818
<script src="_static/translations.js?v=cbf116e0"></script>
1919

2020
<script src="_static/sidebar.js"></script>
2121

2222
<link rel="search" type="application/opensearchdescription+xml"
23-
title="在 Python 3.14.3 說明文件 中搜尋"
23+
title="在 Python 3.14.4 說明文件 中搜尋"
2424
href="_static/opensearch.xml"/>
2525
<link rel="author" title="關於這些文件" href="about.html" />
2626
<link rel="index" title="索引" href="genindex.html" />
@@ -171,7 +171,7 @@ <h3>導航</h3>
171171

172172
</li>
173173
<li id="cpython-language-and-version">
174-
<a href="index.html">3.14.3 Documentation</a> &#187;
174+
<a href="index.html">3.14.4 Documentation</a> &#187;
175175
</li>
176176

177177
<li class="nav-item nav-item-this"><a href="">處理錯誤 (Bug)</a></li>
@@ -250,7 +250,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
250250
</section>
251251
<section id="getting-started-contributing-to-python-yourself">
252252
<span id="contributing-to-python"></span><h2>開始讓自己貢獻 Python<a class="headerlink" href="#getting-started-contributing-to-python-yourself" title="連結到這個標頭"></a></h2>
253-
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://devguide.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
253+
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://devguide.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
254254
</section>
255255
</section>
256256

@@ -349,7 +349,7 @@ <h3>導航</h3>
349349

350350
</li>
351351
<li id="cpython-language-and-version">
352-
<a href="index.html">3.14.3 Documentation</a> &#187;
352+
<a href="index.html">3.14.4 Documentation</a> &#187;
353353
</li>
354354

355355
<li class="nav-item nav-item-this"><a href="">處理錯誤 (Bug)</a></li>
@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 4月 07, 2026 (00:29 UTC)。
396+
最後更新於 4月 08, 2026 (00:30 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>
399399

pr-preview/pr-1214/c-api/abstract.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

8-
<title>抽象物件層 (Abstract Objects Layer) &#8212; Python 3.14.3 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>抽象物件層 (Abstract Objects Layer) &#8212; Python 3.14.4 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
99

1010
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />
1111
<link rel="stylesheet" type="text/css" href="../_static/classic.css?v=234b1a7c" />
1212
<link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=82640b3f" />
1313
<link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=5349f25f" />
1414

15-
<script src="../_static/documentation_options.js?v=e2c088d7"></script>
15+
<script src="../_static/documentation_options.js?v=9e923c91"></script>
1616
<script src="../_static/doctools.js?v=9bcbadda"></script>
1717
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
1818
<script src="../_static/translations.js?v=cbf116e0"></script>
1919

2020
<script src="../_static/sidebar.js"></script>
2121

2222
<link rel="search" type="application/opensearchdescription+xml"
23-
title="在 Python 3.14.3 說明文件 中搜尋"
23+
title="在 Python 3.14.4 說明文件 中搜尋"
2424
href="../_static/opensearch.xml"/>
2525
<link rel="author" title="關於這些文件" href="../about.html" />
2626
<link rel="index" title="索引" href="../genindex.html" />
@@ -159,7 +159,7 @@ <h3>導航</h3>
159159

160160
</li>
161161
<li id="cpython-language-and-version">
162-
<a href="../index.html">3.14.3 Documentation</a> &#187;
162+
<a href="../index.html">3.14.4 Documentation</a> &#187;
163163
</li>
164164

165165
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python/C API 參考手冊</a> &#187;</li>
@@ -320,7 +320,7 @@ <h3>導航</h3>
320320

321321
</li>
322322
<li id="cpython-language-and-version">
323-
<a href="../index.html">3.14.3 Documentation</a> &#187;
323+
<a href="../index.html">3.14.4 Documentation</a> &#187;
324324
</li>
325325

326326
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
@@ -365,7 +365,7 @@ <h3>導航</h3>
365365
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
366366
<br>
367367
<br>
368-
最後更新於 4月 07, 2026 (00:29 UTC)。
368+
最後更新於 4月 08, 2026 (00:30 UTC)。
369369

370370
<a href="/bugs.html">發現 bug</a>
371371

pr-preview/pr-1214/c-api/allocation.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

8-
<title>在 heap 上分配物件 &#8212; Python 3.14.3 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>在 heap 上分配物件 &#8212; Python 3.14.4 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
99

1010
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />
1111
<link rel="stylesheet" type="text/css" href="../_static/classic.css?v=234b1a7c" />
1212
<link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=82640b3f" />
1313
<link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=5349f25f" />
1414

15-
<script src="../_static/documentation_options.js?v=e2c088d7"></script>
15+
<script src="../_static/documentation_options.js?v=9e923c91"></script>
1616
<script src="../_static/doctools.js?v=9bcbadda"></script>
1717
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
1818
<script src="../_static/translations.js?v=cbf116e0"></script>
1919

2020
<script src="../_static/sidebar.js"></script>
2121

2222
<link rel="search" type="application/opensearchdescription+xml"
23-
title="在 Python 3.14.3 說明文件 中搜尋"
23+
title="在 Python 3.14.4 說明文件 中搜尋"
2424
href="../_static/opensearch.xml"/>
2525
<link rel="author" title="關於這些文件" href="../about.html" />
2626
<link rel="index" title="索引" href="../genindex.html" />
@@ -169,7 +169,7 @@ <h3>導航</h3>
169169

170170
</li>
171171
<li id="cpython-language-and-version">
172-
<a href="../index.html">3.14.3 Documentation</a> &#187;
172+
<a href="../index.html">3.14.4 Documentation</a> &#187;
173173
</li>
174174

175175
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
@@ -528,7 +528,7 @@ <h3>導航</h3>
528528

529529
</li>
530530
<li id="cpython-language-and-version">
531-
<a href="../index.html">3.14.3 Documentation</a> &#187;
531+
<a href="../index.html">3.14.4 Documentation</a> &#187;
532532
</li>
533533

534534
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
@@ -574,7 +574,7 @@ <h3>導航</h3>
574574
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
575575
<br>
576576
<br>
577-
最後更新於 4月 07, 2026 (00:29 UTC)。
577+
最後更新於 4月 08, 2026 (00:30 UTC)。
578578

579579
<a href="/bugs.html">發現 bug</a>
580580

pr-preview/pr-1214/c-api/apiabiversion.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

8-
<title>API 和 ABI 版本管理 &#8212; Python 3.14.3 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>API 和 ABI 版本管理 &#8212; Python 3.14.4 說明文件</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
99

1010
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />
1111
<link rel="stylesheet" type="text/css" href="../_static/classic.css?v=234b1a7c" />
1212
<link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=82640b3f" />
1313
<link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=5349f25f" />
1414

15-
<script src="../_static/documentation_options.js?v=e2c088d7"></script>
15+
<script src="../_static/documentation_options.js?v=9e923c91"></script>
1616
<script src="../_static/doctools.js?v=9bcbadda"></script>
1717
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
1818
<script src="../_static/translations.js?v=cbf116e0"></script>
1919

2020
<script src="../_static/sidebar.js"></script>
2121

2222
<link rel="search" type="application/opensearchdescription+xml"
23-
title="在 Python 3.14.3 說明文件 中搜尋"
23+
title="在 Python 3.14.4 說明文件 中搜尋"
2424
href="../_static/opensearch.xml"/>
2525
<link rel="author" title="關於這些文件" href="../about.html" />
2626
<link rel="index" title="索引" href="../genindex.html" />
@@ -171,7 +171,7 @@ <h3>導航</h3>
171171

172172
</li>
173173
<li id="cpython-language-and-version">
174-
<a href="../index.html">3.14.3 Documentation</a> &#187;
174+
<a href="../index.html">3.14.4 Documentation</a> &#187;
175175
</li>
176176

177177
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python/C API 參考手冊</a> &#187;</li>
@@ -469,7 +469,7 @@ <h3>導航</h3>
469469

470470
</li>
471471
<li id="cpython-language-and-version">
472-
<a href="../index.html">3.14.3 Documentation</a> &#187;
472+
<a href="../index.html">3.14.4 Documentation</a> &#187;
473473
</li>
474474

475475
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
@@ -514,7 +514,7 @@ <h3>導航</h3>
514514
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
515515
<br>
516516
<br>
517-
最後更新於 4月 07, 2026 (00:29 UTC)。
517+
最後更新於 4月 08, 2026 (00:30 UTC)。
518518

519519
<a href="/bugs.html">發現 bug</a>
520520

0 commit comments

Comments
 (0)