pythonic-fp-fptools 5.4.0__tar.gz → 6.1.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.
Files changed (48) hide show
  1. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/PKG-INFO +23 -38
  2. pythonic_fp_fptools-5.4.0/README.rst → pythonic_fp_fptools-6.1.0/README.md +13 -24
  3. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/pyproject.toml +34 -28
  4. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/src/pythonic_fp/fptools/__init__.py +1 -1
  5. pythonic_fp_fptools-6.1.0/src/pythonic_fp/fptools/_recoverable.py +22 -0
  6. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/src/pythonic_fp/fptools/either.py +152 -149
  7. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/src/pythonic_fp/fptools/function.py +5 -5
  8. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/src/pythonic_fp/fptools/lazy.py +24 -12
  9. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/src/pythonic_fp/fptools/maybe.py +118 -48
  10. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/src/pythonic_fp/fptools/state.py +74 -47
  11. pythonic_fp_fptools-5.4.0/.github/workflows/static.yml +0 -64
  12. pythonic_fp_fptools-5.4.0/.gitignore +0 -9
  13. pythonic_fp_fptools-5.4.0/CHANGELOG.rst +0 -318
  14. pythonic_fp_fptools-5.4.0/docs/Makefile +0 -78
  15. pythonic_fp_fptools-5.4.0/docs/gen_conf.py +0 -110
  16. pythonic_fp_fptools-5.4.0/docs/requirements.txt +0 -2
  17. pythonic_fp_fptools-5.4.0/docs/source/_static/.gitkeep +0 -0
  18. pythonic_fp_fptools-5.4.0/docs/source/_static/custom.css +0 -3
  19. pythonic_fp_fptools-5.4.0/docs/source/_templates/.gitkeep +0 -0
  20. pythonic_fp_fptools-5.4.0/docs/source/api/function.rst +0 -6
  21. pythonic_fp_fptools-5.4.0/docs/source/api/index.rst +0 -20
  22. pythonic_fp_fptools-5.4.0/docs/source/api/lazy.rst +0 -6
  23. pythonic_fp_fptools-5.4.0/docs/source/api/monads/either.rst +0 -6
  24. pythonic_fp_fptools-5.4.0/docs/source/api/monads/index.rst +0 -10
  25. pythonic_fp_fptools-5.4.0/docs/source/api/monads/maybe.rst +0 -6
  26. pythonic_fp_fptools-5.4.0/docs/source/api/monads/state.rst +0 -6
  27. pythonic_fp_fptools-5.4.0/docs/source/changelog.rst +0 -7
  28. pythonic_fp_fptools-5.4.0/docs/source/description.rst +0 -8
  29. pythonic_fp_fptools-5.4.0/docs/source/index.rst +0 -30
  30. pythonic_fp_fptools-5.4.0/docs/source/releases.rst +0 -28
  31. pythonic_fp_fptools-5.4.0/docs/source/usage.rst +0 -29
  32. pythonic_fp_fptools-5.4.0/src/pythonic_fp/fptools/__init__.pyi +0 -0
  33. pythonic_fp_fptools-5.4.0/src/pythonic_fp/fptools/either.pyi +0 -36
  34. pythonic_fp_fptools-5.4.0/src/pythonic_fp/fptools/function.pyi +0 -12
  35. pythonic_fp_fptools-5.4.0/src/pythonic_fp/fptools/lazy.pyi +0 -18
  36. pythonic_fp_fptools-5.4.0/src/pythonic_fp/fptools/maybe.pyi +0 -27
  37. pythonic_fp_fptools-5.4.0/src/pythonic_fp/fptools/state.pyi +0 -23
  38. pythonic_fp_fptools-5.4.0/tests/either/test_either.py +0 -511
  39. pythonic_fp_fptools-5.4.0/tests/either/test_sequence_either.py +0 -120
  40. pythonic_fp_fptools-5.4.0/tests/either/test_str_repr_either.py +0 -74
  41. pythonic_fp_fptools-5.4.0/tests/function/test_function.py +0 -62
  42. pythonic_fp_fptools-5.4.0/tests/lazy/test_lazy.py +0 -284
  43. pythonic_fp_fptools-5.4.0/tests/maybe/maybe.py +0 -90
  44. pythonic_fp_fptools-5.4.0/tests/maybe/test_sequence_maybe.py +0 -55
  45. pythonic_fp_fptools-5.4.0/tests/maybe/test_str_repr_maybe.py +0 -134
  46. pythonic_fp_fptools-5.4.0/tests/state/test_state.py +0 -157
  47. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.0}/LICENSE +0 -0
  48. {pythonic_fp_fptools-5.4.0 → pythonic_fp_fptools-6.1.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: 5.4.0
4
- Summary: .. admonition:: Functional programming tools for Python
3
+ Version: 6.1.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.13
8
- Description-Content-Type: text/x-rst
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
- Requires-Dist: pythonic-fp-booleans>=3.0.2
18
- Requires-Dist: pythonic-fp-circulararray>=6.0.4
19
- Requires-Dist: pythonic-fp-gadgets>=4.0.2
20
- Requires-Dist: pytest>=8.4.1 ; extra == "test"
21
- Requires-Dist: pythonic-fp-containers>=4.0.1 ; extra == "test"
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
18
+ Requires-Dist: pythonic-fp-booleans>=5,<6
19
+ Requires-Dist: pythonic-fp-circulararray>=6.2.2,<6.4
20
+ Requires-Dist: pythonic-fp-gadgets>=4.5.0,<6
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
- Part of the
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
- Part of the
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 = "5.4.0"
8
- readme = "README.rst"
9
- requires-python = ">=3.13"
7
+ version = "6.1.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,32 +28,49 @@ 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 = [
33
- "pythonic-fp-booleans>=3.0.2",
34
- "pythonic-fp-circulararray>=6.0.4",
35
- "pythonic-fp-gadgets>=4.0.2",
35
+ "pythonic-fp-booleans>=5,<6",
36
+ "pythonic-fp-circulararray>=6.2.2,<6.4",
37
+ "pythonic-fp-gadgets>=4.5.0,<6",
36
38
  ]
37
- dynamic = ["description"]
38
39
 
39
40
  [project.urls]
40
- Changelog = "https://github.com/grscheller/pythonic-fp-fptools/blob/main/CHANGELOG.rst"
41
- Documentation = "https://grscheller.github.io/pythonic-fp/projects/fptools.html"
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
- [project.optional-dependencies]
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
- "pythonic-fp-containers>=4.0.1",
49
- "pythonic-fp-iterables>=5.1.3",
50
- "pythonic-fp-queues>=5.1.1",
51
53
  ]
52
54
 
53
55
  [tool.flit.module]
54
56
  name = "pythonic_fp.fptools"
55
57
 
58
+ [tool.flit.sdist]
59
+ exclude = [
60
+ "docs/",
61
+ "tests/",
62
+ "**/.mypy_cache/",
63
+ "**/.ruff_cache/",
64
+ "**/.pytest_cache/",
65
+ "**/__pycache__/",
66
+ "**/.dmypy.json",
67
+ ]
68
+
69
+ [tool.pytest]
70
+ addopts = ["-ra"]
71
+ consider_namespace_packages = true
72
+ testpaths = ["tests/"]
73
+
56
74
  [tool.mypy]
57
75
  explicit_package_bases = true
58
76
  local_partial_types = true
@@ -61,23 +79,12 @@ warn_redundant_casts = true
61
79
  warn_return_any = true
62
80
  warn_unused_configs = true
63
81
 
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
82
  [tool.ruff]
79
83
  target-version = "py314"
80
84
 
85
+ [tool.ruff.lint]
86
+ ignore = ["RUF022", "E741"]
87
+
81
88
  [tool.ruff.lint.flake8-quotes]
82
89
  docstring-quotes = "double"
83
90
 
@@ -86,7 +93,6 @@ docstring-quotes = "double"
86
93
  "E731",
87
94
  "C901",
88
95
  ]
89
- "**/*.py" = ["E741"]
90
96
 
91
97
  [tool.ruff.format]
92
98
  quote-style = "single"
@@ -1,4 +1,4 @@
1
- # Copyright 2023-2025 Geoffrey R. Scheller
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.
@@ -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
+ )