| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-95860)
We only statically initialize for core code and builtin modules. Extension modules still create
the tuple at runtime. We'll solve that part of interpreter isolation separately.
This change includes generated code. The non-generated changes are in:
* Tools/clinic/clinic.py
* Python/getargs.c
* Include/cpython/modsupport.h
* Makefile.pre.in (re-generate global strings after running clinic)
* very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c
All other changes are generated code (clinic, global strings).
|
| |
|
|
|
|
|
|
| |
* Test if HAVE_ALIGNED_REQUIRED is defined, not its value.
* Define explicitly NOT_PYTHON macro to 0.
Fix "gcc -Wundef" warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
setup.py no longer defines Py_BUILD_CORE_MODULE. Instead every
module defines the macro before #include "Python.h" unless
Py_BUILD_CORE_BUILTIN is already defined.
Py_BUILD_CORE_BUILTIN is defined for every module that is built by
Modules/Setup.
The PR also simplifies Modules/Setup. Makefile and makesetup
already define Py_BUILD_CORE_BUILTIN and include Modules/internal
for us.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move Include/pystrhex.h to Include/internal/pycore_strhex.h.
The header file only contains private functions.
The following C extensions are now built with Py_BUILD_CORE_MODULE
macro defined to get access to the internal C API:
* _blake2
* _hashopenssl
* _md5
* _sha1
* _sha3
* _ssl
* binascii
|
|
|
|
|
| |
Contributed-By: Matthias Klose
Automerge-Triggered-By: GH:tiran
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 93d50a6a8d0c5d332c11aef267e66573a09765ac / GH-21855 changed the
order of variable definitions, which introduced a potential invalid free
bug. Py_buffer object is now initialized earlier and the result of
Keccak initialize is verified.
Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
|
|
|
|
|
|
|
|
|
| |
No longer use deprecated aliases to functions:
* Replace PyObject_MALLOC() with PyObject_Malloc()
* Replace PyObject_REALLOC() with PyObject_Realloc()
* Replace PyObject_FREE() with PyObject_Free()
* Replace PyObject_Del() with PyObject_Free()
* Replace PyObject_DEL() with PyObject_Free()
|
|
|
|
| |
Port the _sha3 extension module to multi-phase init (PEP 489).
Convert static types to heap types.
|
|
|
|
|
|
|
|
|
| |
* Replace PY_INT64_T with int64_t
* Replace PY_UINT32_T with uint32_t
* Replace PY_UINT64_T with uint64_t
sha3module.c no longer checks if PY_UINT64_T is defined since it's
always defined and uint64_t is always available on platforms
supported by Python.
|
|
|
| |
Add Py_SET_TYPE() function to set the type of an object.
|
|
|
|
|
| |
The usedforsecurity keyword only argument added to the hash constructors is useful for FIPS builds and similar restrictive environment with non-technical requirements that legacy algorithms be forbidden by their implementations without being explicitly annotated as not being used for any security related purposes. Linux distros with FIPS support benefit from this being standard rather than making up their own way(s) to do it.
Contributed and Signed-off-by: Christian Heimes christian@python.org
|
|
|
|
|
|
|
|
|
| |
(GH-13464)
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
|
|
|
|
| |
Modules/_sha3/cleanup.py (GH-11411)
|
|
|
|
| |
parameter. (GH-9689)
|
|
|
|
|
| |
(GH-9751)
for the SHAKE algorithm in the hashlib module.
|
|
|
|
| |
Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* help(hashlib) didn't work because of incorrect module name in blake2b and
blake2s classes.
* Constructors blake2*(), sha3_*(), shake_*() and keccak_*() incorrectly
accepted keyword argument "string" for binary data, but documented as
accepting the "data" keyword argument. Now this parameter is positional-only.
* Keyword-only parameters in blake2b() and blake2s() were not documented as
keyword-only.
* Default value for some parameters of blake2b() and blake2s() was None,
which is not acceptable value.
* The length argument for shake_*.digest() was wrapped out to 32 bits.
* The argument for shake_128.digest() and shake_128.hexdigest() was not
positional-only as intended.
* TypeError messages for incorrect arguments in all constructors sha3_*(),
shake_*() and keccak_*() incorrectly referred to sha3_224.
Also made the following enhancements:
* More accurately specified input and result types for strings, bytes and
bytes-like objects.
* Unified positional parameter names for update() and constructors.
* Improved formatting.
|
|
|
|
| |
arguments. (#4746)
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
|
|
| |
the bare METH_FASTCALL be used for functions with positional-only
parameters.
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
|
|
|
|
| |
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using only positional arguments.
|
|
|
|
| |
Issue #29286.
|
| |
|
| |
|
| |
|
|
|
|
| |
uint64_t[20].
|
|
|
|
| |
return value of PyModule_Create()
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Patch by Christian Heimes, with modifications.
|
| |
|
| |
|
| |
|
|
|
|
| |
gcov is great.
|
|
|
|
|
| |
non-pydebug builds. Several extension modules now compile cleanly when
assert()s are enabled in standard builds (-DDEBUG flag).
|
|
|
|
| |
endianess detection and handling.
|
|
|
|
| |
This makes the sha3 types unusable from the hmac module. HMAC-SHA3 hasn't been specified yet.
|
| |
|
| |
|
|
|
|
| |
compiler doesn't like the address alignment.
|
|
|
|
| |
endian platforms
|
| |
|
| |
|