Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add documentation exclusions for iOS.
  • Loading branch information
freakboy3742 committed Mar 20, 2024
commit 32e9d126fd44f5e820db3793db76ab02a8fce705
8 changes: 8 additions & 0 deletions Doc/includes/wasm-ios-notavail.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. include for modules that don't work on WASM or iOS

.. availability:: not Emscripten, not WASI, not iOS.
Comment thread
hugovk marked this conversation as resolved.
Outdated

This module does not work or is not available on WebAssembly platforms
``wasm32-emscripten`` and ``wasm32-wasi``, or on iOS. See
:ref:`wasm-availability` for more information on WASM availability; see
:ref:`iOS-availability` for more information on iOS availability.
2 changes: 2 additions & 0 deletions Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
The :mod:`curses` module provides an interface to the curses library, the
de-facto standard for portable advanced terminal handling.

.. include:: ../includes/wasm-ios-notavail.rst
Comment thread
serhiy-storchaka marked this conversation as resolved.
Outdated

While curses is most widely used in the Unix environment, versions are available
for Windows, DOS, and possibly other systems as well. This extension module is
designed to match the API of ncurses, an open-source curses library hosted on
Expand Down
3 changes: 2 additions & 1 deletion Doc/library/dbm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

:mod:`dbm` is a generic interface to variants of the DBM database:

.. include:: ../includes/wasm-ios-notavail.rst
Comment thread
serhiy-storchaka marked this conversation as resolved.
Outdated

* :mod:`dbm.sqlite3`
* :mod:`dbm.gnu`
* :mod:`dbm.ndbm`
Expand Down Expand Up @@ -455,4 +457,3 @@ The :mod:`!dbm.dumb` module defines the following:
.. method:: dumbdbm.close()

Close the database.

2 changes: 1 addition & 1 deletion Doc/library/ensurepip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ when creating a virtual environment) or after explicitly uninstalling
:pep:`453`: Explicit bootstrapping of pip in Python installations
The original rationale and specification for this module.

.. include:: ../includes/wasm-notavail.rst
.. include:: ../includes/wasm-ios-notavail.rst

Command line interface
----------------------
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/grp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
This module provides access to the Unix group database. It is available on all
Unix versions.

.. availability:: Unix, not Emscripten, not WASI.
.. availability:: Unix, not Emscripten, not WASI, not iOS.

Group database entries are reported as a tuple-like object, whose attributes
correspond to the members of the ``group`` structure (Attribute field below, see
Expand Down
35 changes: 34 additions & 1 deletion Doc/library/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Notes on availability
operating system.

* If not separately noted, all functions that claim "Availability: Unix" are
supported on macOS, which builds on a Unix core.
supported on macOS and iOS, both of which build on a Unix core.

* If an availability note contains both a minimum Kernel version and a minimum
libc version, then both conditions must hold. For example a feature with note
Expand Down Expand Up @@ -119,3 +119,36 @@ DOM APIs as well as limited networking capabilities with JavaScript's
.. _wasmtime: https://wasmtime.dev/
.. _Pyodide: https://pyodide.org/
.. _PyScript: https://pyscript.net/

.. _iOS-availability:

iOS
---

iOS is, in most respects, a POSIX operating system. File I/O, socket handling,
and threading all behave as they would on any POSIX operating system. However,
there are several major differences between iOS and other POSIX systems.

* An iOS app cannot use any form of subprocessing, background processing, or
inter-process communication. If an iOS app attempts to create a subprocess,
the process creating the subprocess will either lock up, or crash. An iOS app
has no visibility of other applications that are running, nor any ability to
communicate with other running applications, outside of the iOS-specific APIs
that exist for this purpose.

* iOS apps have limited access to modify system resources. These resources will
often be *readable*, but attempts to modify those resources will either fail.

* iOS apps have a limited concept of console input and output. ``stdout`` and
``stderr`` *exist*, and content written to ``stdout`` and ``stderr`` will be
visible in logs when running in Xcode, but this content *won't* be recorded
in the system log. If a user who has installed your app provides their app
logs as a diagnostic aid, they will not include any detail written to
``stdout`` or ``stderr``.

iOS apps have no concept of ``stdin`` at all. While iOS apps can have a
keyboard, this is a software feature, not something that is attached to
``stdin``.

As a result, Python library that involve console manipulation (such as
``curses`` and ``readline``) are not available on iOS.
2 changes: 1 addition & 1 deletion Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

--------------

.. include:: ../includes/wasm-notavail.rst
.. include:: ../includes/wasm-ios-notavail.rst

Introduction
------------
Expand Down
Loading