feat: 支持 Python 3.8+ (0.3.0)
publish-dlp-io / publish (push) Failing after 2s

- requires-python >=3.8, classifiers 增加 3.8/3.9
- 代码经 ast feature_version=(3,8) 校验, 无 3.9+ 专属语法; str|None 等注解由 future annotations 延迟求值
- CI 测试/构建/smoke 矩阵扩展为 3.8-3.14, 裸资产数 6→8
- 注意: Windows runner 需预装 Python 3.8 与 3.9 (py launcher)
This commit is contained in:
p40000043244@byd.com
2026-08-03 15:30:33 +08:00
parent 457e4eed3f
commit d34861be93
6 changed files with 22 additions and 20 deletions
+7 -7
View File
@@ -95,11 +95,11 @@ jobs:
"DLP_IO_PACKAGE_VERSION=$packageVersion" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "package source: $tag @ $headCommit"
- name: Test Python 3.10-3.14
- name: Test Python 3.8-3.14
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) {
& py "-$pythonVersion" --version
if ($LASTEXITCODE -ne 0) { throw "Python $pythonVersion is required" }
& py "-$pythonVersion" -m pip install -r requirements-dev.txt --progress-bar off
@@ -124,7 +124,7 @@ jobs:
"dlp_io-$version-py3-none-any.whl",
"dlp_io-$version.tar.gz"
)
foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) {
$abi = $pythonVersion.Replace(".", "")
$wheel = "dlp_io-$version-cp$abi-cp$abi-win_amd64.whl"
$env:DLP_IO_PYD = "1"
@@ -164,7 +164,7 @@ jobs:
}
}
$bareAssets = @(Get-ChildItem -LiteralPath $assetsDir -File | ForEach-Object Name)
if ($bareAssets.Count -ne 6) {
if ($bareAssets.Count -ne 8) {
throw "bare asset set mismatch: $($bareAssets -join ', ')"
}
@@ -198,7 +198,7 @@ jobs:
}
}
foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) {
$abi = $pythonVersion.Replace(".", "")
$pydWheel = (Resolve-Path (Join-Path dist "dlp_io-$($env:DLP_IO_PACKAGE_VERSION)-cp$abi-cp$abi-win_amd64.whl")).Path
$pydRoot = Join-Path $env:TEMP ("dlp-io-pyd-smoke-$abi-" + $PID)
@@ -232,7 +232,7 @@ jobs:
throw "unsafe bare smoke path: $bareRootFull"
}
try {
foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) {
$abi = $pythonVersion.Replace(".", "")
$sandbox = Join-Path $bareRootFull "cp$abi"
New-Item -ItemType Directory -Force $sandbox | Out-Null
@@ -293,7 +293,7 @@ jobs:
"## 产物",
"",
"- ``dlp_io-$version-py3-none-any.whl``:纯 Python wheelpip 安装,跨平台",
"- ``dlp_io-$version-cp3XX-cp3XX-win_amd64.whl``pyd wheelpip 安装,Windows 按解释器版本选用(cp310-cp314",
"- ``dlp_io-$version-cp3XX-cp3XX-win_amd64.whl``pyd wheelpip 安装,Windows 按解释器版本选用(cp38-cp314",
"- ``dlp_io-$version.tar.gz``sdist 源码包",
"- ``dlp_io.py`` / ``dlp_io.cp3XX-win_amd64.pyd``:免安装单文件,直接放进项目目录即可 ``import dlp_io``",
"",