Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

[Infra] Bump to Pydantic v2 #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion infisical/models/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SecretImport(BaseModel):

class SecretsResponse(BaseModel):
secrets: List[Secret]
imports: Optional[List[SecretImport]]
imports: Optional[List[SecretImport]] = None


class SecretResponse(BaseModel):
Expand Down
12 changes: 6 additions & 6 deletions infisical/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Secret(BaseModel):
id: str = Field(..., alias="_id")
version: int
workspace: str
user: Optional[str]
user: Optional[str] = None
type: Literal["shared", "personal"]
environment: str
secret_key_ciphertext: str = Field(..., alias="secretKeyCiphertext")
Expand All @@ -24,11 +24,11 @@ class Secret(BaseModel):

class SecretBundle(BaseModel):
secret_name: str
secret_value: Optional[str]
version: Optional[int]
workspace: Optional[str]
environment: Optional[str]
type: Optional[Literal["shared", "personal"]]
secret_value: Optional[str] = None
version: Optional[int] = None
workspace: Optional[str] = None
environment: Optional[str] = None
type: Optional[Literal["shared", "personal"]] = None
created_at: Optional[datetime] = Field(None, alias="createdAt")
updated_at: Optional[datetime] = Field(None, alias="updatedAt")
is_fallback: bool
Expand Down
2 changes: 1 addition & 1 deletion infisical/models/secret_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ class ServiceTokenV3Credentials(BaseModel):
class ClientConfig(BaseModel):
auth_mode: Literal["service_token", "service_token_v3"]
credentials: Union[ServiceTokenCredentials, ServiceTokenV3Credentials]
workspace_config: Optional[WorkspaceConfig]
workspace_config: Optional[WorkspaceConfig] = None
cache_ttl: int
Empty file added log.txt
Empty file.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ classifiers = [
]
dependencies = [
"requests ==2.31.0",
"pydantic >=1.6.2,!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0",
"pydantic >=2.0.0",
"pycryptodomex >=3.17,<4.0.0",
"pynacl >=1.5.0,<2.0.0"
]
Expand Down