From f1039fd2f27c6d444e41ec79acabe4715cb76eb7 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Mon, 12 Sep 2022 14:38:52 +1000 Subject: [PATCH] collections: Rename collections.* to collections-*. This is to match the convention for naming "extension" packages. Signed-off-by: Jim Mussared --- .../collections/defaultdict.py | 0 .../manifest.py | 1 + .../test_defaultdict.py | 0 .../collections/deque.py | 0 .../{collections.deque => collections-deque}/manifest.py | 1 + python-stdlib/collections/collections/__init__.py | 6 ++---- 6 files changed, 4 insertions(+), 4 deletions(-) rename python-stdlib/{collections.defaultdict => collections-defaultdict}/collections/defaultdict.py (100%) rename python-stdlib/{collections.defaultdict => collections-defaultdict}/manifest.py (79%) rename python-stdlib/{collections.defaultdict => collections-defaultdict}/test_defaultdict.py (100%) rename python-stdlib/{collections.deque => collections-deque}/collections/deque.py (100%) rename python-stdlib/{collections.deque => collections-deque}/manifest.py (68%) diff --git a/python-stdlib/collections.defaultdict/collections/defaultdict.py b/python-stdlib/collections-defaultdict/collections/defaultdict.py similarity index 100% rename from python-stdlib/collections.defaultdict/collections/defaultdict.py rename to python-stdlib/collections-defaultdict/collections/defaultdict.py diff --git a/python-stdlib/collections.defaultdict/manifest.py b/python-stdlib/collections-defaultdict/manifest.py similarity index 79% rename from python-stdlib/collections.defaultdict/manifest.py rename to python-stdlib/collections-defaultdict/manifest.py index bbce4be1..f8d566ab 100644 --- a/python-stdlib/collections.defaultdict/manifest.py +++ b/python-stdlib/collections-defaultdict/manifest.py @@ -2,4 +2,5 @@ metadata(version="0.3") # Originally written by Paul Sokolovsky. +require("collections") package("collections") diff --git a/python-stdlib/collections.defaultdict/test_defaultdict.py b/python-stdlib/collections-defaultdict/test_defaultdict.py similarity index 100% rename from python-stdlib/collections.defaultdict/test_defaultdict.py rename to python-stdlib/collections-defaultdict/test_defaultdict.py diff --git a/python-stdlib/collections.deque/collections/deque.py b/python-stdlib/collections-deque/collections/deque.py similarity index 100% rename from python-stdlib/collections.deque/collections/deque.py rename to python-stdlib/collections-deque/collections/deque.py diff --git a/python-stdlib/collections.deque/manifest.py b/python-stdlib/collections-deque/manifest.py similarity index 68% rename from python-stdlib/collections.deque/manifest.py rename to python-stdlib/collections-deque/manifest.py index e4306fae..0133d2ba 100644 --- a/python-stdlib/collections.deque/manifest.py +++ b/python-stdlib/collections-deque/manifest.py @@ -1,3 +1,4 @@ metadata(version="0.1.3") +require("collections") package("collections") diff --git a/python-stdlib/collections/collections/__init__.py b/python-stdlib/collections/collections/__init__.py index 471b3a52..7f3be567 100644 --- a/python-stdlib/collections/collections/__init__.py +++ b/python-stdlib/collections/collections/__init__.py @@ -1,9 +1,7 @@ -# Should be reimplemented for MicroPython -# Reason: -# CPython implementation brings in metaclasses and other bloat. -# This is going to be just import-all for other modules in a namespace package +# Replace built-in collections module. from ucollections import * +# Provide optional dependencies (which may be installed separately). try: from .defaultdict import defaultdict except ImportError: