summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2021-01-24 22:49:28 -0500
committerDan Halbert <halbert@halwitz.org>2021-01-24 23:10:20 -0500
commit69869e1439a1ebad383b75b28e7e88f21ccab732 (patch)
tree9b59b2d5536267fbd8d91d478a6892a20e96f671 /docs/library
parent97f5d218a5af9c7207bc339bf25beaa65c7b42e5 (diff)
CIRCUITPY_* switches for JSON, RE, etc. Doc cleanup
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/errno.rst (renamed from docs/library/uerrno.rst)10
-rw-r--r--docs/library/index.rst51
-rw-r--r--docs/library/io.rst (renamed from docs/library/uio.rst)6
-rw-r--r--docs/library/json.rst (renamed from docs/library/ujson.rst)6
-rw-r--r--docs/library/re.rst (renamed from docs/library/ure.rst)8
5 files changed, 24 insertions, 57 deletions
diff --git a/docs/library/uerrno.rst b/docs/library/errno.rst
index 72f71f0aa..96777b205 100644
--- a/docs/library/uerrno.rst
+++ b/docs/library/errno.rst
@@ -1,9 +1,7 @@
-:mod:`uerrno` -- system error codes
+:mod:`errno` -- system error codes
===================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: uerrno
+.. module:: errno
:synopsis: system error codes
|see_cpython_module| :mod:`cpython:errno`.
@@ -22,7 +20,7 @@ Constants
try:
os.mkdir("my_dir")
except OSError as exc:
- if exc.args[0] == uerrno.EEXIST:
+ if exc.args[0] == errno.EEXIST:
print("Directory already exists")
.. data:: errorcode
@@ -30,5 +28,5 @@ Constants
Dictionary mapping numeric error codes to strings with symbolic error
code (see above)::
- >>> print(uerrno.errorcode[uerrno.EEXIST])
+ >>> print(errno.errorcode[uerrno.EEXIST])
EEXIST
diff --git a/docs/library/index.rst b/docs/library/index.rst
index e91387242..94bd8a656 100644
--- a/docs/library/index.rst
+++ b/docs/library/index.rst
@@ -7,34 +7,20 @@ Python standard libraries and micro-libraries
---------------------------------------------
These libraries are inherited from MicroPython.
-They are similar to the standard Python libraries with the same name
-or with the "u" prefix dropped.
+They are similar to the standard Python libraries with the same name.
They implement a subset of or a variant of the corresponding
standard Python library.
-.. warning::
-
- Though these MicroPython-based libraries are available in CircuitPython,
- their functionality may change in the future, perhaps significantly.
- As CircuitPython continues to develop, new versions of these libraries will
- be created that are more compliant with the standard Python libraries.
- You may need to change your code later if you rely
- on any non-standard functionality they currently provide.
-
CircuitPython's long-term goal is that code written in CircuitPython
using Python standard libraries will be runnable on CPython without changes.
-Some libraries below are not enabled on CircuitPython builds with
+These libraries are not enabled on CircuitPython builds with
limited flash memory, usually on non-Express builds:
-``uerrno``, ``ure``.
-
-Some libraries are not currently enabled in any CircuitPython build, but may be in the future:
-``uio``, ``ujson``, ``uzlib``.
+``binascii``, ``errno``, ``json``, ``re``.
-Some libraries are only enabled only WiFi-capable ports (ESP8266, nRF)
-because they are typically used for network software:
-``binascii``, ``hashlib``, ``uheapq``, ``uselect``, ``ussl``.
-Not all of these are enabled on all WiFi-capable ports.
+These libraries are not currently enabled in any CircuitPython build, but may be in the future,
+with the ``u`` prefix dropped:
+``uctypes`, ``uhashlib``, ``uio``, ``uzlib``.
.. toctree::
:maxdepth: 1
@@ -44,13 +30,14 @@ Not all of these are enabled on all WiFi-capable ports.
array.rst
binascii.rst
collections.rst
+ errno.rst
gc.rst
hashlib.rst
+ io.rst
+ json.rst
+ re.rst
sys.rst
- uerrno.rst
- uio.rst
- ujson.rst
- ure.rst
+ uctypes.rst
uselect.rst
usocket.rst
ussl.rst
@@ -59,8 +46,8 @@ Not all of these are enabled on all WiFi-capable ports.
Omitted functions in the ``string`` library
-------------------------------------------
-A few string operations are not enabled on CircuitPython
-M0 non-Express builds, due to limited flash memory:
+A few string operations are not enabled on small builds
+(usually non-Express), due to limited flash memory:
``string.center()``, ``string.partition()``, ``string.splitlines()``,
``string.reversed()``.
@@ -78,15 +65,3 @@ versions of CircuitPython.
btree.rst
framebuf.rst
micropython.rst
- network.rst
- uctypes.rst
-
-Libraries specific to the ESP8266
----------------------------------
-
-The following libraries are specific to the ESP8266.
-
-.. toctree::
- :maxdepth: 2
-
- esp.rst
diff --git a/docs/library/uio.rst b/docs/library/io.rst
index d1f7c111f..37e3eb7c9 100644
--- a/docs/library/uio.rst
+++ b/docs/library/io.rst
@@ -1,9 +1,7 @@
-:mod:`uio` -- input/output streams
+:mod:`io` -- input/output streams
==================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: uio
+.. module:: io
:synopsis: input/output streams
|see_cpython_module| :mod:`cpython:io`.
diff --git a/docs/library/ujson.rst b/docs/library/json.rst
index 4ed91f053..21574e556 100644
--- a/docs/library/ujson.rst
+++ b/docs/library/json.rst
@@ -1,9 +1,7 @@
-:mod:`ujson` -- JSON encoding and decoding
+:mod:`json` -- JSON encoding and decoding
==========================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: ujson
+.. module:: json
:synopsis: JSON encoding and decoding
|see_cpython_module| :mod:`cpython:json`.
diff --git a/docs/library/ure.rst b/docs/library/re.rst
index 4af182b01..bdcc9f52c 100644
--- a/docs/library/ure.rst
+++ b/docs/library/re.rst
@@ -1,9 +1,7 @@
-:mod:`ure` -- simple regular expressions
+:mod:`re` -- simple regular expressions
========================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: ure
+.. module:: re
:synopsis: regular expressions
|see_cpython_module| :mod:`cpython:re`.
@@ -77,7 +75,7 @@ Regex objects
-------------
Compiled regular expression. Instances of this class are created using
-`ure.compile()`.
+`re.compile()`.
.. method:: regex.match(string)
regex.search(string)