Skip to content

Commit 46bd556

Browse files
committed
Deprecate PEP 456 support for embedders
1 parent 0c77e7c commit 46bd556

File tree

5 files changed

+24
-1
lines changed

5 files changed

+24
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Pending removal in Python 3.17
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* :pep:`456` embedders support for the string hashing scheme definition.

Doc/deprecations/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ C API deprecations
1818

1919
.. include:: c-api-pending-removal-in-3.15.rst
2020

21+
.. include:: c-api-pending-removal-in-3.16.rst
22+
23+
.. include:: c-api-pending-removal-in-3.17.rst
24+
2125
.. include:: c-api-pending-removal-in-3.18.rst
2226

2327
.. include:: c-api-pending-removal-in-3.20.rst

Doc/whatsnew/3.15.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,18 @@ Deprecated
844844
New deprecations
845845
----------------
846846

847+
* Build:
848+
849+
* Deprecate :pep:`456` support for providing an external definition
850+
of the string hashing scheme. Removal is scheduled for Python 3.17.
851+
852+
Previously, embedders could define :c:macro:`Py_HASH_ALGORITHM` to be
853+
``Py_HASH_EXTERNAL`` to indicate that the hashing scheme was provided
854+
externally but this feature was undocumented, untested and most likely
855+
unused.
856+
857+
(Contributed by Bénédikt Tran in :gh:`141226`.)
858+
847859
* CLI:
848860

849861
* Deprecate :option:`-b` and :option:`!-bb` command-line options
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Deprecate :pep:`456` support for providing an external definition
2+
of the string hashing scheme. Removal is scheduled for Python 3.17.
3+
Patch by Bénédikt Tran.

Python/pyhash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
_Py_HashSecret_t _Py_HashSecret = {{0}};
1818

1919
#if Py_HASH_ALGORITHM == Py_HASH_EXTERNAL
20-
extern PyHash_FuncDef PyHash_Func;
20+
Py_DEPRECATED(3.15) extern PyHash_FuncDef PyHash_Func;
2121
#else
2222
static PyHash_FuncDef PyHash_Func;
2323
#endif

0 commit comments

Comments
 (0)