-
Notifications
You must be signed in to change notification settings - Fork 42
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
Typing improvements and loosened dependencies #342
base: main
Are you sure you want to change the base?
Conversation
Also remove unused packages: flake8, types-setuptools
Path type was never supported so also remove false type
@@ -10,23 +10,13 @@ | |||
from psycopg import Connection, sql | |||
from psycopg.types.json import set_json_dumps, set_json_loads | |||
from psycopg_pool import ConnectionPool | |||
|
|||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have some use cases where pypgstac is used with other libraries that require pydantic 1.X, so we use this try block to use the v1 compatibility layer of pydantic 2 which still supports BaseSettings.
Hey @Zaczero Thanks for kicking this PR up here. I am not too keen on just using >= for dependencies as (particularly with a major release version) there is a good chance that there could be breaking changes from dependencies. For pydantic, I do know that we need to integrate with some libraries that still are using pydantic v1. This is why we use the v1 compatibility layer in Pydantic v2 that allows us to still use the old pydantic base settings api. |
This PR is a set of several typing improvements as well as loosened dependencies which resolves #341. While this PR bundles several changes, the commits are atomic and should be simple to review individually.
More notable changes: