Skip to content

Commit ec9cf6b

Browse files
committed
gh-121249: deprecate support for complex types in the struct module
1 parent 3efd2f4 commit ec9cf6b

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

Doc/deprecations/pending-removal-in-3.17.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ Pending removal in Python 3.17
3737
is deprecated and scheduled for removal in Python 3.17.
3838
(Contributed by Stan Ulbrych in :gh:`136702`.)
3939

40+
41+
* :mod:`struct`:
42+
43+
- Support the :c:expr:`float complex` and :c:expr:`double complex` C types in
44+
the :mod:`struct` module (formatting characters ``'F'`` and ``'D'``
45+
respectively).
46+
(Contributed by Sergey B Kirpichev in :gh:`121249`.)
47+
48+
4049
* :mod:`typing`:
4150

4251
- Before Python 3.14, old-style unions were implemented using the private class

Doc/library/struct.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ platform-dependent.
280280
.. versionchanged:: 3.14
281281
Added support for the ``'F'`` and ``'D'`` formats.
282282

283+
.. deprecated-removed:: 3.15 3.17
284+
Support for the ``'F'`` and ``'D'`` formats.
285+
283286
.. seealso::
284287

285288
The :mod:`array` and :ref:`ctypes <ctypes-fundamental-data-types>` modules,

Doc/whatsnew/3.15.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,12 @@ New deprecations
19501950

19511951
(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)
19521952

1953+
- Support the :c:expr:`float complex` and :c:expr:`double complex` C types in
1954+
the :mod:`struct` module (formatting characters ``'F'`` and ``'D'``
1955+
respectively).
1956+
(Contributed by Sergey B Kirpichev in :gh:`121249`.)
1957+
1958+
19531959
* :mod:`typing`:
19541960

19551961
* The following statements now cause ``DeprecationWarning``\ s to be emitted
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Deprecate support for complex types in the :mod:`struct` module (formatting
2+
characters ``'F'`` and ``'D'`` respectively).

0 commit comments

Comments
 (0)