[Fix] Support Python 3.13 by relaxing dependency constraints#3010
Open
honglei wants to merge 17 commits into
Open
[Fix] Support Python 3.13 by relaxing dependency constraints#3010honglei wants to merge 17 commits into
honglei wants to merge 17 commits into
Conversation
Collaborator
|
@honglei Please fix the CI,the test python check is failed. |
honglei
added a commit
to honglei/DB-GPT
that referenced
this pull request
Apr 21, 2026
…n and hardcoded py313 path The PR was blocked by CI infrastructure issues rather than dependency logic changes. Test Python jobs were auto-failed because upload-artifact v3 is deprecated, and code-quality setup could fail on runners lacking /opt/python313/bin/python3.13.\n\nThis updates upload-artifact to v4 and makes virtualenv creation choose /opt/python313 first, then fall back to python3.13/python3 from PATH for broader runner compatibility.\n\nConstraint: Keep fix minimal and limited to CI/setup behavior\nRejected: Reworking dependency matrix or Python version policy | unrelated to observed failure mode\nConfidence: high\nScope-risk: narrow\nReversibility: clean\nDirective: Keep CI action major versions current; avoid hardcoded interpreter paths without PATH fallback\nTested: make setup (pass)\nNot-tested: Full GitHub Actions rerun on PR eosphoros-ai#3010
The PR branch regressed due to two setup mismatches: test-python installed the repository root as an editable package, and Makefile used an absolute interpreter path tied to specific runners. Both caused avoidable CI breakage. This rollback-based fix keeps scope narrow: use the actual package under test (packages/dbgpt-core), run tests against its source tree, move artifact upload to v4, and resolve Python via PATH fallback instead of /opt hardcoding. Constraint: Keep fixes limited to CI/bootstrap behavior for PR eosphoros-ai#3010 Rejected: Keep root editable install () | fails under current monorepo layout Rejected: Keep /opt/python313/bin/python3.13 | runner-specific path breaks portability Confidence: high Scope-risk: narrow Reversibility: clean Directive: CI install/test paths must target workspace packages, not repo root Tested: Verified failing reason from run 24702430365 logs; make -nB setup Not-tested: Full GitHub matrix rerun
The test-python workflow failed during dependency install because requirements/dev-requirements.txt in the branch was committed as binary content. pip could not decode it (UnicodeDecodeError at byte 0x88). Restore the file to plain text requirements so pip can parse it across all matrix jobs. Constraint: Keep scope to the broken requirements file only Rejected: Change workflow to skip dev requirements install | hides the underlying corrupted file Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep requirements files as UTF-8 text; avoid binary rewrites Tested: file and hex header checks confirm ASCII text content Not-tested: Full GitHub Actions rerun
The Test Python matrix failed during collection with missing modules such as sqlalchemy, click, cloudpickle, and fastapi. The workflow only installed proxy_openai extra, which is insufficient for the selected test scope under packages/dbgpt-core/src/dbgpt. Install the core package with the extras that provide the missing runtime/test dependencies used by those modules. Constraint: Keep fix limited to workflow dependency setup Rejected: Narrow test scope to avoid modules | would hide dependency regressions Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep workflow install extras aligned with test collection scope Tested: Verified prior failure logs and mapped missing modules to extras Not-tested: Full GitHub matrix rerun
Latest matrix failures show missing dbgpt_ext imports during collection and pytest 9 deprecation behavior breaking flow-variable tests. Install dbgpt-ext and dbgpt-serve alongside dbgpt-core in the test workflow, and cap pytest below 9 to keep current tests compatible. Constraint: Keep fix limited to CI workflow dependency/runtime setup Rejected: Ignore failing modules via test selection | would hide integration regressions Confidence: high Scope-risk: narrow Reversibility: clean Directive: Test workflow must install workspace packages used by core test imports Tested: Verified failure signatures from run 24705179474 logs Not-tested: Full GitHub matrix rerun
Keep CI dependency installation aligned with repository-managed requirement files so pytest constraints are not split between workflow scripts and dependency manifests. Constraint: CI install path is transitioning to uv-based sync and run commands Rejected: Keep a standalone workflow-level pytest pin | creates split dependency authority and drift risk Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep pytest major-version constraints in dependency files, not ad hoc workflow commands Tested: Reviewed staged diff for targeted files Not-tested: Full GitHub Actions matrix run
Contributor
Author
|
@chenliang15405 fixed the CI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3006
PR Description
Summary
This PR adds support for Python 3.13 by relaxing or updating the version constraints for several key dependencies, including
aiohttp,pandas,numpy,onnxruntime, andspacy. It ensures compatibility across Python 3.10 to 3.13 without forcing breaking changes on existing environments.Problem
Python 3.13 introduced internal changes (such as the removal of some deprecated APIs and changes in C-API) that require newer versions of many scientific and web libraries. The previous version pinning (
==) and strict upper bounds (e.g.,<2.0.0fornumpy) inpyproject.tomlprevented users from installing compatible versions in a Python 3.13 environment.Solution
==) to minimum version constraints (>=) foraiohttpandpandasto allow the installer to select newer, compatible versions when running on Python 3.13.<2.0.0restriction fornumpy. This allows the use of Numpy 2.x, which provides the necessary wheels and compatibility for Python 3.13.onnxruntimeandspacyconstraints indbgpt-extto remove outdated upper bounds and allow versions that support Python 3.13.How Has This Been Tested?
The changes have been verified in the following environment:
pipanduvcan successfully resolve and install the dependency tree.Snapshots:
N/A
Checklist: