memgraph / gqlalchemy

GQLAlchemy is a library developed with the purpose of assisting in writing and running queries on Memgraph. GQLAlchemy supports high-level connection to Memgraph as well as modular query builder.

Home Page:https://pypi.org/project/gqlalchemy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade to pydantic v2

apowers313 opened this issue · comments

Pydantic released a v2 in June 2023. I'd prefer to use the newer APIs, but gqlalchemy uses v1 which is a dependency conflict.

Any plans for gqlalchemy to upgrade to pydantic v2?

Hi @apowers313, thank you for reporting this. We did not have such plans, but I will add this issue to Milestone 1.5 to potentially include it there. Is that a blocker for you, or just nice to have?

commented

@katarinasupe
Hi, we are also looking forward to migrating our codebase to pydantic V2, because of all the new features and improvements. But we are waiting for all the other libs we use to do the transition as well.
Do you have maybe a timeframe for this?

FYI, it seems like the easiest upgrade path might be to upgrade to Pydantic v2 and then import the v1 APIs as mentioned in the migration guide.

Hi, @apowers313 and @alex-linx, @katarinasupe is currently on AL, but once she returns next week, we will get back to you on this issue.

@apowers313 Thanks for the tip, we will look into it.

hi, we are having same issue. even for simple connection it throws error

I would recommend downgrading to pydantic v1 (e.g. pip install "pydantic>=1.0.0") or using pymgclient as a work around.

thanks @apowers313 pymg directly

+1 for me on v2 support - as @apowers313 noted you can use v2 and import the v1 apis to make the migration simpler

does changing the import with v1. will work ?

@apowers313 @alex-linx @rahulvramesh @chrisgoddard thank you for jumping in on this issue. We will work on the release at the end of the next week and try to include this dependency bump. Stay tuned :)