ygo 1.1.0__tar.gz → 1.1.1__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.

Potentially problematic release.


This version of ygo might be problematic. Click here for more details.

@@ -1,6 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygo
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
+ Summary: 一个轻量级 Python 工具包,支持 并发执行(带进度条)、延迟调用、链式绑定参数、函数信息获取、模块/函数动态加载。并结合 ylog 提供日志记录能力
4
5
  Project-URL: homepage, https://github.com/link-yundi/ygo
5
6
  Project-URL: repository, https://github.com/link-yundi/ygo
6
7
  Requires-Python: >=3.12
@@ -54,7 +55,7 @@ import ygo
54
55
  import ylog
55
56
  from a.b.c import test_fn
56
57
 
57
- with ygo.pool(job_name="test parallel", show_progress=True) as go:
58
+ with ygo.pool(n_jobs=5, show_progress=True) as go:
58
59
  for i in range(10):
59
60
  go.submit(test_fn)(a=i, b=2*i)
60
61
  for res in go.do():
@@ -41,7 +41,7 @@ import ygo
41
41
  import ylog
42
42
  from a.b.c import test_fn
43
43
 
44
- with ygo.pool(job_name="test parallel", show_progress=True) as go:
44
+ with ygo.pool(n_jobs=5, show_progress=True) as go:
45
45
  for i in range(10):
46
46
  go.submit(test_fn)(a=i, b=2*i)
47
47
  for res in go.do():
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ygo"
7
- version = "v1.1.0"
8
- description = ""
7
+ version = "v1.1.1"
8
+ description = "一个轻量级 Python 工具包,支持 并发执行(带进度条)、延迟调用、链式绑定参数、函数信息获取、模块/函数动态加载。并结合 ylog 提供日志记录能力"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
11
11
  dependencies = [
@@ -20,7 +20,7 @@ from .utils import (
20
20
  fn_from_str,
21
21
  )
22
22
 
23
- __version__ = "v1.1.0"
23
+ __version__ = "v1.1.1"
24
24
 
25
25
  __all__ = [
26
26
  "FailTaskError",
@@ -1,6 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygo
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
+ Summary: 一个轻量级 Python 工具包,支持 并发执行(带进度条)、延迟调用、链式绑定参数、函数信息获取、模块/函数动态加载。并结合 ylog 提供日志记录能力
4
5
  Project-URL: homepage, https://github.com/link-yundi/ygo
5
6
  Project-URL: repository, https://github.com/link-yundi/ygo
6
7
  Requires-Python: >=3.12
@@ -54,7 +55,7 @@ import ygo
54
55
  import ylog
55
56
  from a.b.c import test_fn
56
57
 
57
- with ygo.pool(job_name="test parallel", show_progress=True) as go:
58
+ with ygo.pool(n_jobs=5, show_progress=True) as go:
58
59
  for i in range(10):
59
60
  go.submit(test_fn)(a=i, b=2*i)
60
61
  for res in go.do():
@@ -9,7 +9,6 @@ Created on 2025/5/14 16:04
9
9
 
10
10
  import sys
11
11
  from pathlib import Path
12
- from threading import Lock
13
12
  from typing import Optional
14
13
 
15
14
  from loguru import logger
@@ -34,7 +33,7 @@ class _Logger:
34
33
  def __init__(
35
34
  self,
36
35
  log_dir: str = "logs",
37
- app_name: str|None = None,
36
+ app_name: str | None = None,
38
37
  retention_days: int = 7,
39
38
  error_retention_days: int = 30,
40
39
  enable_console: bool = True,
@@ -145,8 +144,6 @@ class _Logger:
145
144
  catch=True # 捕获格式化异常
146
145
  )
147
146
 
148
-
149
-
150
147
  def _setup_global_exception_handling(self):
151
148
  """配置全局异常捕获"""
152
149
 
@@ -230,6 +227,7 @@ class _Logger:
230
227
  if enable_file is not False:
231
228
  self._setup_file_logging(self._retention_days, self._error_retention_days)
232
229
 
230
+
233
231
  # 初始化默认实例
234
232
  _default_logger = _Logger()
235
233
 
@@ -242,6 +240,7 @@ error = _default_logger.error
242
240
  critical = _default_logger.critical
243
241
  update_config = _default_logger.update_config
244
242
 
243
+
245
244
  def get_logger(app_name: str,
246
245
  log_dir: str = "logs",
247
246
  retention_days: int = 7,
@@ -259,4 +258,3 @@ def get_logger(app_name: str,
259
258
  enable_file=enable_file,
260
259
  debug_mode=debug_mode
261
260
  )
262
-
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