circuitpython-functools 2.0.0__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {circuitpython_functools-2.0.0/circuitpython_functools.egg-info → circuitpython_functools-2.0.1}/PKG-INFO +2 -1
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1/circuitpython_functools.egg-info}/PKG-INFO +2 -1
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/circuitpython_functools.egg-info/requires.txt +1 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/circuitpython_functools.py +1 -19
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/examples/functools_simpletest.py +2 -2
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/optional_requirements.txt +2 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/pyproject.toml +1 -1
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.github/workflows/build.yml +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.github/workflows/failure-help-text.yml +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.github/workflows/release_gh.yml +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.github/workflows/release_pypi.yml +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.gitignore +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.pre-commit-config.yaml +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.readthedocs.yaml +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/CODE_OF_CONDUCT.md +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/LICENSE-MIT +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/LICENSE-PSF +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/LICENSES/CC-BY-4.0.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/LICENSES/MIT.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/LICENSES/PSF-2.0.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/LICENSES/Unlicense.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/README.rst +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/README.rst.license +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/circuitpython_functools.egg-info/SOURCES.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/circuitpython_functools.egg-info/dependency_links.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/circuitpython_functools.egg-info/top_level.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/_static/favicon.ico +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/_static/favicon.ico.license +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/api.rst +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/api.rst.license +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/conf.py +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/examples.rst +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/examples.rst.license +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/index.rst +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/index.rst.license +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/requirements.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/requirements.txt +0 -0
- {circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: circuitpython-functools
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: A CircuitPython implementation of CPython's functools library
|
|
5
5
|
Author-email: Alec Delaney <tekktrik@gmail.com>
|
|
6
6
|
License-Expression: MIT AND PSF-2.0
|
|
@@ -16,6 +16,7 @@ License-File: LICENSE-MIT
|
|
|
16
16
|
License-File: LICENSE-PSF
|
|
17
17
|
Requires-Dist: Adafruit-Blinka
|
|
18
18
|
Provides-Extra: optional
|
|
19
|
+
Requires-Dist: pre-commit~=4.1; extra == "optional"
|
|
19
20
|
Dynamic: license-file
|
|
20
21
|
|
|
21
22
|
Introduction
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: circuitpython-functools
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: A CircuitPython implementation of CPython's functools library
|
|
5
5
|
Author-email: Alec Delaney <tekktrik@gmail.com>
|
|
6
6
|
License-Expression: MIT AND PSF-2.0
|
|
@@ -16,6 +16,7 @@ License-File: LICENSE-MIT
|
|
|
16
16
|
License-File: LICENSE-PSF
|
|
17
17
|
Requires-Dist: Adafruit-Blinka
|
|
18
18
|
Provides-Extra: optional
|
|
19
|
+
Requires-Dist: pre-commit~=4.1; extra == "optional"
|
|
19
20
|
Dynamic: license-file
|
|
20
21
|
|
|
21
22
|
Introduction
|
|
@@ -23,7 +23,7 @@ Implementation Notes
|
|
|
23
23
|
import gc
|
|
24
24
|
from collections import OrderedDict
|
|
25
25
|
|
|
26
|
-
__version__ = "2.0.
|
|
26
|
+
__version__ = "2.0.1"
|
|
27
27
|
__repo__ = "https://github.com/tekktrik/CircuitPython_functools.git"
|
|
28
28
|
|
|
29
29
|
_cache_records = {}
|
|
@@ -107,24 +107,6 @@ class CachedFunc:
|
|
|
107
107
|
gc.collect()
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
class LRUCachedFunc:
|
|
111
|
-
"""Wrapped LRU cache function."""
|
|
112
|
-
|
|
113
|
-
def __init__(self, wrapped_func, maxsize):
|
|
114
|
-
"""Initialize the wrapped LRU cache function."""
|
|
115
|
-
self._maxsize = maxsize
|
|
116
|
-
self._wrapped_func = wrapped_func
|
|
117
|
-
|
|
118
|
-
def __call__(self, *args, **kwargs):
|
|
119
|
-
"""Call the wrapped function."""
|
|
120
|
-
print(type(self._wrapped_func))
|
|
121
|
-
return self._wrapped_func(*args, **kwargs)
|
|
122
|
-
|
|
123
|
-
def cache_clear(self):
|
|
124
|
-
"""Clear the LRU cache."""
|
|
125
|
-
return self.cache_clear()
|
|
126
|
-
|
|
127
|
-
|
|
128
110
|
def cache(user_function):
|
|
129
111
|
"""Create an unbounded cache."""
|
|
130
112
|
return CachedFunc(-1, user_function)
|
{circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/examples/functools_simpletest.py
RENAMED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
"""Example usage of the circuitpython_functools module."""
|
|
7
7
|
|
|
8
|
-
from circuitpython_functools import cache
|
|
8
|
+
from circuitpython_functools import cache, lru_cache
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
@
|
|
11
|
+
@lru_cache(maxsize=3)
|
|
12
12
|
def add(a, b, *, c=1, d=2):
|
|
13
13
|
"""Perform addition."""
|
|
14
14
|
return a + b + c + d
|
|
@@ -12,7 +12,7 @@ requires = [
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "circuitpython-functools"
|
|
14
14
|
description = "A CircuitPython implementation of CPython's functools library"
|
|
15
|
-
version = "2.0.
|
|
15
|
+
version = "2.0.1"
|
|
16
16
|
readme = "README.rst"
|
|
17
17
|
authors = [
|
|
18
18
|
{name = "Alec Delaney", email = "tekktrik@gmail.com"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.github/workflows/release_gh.yml
RENAMED
|
File without changes
|
{circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/.github/workflows/release_pypi.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{circuitpython_functools-2.0.0 → circuitpython_functools-2.0.1}/docs/_static/favicon.ico.license
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|