mm-std 0.1.8__py3-none-any.whl → 0.1.9__py3-none-any.whl

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.
mm_std/concurrency.py CHANGED
@@ -8,7 +8,6 @@ from dataclasses import dataclass, field
8
8
  from datetime import datetime
9
9
  from logging import Logger
10
10
  from threading import Lock, Thread
11
- from typing import ParamSpec, TypeVar
12
11
 
13
12
  from .date import is_too_old, utc_now
14
13
 
@@ -57,11 +56,7 @@ class ConcurrentTasks:
57
56
  self.timeout_error = True
58
57
 
59
58
 
60
- T = TypeVar("T")
61
- P = ParamSpec("P")
62
-
63
-
64
- def synchronized_parameter(arg_index: int = 0, skip_if_locked: bool = False) -> Callable[..., Callable[P, T | None]]:
59
+ def synchronized_parameter[T, **P](arg_index: int = 0, skip_if_locked: bool = False) -> Callable[..., Callable[P, T | None]]:
65
60
  locks: dict[object, Lock] = defaultdict(Lock)
66
61
 
67
62
  def outer(func: Callable[P, T]) -> Callable[P, T | None]:
@@ -81,7 +76,7 @@ def synchronized_parameter(arg_index: int = 0, skip_if_locked: bool = False) ->
81
76
  return outer
82
77
 
83
78
 
84
- def synchronized(fn: Callable[P, T]) -> Callable[P, T]:
79
+ def synchronized[T, **P](fn: Callable[P, T]) -> Callable[P, T]:
85
80
  lock = Lock()
86
81
 
87
82
  @functools.wraps(fn)
mm_std/date.py CHANGED
@@ -52,10 +52,6 @@ def parse_date(value: str, ignore_tz: bool = False) -> datetime:
52
52
  raise ValueError(f"Time data '{value}' does not match any known format.")
53
53
 
54
54
 
55
- # def parse_date(value: str, ignore_tz: bool = False) -> datetime:
56
- # return parser.parse(value, ignoretz=ignore_tz)
57
-
58
-
59
55
  def utc_random(
60
56
  *,
61
57
  from_time: datetime | None = None,
mm_std/net.py CHANGED
@@ -11,9 +11,9 @@ import pydash
11
11
 
12
12
  from mm_std.result import Err, Ok, Result
13
13
 
14
- FIREFOX_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0"
15
- SAFARI_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15" # fmt: skip # noqa
16
- CHROME_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" # fmt: skip # noqa
14
+ FIREFOX_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0"
15
+ SAFARI_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Safari/605.1.15" # fmt: skip # noqa
16
+ CHROME_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" # fmt: skip # noqa
17
17
 
18
18
 
19
19
  @dataclass
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: mm-std
3
+ Version: 0.1.9
4
+ Requires-Python: >=3.12
5
+ Requires-Dist: cryptography~=44.0.0
6
+ Requires-Dist: httpx[http2,socks]~=0.28.1
7
+ Requires-Dist: pydantic~=2.10.4
8
+ Requires-Dist: pydash~=8.0.4
9
+ Requires-Dist: python-dotenv~=1.0.1
10
+ Requires-Dist: pyyaml~=6.0.2
11
+ Requires-Dist: rich~=13.9.4
@@ -1,15 +1,15 @@
1
1
  mm_std/__init__.py,sha256=4pa6AjO-0mfrfBi6FS5sqOk1HFAKt2OMovA12ys7UvQ,2288
2
2
  mm_std/command.py,sha256=r1n9ZHyMFhNkNOH9grRCm5J0hhX4_v0c2wdaal8iCZY,1270
3
- mm_std/concurrency.py,sha256=SZGSTlswpFRZwsI7ztFWYca1XOPToLe0oBNJBZlSlgo,5311
3
+ mm_std/concurrency.py,sha256=-Asx1Xl6aFf7xLz_UF6KgwY8oUR904S4-NEXIyVo_lA,5251
4
4
  mm_std/config.py,sha256=Wo_VS6MO1vTZosOHv97mCo41YYGKZaRAeergaSVzUcs,3111
5
5
  mm_std/crypto.py,sha256=jdk0_TCmeU0pPXMyz9xH6kQHSjjZ9GcGClBwQps5vBo,340
6
- mm_std/date.py,sha256=dhlBE8dTzPe0Qhu5f6YMeR5ka5k2B0IoMe8VA7_-pII,1969
6
+ mm_std/date.py,sha256=Bf63vyACsIIXe2E2Gzhvaw4RZRzP3522Aslk1lHtXQ4,1847
7
7
  mm_std/dict.py,sha256=kJBPVG9vEqHiSgKKoji8gVGL1yEBbxAmFNn0zz17AUg,180
8
8
  mm_std/env.py,sha256=5zaR9VeIfObN-4yfgxoFeU5IM1GDeZZj9SuYf7t9sOA,125
9
9
  mm_std/fs.py,sha256=RwarNRJq3tIMG6LVX_g03hasfYpjYFh_O27oVDt5IPQ,291
10
10
  mm_std/json_.py,sha256=12uGLwmnrRA63QI0nUx-UU33zXcyShbsKCoOQiIJ8io,1016
11
11
  mm_std/log.py,sha256=6ux6njNKc_ZCQlvWn1FZR6vcSY2Cem-mQzmNXvsg5IE,913
12
- mm_std/net.py,sha256=k3kl9OY23VoF2md6UyRBDQ9lhRzWlFCuhalDtv6Of90,4686
12
+ mm_std/net.py,sha256=0DTeexW2t6LKqDVUE6TePAHsEY3qoHoUuaHBt1IpPNI,4688
13
13
  mm_std/print_.py,sha256=mMixwfdrLEYW15ez7_QxXdrV-d38q9XJP8tB8F7P2pI,1553
14
14
  mm_std/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  mm_std/random_.py,sha256=OuUX4VJeSd13NZBya4qrGpR2TfN7_87tfebOY6DBUnI,1113
@@ -18,6 +18,6 @@ mm_std/str.py,sha256=nG5XF5870xM2PAvU0LZrJDk-d54LYwRLGnSahIekOVw,3151
18
18
  mm_std/telegram.py,sha256=QrHPnsy0LTeqpd-g3RaHhk7gWIfHZEgnMs-S5DLW-vU,1220
19
19
  mm_std/types.py,sha256=KpFtJ-BTmDfmmFeOSlgq6cMbCfGGOQjh1oWvdcrW-kw,116
20
20
  mm_std/zip.py,sha256=2EXcae4HO5U4kObj2Lj8jl5F2OUpT-WRlJybTyFzt6I,370
21
- mm_std-0.1.8.dist-info/METADATA,sha256=qS2lfsHdWITmGzMWqikfNAAA-bZrWRfZHayi1_tF5bA,304
22
- mm_std-0.1.8.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
23
- mm_std-0.1.8.dist-info/RECORD,,
21
+ mm_std-0.1.9.dist-info/METADATA,sha256=9mAqv05DzOIyS08WQdPkmmnWa7FqsPd_knflEndwItE,306
22
+ mm_std-0.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ mm_std-0.1.9.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.26.3
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,11 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: mm-std
3
- Version: 0.1.8
4
- Requires-Python: >=3.12
5
- Requires-Dist: cryptography~=44.0.0
6
- Requires-Dist: httpx[http2,socks]~=0.28.0
7
- Requires-Dist: pydantic~=2.10.2
8
- Requires-Dist: pydash~=8.0.4
9
- Requires-Dist: python-dotenv~=1.0.1
10
- Requires-Dist: pyyaml~=6.0.1
11
- Requires-Dist: rich~=13.0