Skip to content

docs: Replace "umodule" with "module" everywhere. #5377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
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 docs/develop/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ An example is the ``gc`` module discussed in :ref:`memorymanagement`.
>>> gc.enable()
>>>

MicroPython has several other builtin standard/core modules like ``io``, ``uarray`` etc.
MicroPython has several other builtin standard/core modules like ``io``, ``array`` etc.
Adding a new core module involves several modifications.

First, create the ``C`` file in the ``py/`` directory. In this example we are adding a
Expand Down
4 changes: 2 additions & 2 deletions docs/develop/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ That should give a MicroPython REPL. You can then run commands like:
.. code-block:: bash

MicroPython v1.13 on 2021-01-01; example-board with unknown-cpu
>>> import usys
>>> usys.implementation
>>> import sys
>>> sys.implementation
('micropython', (1, 13, 0))
>>>

Expand Down
12 changes: 6 additions & 6 deletions docs/esp32/quickref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ A useful function for connecting to your local WiFi network is::
pass
print('network config:', wlan.ifconfig())

Once the network is established the :mod:`socket <usocket>` module can be used
Once the network is established the :mod:`socket <socket>` module can be used
to create and use TCP/UDP sockets as usual, and the ``urequests`` module for
convenient HTTP requests.

Expand All @@ -113,7 +113,7 @@ to reconnect forever).
Delay and timing
----------------

Use the :mod:`time <utime>` module::
Use the :mod:`time <time>` module::

import time

Expand Down Expand Up @@ -459,15 +459,15 @@ SD card

See :ref:`machine.SDCard <machine.SDCard>`. ::

import machine, uos
import machine, os

# Slot 2 uses pins sck=18, cs=5, miso=19, mosi=23
sd = machine.SDCard(slot=2)
uos.mount(sd, "/sd") # mount
os.mount(sd, "/sd") # mount

uos.listdir('/sd') # list directory contents
os.listdir('/sd') # list directory contents

uos.umount('/sd') # eject
os.umount('/sd') # eject

RMT
---
Expand Down
4 changes: 2 additions & 2 deletions docs/esp8266/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Real-time clock

RTC in ESP8266 has very bad accuracy, drift may be seconds per minute. As
a workaround, to measure short enough intervals you can use
``utime.time()``, etc. functions, and for wall clock time, synchronize from
``time.time()``, etc. functions, and for wall clock time, synchronize from
the net using included ``ntptime.py`` module.

Due to limitations of the ESP8266 chip the internal real-time clock (RTC)
Expand Down Expand Up @@ -203,7 +203,7 @@ limitation with usage of TLS on the low-memory devices:
communication with other devices.

There are also some not implemented features specifically in MicroPython's
``ussl`` module based on axTLS:
``ssl`` module based on axTLS:

6. Certificates are not validated (this makes connections susceptible
to man-in-the-middle attacks).
Expand Down
12 changes: 6 additions & 6 deletions docs/esp8266/quickref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ A useful function for connecting to your local WiFi network is::
pass
print('network config:', wlan.ifconfig())

Once the network is established the :mod:`socket <usocket>` module can be used
Once the network is established the :mod:`socket <socket>` module can be used
to create and use TCP/UDP sockets as usual.

Delay and timing
----------------

Use the :mod:`time <utime>` module::
Use the :mod:`time <time>` module::

import time

Expand Down Expand Up @@ -171,15 +171,15 @@ attaches the REPL).

To detach the REPL from UART0, use::

import uos
uos.dupterm(None, 1)
import os
os.dupterm(None, 1)

The REPL is attached by default. If you have detached it, to reattach
it use::

import uos, machine
import os, machine
uart = machine.UART(0, 115200)
uos.dupterm(uart, 1)
os.dupterm(uart, 1)

PWM (pulse width modulation)
----------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/library/uarray.rst → docs/library/array.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`uarray` -- arrays of numeric data
:mod:`array` -- arrays of numeric data
=======================================

.. module:: uarray
.. module:: array
:synopsis: efficient arrays of numeric data

|see_cpython_module| :mod:`python:array`.
Expand Down
4 changes: 2 additions & 2 deletions docs/library/ubinascii.rst → docs/library/binascii.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`ubinascii` -- binary/ASCII conversions
:mod:`binascii` -- binary/ASCII conversions
============================================

.. module:: ubinascii
.. module:: binascii
:synopsis: binary/ASCII conversions

|see_cpython_module| :mod:`python:binascii`.
Expand Down
8 changes: 4 additions & 4 deletions docs/library/ubluetooth.rst → docs/library/bluetooth.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`ubluetooth` --- low-level Bluetooth
:mod:`bluetooth` --- low-level Bluetooth
=========================================

.. module:: ubluetooth
.. module:: bluetooth
:synopsis: Low-level Bluetooth radio functionality

This module provides an interface to a Bluetooth controller on a board.
Expand Down Expand Up @@ -110,7 +110,7 @@ Event Handling

