pythonwrench 0.6.5__tar.gz → 0.6.6__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 (131) hide show
  1. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/CHANGELOG.md +4 -0
  2. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/CITATION.cff +1 -1
  3. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/PKG-INFO +1 -1
  4. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/__init__.py +1 -1
  5. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/logging.py +4 -3
  6. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_typing.py +15 -0
  7. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/.github/workflows/test.yaml +0 -0
  8. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/.gitignore +0 -0
  9. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/.pre-commit-config.yaml +0 -0
  10. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/.readthedocs.yaml +0 -0
  11. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/LICENSE +0 -0
  12. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/README.md +0 -0
  13. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/Makefile +0 -0
  14. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/conf.py +0 -0
  15. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/index.rst +0 -0
  16. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/make.bat +0 -0
  17. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/modules.rst +0 -0
  18. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.abc.rst +0 -0
  19. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.argparse.dataclass_.rst +0 -0
  20. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.argparse.parsers.rst +0 -0
  21. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.argparse.rst +0 -0
  22. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.cast.rst +0 -0
  23. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.checksum.rst +0 -0
  24. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.collections.collections.rst +0 -0
  25. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.collections.prop.rst +0 -0
  26. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.collections.reducers.rst +0 -0
  27. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.collections.rst +0 -0
  28. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.concurrent.rst +0 -0
  29. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.csv.rst +0 -0
  30. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.dataclasses.rst +0 -0
  31. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.datetime.rst +0 -0
  32. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.difflib.rst +0 -0
  33. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.disk_cache.rst +0 -0
  34. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.enum.rst +0 -0
  35. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.functools.rst +0 -0
  36. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.hashlib.rst +0 -0
  37. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.importlib.rst +0 -0
  38. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.inspect.rst +0 -0
  39. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.json.rst +0 -0
  40. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.jsonl.rst +0 -0
  41. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.logging.rst +0 -0
  42. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.math.rst +0 -0
  43. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.os.rst +0 -0
  44. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.pickle.rst +0 -0
  45. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.random.rst +0 -0
  46. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.re.rst +0 -0
  47. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.rst +0 -0
  48. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.semver.rst +0 -0
  49. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.serialization.csv.rst +0 -0
  50. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.serialization.json.rst +0 -0
  51. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.serialization.jsonl.rst +0 -0
  52. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.serialization.pickle.rst +0 -0
  53. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.serialization.rst +0 -0
  54. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.time.rst +0 -0
  55. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.typing.checks.rst +0 -0
  56. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.typing.classes.rst +0 -0
  57. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.typing.rst +0 -0
  58. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/pythonwrench.warnings.rst +0 -0
  59. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/docs/update.bash +0 -0
  60. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/pyproject.toml +0 -0
  61. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/setup.py +0 -0
  62. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/__main__.py +0 -0
  63. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/_core.py +0 -0
  64. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/abc.py +0 -0
  65. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/argparse/__init__.py +0 -0
  66. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/argparse/dataclass_.py +0 -0
  67. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/argparse/parsers.py +0 -0
  68. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/cast.py +0 -0
  69. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/checksum.py +0 -0
  70. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/collections/__init__.py +0 -0
  71. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/collections/collections.py +0 -0
  72. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/collections/prop.py +0 -0
  73. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/collections/reducers.py +0 -0
  74. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/concurrent.py +0 -0
  75. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/csv.py +0 -0
  76. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/dataclasses.py +0 -0
  77. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/datetime.py +0 -0
  78. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/difflib.py +0 -0
  79. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/disk_cache.py +0 -0
  80. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/entrypoints/info.py +0 -0
  81. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/entrypoints/safe_rmdir.py +0 -0
  82. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/entrypoints/tree.py +0 -0
  83. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/enum.py +0 -0
  84. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/functools.py +0 -0
  85. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/hashlib.py +0 -0
  86. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/importlib.py +0 -0
  87. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/inspect.py +0 -0
  88. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/json.py +0 -0
  89. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/jsonl.py +0 -0
  90. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/math.py +0 -0
  91. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/os.py +0 -0
  92. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/pickle.py +0 -0
  93. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/random.py +0 -0
  94. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/re.py +0 -0
  95. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/semver.py +0 -0
  96. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/serialization/__init__.py +0 -0
  97. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/serialization/_core.py +0 -0
  98. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/serialization/csv.py +0 -0
  99. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/serialization/json.py +0 -0
  100. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/serialization/jsonl.py +0 -0
  101. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/serialization/pickle.py +0 -0
  102. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/time.py +0 -0
  103. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/typing/__init__.py +0 -0
  104. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/typing/checks.py +0 -0
  105. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/typing/classes.py +0 -0
  106. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/src/pythonwrench/warnings.py +0 -0
  107. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_abc.py +0 -0
  108. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_argparse.py +0 -0
  109. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_cast.py +0 -0
  110. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_checksum.py +0 -0
  111. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_collections.py +0 -0
  112. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_core.py +0 -0
  113. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_csv.py +0 -0
  114. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_dataclasses.py +0 -0
  115. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_difflib.py +0 -0
  116. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_disk_cache.py +0 -0
  117. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_entrypoints.py +0 -0
  118. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_enum.py +0 -0
  119. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_functools.py +0 -0
  120. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_hashlib.py +0 -0
  121. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_importlib.py +0 -0
  122. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_inspect.py +0 -0
  123. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_json.py +0 -0
  124. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_jsonl.py +0 -0
  125. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_logging.py +0 -0
  126. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_math.py +0 -0
  127. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_os.py +0 -0
  128. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_random.py +0 -0
  129. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_readme.py +0 -0
  130. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/tests/test_semver.py +0 -0
  131. {pythonwrench-0.6.5 → pythonwrench-0.6.6}/uv.lock +0 -0
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.6.6] 2026-08-20
6
+ ### Fixed
7
+ - `setup_logging_level` isinstance check.
8
+
5
9
  ## [0.6.5] 2026-08-20
