Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit77163a1

Browse files
Deploy preview for PR 1123 🛫
1 parentebe0a44 commit77163a1

File tree

556 files changed

+645
-584
lines changed

Some content is hidden

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

556 files changed

+645
-584
lines changed

‎pr-preview/pr-1123/_sources/c-api/memory.rst.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,10 @@ This allocator is disabled if Python is configured with the
656656
:option:`--without-pymalloc` option. It can also be disabled at runtime using
657657
the :envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``).
658658
659+
Typically, it makes sense to disable the pymalloc allocator when building
660+
Python with AddressSanitizer (:option:`--with-address-sanitizer`) which helps
661+
uncover low level bugs within the C code.
662+
659663
Customize pymalloc Arena Allocator
660664
----------------------------------
661665

‎pr-preview/pr-1123/_sources/library/tarfile.rst.txt

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,9 @@ Command-line options
13041304
Examples
13051305
--------
13061306

1307+
Reading examples
1308+
~~~~~~~~~~~~~~~~~~~
1309+
13071310
How to extract an entire tar archive to the current working directory::
13081311

13091312
import tarfile
@@ -1326,6 +1329,23 @@ a generator function instead of a list::
13261329
tar.extractall(members=py_files(tar))
13271330
tar.close()
13281331

1332+
How to read a gzip compressed tar archive and display some member information::
1333+
1334+
import tarfile
1335+
tar = tarfile.open("sample.tar.gz", "r:gz")
1336+
for tarinfo in tar:
1337+
print(tarinfo.name, "is", tarinfo.size, "bytes in size and is ", end="")
1338+
if tarinfo.isreg():
1339+
print("a regular file.")
1340+
elif tarinfo.isdir():
1341+
print("a directory.")
1342+
else:
1343+
print("something else.")
1344+
tar.close()
1345+
1346+
Writing examples
1347+
~~~~~~~~~~~~~~~~
1348+
13291349
How to create an uncompressed tar archive from a list of filenames::
13301350

13311351
import tarfile
@@ -1341,19 +1361,15 @@ The same example using the :keyword:`with` statement::
13411361
for name in ["foo", "bar", "quux"]:
13421362
tar.add(name)
13431363

1344-
How to read a gzip compressed tar archive and display some member information::
1364+
How to create and write an archive to stdout using
1365+
:data:`sys.stdout.buffer <sys.stdout>` in the *fileobj* parameter
1366+
in:meth:`TarFile.add`::
13451367

1346-
import tarfile
1347-
tar = tarfile.open("sample.tar.gz", "r:gz")
1348-
for tarinfo in tar:
1349-
print(tarinfo.name, "is", tarinfo.size, "bytes in size and is ", end="")
1350-
if tarinfo.isreg():
1351-
print("a regular file.")
1352-
elif tarinfo.isdir():
1353-
print("a directory.")
1354-
else:
1355-
print("something else.")
1356-
tar.close()
1368+
import sys
1369+
import tarfile
1370+
with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar:
1371+
for name in ["foo", "bar", "quux"]:
1372+
tar.add(name)
13571373

13581374
How to create an archive and reset the user information using the *filter*
13591375
parameter in:meth:`TarFile.add`::

‎pr-preview/pr-1123/_sources/using/configure.rst.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,9 @@ Debug options
771771
..option::--with-address-sanitizer
772772

773773
Enable AddressSanitizer memory error detector, ``asan`` (default is no).
774+
To improve ASan detection capabilities you may also want to combine this
775+
with:option:`--without-pymalloc` to disable the specialized small-object
776+
allocator whose allocations are not tracked by ASan.
774777

775778
..versionadded::3.6
776779

‎pr-preview/pr-1123/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h3>瀏覽</h3>
320320
<ahref="https://www.python.org/psf/donations/">Please donate.</a>
321321
<br>
322322
<br>
323-
最後更新於 7月20, 2025 (00:24 UTC)。
323+
最後更新於 7月21, 2025 (00:23 UTC)。
324324

325325
<ahref="/bugs.html">Found a bug</a>?
326326

‎pr-preview/pr-1123/bugs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
231231
</section>
232232
<sectionid="getting-started-contributing-to-python-yourself">
233233
<spanid="contributing-to-python"></span><h2>開始讓自己貢獻 Python<aclass="headerlink"href="#getting-started-contributing-to-python-yourself"title="連結到這個標頭"></a></h2>
234-
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在<aclass="reference external"href="https://devguide.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<aclass="reference external"href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
234+
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在<aclass="reference external"href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<aclass="reference external"href="https://devguide.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
235235
</section>
236236
</section>
237237

@@ -359,7 +359,7 @@ <h3>瀏覽</h3>
359359
<ahref="https://www.python.org/psf/donations/">Please donate.</a>
360360
<br>
361361
<br>
362-
最後更新於 7月20, 2025 (00:24 UTC)。
362+
最後更新於 7月21, 2025 (00:23 UTC)。
363363

364364
<ahref="/bugs.html">Found a bug</a>?
365365

‎pr-preview/pr-1123/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ <h3>瀏覽</h3>
329329
<ahref="https://www.python.org/psf/donations/">Please donate.</a>
330330
<br>
331331
<br>
332-
最後更新於 7月20, 2025 (00:24 UTC)。
332+
最後更新於 7月21, 2025 (00:23 UTC)。
333333

334334
<ahref="/bugs.html">Found a bug</a>?
335335

‎pr-preview/pr-1123/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ <h3>瀏覽</h3>
346346
<ahref="https://www.python.org/psf/donations/">Please donate.</a>
347347
<br>
348348
<br>
349-
最後更新於 7月20, 2025 (00:24 UTC)。
349+
最後更新於 7月21, 2025 (00:23 UTC)。
350350

351351
<ahref="/bugs.html">Found a bug</a>?
352352

‎pr-preview/pr-1123/c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h3>瀏覽</h3>
376376
<ahref="https://www.python.org/psf/donations/">Please donate.</a>
377377
<br>
378378
<br>
379-
最後更新於 7月20, 2025 (00:24 UTC)。
379+
最後更新於 7月21, 2025 (00:23 UTC)。
380380

381381
<ahref="/bugs.html">Found a bug</a>?
382382

‎pr-preview/pr-1123/c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ <h3>瀏覽</h3>
931931
<ahref="https://www.python.org/psf/donations/">Please donate.</a>
932932
<br>
933933
<br>
934-
最後更新於 7月20, 2025 (00:24 UTC)。
934+
最後更新於 7月21, 2025 (00:23 UTC)。
935935

936936
<ahref="/bugs.html">Found a bug</a>?
937937

‎pr-preview/pr-1123/c-api/bool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ <h3>瀏覽</h3>
340340
<ahref="https://www.python.org/psf/donations/">Please donate.</a>
341341
<br>
342342
<br>
343-
最後更新於 7月20, 2025 (00:24 UTC)。
343+
最後更新於 7月21, 2025 (00:23 UTC)。
344344

345345
<ahref="/bugs.html">Found a bug</a>?
346346

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp