labull-framework 0.1.3.1__tar.gz → 0.1.4__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.
- {labull_framework-0.1.3.1/labull_framework.egg-info → labull_framework-0.1.4}/PKG-INFO +1 -1
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/deepcheck.py +23 -1
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/validate.py +9 -1
- {labull_framework-0.1.3.1 → labull_framework-0.1.4/labull_framework.egg-info}/PKG-INFO +1 -1
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/pyproject.toml +1 -1
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/LICENSE +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/MANIFEST.in +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/README-pypi.md +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/__init__.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/admin.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/apps.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/auth/__init__.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/auth/backend.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/auth/bootstrap.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/auth/sso.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/auth/views.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/__init__.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/data.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/gitinfo.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/static/canvas.css +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/static/canvas.js +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/static/page.html +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/views.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/env.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/jsonio.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/__init__.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/devkit.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/dispatch.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/export.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/health.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/registry.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/sdk.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/service.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/views.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/management/__init__.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/management/commands/__init__.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/management/commands/labull_contract.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/migrations/0001_initial.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/migrations/__init__.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/models.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/settings.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/urls.py +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework.egg-info/SOURCES.txt +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework.egg-info/dependency_links.txt +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework.egg-info/requires.txt +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework.egg-info/top_level.txt +0 -0
- {labull_framework-0.1.3.1 → labull_framework-0.1.4}/setup.cfg +0 -0
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/deepcheck.py
RENAMED
|
@@ -695,12 +695,26 @@ def deep_check(
|
|
|
695
695
|
params = (files or {}).get(PROBE_PARAMS_FILE)
|
|
696
696
|
if isinstance(params, str) and params.strip():
|
|
697
697
|
env[BLOCK_PROBE_PARAMS] = params
|
|
698
|
+
# 🔴 这一段子进程的编码要**两头都钉死**(子进程按 UTF-8 写、父进程按 UTF-8 读):
|
|
699
|
+
# 只写 `text=True` 的话,父进程用 `locale.getpreferredencoding(False)` 解码
|
|
700
|
+
# (中文 Windows = cp936),而子进程一旦吐 UTF-8 —— 服务进程环境里有
|
|
701
|
+
# `PYTHONIOENCODING=utf-8` / `PYTHONUTF8=1` 这类东西时就是这样 —— `subprocess` 的
|
|
702
|
+
# 解码线程会抛 `UnicodeDecodeError` 直接死掉。那个异常在**线程**里,主线程看不见,
|
|
703
|
+
# `stdout`/`stderr` 双双变成 `None` 而 `returncode` 仍是 0 ⇒ 这一层看起来只是
|
|
704
|
+
# "深检自己没跑起来",实则**每一次都没验**(0.1.2 ~ 0.1.3.1 就是这个状态)。
|
|
705
|
+
# 同一个坑的另一处见 `canvas/gitinfo.py` 的 `_run()`。
|
|
706
|
+
env['PYTHONIOENCODING'] = 'utf-8'
|
|
707
|
+
# Windows 商店版 Python 的 `sys.executable` 可能是 None,拿不到就没有解释器可用。
|
|
708
|
+
interpreter = sys.executable or 'python'
|
|
698
709
|
try:
|
|
699
710
|
done = subprocess.run(
|
|
700
|
-
[
|
|
711
|
+
[interpreter, '-c', child],
|
|
701
712
|
env=env,
|
|
702
713
|
capture_output=True,
|
|
703
714
|
text=True,
|
|
715
|
+
encoding='utf-8',
|
|
716
|
+
# 第二道保险:真碰上编码诡异的输出,也宁可显示成问号,不要让解码线程死掉。
|
|
717
|
+
errors='replace',
|
|
704
718
|
timeout=DEEP_TIMEOUT,
|
|
705
719
|
)
|
|
706
720
|
except subprocess.TimeoutExpired:
|
|
@@ -720,6 +734,14 @@ def deep_check(
|
|
|
720
734
|
[],
|
|
721
735
|
)
|
|
722
736
|
|
|
737
|
+
if done.stdout is None:
|
|
738
|
+
# 正常走不到这里(上面 `encoding` / `errors` 已经给全);真走到了也**不许静默**:
|
|
739
|
+
# 至少把 stderr 的最后一行说出来,否则"编码不对 ⇒ 什么都没验"会一直隐形。
|
|
740
|
+
tail = (done.stderr or '').strip().splitlines()
|
|
741
|
+
return [], [
|
|
742
|
+
f'引用深检的输出没能解码(returncode={done.returncode}):'
|
|
743
|
+
f'{tail[-1] if tail else "没有 stderr"}'
|
|
744
|
+
]
|
|
723
745
|
payload = _payload_of(done.stdout or '')
|
|
724
746
|
if payload is None:
|
|
725
747
|
detail = (done.stderr or done.stdout or '').strip().splitlines()
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/validate.py
RENAMED
|
@@ -488,12 +488,20 @@ def trial_load(src: str) -> list[str]:
|
|
|
488
488
|
# 不交的话每个块都会报"找不到 labull_framework / modules"——那是假错。
|
|
489
489
|
env['PYTHONPATH'] = os.pathsep.join(item for item in sys.path if item)
|
|
490
490
|
env['LABULL_TRIAL_SOURCE'] = json.dumps(src, ensure_ascii=False)
|
|
491
|
+
# 🔴 同 `deepcheck.deep_check()`:子进程按 UTF-8 写、父进程按 UTF-8 读,两头都得钉死。
|
|
492
|
+
# 只写 `text=True` 时父进程按 `locale.getpreferredencoding(False)`(中文 Windows = cp936)
|
|
493
|
+
# 解码,子进程吐 UTF-8 时解码线程会抛 `UnicodeDecodeError` 死掉 ⇒ `stderr` 变成 None,
|
|
494
|
+
# 这一层就只剩一句"加载失败(……):1"(真因被吞了)。
|
|
495
|
+
env['PYTHONIOENCODING'] = 'utf-8'
|
|
496
|
+
interpreter = sys.executable or 'python'
|
|
491
497
|
try:
|
|
492
498
|
done = subprocess.run(
|
|
493
|
-
[
|
|
499
|
+
[interpreter, '-c', _TRIAL_SCRIPT],
|
|
494
500
|
env=env,
|
|
495
501
|
capture_output=True,
|
|
496
502
|
text=True,
|
|
503
|
+
encoding='utf-8',
|
|
504
|
+
errors='replace',
|
|
497
505
|
timeout=TRIAL_LOAD_TIMEOUT,
|
|
498
506
|
)
|
|
499
507
|
except subprocess.TimeoutExpired:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "labull-framework"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.4"
|
|
8
8
|
description = "Labull Framework: a pluggable Django app with Authing OIDC login and magic blocks"
|
|
9
9
|
readme = "README-pypi.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
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
|
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/static/canvas.css
RENAMED
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/static/canvas.js
RENAMED
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/canvas/static/page.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/dispatch.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/magic_block/registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/management/commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labull_framework-0.1.3.1 → labull_framework-0.1.4}/labull_framework.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|