Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken Dependency with Qdrant-Client on Replit #200

Closed
NirantK opened this issue Jul 6, 2023 · 8 comments
Closed

Broken Dependency with Qdrant-Client on Replit #200

NirantK opened this issue Jul 6, 2023 · 8 comments

Comments

@NirantK
Copy link
Contributor

NirantK commented Jul 6, 2023

How to reproduce

Go to Replit.new (while logged into your Replit account)

poetry add qdrant-client

Results in this error:

poetry add qdrant-client
Using version ^1.3.1 for qdrant-client

Updating dependencies
Resolving dependencies... (3.8s)

  SolverProblemError

  Because no versions of replit match >3.2.4,<3.2.5 || >3.2.5,<3.2.6 || >3.2.6,<3.2.7 || >3.2.7,<3.2.8 || >3.2.8,<3.3.0 || >3.3.0,<4.0.0
   and replit (3.2.4) depends on typing_extensions (>=3.7.4,<4.0.0), replit (>=3.2.4,<3.2.5 || >3.2.5,<3.2.6 || >3.2.6,<3.2.7 || >3.2.7,<3.2.8 || >3.2.8,<3.3.0 || >3.3.0,<4.0.0) requires typing_extensions (>=3.7.4,<4.0.0).
  And because replit (3.2.6) depends on typing_extensions (>=3.7.4,<4.0.0), replit (>=3.2.4,<3.2.5 || >3.2.5,<3.2.7 || >3.2.7,<3.2.8 || >3.2.8,<3.3.0 || >3.3.0,<4.0.0) requires typing_extensions (>=3.7.4,<4.0.0).
  And because replit (3.2.7) depends on typing_extensions (>=3.7.4,<4.0.0)
   and replit (3.2.8) depends on typing_extensions (>=3.7.4,<4.0.0), replit (>=3.2.4,<3.2.5 || >3.2.5,<3.3.0 || >3.3.0,<4.0.0) requires typing_extensions (>=3.7.4,<4.0.0).
  And because replit (3.3.0) depends on typing_extensions (>=3.7.4,<4.0.0)
   and replit (3.2.5) depends on typing_extensions (>=3.7.4,<4.0.0), replit (>=3.2.4,<4.0.0) requires typing_extensions (>=3.7.4,<4.0.0).
  Because no versions of qdrant-client match >1.3.1,<2.0.0
   and qdrant-client (1.3.1) depends on typing-extensions (>=4.0.0,<4.6.0), qdrant-client (>=1.3.1,<2.0.0) requires typing-extensions (>=4.0.0,<4.6.0).
  Thus, qdrant-client (>=1.3.1,<2.0.0) is incompatible with replit (>=3.2.4,<4.0.0).
  So, because python-template depends on both replit (^3.2.4) and qdrant-client (^1.3.1), version solving failed.

  at venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│ 
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

pip install side steps this error, by downgrading typing-extensions — but makes the environment confusing to use:

WARNING: pip is using a content-addressable pool to install files from. This experimental feature is enabled through --use-feature=content-addressable-pool and it is not ready for production.
Installing collected packages: sniffio, exceptiongroup, h11, anyio, hyperframe, httpcore, hpack, typing-extensions, httpx, h2, grpcio, pydantic, portalocker, grpcio-tools, qdrant-client
  Attempting uninstall: typing-extensions
    Found existing installation: typing-extensions 3.10.0.2
    Uninstalling typing-extensions-3.10.0.2:
      Successfully uninstalled typing-extensions-3.10.0.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
replit 3.2.5 requires typing_extensions<4.0.0,>=3.7.4, but you have typing-extensions 4.5.0 which is incompatible.

Possible Fixes

  1. [Preferred] Both Replit and Qdrant Client upgrade to latest typing-extensions i.e. 4.7.1
  2. Replit upgrades to same version as Qdrant Client i.e. v4.5.0 for typing-extentions
  3. [Not Preferred] Qdrant client downgrade to v4.0.0 for typing-extentions
@sfitts
Copy link

sfitts commented Jul 7, 2023

The same kind of conflict exists between qdrant-client 1.3.1 and pydantic-core 2.1.2 (which requires typing_extensions of at least 4.6.0, but not 4.7.0). This leaves the first (preferred) solution as really the only one that works.

@joein
Copy link
Member

joein commented Jul 8, 2023

Initial reason to have fixed dependency for typing-extensions was caused by their bug, as far as I remember it was version 4.6.0.
I will check how does it work with different versions of typing-extensions, and maybe update the dependencies

Found #175

Initial reason was bug in pydantic.
pydantic<1.10.8 is incompatible with typing-extensions>4.5.0

@joein
Copy link
Member

joein commented Jul 8, 2023

It does not seem like replit-py is actively maintained replit/replit-py#125
We probably would not downgrade our dependency, but I'll look into this

Issue with pydantic will be fixed

@joein
Copy link
Member

joein commented Jul 8, 2023

@sfitts

Afaik pydantic-core is all about pydantic v2 ?
At the moment pydantic v2 is not supported, it is not that easy as just allow a certain version of typing-extensions :(

However we are working on this.
Should be available soon

@joein
Copy link
Member

joein commented Jul 8, 2023

#203

@sfitts
Copy link

sfitts commented Jul 9, 2023

@joein Thanks for pointing that out -- we were not intending to use pydantic v2 at this point (it was getting dragged in by some sloppy requirements specification). After cleaning that up we're now fine with type_extensions 4.5.0. At least that's what pip-tools seems to think ;).

@joein
Copy link
Member

joein commented Jul 22, 2023

As of #214 qdrant-client supports pydantic v2 and typing-extensions are not explicitly frozen anymore, should be available with the next release

@joein
Copy link
Member

joein commented Jul 26, 2023

pydantic v2 support was introduced in qdrant-client==1.3.2

@joein joein closed this as completed Jul 26, 2023
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

No branches or pull requests

3 participants