Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
450 commits
Select commit Hold shift + click to select a range
13adb1c
add: include and skipfiles options for print tree function.
Labbeti Nov 9, 2025
9be7fbe
mod: update CHANGELOG.
Labbeti Nov 9, 2025
c97d855
add: experimental dataclassdict wrapper.
Labbeti Nov 11, 2025
e29d8eb
mod: format dataclassdict code.
Labbeti Nov 13, 2025
cad9cab
add: T_Index typevar is now Any by default instead of int.
Labbeti Nov 15, 2025
68404de
del: remove dataclassdict expt class.
Labbeti Nov 16, 2025
d35f1ee
add: option 'sort' to tree_iter.
Labbeti Nov 16, 2025
e5fe0d6
mod: update README and docs.
Labbeti Nov 16, 2025
02bae56
fix: remove unused import.
Labbeti Nov 17, 2025
05f6ff4
fix: kwds args name.
Labbeti Nov 21, 2025
5de8e4d
add: ThreadPoolExecutorHelper class.
Labbeti Dec 5, 2025
3ee7133
mod: format with ruff.
Labbeti Dec 5, 2025
4064eaf
mod: updaet index doc page.
Labbeti Dec 13, 2025
de12367
mod: updaet index doc page.
Labbeti Dec 13, 2025
07f4a5f
mod: update docs pages.
Labbeti Dec 13, 2025
4b0751a
add: matmul typing and reduce fn.
Labbeti Dec 13, 2025
04fc92f
mod: update matmul class and function.
Labbeti Dec 13, 2025
c366fb6
fix: update macos image from 13 to 15 in workflow.
Labbeti Dec 13, 2025
bad97c6
add: new protocols with reversed order.
Labbeti Dec 13, 2025
9cea849
mod: update print_install_info to exclude warning msg.
Labbeti Dec 13, 2025
aebb7e5
mod: update python max version and pypi classifiers.
Labbeti Dec 13, 2025
37350b5
mod: update pythonwrench main description.
Labbeti Dec 13, 2025
e27d384
mod: update version numbers to 0.4.3.
Labbeti Dec 13, 2025
abd3cec
mod: update lockfile.
Labbeti Dec 13, 2025
0f155bd
mod: update workflow to test python 3.14.
Labbeti Dec 13, 2025
61fdae1
fix: typo in README.
Labbeti Dec 13, 2025
327fb03
add: SizedGenerator class.
Labbeti Dec 13, 2025
1c3ff86
add: executor_kwds option to ThreadPoolExecutorHelper.
Labbeti Dec 19, 2025
e9c9d92
mod: update ThreadPoolExecutorHelper init args.
Labbeti Dec 19, 2025
d7d6079
mod: update typing in SizedGenerator.
Labbeti Dec 19, 2025
4e1c20f
mod: update jsonl file to avoid importing json serialization functions.
Labbeti Dec 20, 2025
e836faf
fix: typing for older python version.
Labbeti Jan 1, 2026
e2c4b1f
mod: add Generator exception to avoid error in list_dict_to_dict_list…
Labbeti Jan 5, 2026
7fdee19
add: argument in now supports inputs arguments values to name the c…
Labbeti Jan 9, 2026
a01df46
mod: update typing for older python versions.
Labbeti Jan 9, 2026
2cb28fa
fix: link in doc page.
Labbeti Jan 9, 2026
4e48a72
mod: update version number for 0.4.4.
Labbeti Jan 9, 2026
6d9eb15
Merge branch 'main' into dev
Labbeti Jan 9, 2026
1796cb3
fix: docs build with newer sphinx versions.
Labbeti Jan 9, 2026
d7f0908
fix: try to fix docs build again with sphinx<9.
Labbeti Jan 9, 2026
b0faf66
mod: update version numbers for 0.4.5.
Labbeti Jan 9, 2026
43e7845
Merge branch 'main' into dev
Labbeti Jan 9, 2026
a304f51
mod: update lockfile.
Labbeti Jan 9, 2026
d30a7d9
add: can now be a custom callable formatter.
Labbeti Jan 9, 2026
88627c7
mod: update version numbers for 0.4.6.
Labbeti Jan 9, 2026
812c5df
Merge branch 'main' into dev
Labbeti Jan 9, 2026
12b5d25
add: docstring for Supports protocols.
Labbeti Jan 19, 2026
8d9b723
add: resolve_path option in checksum.
Labbeti Jan 19, 2026
055ad0b
add: Disk cache functions now detect saving backend when custom load/…
Labbeti Jan 28, 2026
6f5d38d
mod: revert default cache store mode to keep compatibility.
Labbeti Jan 29, 2026
e005960
mod: update pickle fns docstrings.
Labbeti Jan 29, 2026
880055c
mod: update error msg.
Labbeti Jan 29, 2026
473a941
fix: Callable in isinstance_generic check.
Labbeti Jan 29, 2026
be2109d
add: arguments aliases for safe-rmdir command.
Labbeti Jan 30, 2026
6f7db85
add: checksum_object alias.
Labbeti Jan 30, 2026
50bfe5e
mod: update version numbers for 0.4.7.
Labbeti Feb 1, 2026
855e505
mod: merge with main.
Labbeti Feb 1, 2026
459b71d
mod: update typing global imports.
Labbeti Feb 5, 2026
22b6852
mod: update CHANGELOG.
Labbeti Feb 5, 2026
b04497b
add/fix: add cache_fname_fmt_args option to select cache filename arg…
Labbeti Feb 5, 2026
aa058e2
mod: update docstring.
Labbeti Feb 5, 2026
1bf64a6
add: checksum_any now supports Enum instances.
Labbeti Feb 6, 2026
5aa247c
mod: update version numbers for 0.4.8.
Labbeti Feb 6, 2026
04f3852
Merge branch 'main' into dev
Labbeti Feb 6, 2026
78a961d
add: test enum checksum.
Labbeti Feb 6, 2026
b4c949a
fix: update Version comparisons to ignore buildmetadata.
Labbeti Feb 6, 2026
6058fcf
mod: update version numbers for 0.4.9.
Labbeti Feb 6, 2026
ce9081c
Merge branch 'main' into dev
Labbeti Feb 6, 2026
98f0b8e
fix: fn names in semver.
Labbeti Feb 6, 2026
9ca7ef3
fix: disk_cache custom args format values.
Labbeti Feb 9, 2026
62c4981
mod: update version numbers to 0.4.10.
Labbeti Feb 9, 2026
21058d8
Merge branch 'main' into dev
Labbeti Feb 9, 2026
e119425
mod: avoid checking type multiple times when saving to CSV.
Labbeti Feb 13, 2026
c54a4db
mod: update disk cache with new defaults.
Labbeti Mar 5, 2026
1b1d542
fix: unittest.
Labbeti Mar 5, 2026
2ef63bc
mod: update pre-commit.
Labbeti Mar 5, 2026
65872ff
mod: update numbers for 0.5.0.
Labbeti Mar 5, 2026
6ac8a16
Dev lazy loader (#17)
Labbeti Mar 5, 2026
41391dd
mod: merge with main.
Labbeti Mar 5, 2026
8fe059a
mod: update CHANGELOG.
Labbeti Mar 5, 2026
e606aad
mod: update checksum to integrate Mapping and Iterable objects.
Labbeti Mar 27, 2026
ba45f8f
add: datetime and date to checksums. Also update CHANGELOG.
Labbeti Mar 27, 2026
aad5d96
mod: disable Mapping and Iterable checksums.
Labbeti Mar 27, 2026
c7e3c7f
mod: format code.
Labbeti May 7, 2026
17590a6
add: argument by to sorted_dict function.
Labbeti May 7, 2026
c56eb49
add: time Ticker class.
Labbeti May 21, 2026
4d04a4b
add: SupportsIter protocol.
Labbeti Jun 13, 2026
e2d516e
mod: make lazy loader optional in lazy optional dep.
Labbeti Jun 19, 2026
b09397b
add: typing classes checks.
Labbeti Jun 19, 2026
2211f51
add: is_collection_alias, is_special_form, is_parameterized fns and s…
Labbeti Jun 19, 2026
834bfc3
mod: update astral setup in workflow.
Labbeti Jun 19, 2026
c5ff6d1
mod: update astral setup in workflow.
Labbeti Jun 19, 2026
4dc3e0d
mod: update checkout setup in workflow.
Labbeti Jun 19, 2026
f66925d
mod: update version to 0.5.1 and docs pages.
Labbeti Jun 19, 2026
8f6f103
Merge branch 'main' into dev
Labbeti Jun 19, 2026
53376a1
mod: delete lazy-loader from main deps.
Labbeti Jun 19, 2026
a03431b
add: Placeholder and requires_packages to global space.
Labbeti Jun 29, 2026
0e4f3f3
fix: as_builtin now support conversions of dataclasses attributes, wi…
Labbeti Jul 2, 2026
21fcba5
fix: as_builtin for python 3.14.
Labbeti Jul 2, 2026
ae10354
fix: imports and internal function.
Labbeti Jul 2, 2026
828adc7
mod: update CHANGELOG and README.
Labbeti Jul 2, 2026
89d7f73
del: duplicated internal function.
Labbeti Jul 2, 2026
4d4759c
fix: dataclass to builtin for python 3.14.
Labbeti Jul 2, 2026
94bc429
mod: update numbers for 0.5.2.
Labbeti Jul 2, 2026
582d8c2
Merge branch 'main' into dev
Labbeti Jul 2, 2026
e339427
fix: Ticker class in global context.
Labbeti Jul 6, 2026
efae9f8
mod: docstring for Ticker.
Labbeti Jul 6, 2026
5872c3d
add: pandas to dev deps.
Labbeti Jul 7, 2026
f890056
add: is_special_form and is_parametrized now supports objects with cu…
Labbeti Jul 7, 2026
9de4d88
mod: update CHANGELOG.
Labbeti Jul 7, 2026
e25d683
mod: move CSV, JSON, JSONL and PICKLE functions to new module.
Labbeti Jul 24, 2026
cc01368
mod: update docs script to support not defined locales and update new…
Labbeti Jul 24, 2026
db9aa5c
mod: update backward compat imports and add _fill_all_arguments option.
Labbeti Jul 24, 2026
1c19a19
mod: merge with typing checks.
Labbeti Jul 24, 2026
324aed0
fix: support for older python versions.
Labbeti Jul 24, 2026
f361d06
mod: update CI uv version.
Labbeti Jul 24, 2026
83fa7d7
mod: update CI uv version.
Labbeti Jul 24, 2026
296ddf9
add: parse_args_using_dataclass function to parse program arguments u…
Labbeti Jul 24, 2026
f44ef71
fix: Dataclass import.
Labbeti Jul 24, 2026
33dcf76
mod: udpate errors and remove exit_on_error.
Labbeti Jul 24, 2026
51ec673
fix: functions for python 3.8.
Labbeti Jul 24, 2026
2ac0abf
mod: import parse_args_using_dataclass and parse_args_using_dataclass…
Labbeti Jul 24, 2026
9797408
add/mod: add unittests for disk cache and set default key_mode to sam…
Labbeti Jul 24, 2026
5f4e8a5
mod: update numbers for 0.6.0.
Labbeti Jul 24, 2026
7f3b379
mod: merge with main.
Labbeti Jul 24, 2026
7aae36d
mod: update docs script.
Labbeti Jul 24, 2026
9d146d2
add: list_parsing option.
Labbeti Jul 24, 2026
c4a6be9
fix: brackets option for argparse.
Labbeti Jul 24, 2026
d42a843
add: pre_fn and post_fn fns to function_alias, deprecated_alias and d…
Labbeti Jul 24, 2026
e75ec74
mod: update argparse arg.
Labbeti Jul 24, 2026
ab20de7
mod: update typing and entrypoints.
Labbeti Jul 25, 2026
097d570
mod: add ModulePlacerholder, import_if_available and fix minor compat…
Labbeti Jul 25, 2026
b42a04e
mod: update numbers for 0.6.1.
Labbeti Jul 25, 2026
add9cda
mod: merge with main.
Labbeti Jul 25, 2026
325a76a
mod: merge with main.
Labbeti Jul 25, 2026
63ae98f
fix: typing for function_alias, deprecated_alias and deprecated_funct…
Labbeti Jul 25, 2026
234d87c
mod: update CHANGELOG and version numbers.
Labbeti Jul 25, 2026
bc1c25b
mod: update _setup_output_fpath defaults.
Labbeti Jul 25, 2026
18a2204
add: dataclassdict decorator.
Labbeti Jul 27, 2026
44e4948
add: add_dashed_arg option.
Labbeti Jul 27, 2026
d2069fd
add: add_dict_methods fn.
Labbeti Jul 27, 2026
881942e
mod: update CHANGELOG.
Labbeti Jul 28, 2026
af82a80
add: add_dataclass_fields_to_parser now supports mixed union and lite…
Labbeti Jul 29, 2026
9d8bb20
fix: exception checked in pytests.
Labbeti Jul 29, 2026
37dd3dd
fix: argparse conversion for python 3.14.
Labbeti Jul 29, 2026
6269a0a
mod: update numbers for 0.6.2.
Labbeti Jul 30, 2026
c0cdf9e
Merge branch 'main' into dev
Labbeti Jul 30, 2026
cf9b2cc
mod: replace build backend.
Labbeti Jul 30, 2026
fbdf871
mod: update tests optional extra deps for workflow.
Labbeti Jul 30, 2026
6baf6e8
mod: update tests extra deps.
Labbeti Jul 30, 2026
382d601
fix: update importlib unittests.
Labbeti Jul 30, 2026
050dd8a
mod: update readthedocs extras requirements.
Labbeti Jul 30, 2026
3393b68
del: docs/requirements file.
Labbeti Jul 30, 2026
150a878
mod: update workflow.
Labbeti Jul 30, 2026
e816933
mod: update lazy loader max version.
Labbeti Jul 30, 2026
d369bd5
mod: update lockfile.
Labbeti Jul 30, 2026
79387d5
mod: refactor argparse function to convert values.
Labbeti Aug 4, 2026
672f001
add: Enum, Path, and add register_parser_fn decorator.
Labbeti Aug 4, 2026
c699b8f
mod: update CHANGELOG.
Labbeti Aug 4, 2026
fe2c904
del: remove unused variable.
Labbeti Aug 4, 2026
5f1d667
fix: parse fn typing.
Labbeti Aug 4, 2026
d3f65a8
add: support for parametrized Callable in isinstance_generic fn.
Labbeti Aug 4, 2026
26efce7
mod: update docs pages.
Labbeti Aug 4, 2026
68b2fe9
mod: update CHANGELOG.
Labbeti Aug 4, 2026
838bb13
add: docstrings for all fns.
Labbeti Aug 4, 2026
b35b25e
mod: update numbers to 0.6.3.
Labbeti Aug 4, 2026
e877200
mod: update typing.
Labbeti Aug 4, 2026
a2cc0ad
add: option value 'search' and 'match' for RE fns.
Labbeti Aug 5, 2026
00684b5
mod: update types for hasher.
Labbeti Aug 5, 2026
067934e
mod: update release date for 0.6.3.
Labbeti Aug 5, 2026
5138d35
Merge branch 'main' into dev
Labbeti Aug 5, 2026
87ea947
mod: update types to cleanup code.
Labbeti Aug 7, 2026
c2f80fe
mod: update parse_args_using_dataclass to handle multiple dataclass a…
Labbeti Aug 8, 2026
5244b34
mod: update checksum fns.
Labbeti Aug 8, 2026
f5c5d28
mod: update checksums fns.
Labbeti Aug 8, 2026
65d5bc7
fix: match name typing.
Labbeti Aug 15, 2026
7a364d6
mod: update CHANGELOG and prepare bool action arg.
Labbeti Aug 16, 2026
933356a
add: bool_action option to store boolean values differently.
Labbeti Aug 16, 2026
42b190e
mod: update numbers for 0.6.4, without release date.
Labbeti Aug 16, 2026
d0e39d8
fix: type import for python 3.8.
Labbeti Aug 16, 2026
5f9ec8c
mod: update release date for 0.6.4.
Labbeti Aug 17, 2026
7b0150f
mod: update workflow with automatic release.
Labbeti Aug 17, 2026
f4abfda
mod: update format.
Labbeti Aug 18, 2026
ef7cf2d
add: return_single_namespace option for parse_args_using_dataclass.
Labbeti Aug 18, 2026
743c77a
add: context manager for Ticker class.
Labbeti Aug 19, 2026
29bc95d
mod: allow argument stream to be None to just set formatter without a…
Labbeti Aug 19, 2026
8cc97ec
add: root logger streams for setup logging functions.
Labbeti Aug 19, 2026
4c9f229
fix: update isinstance check in setup logging.
Labbeti Aug 19, 2026
8a3c63f
mod: update numbers for 0.6.5.
Labbeti Aug 19, 2026
2a66685
mod: update release date for 0.6.5.
Labbeti Aug 20, 2026
375762b
Merge branch 'main' into dev
Labbeti Aug 20, 2026
e85a3ed
Merge branch 'main' into dev
Labbeti Aug 20, 2026
5f6886c
fix: isinstance check in setup_logging_level.
Labbeti Aug 20, 2026
e4ca63d
mod: update version for 0.6.6.
Labbeti Aug 20, 2026
71c015a
add: unittest for parse list.
Labbeti Aug 20, 2026
8368ada
add: on_error and default arguments to load_json, load_pickle, load_j…
Labbeti Aug 28, 2026
1dab09e
fix: update serialization dumps when overwrite is False.
Labbeti Sep 2, 2026
811199a
add: posonly_for_required argument for parse_args_using_dataclass fn.
Labbeti Sep 4, 2026
65ea9c3
fix: setup_logging_level when stderr is not set in root logger.
Labbeti Sep 7, 2026
ab21aec
mod: update CHANGELOG.
Labbeti Sep 7, 2026
fa5da9f
mod: update version numbers.
Labbeti Sep 7, 2026
18f99bd
Merge branch 'main' into dev
Labbeti Sep 7, 2026
60b8442
Merge branch 'main' into dev
Labbeti Sep 7, 2026
eb02be9
add: remove_children fn.
Labbeti Oct 16, 2026
aca246b
add: use_tqdm option in remove_children.
Labbeti Oct 16, 2026
cec4e8a
mod: minor code format.
Labbeti Oct 16, 2026
9ca1504
mod: comment to specify why alias has not been used.
Labbeti Oct 20, 2026
2b597a5
add: Version is now converted to str by default by cast.
Labbeti Oct 20, 2026
36c2505
add: filter_dict_with_patterns fn.
Labbeti Oct 20, 2026
cb44b3f
add: workspace file for vscode.
Labbeti Oct 21, 2026
d9b30af
mod: update unitest.
Labbeti Oct 23, 2026
e2274aa
mod: working on future annotations support.
Labbeti Oct 23, 2026
27cb927
add: update isinstance_generic alias, object check, and explicit exce…
Labbeti Oct 23, 2026
27b2ad1
mod: update CHANGELOG.
Labbeti Oct 23, 2026
16e3675
Add subparsers impl for nested dataclasses in auto argparse (#29)
Labbeti Oct 26, 2026
2d309a2
mod: update CHANGELOG and version number, without date.
Labbeti Oct 26, 2026
8fd0053
mod: update release date.
Labbeti Oct 26, 2026
8613491
Merge branch 'main' into dev
Labbeti Oct 26, 2026
918ad4c
add: on_error now support 'return_default' value.
Labbeti Oct 27, 2026
82ee986
add: hash_bytes, hash_bytes_buffer, hash_str fns.
Labbeti Oct 27, 2026
dce3511
mod: update workflow for python 3.15.
Labbeti Oct 27, 2026
8899b0f
mod: update CHANGELOG.
Labbeti Oct 27, 2026
aed68ed
add: allow python 3.15 in pyproject.
Labbeti Oct 27, 2026
15ebaa8
fix: remove debug code in core.
Labbeti Oct 27, 2026
a5b8d76
mod: update ruff version for dev.
Labbeti Oct 27, 2026
c05ad92
mod: pin ruff version to 0.16.10.
Labbeti Oct 27, 2026
729a5cb
mod: clean code by apply ruff 0.16.10 format and check.
Labbeti Oct 27, 2026
9ba1699
fix: typing in Version.
Labbeti Oct 27, 2026
8f812ab
mod: update CHANGELOG.
Labbeti Oct 27, 2026
b4e8137
mod: update dataclass compat with argparse to support entrypoints args.
Labbeti Oct 28, 2026
64e5425
fix: kw_only usage for older python versions in add_dataclass_fields_…
Labbeti Oct 28, 2026
81caa98
fix: default value for parser.
Labbeti Oct 30, 2026
1ef7997
add: key arg in filter_iter_with_patterns.
Labbeti Nov 6, 2026
cd797ee
mod: merge with remote.
Labbeti Nov 8, 2026
0f8cf6e
mod: minor code format update.
Labbeti Nov 8, 2026
5b275f8
mod: format code.
Labbeti Nov 17, 2026
c426367
add: module_fallback option to import_if_available fn.
Labbeti Nov 17, 2026
f84ee35
add: serialisation functions for YAML files when pyyaml is installed.
Labbeti Nov 18, 2026
d2c5da0
mod: update doc pages.
Labbeti Nov 18, 2026
9658688
mod: yaml_is_available in info.
Labbeti Nov 18, 2026
0d71aa2
fix: dumps_yaml and save_yaml fns.
Labbeti Nov 18, 2026
6dedd7f
mod: update dataclassdict args to manage dataclass.
Labbeti Nov 18, 2026
9c1d518
fix: dataclassdict for older python versions.
Labbeti Nov 18, 2026
b396089
fix: dataclassdict for older python versions again.
Labbeti Nov 18, 2026
4101ac6
add: support for type alias type in isinstance_generic.
Labbeti Nov 21, 2026
3550642
add: note about exec use in unittest.
Labbeti Nov 21, 2026
efebb5b
add: strict option in Version to support minor and patch missing args.
Labbeti Nov 21, 2026
5e5a638
mod: update tests for yaml fns.
Labbeti Nov 21, 2026
26815b9
mod: update numbers for 0.6.9.
Labbeti Nov 21, 2026
0a8ec53
fix: UnionType check in isinstance_generic for older python versions.
Labbeti Nov 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
include:
- os: windows-2022
python-version: "3.8"
- os: windows-latest
python-version: "3.14"
python-version: "3.15"
- os: macos-15
python-version: "3.8"
- os: macos-latest
python-version: "3.14"
python-version: "3.15"

steps:
# --- INSTALLATIONS ---
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
args: ['--fix=no']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.9
rev: v0.16.10
hooks:
- id: ruff
types_or: [python, pyi]
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to this project will be documented in this file.

## [0.6.9] 2026-11-21
### Added
- Support Python 3.15.
- `hash_str`, `hash_bytes` and `hash_bytes_buffer` functions.
- Function `parse_args_using_dataclass` now supports metadata doc options.
- `key` arg in `filter_iter_with_patterns`.
- Serialisation function for YAML files.
- `on_exists` option for serialization fns.
- `module_fallback` option to `import_if_available` fn.
- support for TypeAliasType in `isinstance_generic`.

### Modified
- Update code format with ruff 0.16.10.
- Add check for `field.kw_only` with positional argument.

### Fixed
- Option value `posonly_for_required=True` in `parse_args_using_dataclass`.


## [0.6.8] 2026-10-26
### Added
- `remove_children` function to remove all content of a directory.
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ keywords:
- tools
- utilities
license: MIT
version: 0.6.8
date-released: '2026-10-26'
version: 0.6.9
date-released: '2026-11-21'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ With pip:
pip install pythonwrench
```

This library has been tested on all Python versions **3.8 - 3.14**, requires only `typing_extensions>=4.10.0`, and runs on **Linux, Mac and Windows** systems.
This library has been tested on all Python versions **3.8 - 3.15**, requires only `typing_extensions>=4.10.0`, and runs on **Linux, Mac and Windows** systems.

## Examples

Expand Down
8 changes: 8 additions & 0 deletions docs/pythonwrench.serialization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ pythonwrench.serialization package
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

pythonwrench.serialization.yaml

Submodules
----------

Expand Down
7 changes: 7 additions & 0 deletions docs/pythonwrench.serialization.yaml.definitions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pythonwrench.serialization.yaml.definitions module
==================================================

.. automodule:: pythonwrench.serialization.yaml.definitions
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/pythonwrench.serialization.yaml.func.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pythonwrench.serialization.yaml.func module
===========================================

.. automodule:: pythonwrench.serialization.yaml.func
:members:
:undoc-members:
:show-inheritance:
16 changes: 16 additions & 0 deletions docs/pythonwrench.serialization.yaml.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pythonwrench.serialization.yaml package
=======================================

.. automodule:: pythonwrench.serialization.yaml
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4

pythonwrench.serialization.yaml.definitions
pythonwrench.serialization.yaml.func
29 changes: 22 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = [
]
description = "Python library with tools for typing, manipulating collections, and more!"
readme = "README.md"
requires-python = ">=3.8,<3.15"
requires-python = ">=3.8,<3.16"
keywords = ["python", "tools", "utilities"]
license = {file = "LICENSE"}
# license-files = ["LICENSE"] # unsupported by python 3.8, but will be required in 2026
Expand All @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Scientific/Engineering",
"Operating System :: OS Independent",
"Operating System :: MacOS :: MacOS X",
Expand Down Expand Up @@ -67,13 +68,16 @@ docs = [
"sphinx-immaterial>=0.11.14",
]
tests = [
"ruff~=0.14.9",
"ruff==0.16.10",
"coverage[toml]>=7.6.1",
"pytest>=8.3.5",
]
lazy = [
"lazy-loader>=0.4,<1",
]
yaml = [
"pyyaml>=6.0.3",
]

[tool.pyright]
include = ["src"]
Expand All @@ -86,11 +90,6 @@ testpaths = ["tests"]
[tool.coverage.run]
source = ["src"]

[tool.ruff.lint.extend-per-file-ignores]
# F401: module imported but unused
# F403: ‘from module import *’ used; unable to detect undefined names
"__init__.py" = ["F401", "F403"]

[tool.uv.sources]
pythonwrench = { workspace = true }

Expand All @@ -109,3 +108,19 @@ packages = ["src/pythonwrench"]

[tool.hatch.version]
path = "src/pythonwrench/__init__.py"

[tool.ruff]
# In addition to the standard set of exclusions, omit all tests, plus a specific file.
extend-exclude = ["notebooks/**.ipynb"]

[tool.ruff.lint.per-file-ignores]
# F401 : unused imports
# E402 : module import not at top of file
# UP009 : remove unnecessary utf-8 coding
# EXE001 : specify sheshang but file is not executable
# PYI061 : replace Literal[None, ...] by Literal[...] | None
# FA100 : Add `from __future__ import annotations` to simplify `typing.Dict`
# PLC0105: `TypeVar` name "T_BuiltinScalar" does not reflect its covariance; consider renaming it to "T_BuiltinScalar_co"
"__init__.py" = ["F401"]
"notebooks/**.ipynb" = ["E402"]
"*.py" = ["UP009", "EXE001", "PYI061", "FA100", "PLC0105"]
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

Expand Down
19 changes: 15 additions & 4 deletions src/pythonwrench/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Python library with tools for typing, manipulating collections, and more!"""

Expand All @@ -9,7 +8,7 @@
__license__ = "MIT"
__maintainer__ = "Étienne Labbé (Labbeti)"
__status__ = "Development"
__version__ = "0.6.8"
__version__ = "0.6.9"


from typing import TYPE_CHECKING
Expand Down Expand Up @@ -127,7 +126,7 @@
identity,
repeat_fn,
)
from .hashlib import hash_file
from .hashlib import hash_bytes, hash_bytes_buffer, hash_file, hash_str
from .importlib import (
ModulePlaceholder,
Placeholder,
Expand Down Expand Up @@ -177,26 +176,32 @@
dump_json,
dump_jsonl,
dump_pickle,
dump_yaml,
dumps_csv,
dumps_json,
dumps_jsonl,
dumps_pickle,
dumps_yaml,
load_csv,
load_json,
load_jsonl,
load_pickle,
load_yaml,
loads_csv,
loads_json,
loads_jsonl,
loads_pickle,
loads_yaml,
read_csv,
read_json,
read_jsonl,
read_pickle,
read_yaml,
save_csv,
save_json,
save_jsonl,
save_pickle,
save_yaml,
)
from .time import Ticker
from .typing import (
Expand Down Expand Up @@ -373,6 +378,12 @@
"save_json",
"save_jsonl",
"save_pickle",
"dump_yaml",
"dumps_yaml",
"load_yaml",
"loads_yaml",
"read_yaml",
"save_yaml",
],
"dataclasses": ["add_dict_methods", "dataclassdict", "get_defaults_values"],
"datetime": ["get_now", "get_now_iso8601"],
Expand All @@ -387,7 +398,7 @@
"identity",
"repeat_fn",
],
"hashlib": ["hash_file"],
"hashlib": ["hash_file", "hash_bytes", "hash_bytes_buffer", "hash_str"],
"importlib": [
"import_if_available",
"ModulePlaceholder",
Expand Down
1 change: 0 additions & 1 deletion src/pythonwrench/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from .entrypoints.info import main_info

Expand Down
20 changes: 7 additions & 13 deletions src/pythonwrench/_core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import warnings
from functools import lru_cache, partial, wraps
Expand Down Expand Up @@ -42,7 +41,7 @@ def __call__(self, /, x: T_PredicateArg) -> bool:

def return_none(*args, **kwargs) -> None:
"""Return None function placeholder."""
return None
return


def function_alias(
Expand Down Expand Up @@ -162,18 +161,17 @@ def apply(
unk_mode: UnkMode = "error",
**kwargs,
) -> T_Output:
"""Perform the apply operation."""
def wrapped_isinstance(x: Any, target_cls_or_tuple: Any) -> bool:
return isinstance_fn(x, target_cls_or_tuple)

for fn, (class_or_tuple, custom_predicate, _) in self.fns.items():
if custom_predicate is not None:
predicate = custom_predicate

elif class_or_tuple is not None:

def target_isinstance_fn_wrap(x: Any) -> bool:
"""Perform the target isinstance fn wrap operation."""
return isinstance_fn(x, class_or_tuple) # type: ignore

predicate = target_isinstance_fn_wrap
predicate = partial(
wrapped_isinstance, target_cls_or_tuple=class_or_tuple
)
else:
msg = f"Invalid function registered. (found {class_or_tuple=} and {custom_predicate=})"
raise TypeError(msg)
Expand Down Expand Up @@ -229,7 +227,6 @@ def warn_once(
source: Any = None,
) -> None:
"""Warn message once using warnings module."""
...


@overload
Expand All @@ -240,7 +237,6 @@ def warn_once(
source: Any = None,
) -> None:
"""Warn message once using warnings module."""
...


@lru_cache(maxsize=None)
Expand Down Expand Up @@ -285,7 +281,6 @@ def deprecated_function(
warn_fn: Callable[[str], Any] = partial(warn_once, category=DeprecationWarning),
) -> Callable[[T_Function], T_Function]:
"""Perform the deprecated function operation."""
...


@overload
Expand All @@ -297,7 +292,6 @@ def deprecated_function(
warn_fn: Callable[[str], Any] = partial(warn_once, category=DeprecationWarning),
) -> T_Function:
"""Perform the deprecated function operation."""
...


def deprecated_function(
Expand Down
1 change: 0 additions & 1 deletion src/pythonwrench/abc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from typing import Any, ClassVar, Dict, Type

Expand Down
1 change: 0 additions & 1 deletion src/pythonwrench/argparse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from typing import TYPE_CHECKING

Expand Down
Loading
Loading