Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/reusable-wasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 60
env:
WASMTIME_VERSION: 38.0.3
WASI_SDK_VERSION: 25
WASI_SDK_VERSION: 29
WASI_SDK_PATH: /opt/wasi-sdk
CROSS_BUILD_PYTHON: cross-build/build
CROSS_BUILD_WASI: cross-build/wasm32-wasip1
Expand Down
11 changes: 11 additions & 0 deletions Doc/c-api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ complete listing.
Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the
command line (see :c:member:`PyConfig.use_environment`).

.. c:macro:: Py_LOCAL(type)

Declare a function returning the specified *type* using a fast-calling
qualifier for functions that are local to the current file.
Semantically, this is equivalent to ``static type``.

.. c:macro:: Py_LOCAL_INLINE(type)

Equivalent to :c:macro:`Py_LOCAL` but additionally requests the function
be inlined.

.. c:macro:: Py_MAX(x, y)

Return the maximum value between ``x`` and ``y``.
Expand Down
2 changes: 1 addition & 1 deletion Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
_stdauthor = 'Guido van Rossum and the Python development team'
_stdauthor = 'The Python development team'
latex_documents = [
('c-api/index', 'c-api.tex', 'The Python/C API', _stdauthor, 'manual'),
(
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ If a new entry overwrites an existing entry, the
original insertion position is changed and moved to the end::

class LastUpdatedOrderedDict(OrderedDict):
'Store items in the order the keys were last added'
'Store items in the order that the keys were last updated.'

def __setitem__(self, key, value):
super().__setitem__(key, value)
Expand Down
4 changes: 2 additions & 2 deletions Doc/whatsnew/2.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2169,9 +2169,9 @@ Changes to Python's build process and to the C API include:

* Two new macros can be used to indicate C functions that are local to the
current file so that a faster calling convention can be used.
``Py_LOCAL(type)`` declares the function as returning a value of the
:c:macro:`Py_LOCAL` declares the function as returning a value of the
specified *type* and uses a fast-calling qualifier.
``Py_LOCAL_INLINE(type)`` does the same thing and also requests the
:c:macro:`Py_LOCAL_INLINE` does the same thing and also requests the
function be inlined. If macro :c:macro:`!PY_LOCAL_AGGRESSIVE` is defined before
:file:`python.h` is included, a set of more aggressive optimizations are enabled
for the module; you should benchmark the results to find out if these
Expand Down
1 change: 1 addition & 0 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ extern "C" {
* Thread support is stubbed and any attempt to create a new thread fails.
*/
#if (!defined(HAVE_PTHREAD_STUBS) && \
!defined(__wasi__) && \
(!defined(__EMSCRIPTEN__) || defined(__EMSCRIPTEN_PTHREADS__)))
# define Py_CAN_START_THREADS 1
#endif
Expand Down
4 changes: 1 addition & 3 deletions Lib/test/test_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,14 +730,12 @@ def test_thread_info(self):
self.assertEqual(len(info), 3)
self.assertIn(info.name, ('nt', 'pthread', 'pthread-stubs', 'solaris', None))
self.assertIn(info.lock, ('pymutex', None))
if sys.platform.startswith(("linux", "android", "freebsd")):
if sys.platform.startswith(("linux", "android", "freebsd", "wasi")):
self.assertEqual(info.name, "pthread")
elif sys.platform == "win32":
self.assertEqual(info.name, "nt")
elif sys.platform == "emscripten":
self.assertIn(info.name, {"pthread", "pthread-stubs"})
elif sys.platform == "wasi":
self.assertEqual(info.name, "pthread-stubs")

def test_abi_info(self):
info = sys.abi_info
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update to WASI SDK 29.
6 changes: 3 additions & 3 deletions Tools/wasm/wasi/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
b"# Required to statically build extension modules."
)

WASI_SDK_VERSION = 25
WASI_SDK_VERSION = 29

WASMTIME_VAR_NAME = "WASMTIME"
WASMTIME_HOST_RUNNER_VAR = f"{{{WASMTIME_VAR_NAME}}}"
Expand Down Expand Up @@ -419,8 +419,8 @@ def main():
f"{WASMTIME_HOST_RUNNER_VAR} run "
# Make sure the stack size will work for a pydebug
# build.
# Use 16 MiB stack.
"--wasm max-wasm-stack=16777216 "
# Use 32 MiB stack.
"--wasm max-wasm-stack=33554432 "
# Enable thread support; causes use of preview1.
# "--wasm threads=y --wasi threads=y "
# Map the checkout to / to load the stdlib from /Lib.
Expand Down
Loading