* simplify HACL* build for MD5, SHA1, SHA2 and SHA3 modules
* remove statically linked libraries for HACL* implementation
* is it better now?
* is it better now?
* fixup
* Present HACL* as a static or shared library.
On WASI, extension modules based on HACL* require the HACL*
library to be linked statically. On other platforms, it can
be built dynamically.
* amend whitespace
* remove temporary .so file as it requires more symlinks
* avoid smelly symbols
* fixup checksums
* regen sbom
* fixup shell warnings and comments
* it *should* work
Change the default LTO flags on GCC to not pass -flto-partition=none, and allow parallelization of LTO. This has a multiple factor speedup for LTO build times on GCC, with no noticeable loss in performance.
On newer make and newer GCC, this passes the jobserver automatically to GCC (or more like GCC grabs it from the env vars).
On older make, this will have benign warnings about serial compilation. It's safe to ignore them.
Make `warnings.catch_warnings()` use a context variable for holding
the warning filtering state if the `sys.flags.context_aware_warnings`
flag is set to true. This makes using the context manager thread-safe in
multi-threaded programs.
Add the `sys.flags.thread_inherit_context` flag. If true, starting a new
thread with `threading.Thread` will use a copy of the context
from the caller of `Thread.start()`.
Both these flags are set to true by default for the free-threaded build
and false for the default build.
Move the Python implementation of warnings.py into _py_warnings.py.
Make _contextvars a builtin module.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
A new extension module, `_hmac`, now exposes the HACL* HMAC (formally verified) implementation.
The HACL* implementation is used as a fallback implementation when the OpenSSL implementation of HMAC
is not available or disabled. For now, only named hash algorithms are recognized and SIMD support provided
by HACL* for the BLAKE2 hash functions is not yet used.
Modifies the behavior of the interpreter on crash under Emscripten:
1. No Python traceback shown on segfault/trap
2. The JavaScript source line is shown
The JavaScript source line is super long and completely unenlightening,
whereas the Python traceback is very helpful.
* Implement C recursion protection with limit pointers for Linux, MacOS and Windows
* Remove calls to PyOS_CheckStack
* Add stack protection to parser
* Make tests more robust to low stacks
* Improve error messages for stack overflow
Replace AC_CACHE_VAL/AC_CHECK_HEADER with a cleaner variant using
AC_CACHE_CHECK/AC_PREPROC_IFELSE.
The former would produce garbled output when config.cache was reused. It
also required directly manipulating GNU Autoconf cache variables.
`emcc -dumpversion` will sometimes say e.g., `4.0.0-git` but in this case
uname does not include `-git` in the version string. Use cut to delete
everything after the dash.
Generate a build error on ``unguarded-availability`` in portable macOS builds (i.e. using MACOSX_DEPLOYMENT_TARGET), preventing invalid use of symbols that are not available in older versions of the OS.
Modifies _PYTHON_HOST_PLATFORM to include the compiler version under
Emscripten. The Emscripten compiler version is the platform version
compatibility identifier.
On Linux, threading.Thread now sets the thread name to the operating
system.
* configure now checks if pthread_getname_np()
and pthread_setname_np() functions are available.
* Add PYTHREAD_NAME_MAXLEN macro.
* Add _thread._NAME_MAXLEN constant for test_threading.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Moves the Emscripten web example into a standalone folder, and updates
Makefile targets to build the web example. Instructions for usage have
also been added.
This unifies the code for nodejs and the code for the browser. After this
commit, the browser example doesn't work; this will be fixed in a
subsequent update.