Skip to content

Commit 1fde63b

Browse files
authored
Merge pull request adafruit#836 from bildzeitung/dmklein_uclxn
Renames ucollections -> collections
2 parents 27f2421 + bf26ffb commit 1fde63b

12 files changed

+18
-36
lines changed

docs/library/ucollections.rst renamed to docs/library/collections.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
:mod:`ucollections` -- collection and container types
1+
:mod:`collections` -- collection and container types
22
=====================================================
33

44
.. include:: ../templates/unsupported_in_circuitpython.inc
55

6-
.. module:: ucollections
6+
.. module:: collections
77
:synopsis: collection and container types
88

99
|see_cpython_module| :mod:`cpython:collections`.
@@ -24,7 +24,7 @@ Classes
2424
a string with space-separated field named (but this is less efficient).
2525
Example of use::
2626

27-
from ucollections import namedtuple
27+
from collections import namedtuple
2828

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

41-
from ucollections import OrderedDict
41+
from collections import OrderedDict
4242

4343
# To make benefit of ordered keys, OrderedDict should be initialized
4444
# from sequence of (key, value) pairs.

docs/library/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Python standard libraries and micro-libraries
2121
gc.rst
2222
sys.rst
2323
binascii.rst
24-
ucollections.rst
24+
collections.rst
2525
uerrno.rst
2626
hashlib.rst
2727
uheapq.rst

py/modcollections.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#if MICROPY_PY_COLLECTIONS
3030

3131
STATIC const mp_rom_map_elem_t mp_module_collections_globals_table[] = {
32-
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ucollections) },
32+
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_collections) },
3333
{ MP_ROM_QSTR(MP_QSTR_namedtuple), MP_ROM_PTR(&mp_namedtuple_obj) },
3434
#if MICROPY_PY_COLLECTIONS_ORDEREDDICT
3535
{ MP_ROM_QSTR(MP_QSTR_OrderedDict), MP_ROM_PTR(&mp_type_ordereddict) },

py/objmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
151151
{ MP_ROM_QSTR(MP_QSTR_uio), MP_ROM_PTR(&mp_module_io) },
152152
#endif
153153
#if MICROPY_PY_COLLECTIONS
154-
{ MP_ROM_QSTR(MP_QSTR_ucollections), MP_ROM_PTR(&mp_module_collections) },
154+
{ MP_ROM_QSTR(MP_QSTR_collections), MP_ROM_PTR(&mp_module_collections) },
155155
#endif
156156
#if MICROPY_PY_STRUCT
157157
{ MP_ROM_QSTR(MP_QSTR_ustruct), MP_ROM_PTR(&mp_module_ustruct) },

tests/basics/class_store_class.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
try:
66
from collections import namedtuple
77
except ImportError:
8-
try:
9-
from ucollections import namedtuple
10-
except ImportError:
11-
print("SKIP")
12-
raise SystemExit
8+
print("SKIP")
9+
raise SystemExit
1310

1411
import skip_if
1512
skip_if.no_cpython_compat()

tests/basics/namedtuple1.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
try:
2-
try:
3-
from collections import namedtuple
4-
except ImportError:
5-
from ucollections import namedtuple
2+
from collections import namedtuple
63
except ImportError:
74
print("SKIP")
85
raise SystemExit

tests/basics/namedtuple1_cpython_compat.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
skip_if.no_cpython_compat()
33

44
try:
5-
try:
6-
from collections import namedtuple
7-
except ImportError:
8-
from ucollections import namedtuple
5+
from collections import namedtuple
96
except ImportError:
107
skip_if.skip()
118

tests/basics/ordereddict1.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
try:
22
from collections import OrderedDict
33
except ImportError:
4-
try:
5-
from ucollections import OrderedDict
6-
except ImportError:
7-
print("SKIP")
8-
raise SystemExit
4+
print("SKIP")
5+
raise SystemExit
96

107
d = OrderedDict([(10, 20), ("b", 100), (1, 2)])
118
print(len(d))

tests/basics/ordereddict_eq.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
try:
22
from collections import OrderedDict
33
except ImportError:
4-
try:
5-
from ucollections import OrderedDict
6-
except ImportError:
7-
print("SKIP")
8-
raise SystemExit
4+
print("SKIP")
5+
raise SystemExit
96

107
x = OrderedDict()
118
y = OrderedDict()

tests/bench/var-8-namedtuple-1st.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import bench
2-
from ucollections import namedtuple
2+
from collections import namedtuple
33

44
T = namedtuple("Tup", ["num", "bar"])
55

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy