Skip to content

Fix #632: "import weave" has an issue#644

Open
JiwaniZakir wants to merge 1 commit intoOpenPipe:mainfrom
JiwaniZakir:fix/632-import-weave-has-an-issue
Open

Fix #632: "import weave" has an issue#644
JiwaniZakir wants to merge 1 commit intoOpenPipe:mainfrom
JiwaniZakir:fix/632-import-weave-has-an-issue

Conversation

@JiwaniZakir
Copy link
Copy Markdown

Closes #632

Before

import weave raised an ImportError at startup:

ImportError: cannot import name 'TransportConnectionFailed' from 'gql.transport.exceptions'

weave==0.52.35 depends on TransportConnectionFailed from the gql package, but gql<4 (e.g. gql==3.4.1) does not export that name. The constraint in pyproject.toml under the backend optional dependencies allowed any gql version below 4, which resolved to an incompatible release.

After

gql>=4.0.0 is installed, which exports TransportConnectionFailed from gql.transport.exceptions as weave expects. import weave succeeds without error.

Changes

  • pyproject.toml, backend dependencies (line 40): changed "gql<4" to "gql>=4.0.0".

Testing

Install the backend extras and verify the import resolves cleanly:

pip install -e ".[backend]"
python -c "import weave; print('ok')"

Expected output: ok with no ImportError. Previously this command produced the TransportConnectionFailed import failure.


This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.

weave>=0.52 imports TransportConnectionFailed from gql.transport.exceptions,
which was added in gql 4.0.0. The backend extras previously pinned gql<4,
preventing a compatible version from being installed.

Closes OpenPipe#632
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"import weave" has an issue

1 participant