[19.0][FIX] test-requirements: pin anyio<4.15 to unblock CI - #636
Open
TheClaud99 wants to merge 1 commit into
Open
[19.0][FIX] test-requirements: pin anyio<4.15 to unblock CI#636TheClaud99 wants to merge 1 commit into
TheClaud99 wants to merge 1 commit into
Conversation
starlette.testclient references the deprecated anyio.abc.BlockingPortal alias. anyio 4.15 emits a DeprecationWarning for it on import, which checklog-odoo reports as an error and makes every build fail even though all tests pass. Pin anyio until starlette uses anyio.from_thread.
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.
Problem
checklog-odoo(OCA_ENABLE_CHECKLOG_ODOO: "1") treats this record as anerror, failing the job after the addon tests have completed:
This causes a red CI on every PR targeting
19.0(like my PR here: #616)Root cause
anyio 4.15.0, released after the last run on
19.0, turnedanyio.abc.BlockingPortalinto a deprecated alias._PortalFactoryTypeinstarlette/testclient.pyis evaluated at import time, so merely importingstarlette.testclientemits the warning.Timeline, since the branches still show green:
19.0: Aug 1118.0: Sep 1This is tracked upstream in Kludex/starlette#3497, with a fix proposed in
Kludex/starlette#3506 (opened Sep 4, not yet merged).
starlette 1.6.0 (latest) still ships the old alias, so no released version
avoids this today.
Fix
Pin
anyio<4.15intest-requirements.txt. This only constrains the testenvironment. It can be dropped once a starlette release including
Kludex/starlette#3506 is available, not merely once that PR is merged.
CI on this PR is the verification: same code as
19.0, green with the pin.Scope
Problably this problem affects every PR on this repo, not just the one where I hit it (#616).
16.0,17.0and18.0have the same import and need the same change; I canopen the equivalent PRs on those branches on request.