Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Typing improvements and loosened dependencies#342

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Zaczero wants to merge9 commits intostac-utils:main
base:main
Choose a base branch
Loading
fromZaczero:main

Conversation

Zaczero
Copy link

This PR is a set of several typing improvements as well as loosened dependencies whichresolves#341. While this PR bundles several changes, the commits are atomic and should be simple to review individually.

More notable changes:

  • pydantic depdendency was replaced with pydantic-settings as inofficial docs.
  • set_json_dumps no longer uses a .decode() wrapper method, since bytes return is supported in psycopg since 3.1.9.
  • pathlib.Path type hints were removed since from my testing they never worked (they are not an instance of str).

@ZaczeroZaczero mentioned this pull requestJan 31, 2025
@@ -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:
Copy link
Collaborator

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.

@bitner
Copy link
Collaborator

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.

@vincentsarago
Copy link
Member

can we close this?
most of the requested changes were done in#352

The pydantic change is a breaking change which would need to be proposed in a specific PR

gadomski reacted with heart emoji

@Zaczero
Copy link
Author

Zaczero commentedFeb 25, 2025
edited
Loading

"most of the requested changes were done"

I don't think calling it "most" is correct here. This PR also aimed to resolve typing issues with the project (see the changed files). However, I also don'tcurrently intend to do further work on this project; if someone cares about having correct types, I would suggest extracting individual changes or having maintainers edit this PR. Project maintainers are allowed to edit it:

image

@ZaczeroZaczero marked this pull request as draftFebruary 25, 2025 12:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@bitnerbitnerbitner left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Loosen dependencies requirements
3 participants
@Zaczero@bitner@vincentsarago

[8]ページ先頭

©2009-2025 Movatter.jp