6
10
  ### Added
7
11
  - `return_single_namespace` option for `parse_args_using_dataclass` function.
@@ -17,5 +17,5 @@ keywords:
17
17
  - tools
18
18
  - utilities
19
19
  license: MIT
20
- version: 0.6.5
20
+ version: 0.6.6
21
21
  date-released: '2026-08-20'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pythonwrench
3
- Version: 0.6.5
3
+ Version: 0.6.6
4
4
  Summary: Python library with tools for typing, manipulating collections, and more!
5
5
  Project-URL: Homepage, https://pypi.org/project/pythonwrench/
6
6
  Project-URL: Documentation, https://pythonwrench.readthedocs.io/
@@ -9,7 +9,7 @@ __author_email__ = "labbeti.pub@gmail.com"
9
9
  __license__ = "MIT"
10
10
  __maintainer__ = "Étienne Labbé (Labbeti)"
11
11
  __status__ = "Development"
12
- __version__ = "0.6.5"
12
+ __version__ = "0.6.6"
13
13
 
14
14
 
15
15
  from typing import TYPE_CHECKING
@@ -5,10 +5,11 @@ import inspect
5
5
  import logging
6
6
  import sys
7
7
  from functools import lru_cache
8
+ from io import TextIOBase
8
9
  from logging import FileHandler, Formatter, Logger, StreamHandler
9
10
  from pathlib import Path
10
11
  from types import ModuleType
11
- from typing import IO, Iterable, List, Literal, Optional, TypeVar, Union
12
+ from typing import IO, Iterable, List, Literal, Optional, TextIO, TypeVar, Union
12
13
 
13
14
  from typing_extensions import TypeAlias
14
15
 
@@ -117,11 +118,11 @@ def setup_logging_level(
117
118
  for handler in logging.getLogger().handlers
118
119
  if isinstance(handler, StreamHandler)
119
120
  ]
120
- elif isinstance(stream, IO):
121
+ elif isinstance(stream, (TextIOBase, TextIO)):
121
122
  streams = [stream]
122
123
  elif stream is None:
123
124
  streams = stream
124
- elif isinstance_generic(stream, Iterable[IO]):
125
+ elif isinstance_generic(stream, Iterable[Union[TextIOBase, TextIO]]):
125
126
  streams = list(stream)
126
127
  else:
127
128
  raise TypeError(f"Invalid argument type {type(stream)=}.")
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
+ import logging
4
5
  import unittest
5
6
  from dataclasses import dataclass
7
+ from io import TextIOBase
8
+ from logging import StreamHandler
6
9
  from numbers import Number
7
10
  from pathlib import Path
8
11
  from typing import (
@@ -331,6 +334,18 @@ class TestIsInstanceGuard(TestCase):
331
334
  assert isinstance_generic([], List[int], check_only_first=True)
332
335
  assert isinstance_generic([1, 2], List, check_only_first=True)
333
336
 
337
+ def test_io_check(self) -> None:
338
+ assert isinstance_generic([], Iterable[TextIOBase])
339
+ assert not isinstance_generic([1], Iterable[TextIOBase])
340
+
341
+ logger = logging.getLogger()
342
+ streams = [
343
+ handler.stream
344
+ for handler in logger.handlers
345
+ if isinstance(handler, StreamHandler)
346
+ ]
347
+ assert isinstance_generic(streams, Iterable[TextIOBase])
348
+
334
349
 
335
350
  class TestCheckArgsType(TestCase):
336
351
  def test_example_1(self) -> None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes