pythonic-fp-fptools 5.3.0__tar.gz → 6.0.0__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.
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/PKG-INFO +20 -35
- pythonic_fp_fptools-5.3.0/README.rst → pythonic_fp_fptools-6.0.0/README.md +13 -24
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/pyproject.toml +31 -22
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/src/pythonic_fp/fptools/__init__.py +2 -5
- pythonic_fp_fptools-6.0.0/src/pythonic_fp/fptools/_recoverable.py +22 -0
- pythonic_fp_fptools-6.0.0/src/pythonic_fp/fptools/either.py +491 -0
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/src/pythonic_fp/fptools/function.py +10 -10
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/src/pythonic_fp/fptools/lazy.py +53 -40
- pythonic_fp_fptools-6.0.0/src/pythonic_fp/fptools/maybe.py +331 -0
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/src/pythonic_fp/fptools/state.py +67 -54
- pythonic_fp_fptools-5.3.0/.github/workflows/static.yml +0 -64
- pythonic_fp_fptools-5.3.0/.gitignore +0 -9
- pythonic_fp_fptools-5.3.0/CHANGELOG.rst +0 -309
- pythonic_fp_fptools-5.3.0/docs/Makefile +0 -78
- pythonic_fp_fptools-5.3.0/docs/gen_conf.py +0 -109
- pythonic_fp_fptools-5.3.0/docs/requirements.txt +0 -2
- pythonic_fp_fptools-5.3.0/docs/source/_static/.gitkeep +0 -0
- pythonic_fp_fptools-5.3.0/docs/source/_templates/.gitkeep +0 -0
- pythonic_fp_fptools-5.3.0/docs/source/api/function.rst +0 -6
- pythonic_fp_fptools-5.3.0/docs/source/api/index.rst +0 -20
- pythonic_fp_fptools-5.3.0/docs/source/api/lazy.rst +0 -6
- pythonic_fp_fptools-5.3.0/docs/source/api/monads/either.rst +0 -6
- pythonic_fp_fptools-5.3.0/docs/source/api/monads/index.rst +0 -10
- pythonic_fp_fptools-5.3.0/docs/source/api/monads/maybe.rst +0 -6
- pythonic_fp_fptools-5.3.0/docs/source/api/monads/state.rst +0 -6
- pythonic_fp_fptools-5.3.0/docs/source/changelog.rst +0 -7
- pythonic_fp_fptools-5.3.0/docs/source/description.rst +0 -8
- pythonic_fp_fptools-5.3.0/docs/source/index.rst +0 -30
- pythonic_fp_fptools-5.3.0/docs/source/releases.rst +0 -26
- pythonic_fp_fptools-5.3.0/docs/source/usage.rst +0 -29
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/__init__.pyi +0 -0
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/either.py +0 -444
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/either.pyi +0 -36
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/function.pyi +0 -12
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/lazy.pyi +0 -18
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/maybe.py +0 -251
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/maybe.pyi +0 -27
- pythonic_fp_fptools-5.3.0/src/pythonic_fp/fptools/state.pyi +0 -23
- pythonic_fp_fptools-5.3.0/tests/either/test_either.py +0 -511
- pythonic_fp_fptools-5.3.0/tests/either/test_sequence_either.py +0 -120
- pythonic_fp_fptools-5.3.0/tests/either/test_str_repr_either.py +0 -74
- pythonic_fp_fptools-5.3.0/tests/function/test_function.py +0 -62
- pythonic_fp_fptools-5.3.0/tests/lazy/test_lazy.py +0 -284
- pythonic_fp_fptools-5.3.0/tests/maybe/maybe.py +0 -90
- pythonic_fp_fptools-5.3.0/tests/maybe/test_sequence_maybe.py +0 -55
- pythonic_fp_fptools-5.3.0/tests/maybe/test_str_repr_maybe.py +0 -134
- pythonic_fp_fptools-5.3.0/tests/state/test_state.py +0 -157
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/LICENSE +0 -0
- {pythonic_fp_fptools-5.3.0 → pythonic_fp_fptools-6.0.0}/src/pythonic_fp/fptools/py.typed +0 -0
|
@@ -1,70 +1,55 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonic-fp-fptools
|
|
3
|
-
Version:
|
|
4
|
-
Summary: Functional
|
|
3
|
+
Version: 6.0.0
|
|
4
|
+
Summary: Functional programming tools for Python.
|
|
5
5
|
Keywords: either,fp,functional,functional programming,lazy,maybe,monad,non-strict
|
|
6
6
|
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
|
-
Requires-Python: >=3.
|
|
8
|
-
Description-Content-Type: text/
|
|
7
|
+
Requires-Python: >=3.14
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Framework :: Pytest
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
15
16
|
Classifier: Typing :: Typed
|
|
16
17
|
License-File: LICENSE
|
|
17
18
|
Requires-Dist: pythonic-fp-booleans>=3.0.2
|
|
18
19
|
Requires-Dist: pythonic-fp-circulararray>=6.0.4
|
|
19
20
|
Requires-Dist: pythonic-fp-gadgets>=4.0.2
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Requires-Dist: pythonic-fp-iterables>=5.1.3 ; extra == "test"
|
|
23
|
-
Requires-Dist: pythonic-fp-queues>=5.1.1 ; extra == "test"
|
|
24
|
-
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-fptools/blob/main/CHANGELOG.rst
|
|
25
|
-
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/projects/fptools.html
|
|
21
|
+
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-fptools/blob/main/CHANGELOG.md
|
|
22
|
+
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp-fptools/release/html/
|
|
26
23
|
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
|
|
27
24
|
Project-URL: Source, https://github.com/grscheller/pythonic-fp-fptools
|
|
28
|
-
Provides-Extra: test
|
|
29
25
|
|
|
30
|
-
Pythonic FP - Functional tools
|
|
31
|
-
==============================
|
|
32
|
-
|
|
33
|
-
PyPI project
|
|
34
|
-
`pythonic-fp.fptools
|
|
35
|
-
<https://pypi.org/project/pythonic-fp-fptools>`_.
|
|
26
|
+
# Pythonic FP - Functional tools
|
|
36
27
|
|
|
37
28
|
Tools to aid with functional programming in Python while still
|
|
38
29
|
endeavoring to be Pythonic.
|
|
39
30
|
|
|
31
|
+
PyPI project
|
|
32
|
+
[pythonic-fp.fptools](https://pypi.org/project/pythonic-fp-fptools).
|
|
33
|
+
Part of the
|
|
34
|
+
[pythonic-fp](https://grscheller.github.io/pythonic-fp/)
|
|
35
|
+
PyPI projects.
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
Documentation and other links for this project are hosted on
|
|
40
|
+
[GitHub Pages](https://grscheller.github.io/pythonic-fp/projects/fptools.html).
|
|
41
|
+
|
|
40
42
|
- Functions as first class objects
|
|
41
43
|
- Lazy (non-strict) function evaluation
|
|
42
44
|
- Maybe monad - representing a possible missing value
|
|
43
45
|
- Either monad - representing either a LEFT or RIGHT value, not both
|
|
44
|
-
|
|
45
46
|
- left biased
|
|
46
|
-
|
|
47
47
|
- State monad implementation
|
|
48
|
-
|
|
49
48
|
- pure FP handling of state (the state monad)
|
|
50
49
|
- Classic FP implementation
|
|
51
|
-
|
|
52
50
|
- the monad encapsulates a state transformation, not a "state"
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
`pythonic-fp
|
|
56
|
-
<https://grscheller.github.io/pythonic-fp/>`_
|
|
57
|
-
PyPI projects.
|
|
58
|
-
|
|
59
|
-
Documentation
|
|
60
|
-
-------------
|
|
61
|
-
|
|
62
|
-
Documentation and other links for this project are hosted on
|
|
63
|
-
`GitHub Pages
|
|
64
|
-
<https://grscheller.github.io/pythonic-fp/projects/fptools.html>`_.
|
|
65
|
-
|
|
66
|
-
Copyright and License
|
|
67
|
-
---------------------
|
|
52
|
+
## Copyright and License
|
|
68
53
|
|
|
69
54
|
Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
70
55
|
License, Version 2.0. See the LICENSE file for details.
|
|
@@ -1,41 +1,30 @@
|
|
|
1
|
-
Pythonic FP - Functional tools
|
|
2
|
-
==============================
|
|
3
|
-
|
|
4
|
-
PyPI project
|
|
5
|
-
`pythonic-fp.fptools
|
|
6
|
-
<https://pypi.org/project/pythonic-fp-fptools>`_.
|
|
1
|
+
# Pythonic FP - Functional tools
|
|
7
2
|
|
|
8
3
|
Tools to aid with functional programming in Python while still
|
|
9
4
|
endeavoring to be Pythonic.
|
|
10
5
|
|
|
6
|
+
PyPI project
|
|
7
|
+
[pythonic-fp.fptools](https://pypi.org/project/pythonic-fp-fptools).
|
|
8
|
+
Part of the
|
|
9
|
+
[pythonic-fp](https://grscheller.github.io/pythonic-fp/)
|
|
10
|
+
PyPI projects.
|
|
11
|
+
|
|
12
|
+
## Documentation
|
|
13
|
+
|
|
14
|
+
Documentation and other links for this project are hosted on
|
|
15
|
+
[GitHub Pages](https://grscheller.github.io/pythonic-fp/projects/fptools.html).
|
|
16
|
+
|
|
11
17
|
- Functions as first class objects
|
|
12
18
|
- Lazy (non-strict) function evaluation
|
|
13
19
|
- Maybe monad - representing a possible missing value
|
|
14
20
|
- Either monad - representing either a LEFT or RIGHT value, not both
|
|
15
|
-
|
|
16
21
|
- left biased
|
|
17
|
-
|
|
18
22
|
- State monad implementation
|
|
19
|
-
|
|
20
23
|
- pure FP handling of state (the state monad)
|
|
21
24
|
- Classic FP implementation
|
|
22
|
-
|
|
23
25
|
- the monad encapsulates a state transformation, not a "state"
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
`pythonic-fp
|
|
27
|
-
<https://grscheller.github.io/pythonic-fp/>`_
|
|
28
|
-
PyPI projects.
|
|
29
|
-
|
|
30
|
-
Documentation
|
|
31
|
-
-------------
|
|
32
|
-
|
|
33
|
-
Documentation and other links for this project are hosted on
|
|
34
|
-
`GitHub Pages
|
|
35
|
-
<https://grscheller.github.io/pythonic-fp/projects/fptools.html>`_.
|
|
36
|
-
|
|
37
|
-
Copyright and License
|
|
38
|
-
---------------------
|
|
27
|
+
## Copyright and License
|
|
39
28
|
|
|
40
29
|
Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
41
30
|
License, Version 2.0. See the LICENSE file for details.
|
|
@@ -4,9 +4,10 @@ build-backend = "flit_core.buildapi"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pythonic-fp-fptools"
|
|
7
|
-
version = "
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
version = "6.0.0"
|
|
8
|
+
description = "Functional programming tools for Python."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.14" # floor: PEP 649/749 deferred annotations — class-level self-reference NameErrors on <3.14
|
|
10
11
|
authors = [
|
|
11
12
|
{ name = "Geoffrey R. Scheller", email = "geoffrey@scheller.com" },
|
|
12
13
|
]
|
|
@@ -27,6 +28,7 @@ classifiers = [
|
|
|
27
28
|
"License :: OSI Approved :: Apache Software License",
|
|
28
29
|
"Operating System :: OS Independent",
|
|
29
30
|
"Programming Language :: Python :: 3.14",
|
|
31
|
+
"Programming Language :: Python :: 3.15",
|
|
30
32
|
"Typing :: Typed",
|
|
31
33
|
]
|
|
32
34
|
dependencies = [
|
|
@@ -34,15 +36,18 @@ dependencies = [
|
|
|
34
36
|
"pythonic-fp-circulararray>=6.0.4",
|
|
35
37
|
"pythonic-fp-gadgets>=4.0.2",
|
|
36
38
|
]
|
|
37
|
-
dynamic = ["description"]
|
|
38
39
|
|
|
39
40
|
[project.urls]
|
|
40
|
-
Changelog = "https://github.com/grscheller/pythonic-fp-fptools/blob/main/CHANGELOG.
|
|
41
|
-
Documentation =
|
|
41
|
+
Changelog = "https://github.com/grscheller/pythonic-fp-fptools/blob/main/CHANGELOG.md"
|
|
42
|
+
Documentation ="https://grscheller.github.io/pythonic-fp-fptools/release/html/"
|
|
42
43
|
Homepage = "https://grscheller.github.io/pythonic-fp/"
|
|
43
44
|
Source = "https://github.com/grscheller/pythonic-fp-fptools"
|
|
44
45
|
|
|
45
|
-
[
|
|
46
|
+
[dependency-groups]
|
|
47
|
+
docs = [
|
|
48
|
+
"furo>=2025.12.19",
|
|
49
|
+
"sphinx>=9.1",
|
|
50
|
+
]
|
|
46
51
|
test = [
|
|
47
52
|
"pytest>=8.4.1",
|
|
48
53
|
"pythonic-fp-containers>=4.0.1",
|
|
@@ -53,6 +58,22 @@ test = [
|
|
|
53
58
|
[tool.flit.module]
|
|
54
59
|
name = "pythonic_fp.fptools"
|
|
55
60
|
|
|
61
|
+
[tool.flit.sdist]
|
|
62
|
+
exclude = [
|
|
63
|
+
"docs/",
|
|
64
|
+
"tests/",
|
|
65
|
+
"**/.mypy_cache/",
|
|
66
|
+
"**/.ruff_cache/",
|
|
67
|
+
"**/.pytest_cache/",
|
|
68
|
+
"**/__pycache__/",
|
|
69
|
+
"**/.dmypy.json",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[tool.pytest]
|
|
73
|
+
addopts = ["-ra"]
|
|
74
|
+
consider_namespace_packages = true
|
|
75
|
+
testpaths = ["tests/"]
|
|
76
|
+
|
|
56
77
|
[tool.mypy]
|
|
57
78
|
explicit_package_bases = true
|
|
58
79
|
local_partial_types = true
|
|
@@ -61,23 +82,12 @@ warn_redundant_casts = true
|
|
|
61
82
|
warn_return_any = true
|
|
62
83
|
warn_unused_configs = true
|
|
63
84
|
|
|
64
|
-
[tool.pylsp-mypy]
|
|
65
|
-
enabled = true
|
|
66
|
-
live-mode = true
|
|
67
|
-
dmypy = false
|
|
68
|
-
strict = true
|
|
69
|
-
report_progress = true
|
|
70
|
-
|
|
71
|
-
[tool.pytest]
|
|
72
|
-
addopts = [
|
|
73
|
-
"-ra",
|
|
74
|
-
]
|
|
75
|
-
consider_namespace_packages = true
|
|
76
|
-
testpaths = ["tests/"]
|
|
77
|
-
|
|
78
85
|
[tool.ruff]
|
|
79
86
|
target-version = "py314"
|
|
80
87
|
|
|
88
|
+
[tool.ruff.lint]
|
|
89
|
+
ignore = ["RUF022", "E741"]
|
|
90
|
+
|
|
81
91
|
[tool.ruff.lint.flake8-quotes]
|
|
82
92
|
docstring-quotes = "double"
|
|
83
93
|
|
|
@@ -86,7 +96,6 @@ docstring-quotes = "double"
|
|
|
86
96
|
"E731",
|
|
87
97
|
"C901",
|
|
88
98
|
]
|
|
89
|
-
"**/*.py" = ["E741"]
|
|
90
99
|
|
|
91
100
|
[tool.ruff.format]
|
|
92
101
|
quote-style = "single"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2023-
|
|
1
|
+
# Copyright 2023-2026 Geoffrey R. Scheller
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
Functional
|
|
17
|
-
============================
|
|
18
|
-
|
|
19
|
-
.. admonition:: Functional programming tools for Python.
|
|
16
|
+
.. admonition:: Functional programming tools for Python
|
|
20
17
|
|
|
21
18
|
Functions as first class objects, Lazy (non-strict) function evaluation,
|
|
22
19
|
and classical Functional Programming data structures.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Copyright 2026 Geoffrey R. Scheller
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from typing import Final
|
|
16
|
+
|
|
17
|
+
RECOVERABLE: Final[tuple[type[Exception], ...]] = (
|
|
18
|
+
LookupError, # KeyError, IndexError
|
|
19
|
+
ValueError, # includes UnicodeError
|
|
20
|
+
ArithmeticError, # ZeroDivisionError, OverflowError, FloatingPointError
|
|
21
|
+
RuntimeError, # RecursionError, NotImplementedError
|
|
22
|
+
)
|