**Note:** As an optimisation to prevent unnecessary allocations, the ``addr``,
``adv_data``, ``char_data``, ``notify_data``, and ``uuid`` entries in the
tuples are read-only memoryview instances pointing to ubluetooth's internal
tuples are read-only memoryview instances pointing to :mod:`bluetooth`'s internal
ringbuffer, and are only valid during the invocation of the IRQ handler
function. If your program needs to save one of these values to access after
the IRQ handler has returned (e.g. by saving it in a class instance or global
Expand Down Expand Up @@ -293,7 +293,7 @@ For the ``_IRQ_PASSKEY_ACTION`` event, the available actions are::
_PASSKEY_ACTION_NUMERIC_COMPARISON = const(4)

In order to save space in the firmware, these constants are not included on the
:mod:`ubluetooth` module. Add the ones that you need from the list above to your
:mod:`bluetooth` module. Add the ones that you need from the list above to your
program.


Expand Down
2 changes: 1 addition & 1 deletion docs/library/btree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Example::

# First, we need to open a stream which holds a database
# This is usually a file, but can be in-memory database
# using uio.BytesIO, a raw flash partition, etc.
# using io.BytesIO, a raw flash partition, etc.
# Oftentimes, you want to create a database file if it doesn't
# exist and open if it exists. Idiom below takes care of this.
# DO NOT open database with "a+b" access mode.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`ucollections` -- collection and container types
:mod:`collections` -- collection and container types
=====================================================

.. module:: ucollections
.. module:: collections
:synopsis: collection and container types

|see_cpython_module| :mod:`python:collections`.
Expand Down Expand Up @@ -49,7 +49,7 @@ Classes
a string with space-separated field named (but this is less efficient).
Example of use::

from ucollections import namedtuple
from collections import namedtuple

MyTuple = namedtuple("MyTuple", ("id", "name"))
t1 = MyTuple(1, "foo")
Expand All @@ -63,7 +63,7 @@ Classes
added. When ordered dict is iterated over, keys/items are returned in
the order they were added::

from ucollections import OrderedDict
from collections import OrderedDict

# To make benefit of ordered keys, OrderedDict should be initialized
# from sequence of (key, value) pairs.
Expand Down
10 changes: 5 additions & 5 deletions docs/library/ucryptolib.rst → docs/library/cryptolib.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`ucryptolib` -- cryptographic ciphers
:mod:`cryptolib` -- cryptographic ciphers
==========================================

.. module:: ucryptolib
.. module:: cryptolib
:synopsis: cryptographic ciphers

Classes
Expand All @@ -21,9 +21,9 @@ Classes
* *key* is an encryption/decryption key (bytes-like).
* *mode* is:

* ``1`` (or ``ucryptolib.MODE_ECB`` if it exists) for Electronic Code Book (ECB).
* ``2`` (or ``ucryptolib.MODE_CBC`` if it exists) for Cipher Block Chaining (CBC).
* ``6`` (or ``ucryptolib.MODE_CTR`` if it exists) for Counter mode (CTR).
* ``1`` (or ``cryptolib.MODE_ECB`` if it exists) for Electronic Code Book (ECB).
* ``2`` (or ``cryptolib.MODE_CBC`` if it exists) for Cipher Block Chaining (CBC).
* ``6`` (or ``cryptolib.MODE_CTR`` if it exists) for Counter mode (CTR).

* *IV* is an initialization vector for CBC mode.
* For Counter mode, *IV* is the initial value for the counter.
Expand Down
10 changes: 5 additions & 5 deletions docs/library/uerrno.rst → docs/library/errno.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`uerrno` -- system error codes
:mod:`errno` -- system error codes
===================================

.. module:: uerrno
.. module:: errno
:synopsis: system error codes

|see_cpython_module| :mod:`python:errno`.
Expand All @@ -20,15 +20,15 @@ Constants
where ``exc`` is an instance of `OSError`. Usage example::

try:
uos.mkdir("my_dir")
os.mkdir("my_dir")
except OSError as exc:
if exc.errno == uerrno.EEXIST:
if exc.errno == errno.EEXIST:
print("Directory already exists")

.. data:: errorcode

Dictionary mapping numeric error codes to strings with symbolic error
code (see above)::

>>> print(uerrno.errorcode[uerrno.EEXIST])
>>> print(errno.errorcode[errno.EEXIST])
EEXIST
2 changes: 1 addition & 1 deletion docs/library/esp32.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ methods to enable over-the-air (OTA) updates.

These methods implement the simple and :ref:`extended
<block-device-interface>` block protocol defined by
:class:`uos.AbstractBlockDev`.
:class:`os.AbstractBlockDev`.

.. method:: Partition.set_boot()

Expand Down
12 changes: 6 additions & 6 deletions docs/library/uhashlib.rst → docs/library/hashlib.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`uhashlib` -- hashing algorithms
:mod:`hashlib` -- hashing algorithms
=====================================

.. module:: uhashlib
.. module:: hashlib
:synopsis: hashing algorithms

|see_cpython_module| :mod:`python:hashlib`.
Expand All @@ -27,15 +27,15 @@ be implemented:
Constructors
------------

.. class:: uhashlib.sha256([data])
.. class:: hashlib.sha256([data])

Create an SHA256 hasher object and optionally feed ``data`` into it.

.. class:: uhashlib.sha1([data])
.. class:: hashlib.sha1([data])

Create an SHA1 hasher object and optionally feed ``data`` into it.

.. class:: uhashlib.md5([data])
.. class:: hashlib.md5([data])

Create an MD5 hasher object and optionally feed ``data`` into it.

Expand All @@ -53,5 +53,5 @@ Methods

.. method:: hash.hexdigest()

This method is NOT implemented. Use ``ubinascii.hexlify(hash.digest())``
This method is NOT implemented. Use ``binascii.hexlify(hash.digest())``
to achieve a similar effect.
4 changes: 2 additions & 2 deletions docs/library/uheapq.rst → docs/library/heapq.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`uheapq` -- heap queue algorithm
:mod:`heapq` -- heap queue algorithm
=====================================

.. module:: uheapq
.. module:: heapq
:synopsis: heap queue algorithm

|see_cpython_module| :mod:`python:heapq`.
Expand Down
Loading