Skip to content

Commit 4e8f0f0

Browse files
committed
blurb, docs, cleanup
1 parent 285b254 commit 4e8f0f0

File tree

5 files changed

+38
-9
lines changed

5 files changed

+38
-9
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ fractions
245245
that an ``isinstance(some_fraction, typing.SupportsInt)`` check passes.
246246
(Contributed by Mark Dickinson in :issue:`44547`.)
247247

248+
hashlib
249+
-------
250+
251+
* :func:`hashlib.blake2b` and :func:`hashlib.blake2s` now prefer `libb2
252+
<https://www.blake2.net/>`_ over Python's vendored copy.
253+
(Contributed by Christian Heimes in :issue:`47095`.)
248254

249255
IDLE and idlelib
250256
----------------
@@ -1060,6 +1066,9 @@ Porting to Python 3.11
10601066
<https://github.com/python/pythoncapi_compat>`__ to get these functions
10611067
on old Python functions.
10621068

1069+
* Distributors are encouraged to build Python with optimized Blake2 library
1070+
`libb2 <https://www.blake2.net>`_.
1071+
10631072

10641073
Deprecated
10651074
----------
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:mod:`hashlib`'s internal ``_blake2`` module now prefers ``libb2`` from
2+
https://www.blake2.net/ over Python's vendored copy of blake2.

configure

Lines changed: 22 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6391,13 +6391,12 @@ for builtin_hash in $with_builtin_hashlib_hashes; do
63916391
done
63926392
IFS=$as_save_IFS
63936393

6394-
dnl libb2 for blake2
6395-
dnl _blake2 module falls back to vendored copy
6394+
dnl libb2 for blake2. _blake2 module falls back to vendored copy.
63966395
AS_VAR_IF([with_builtin_blake2], [yes], [
63976396
PKG_CHECK_MODULES([LIBB2], [libb2], [
6398-
have_libb2=yes
6399-
AC_DEFINE([HAVE_LIBB2], [1], [Define to 1 if you want to build _blake2 with libb2])
6400-
], [have_libb2=no])
6397+
AC_DEFINE([HAVE_LIBB2], [1],
6398+
[Define to 1 if you want to build _blake2 module with libb2])
6399+
])
64016400
])
64026401

64036402
# --with-experimental-isolated-subinterpreters

pyconfig.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@
622622
/* Define to 1 if you have the `lchown' function. */
623623
#undef HAVE_LCHOWN
624624

625-
/* Define to 1 if you want to build _blake2 with libb2 */
625+
/* Define to 1 if you want to build _blake2 module with libb2 */
626626
#undef HAVE_LIBB2
627627

628628
/* Define to 1 if you have the `db' library (-ldb). */

0 commit comments

Comments
 (0)