zstdlib 0.10.11__tar.gz → 0.10.12__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. {zstdlib-0.10.11 → zstdlib-0.10.12}/PKG-INFO +1 -1
  2. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/__init__.py +1 -1
  3. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/hybridmethod.py +5 -2
  4. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib.egg-info/PKG-INFO +1 -1
  5. {zstdlib-0.10.11 → zstdlib-0.10.12}/LICENSE +0 -0
  6. {zstdlib-0.10.11 → zstdlib-0.10.12}/README.md +0 -0
  7. {zstdlib-0.10.11 → zstdlib-0.10.12}/pyproject.toml +0 -0
  8. {zstdlib-0.10.11 → zstdlib-0.10.12}/setup.cfg +0 -0
  9. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/__init__.py +0 -0
  10. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/log/__init__.py +0 -0
  11. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/log/base.py +0 -0
  12. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/log/test_cute.py +0 -0
  13. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/log/test_trace.py +0 -0
  14. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_ansi.py +0 -0
  15. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_enum.py +0 -0
  16. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_exc_capture.py +0 -0
  17. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_frozen.py +0 -0
  18. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_hybridmethod.py +0 -0
  19. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_io.py +0 -0
  20. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_ip_lock.py +0 -0
  21. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_keyed_instance.py +0 -0
  22. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_lazy.py +0 -0
  23. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_not_set.py +0 -0
  24. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_prompt.py +0 -0
  25. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_singleton.py +0 -0
  26. {zstdlib-0.10.11 → zstdlib-0.10.12}/tests/test_util.py +0 -0
  27. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/ansi.py +0 -0
  28. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/enum.py +0 -0
  29. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/exc_capture.py +0 -0
  30. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/frozen.py +0 -0
  31. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/io.py +0 -0
  32. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/ip_lock.py +0 -0
  33. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/keyed_instance.py +0 -0
  34. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/lazy.py +0 -0
  35. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/log/__init__.py +0 -0
  36. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/log/cute.py +0 -0
  37. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/log/trace.py +0 -0
  38. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/macos.py +0 -0
  39. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/not_set.py +0 -0
  40. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/prompt.py +0 -0
  41. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/py.typed +0 -0
  42. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/signal_cm.py +0 -0
  43. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/singleton.py +0 -0
  44. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib/util.py +0 -0
  45. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib.egg-info/SOURCES.txt +0 -0
  46. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib.egg-info/dependency_links.txt +0 -0
  47. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib.egg-info/requires.txt +0 -0
  48. {zstdlib-0.10.11 → zstdlib-0.10.12}/zstdlib.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zstdlib
3
- Version: 0.10.11
3
+ Version: 0.10.12
4
4
  Summary: A set of useful python utilities
5
5
  License-Expression: GPL-3.0-only
6
6
  Project-URL: Homepage, https://github.com/zwimer/zstdlib
@@ -1,4 +1,4 @@
1
- __version__ = "0.10.11"
1
+ __version__ = "0.10.12"
2
2
 
3
3
  from .prompt import prompt_until, prompt_for, yn_prompt
4
4
  from .ip_lock import GlobalIPLock, IPLock, RIPLock
@@ -1,5 +1,6 @@
1
1
  from typing import Concatenate, overload
2
2
  from collections.abc import Callable
3
+ from functools import wraps
3
4
 
4
5
  __all__ = ("hybridmethod",)
5
6
 
@@ -12,13 +13,14 @@ class hybridmethod[T, R, **P]: # Name aligns with @staticmethod and such
12
13
  A member function decorator that combines an instances bound function and @classmethod
13
14
  If a member function uses @hybridmethod then it may use the signature:
14
15
  @hybridmethod
15
- def f(self: Self | None, cls: type[Self], ...)
16
+ def f(self: Foo | None, cls: type[Foo], ...)
16
17
  This could be used to implement functions such as:
17
- def history(self: Self | None, cls: type[Self], *, id: int | None = None): ...
18
+ def history(self: Foo | None, cls: type[Foo], *, id: int | None = None): ...
18
19
  ...
19
20
  A.history(id=a.id)
20
21
  A.history(id=0)
21
22
  a.history()
23
+ Note that using Self is the type signature is invalid, just as it is with @classmethod
22
24
  """
23
25
 
24
26
  __slots__ = ("_fn",)
@@ -39,6 +41,7 @@ class hybridmethod[T, R, **P]: # Name aligns with @staticmethod and such
39
41
  owner = type(instance)
40
42
 
41
43
  # functools.partial doesn't preserve typing as we need it to :/
44
+ @wraps(self._fn)
42
45
  def ret(*args: P.args, **kwargs: P.kwargs) -> R:
43
46
  return self._fn(instance, owner, *args, **kwargs)
44
47
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zstdlib
3
- Version: 0.10.11
3
+ Version: 0.10.12
4
4
  Summary: A set of useful python utilities
5
5
  License-Expression: GPL-3.0-only
6
6
  Project-URL: Homepage, https://github.com/zwimer/zstdlib
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes