@@ -197,25 +197,35 @@ Other compression modules
197197New import names ``compression.lzma ``, ``compression.bz2 ``, and
198198``compression.zlib `` will be introduced in Python 3.14 re-exporting the
199199contents of the existing ``lzma ``, ``bz2 ``, and ``zlib `` modules respectively.
200- Starting with Python 3.19, the existing modules will emit a deprecation warning
201- on import. In Python 3.24, the existing modules will be removed and code must
202- use the ``compression `` sub-modules. The documentation for these modules will be
203- updated to discuss the planned deprecation and removal.
204200
205201The ``_compression `` module, given that it is marked private, will be
206202immediately renamed to ``compression._common.streams ``. The new name was
207203selected due to the current contents of the module being I/O related helpers
208204for stream APIs (e.g. ``LZMAFile ``) in standard library compression modules.
209205
206+ Compression module migration timeline
207+ -------------------------------------
208+
209+ Existing modules will emit a ``DeprecationWarning `` in the Python
210+ release following the last Python without the ``compression `` module leaving
211+ support. For example, if the ``compression `` namespace is introduced in 3.14,
212+ then the ``DeprecationWarnings `` would be emitted in 3.19, the next release
213+ after 3.13 reaches end of life. Following the standard deprecation timeline
214+ specified in :pep: `387 `, in Python 3.24 the existing modules will be removed
215+ and code must use the ``compression `` sub-modules. The documentation for these
216+ modules will be updated to discuss the planned deprecation and removal
217+ timelines.
218+
219+
210220Backwards Compatibility
211221=======================
212222
213223The main compatibility concern is usage of existing standard library
214224compression APIs with the existing import names. These names will be
215- deprecated, and will be removed in 3.24. Given the long deprecation period,
216- most users will likely migrate to the new import names well before then.
217- Additionally, a libCST codemod can be provided to automatically rewrite
218- imports, easing the migration.
225+ deprecated in 3.19 and will be removed in 3.24. Given the long coexistance of
226+ the modules and a 5 year deprecation period, most users will likely migrate to
227+ the new import names well before then. Additionally, a libCST codemod can be
228+ provided to automatically rewrite imports, easing the migration.
219229
220230Security Implications
221231=====================
0 commit comments