langchain
langchain copied to clipboard
Import of `declarative_base` when SQLAlchemy <1.4
In pyproject.toml, the expectation is SQLAlchemy = "^1"
. But, the way declarative_base
is imported in cache.py will only work with SQLAlchemy >=1.4. This PR makes sure Langchain can be run in environments with SQLAlchemy <1.4
In general, it feels like SQLAlchemy should be made to be an optional dependency. What do you think, @hwchase17?
In general, it feels like SQLAlchemy should be made to be an optional dependency. What do you think, @hwchase17?
yeah let me take a look into that
im also fine just bumping the requirements to be "^1.4" - thoughts on that?
im also fine just bumping the requirements to be "^1.4" - thoughts on that?
The move from 1.3 to 1.4 isn't trivial (i.e., it's not just a matter of upgrading, as I learnt earlier today). So, that'd possibly make life difficult for LangChain users — that's certainly the case for us. Given how popular <1.4 is in the wild, I think it'd make sense to support it. Just my two cents.
I know you're busy with exciting stuff @hwchase17 (💪), but, thoughts on this? 😊
I know you're busy with exciting stuff @hwchase17 (💪), but, thoughts on this? 😊
sorry for delay - agree this should be fixed. will get into the next release