tretool 0.2.1__py3-none-any.whl → 0.3.0__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.
tretool/__init__.py CHANGED
@@ -3,25 +3,50 @@
3
3
 
4
4
  ## tretool - Python多功能工具库
5
5
 
6
- [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/)
6
+ [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
7
7
 
8
8
  **tretool** 是一个集成常用功能的Python工具库。
9
9
  """
10
10
 
11
- from . import config
11
+ import sys
12
12
 
13
- from . import encoding
13
+ MIN_PY_VERSION = (3, 10)
14
14
 
15
- from . import jsonlib
15
+ if sys.version_info >= MIN_PY_VERSION:
16
+ from . import config
16
17
 
17
- from . import markfunc
18
- from . import memorizeTools
18
+ from . import decoratorlib
19
19
 
20
- from . import path
21
- from . import platformlib
22
- from . import plugin
20
+ from . import encoding
23
21
 
24
- from . import timelib
25
- from . import transform
22
+ from . import httplib
26
23
 
27
- from . import writeLog
24
+ from . import jsonlib
25
+
26
+ from . import logger
27
+
28
+ from . import path
29
+ from . import platformlib
30
+ from . import plugin
31
+
32
+ from . import smartCache
33
+
34
+ from . import timelib
35
+ from . import transform
36
+
37
+ else:
38
+ current_version = f"{sys.version_info.major}.{sys.version_info.minor}"
39
+ required_version = f"{MIN_PY_VERSION[0]}.{MIN_PY_VERSION[1]}"
40
+
41
+ raise RuntimeError(
42
+ f"\n\n"
43
+ f"不兼容的Python版本\n\n"
44
+ f"Tretool需要Python {required_version}+ (检测到: Python {current_version})\n"
45
+ f"请执行以下操作之一:\n"
46
+ f"1. 升级Python到{required_version}或更高版本\n"
47
+ f"2. 使用兼容的Tretool版本\n\n"
48
+ f"升级Python推荐方法:\n"
49
+ f"- 使用pyenv: `pyenv install 3.10.x`\n"
50
+ f"- 从官网下载: https://www.python.org/downloads/\n"
51
+ f"- 使用conda: `conda install python=3.10`"
52
+ )