v2.7.13: Optimize Nuitka Lite Mode, enhance security, and fix backport crash

- Added `--lto=yes` Link-Time Optimization for Nuitka in Lite Mode
- Fixed package bloat in Lite Mode
- Fixed fatal TypeError in Backport exclusion rule version comparison
- Cleaned up bare except clauses to avoid swallowing interrupt signals
- Upgraded hashing algorithm to SHA-256 and added download protocol validation
- Passed Ruff, Flake8, and Bandit security and quality audits
- Added `__future__.annotations` for Python 3.8/3.9 type hint compatibility
- Cleaned up redundant AST dependency logs when requirements.txt is absent
- Fixed missing dynamic translation for the "Code Signing" card title
This commit is contained in:
QwejayHuang committed 2026-08-26 09:53:30 +08:00
1 parent 51b1f78b72
commit dcaf07c68b
4 files changed
+2704 -1645

No files matched your search

+18
View File
@@ -9,6 +9,24 @@ QPyPack 项目的所有重要变更都将记录在此文件中。
---
### [2.7.13] - 2026-08-26
#### 新增
- **Nuitka 编译优化**:精简模式下默认引入 `--lto=yes` 链接时间优化机制,深度消除未引用符号,大幅压缩编译出的原生二进制体积。
#### 改进
- **代码安全与规范全面升级**:全量通过 Ruff、Flake8 及 Bandit 安全审计,哈希算法升级为更安全的 SHA-256,并增加 Python 下载协议的白名单与异常链校验。
- **日志显示改进**:优化 AST 静态分析与依赖清单的比对逻辑,未提供 `requirements.txt` 时不再冗余输出重复的“自动补齐”项,日志层级更清晰明了。
- **低版本解释器类型兼容**:引入 `__future__.annotations` 延迟注解机制,确保现代 PEP 604 类型提示在 Python 3.8 / 3.9 环境下依然稳定运行不崩溃。
#### 修复
- **修复精简模式BUG**:修复精简模式下打包体积暴增的问题。
- **修复版本比对致命异常**:重构 Backport 拦截规则的版本解析逻辑,修复目标解释器元组与规则字符串直接比对导致的崩溃问题。
- **修复界面多语言刷新遗漏**:修复多语言即时切换时“代码签名”卡片标题未能同步翻译的问题,并清理了翻译字典中的重复键声明。
- **消除进程退出拦截隐患**:清理所有裸 `except:`,避免意外拦截系统中断信号导致子线程无法正常退出。
---
## [2.7.12] - 2026-08-24
### 新增
+18
View File
@@ -9,6 +9,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
### [2.7.13] - 2026-08-26
#### Added
- **Nuitka Compilation Optimization**: Enabled `--lto=yes` (Link-Time Optimization) by default in Lite Mode to eliminate unreferenced symbols and significantly reduce the compiled native binary size.
#### Improved
- **Code Security & Quality Upgrades**: Fully passed Ruff, Flake8, and Bandit security audits; upgraded internal hashing to SHA-256; added protocol whitelisting and explicit exception chaining for Python downloads.
- **Log Output Refinements**: Optimized comparison logic between AST analysis and dependency manifests; eliminated redundant "Auto-patched" logs when no `requirements.txt` is present for cleaner, more intuitive logs.
- **Legacy Python Compatibility**: Introduced `from __future__ import annotations` deferred evaluation, ensuring modern PEP 604 union type hints run reliably on Python 3.8 / 3.9 without runtime errors.
#### Fixed
- **Fix Lite Mode Bloat Issue**: Resolved an issue causing bloated package sizes in Lite Mode.
- **Fix Fatal Version Comparison Crash**: Refactored version parsing in Backport exclusion rules, resolving a crash caused by comparing version tuples directly with rule strings (`TypeError`).
- **Fix Missing UI Translation Refresh**: Fixed a dynamic translation refresh issue where the "Code Signing" card title failed to update on language switch, and removed duplicate translation keys.
- **Eliminate Process Interception Risk**: Replaced all bare `except:` clauses to prevent swallowing system interrupt signals, ensuring worker threads terminate cleanly.
---
## [2.7.12] - 2026-08-25
### Added
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "qpypack"
version = "2.7.12"
version = "2.7.13"
description = "A cross-platform GUI packaging and compilation suite based on PyInstaller and Nuitka."
readme = "README_EN.md"
authors = [
+2667 -1644
View File
File diff suppressed because it is too large. Load diff