ygo 1.2.2__tar.gz → 1.2.3__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,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygo
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: 一个轻量级 Python 工具包,支持 并发执行(带进度条)、延迟调用、链式绑定参数、函数信息获取、模块/函数动态加载。并结合 ylog 提供日志记录能力
5
5
  Project-URL: homepage, https://github.com/link-yundi/ygo
6
6
  Project-URL: repository, https://github.com/link-yundi/ygo
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ygo"
7
- version = "1.2.2"
7
+ version = "1.2.3"
8
8
  description = "一个轻量级 Python 工具包,支持 并发执行(带进度条)、延迟调用、链式绑定参数、函数信息获取、模块/函数动态加载。并结合 ylog 提供日志记录能力"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -0,0 +1,19 @@
1
+ # Copyright (c) ZhangYundi.
2
+ # Licensed under the MIT License.
3
+ # Created on 2025/7/20 16:33
4
+ # Description:
5
+ import queue
6
+
7
+ # from ygo.utils import locate
8
+ from ygo.pool import run_job
9
+
10
+ # def test_locate():
11
+ # fn = locate("functools.partial")
12
+ # test_fn = lambda a, b: a+b
13
+ # assert fn(test_fn, 1, 2)() == 3
14
+
15
+ def foo():
16
+ run_job(1, 1, queue.Queue())
17
+
18
+ if __name__ == '__main__':
19
+ foo()
@@ -13,7 +13,7 @@ from .utils import (
13
13
  )
14
14
  from .lazy import lazy_import
15
15
 
16
- __version__ = "1.2.2"
16
+ __version__ = "1.2.3"
17
17
 
18
18
  __all__ = [
19
19
  "FailTaskError",
@@ -27,10 +27,10 @@ def run_job(job, task_id, queue):
27
27
  try:
28
28
  result = job()
29
29
  except WarnException as e:
30
- logger.warning(FailTaskError(task_name=job.task_name, error=e))
30
+ logger.warning(FailTaskError(task_name=job.task_name, error=e).__str__())
31
31
  result = None
32
32
  except Exception as e:
33
- logger.error(FailTaskError(task_name=job.task_name, error=e), exc_info=e)
33
+ logger.opt(exc_info=e).error(FailTaskError(task_name=job.task_name, error=e).__str__())
34
34
  result = None
35
35
  queue.put((task_id, 1))
36
36
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygo
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: 一个轻量级 Python 工具包,支持 并发执行(带进度条)、延迟调用、链式绑定参数、函数信息获取、模块/函数动态加载。并结合 ylog 提供日志记录能力
5
5
  Project-URL: homepage, https://github.com/link-yundi/ygo
6
6
  Project-URL: repository, https://github.com/link-yundi/ygo
@@ -1,11 +0,0 @@
1
- # Copyright (c) ZhangYundi.
2
- # Licensed under the MIT License.
3
- # Created on 2025/7/20 16:33
4
- # Description:
5
-
6
- from ygo.utils import locate
7
-
8
- def test_locate():
9
- fn = locate("functools.partial")
10
- test_fn = lambda a, b: a+b
11
- assert fn(test_fn, 1, 2)() == 3
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