bool-hybrid-array 9.10.15__tar.gz → 9.10.17__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.
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/PKG-INFO +4 -2
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/README.md +2 -1
- bool_hybrid_array-9.10.17/bool_hybrid_array/__init__.py +47 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array/core.py +9 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/PKG-INFO +4 -2
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/setup.py +2 -1
- bool_hybrid_array-9.10.15/bool_hybrid_array/__init__.py +0 -26
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/LICENSE +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array/__main__.py +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array/int_array/__init__.py +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array//347/247/230/345/257/206.md" +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/SOURCES.txt +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/dependency_links.txt +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/requires.txt +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/top_level.txt +0 -0
- {bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bool-hybrid-array
|
|
3
|
-
Version: 9.10.
|
|
3
|
+
Version: 9.10.17
|
|
4
4
|
Summary: 一个高效的布尔数组(密集+稀疏混合存储,节省内存)
|
|
5
5
|
Home-page: https://github.com/BKsell/bool-hybrid-array
|
|
6
6
|
Author: 蔡靖杰
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
20
|
Classifier: License :: OSI Approved :: MIT License
|
|
20
21
|
Classifier: Operating System :: OS Independent
|
|
21
22
|
Requires-Python: >=3.8
|
|
@@ -560,7 +561,8 @@ except OverflowError as e:
|
|
|
560
561
|
* **9.10.13**:给IntHybridArray新增多种列表操作
|
|
561
562
|
* **9.10.14**:修复IntHybridArray中因单个 0 导致所有数字位长被压缩到 1的问题
|
|
562
563
|
* **9.10.15**:修复IntHybridArray变成布尔数组的错误
|
|
563
|
-
|
|
564
|
+
* **9.10.16**:新增Python 3.14时的jit优化加速
|
|
565
|
+
* **9.10.17**:给保护字典添加__import__方法,支持from导入
|
|
564
566
|
|
|
565
567
|
|
|
566
568
|
|
|
@@ -521,7 +521,8 @@ except OverflowError as e:
|
|
|
521
521
|
* **9.10.13**:给IntHybridArray新增多种列表操作
|
|
522
522
|
* **9.10.14**:修复IntHybridArray中因单个 0 导致所有数字位长被压缩到 1的问题
|
|
523
523
|
* **9.10.15**:修复IntHybridArray变成布尔数组的错误
|
|
524
|
-
|
|
524
|
+
* **9.10.16**:新增Python 3.14时的jit优化加速
|
|
525
|
+
* **9.10.17**:给保护字典添加__import__方法,支持from导入
|
|
525
526
|
|
|
526
527
|
|
|
527
528
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from types import ModuleType,FunctionType
|
|
3
|
+
from . import core
|
|
4
|
+
from .core import __builtins__,builtins
|
|
5
|
+
from . import int_array
|
|
6
|
+
__version__ = "9.10.17"
|
|
7
|
+
public_objects = []
|
|
8
|
+
def jit_class_methods(cls):
|
|
9
|
+
for attr_name in dir(cls):
|
|
10
|
+
if not attr_name.startswith("_"):
|
|
11
|
+
attr = getattr(cls, attr_name)
|
|
12
|
+
if isinstance(attr, FunctionType):
|
|
13
|
+
try:
|
|
14
|
+
setattr(cls, attr_name, jit(attr))
|
|
15
|
+
except:
|
|
16
|
+
pass
|
|
17
|
+
elif isinstance(attr, classmethod):
|
|
18
|
+
original_func = attr.__func__
|
|
19
|
+
try:
|
|
20
|
+
setattr(cls, attr_name, classmethod(jit(original_func)))
|
|
21
|
+
except:
|
|
22
|
+
pass
|
|
23
|
+
return cls
|
|
24
|
+
for name in dir(core):
|
|
25
|
+
if not name.startswith("_"):
|
|
26
|
+
obj = getattr(core, name)
|
|
27
|
+
if isinstance(obj, (type, ModuleType)) or callable(obj):
|
|
28
|
+
public_objects.append(name)
|
|
29
|
+
if isinstance(obj,FunctionType):
|
|
30
|
+
try:setattr(core,name,jit(obj))
|
|
31
|
+
except:pass
|
|
32
|
+
elif isinstance(obj,type):
|
|
33
|
+
jit_class_methods(obj)
|
|
34
|
+
__all__ = public_objects + ["__version__","__builtins__","core","builtins","__dict__","int_array"]
|
|
35
|
+
globals().update({
|
|
36
|
+
name: getattr(core, name)
|
|
37
|
+
for name in public_objects
|
|
38
|
+
})
|
|
39
|
+
try:
|
|
40
|
+
__dict__ = ProtectedBuiltinsDict(globals())
|
|
41
|
+
sys.modules[__name__+'.int_array'] = ProtectedBuiltinsDict(int_array.__dict__)
|
|
42
|
+
sys.modules[__name__] = ProtectedBuiltinsDict(globals().copy())
|
|
43
|
+
sys.modules[__name__].name = 'bool_hybrid_array'
|
|
44
|
+
core.__dict__ = ProtectedBuiltinsDict(core.__dict__)
|
|
45
|
+
except:
|
|
46
|
+
pass
|
|
47
|
+
|
|
@@ -756,6 +756,15 @@ class ProtectedBuiltinsDict(dict,metaclass=ResurrectMeta):
|
|
|
756
756
|
raise AttributeError(f'禁止修改内置常量:{self.name}.{name}')
|
|
757
757
|
else:
|
|
758
758
|
super().__setattr__(name,value)
|
|
759
|
+
def __import__(self, name, globals=None, locals=None, fromlist=(), level=0):
|
|
760
|
+
if fromlist:
|
|
761
|
+
result = []
|
|
762
|
+
for key in fromlist:
|
|
763
|
+
if key not in self:
|
|
764
|
+
raise AttributeError(f"'ImportableDict' object has no attribute '{key}'")
|
|
765
|
+
result.append(self[key])
|
|
766
|
+
return result[0] if len(result) == 1 else tuple(result)
|
|
767
|
+
return self
|
|
759
768
|
def Ask_arr(arr):
|
|
760
769
|
if isinstance(arr,BHA_List):
|
|
761
770
|
return '\n'.join(map(Ask_arr,arr))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bool-hybrid-array
|
|
3
|
-
Version: 9.10.
|
|
3
|
+
Version: 9.10.17
|
|
4
4
|
Summary: 一个高效的布尔数组(密集+稀疏混合存储,节省内存)
|
|
5
5
|
Home-page: https://github.com/BKsell/bool-hybrid-array
|
|
6
6
|
Author: 蔡靖杰
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
20
|
Classifier: License :: OSI Approved :: MIT License
|
|
20
21
|
Classifier: Operating System :: OS Independent
|
|
21
22
|
Requires-Python: >=3.8
|
|
@@ -560,7 +561,8 @@ except OverflowError as e:
|
|
|
560
561
|
* **9.10.13**:给IntHybridArray新增多种列表操作
|
|
561
562
|
* **9.10.14**:修复IntHybridArray中因单个 0 导致所有数字位长被压缩到 1的问题
|
|
562
563
|
* **9.10.15**:修复IntHybridArray变成布尔数组的错误
|
|
563
|
-
|
|
564
|
+
* **9.10.16**:新增Python 3.14时的jit优化加速
|
|
565
|
+
* **9.10.17**:给保护字典添加__import__方法,支持from导入
|
|
564
566
|
|
|
565
567
|
|
|
566
568
|
|
|
@@ -8,7 +8,7 @@ def get_long_description():
|
|
|
8
8
|
return "一个高效的布尔数组(密集+稀疏混合存储,节省内存)"
|
|
9
9
|
setup(
|
|
10
10
|
name="bool-hybrid-array",
|
|
11
|
-
version="9.10.
|
|
11
|
+
version="9.10.17",
|
|
12
12
|
author="蔡靖杰",
|
|
13
13
|
extras_require={"int_array":[]},
|
|
14
14
|
author_email="1289270215@qq.com",
|
|
@@ -26,6 +26,7 @@ setup(
|
|
|
26
26
|
'Programming Language :: Python :: 3.11',
|
|
27
27
|
'Programming Language :: Python :: 3.12',
|
|
28
28
|
'Programming Language :: Python :: 3.13',
|
|
29
|
+
'Programming Language :: Python :: 3.14',
|
|
29
30
|
"License :: OSI Approved :: MIT License",
|
|
30
31
|
"Operating System :: OS Independent",
|
|
31
32
|
],
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from types import ModuleType
|
|
3
|
-
from . import core
|
|
4
|
-
from .core import __builtins__,builtins
|
|
5
|
-
from . import int_array
|
|
6
|
-
__version__ = "9.10.15"
|
|
7
|
-
public_objects = []
|
|
8
|
-
for name in dir(core):
|
|
9
|
-
if not name.startswith("_"):
|
|
10
|
-
obj = getattr(core, name)
|
|
11
|
-
if isinstance(obj, (type, ModuleType)) or callable(obj):
|
|
12
|
-
public_objects.append(name)
|
|
13
|
-
__all__ = public_objects + ["__version__","__builtins__","core","builtins","__dict__","int_array"]
|
|
14
|
-
globals().update({
|
|
15
|
-
name: getattr(core, name)
|
|
16
|
-
for name in public_objects
|
|
17
|
-
})
|
|
18
|
-
try:
|
|
19
|
-
__dict__ = ProtectedBuiltinsDict(globals())
|
|
20
|
-
sys.modules[__name__+'.int_array'] = ProtectedBuiltinsDict(int_array.__dict__)
|
|
21
|
-
sys.modules[__name__] = ProtectedBuiltinsDict(globals().copy())
|
|
22
|
-
sys.modules[__name__].name = 'bool_hybrid_array'
|
|
23
|
-
core.__dict__ = ProtectedBuiltinsDict(core.__dict__)
|
|
24
|
-
except:
|
|
25
|
-
pass
|
|
26
|
-
|
|
File without changes
|
|
File without changes
|
{bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array/int_array/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/requires.txt
RENAMED
|
File without changes
|
{bool_hybrid_array-9.10.15 → bool_hybrid_array-9.10.17}/bool_hybrid_array.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|