diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-04-13 23:22:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 23:22:49 (GMT) |
commit | 695d47b51e3e197de5448a1eb2f618bef6d59ac8 (patch) | |
tree | 64ec0c41016aa5d7573352ce991cdf4994765bef /Doc/library | |
parent | 8fa1489365e7af8b90286c97db55a2dc60a05cde (diff) | |
download | cpython-695d47b51e3e197de5448a1eb2f618bef6d59ac8.zip cpython-695d47b51e3e197de5448a1eb2f618bef6d59ac8.tar.gz cpython-695d47b51e3e197de5448a1eb2f618bef6d59ac8.tar.bz2 |
bpo-43785: Update bz2 document (GH-25351)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/bz2.rst | 7 | ||||
-rw-r--r-- | Doc/library/lzma.rst | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index 637baf4..f6787ab 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -25,8 +25,6 @@ The :mod:`bz2` module contains: * The :func:`compress` and :func:`decompress` functions for one-shot (de)compression. -All of the classes in this module may safely be accessed from multiple threads. - (De)compression of files ------------------------ @@ -140,6 +138,11 @@ All of the classes in this module may safely be accessed from multiple threads. The *compresslevel* parameter became keyword-only. + .. versionchanged:: 3.10 + This class is thread unsafe in the face of multiple simultaneous + readers or writers, just like its equivalent classes in :mod:`gzip` and + :mod:`lzma` have always been. + Incremental (de)compression --------------------------- diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst index 633c878..2109264 100644 --- a/Doc/library/lzma.rst +++ b/Doc/library/lzma.rst @@ -19,8 +19,8 @@ interface supporting the ``.xz`` and legacy ``.lzma`` file formats used by the :program:`xz` utility, as well as raw compressed streams. The interface provided by this module is very similar to that of the :mod:`bz2` -module. However, note that :class:`LZMAFile` is *not* thread-safe, unlike -:class:`bz2.BZ2File`, so if you need to use a single :class:`LZMAFile` instance +module. Note that :class:`LZMAFile` and :class:`bz2.BZ2File` are *not* +thread-safe, so if you need to use a single :class:`LZMAFile` instance from multiple threads, it is necessary to protect it with a lock. |