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.
- {ygo-1.2.2 → ygo-1.2.3}/PKG-INFO +1 -1
- {ygo-1.2.2 → ygo-1.2.3}/pyproject.toml +1 -1
- ygo-1.2.3/tests/test_utils.py +19 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo/__init__.py +1 -1
- {ygo-1.2.2 → ygo-1.2.3}/ygo/pool.py +2 -2
- {ygo-1.2.2 → ygo-1.2.3}/ygo.egg-info/PKG-INFO +1 -1
- ygo-1.2.2/tests/test_utils.py +0 -11
- {ygo-1.2.2 → ygo-1.2.3}/LICENSE +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/README.md +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/setup.cfg +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/tests/test_lazy.py +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/tests/test_ygo.py +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo/delay.py +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo/exceptions.py +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo/lazy.py +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo/utils.py +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo.egg-info/SOURCES.txt +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo.egg-info/dependency_links.txt +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo.egg-info/requires.txt +0 -0
- {ygo-1.2.2 → ygo-1.2.3}/ygo.egg-info/top_level.txt +0 -0
{ygo-1.2.2 → ygo-1.2.3}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ygo
|
|
3
|
-
Version: 1.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
|
|
@@ -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()
|
|
@@ -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)
|
|
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.
|
|
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
|
ygo-1.2.2/tests/test_utils.py
DELETED
|
@@ -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
|
{ygo-1.2.2 → ygo-1.2.3}/LICENSE
RENAMED
|
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
|