Skip to content
Merged
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
37 changes: 16 additions & 21 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
lockVersion: 2.0.0
id: 833c6a67-4a4a-4ef1-ba24-165a29264e4a
management:
docChecksum: 95677631b1e6bfbb79b295e9dfc3b271
docChecksum: 953e2b2118ac2b030e61d9bac4505786
docVersion: 1.0.0
speakeasyVersion: 1.678.1
generationVersion: 2.787.5
releaseVersion: 1.10.5
configChecksum: f505932cf38024c750733723ea1bb373
speakeasyVersion: 1.682.0
generationVersion: 2.791.1
releaseVersion: 1.10.6
configChecksum: ec36deefe7602ad6db6f6478361ffd81
repoURL: https://github.com/gr4vy/gr4vy-python.git
installationURL: https://github.com/gr4vy/gr4vy-python.git
published: true
persistentEdits:
generation_id: 39f0891c-5588-44d7-8c3e-cd31f00df595
pristine_commit_hash: d9997d8836655ff3b5d64e9de8b53246e364565b
pristine_tree_hash: 2fda46f5c4341409d944408dd1f0ded5b85ce9bf
generation_id: 4ae03175-546a-4cc4-b3fb-6fa8f8bcaccb
pristine_commit_hash: 5e7dd1d68c984539f33e9188ce202e2979acb104
pristine_tree_hash: 2decd3a27e1b7c80880dfc6bf0a8eb9b6e9c000e
features:
python:
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.5
core: 5.23.14
core: 5.23.16
defaultEnabledRetries: 0.2.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.3.2
Expand All @@ -34,7 +34,7 @@ features:
methodArguments: 1.0.2
nameOverrides: 3.0.1
nullables: 1.0.1
openEnums: 1.0.1
openEnums: 1.0.2
pagination: 3.0.7
responseFormat: 1.0.1
retries: 3.0.3
Expand Down Expand Up @@ -2192,8 +2192,8 @@ trackedFiles:
pristine_git_object: e8cd3e85682cd3d489cf3c5be75a0563d0c9f4bf
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:c5f30e22c6ded754018a9e5908fb741d69749697
pristine_git_object: 5bb1c5ef85477f5f34f9ead01efeb4f08d4b748a
last_write_checksum: sha1:79e11f0cad51974ece2050b4fb10f3a7e2c5c336
pristine_git_object: 0b4ee38bd140d4e762a43ba11eaef3675315a14b
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:63a92abbd1de3323613f0d4c1ae4412076577710
Expand All @@ -2220,8 +2220,8 @@ trackedFiles:
pristine_git_object: 83a0d00f9b5b1a6d837643a32bfd0f82cd4f98ce
src/gr4vy/_version.py:
id: 1b5ad1da47aa
last_write_checksum: sha1:2f3eb4cf8314248c75a8ad6aee0bd325aa2507ae
pristine_git_object: 10f11eaf295e32a16ff5ce3a6c342e7de4a72b1b
last_write_checksum: sha1:ef593d0a6f7a6ed028143c82e3e065322f51d235
pristine_git_object: 709d3eb64f4b305cac2f14c0c55555631738b557
src/gr4vy/account_updater.py:
id: 6dc8f39e2fb9
last_write_checksum: sha1:fabc79a59dd06fb927ce2d834fbafbcad5836a4b
Expand Down Expand Up @@ -3888,8 +3888,8 @@ trackedFiles:
pristine_git_object: fc76fe0c5505e29859b5d2bb707d48fd27661b8c
src/gr4vy/types/basemodel.py:
id: 1af1ed4da662
last_write_checksum: sha1:615d0b364fa924b0fef719958df34596cc7c1ae2
pristine_git_object: 231c2e37283a76082f1a064c7aae47f8ee4ee694
last_write_checksum: sha1:10d84aedeb9d35edfdadf2c3020caa1d24d8b584
pristine_git_object: a9a640a1a7048736383f96c67c6290c86bf536ee
src/gr4vy/utils/__init__.py:
id: e52060886bd2
last_write_checksum: sha1:5d88356c206a32c694ae113178ca6325a9fc612a
Expand Down Expand Up @@ -7394,11 +7394,6 @@ examples:
application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"}
examplesVersion: 1.0.2
generatedTests: {}
releaseNotes: |
## Python SDK Changes:
* `gr4vy.transactions.create()`: `request.connection_options` **Changed** **Breaking** :warning:
* `gr4vy.transactions.update()`: `request.connection_options` **Changed** **Breaking** :warning:
* `gr4vy.payment-links.create()`: `request.connection_options` **Changed** **Breaking** :warning:
generatedFiles:
- .gitattributes
- .vscode/settings.json
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
python:
version: 1.10.5
version: 1.10.6
additionalDependencies:
dev:
freezegun: ^1.5.1
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.678.1
speakeasyVersion: 1.682.0
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:86c63ec5f8232c7bdb78c6ae1b1c9abac1a8313ce1f8744e225efad4f126f71d
sourceBlobDigest: sha256:22b2e45a967df609d5bb43af7d817b6da21ab49198f282c29396812584895d17
sourceRevisionDigest: sha256:7deb48337b2b7912be4756b79932ef4d3943c4852ce6f97129fe45c401e8c4eb
sourceBlobDigest: sha256:7f90e127cc0b0ad4fc5bac99867e949aaa5039cff86e668df6586b271da5ce62
tags:
- latest
- speakeasy-sdk-regen-1765989284
- speakeasy-sdk-regen-1767785709
- 1.0.0
targets:
python:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:86c63ec5f8232c7bdb78c6ae1b1c9abac1a8313ce1f8744e225efad4f126f71d
sourceBlobDigest: sha256:22b2e45a967df609d5bb43af7d817b6da21ab49198f282c29396812584895d17
sourceRevisionDigest: sha256:7deb48337b2b7912be4756b79932ef4d3943c4852ce6f97129fe45c401e8c4eb
sourceBlobDigest: sha256:7f90e127cc0b0ad4fc5bac99867e949aaa5039cff86e668df6586b271da5ce62
codeSamplesNamespace: openapi-python-code-samples
codeSamplesRevisionDigest: sha256:cd1bf63f0a285e4a5658fa4e5e74c823a359b4242714a23986363505a5ce23a9
codeSamplesRevisionDigest: sha256:67b9f7138e7010f19618f9cd69a8985a16b05f20a9016e52cf60ad6d7d8466be
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1268,4 +1268,14 @@ Based on:
### Generated
- [python v1.10.5] .
### Releases
- [PyPI v1.10.5] https://pypi.org/project/gr4vy/1.10.5 - .
- [PyPI v1.10.5] https://pypi.org/project/gr4vy/1.10.5 - .

## 2026-01-07 11:34:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.682.0 (2.791.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.10.6] .
### Releases
- [PyPI v1.10.6] https://pypi.org/project/gr4vy/1.10.6 - .
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[project]
name = "gr4vy"
version = "1.10.5"
version = "1.10.6"
description = "Python Client SDK Generated by Speakeasy."
authors = [{ name = "Gr4vy" },]
readme = "README-PYPI.md"
Expand Down
6 changes: 3 additions & 3 deletions src/gr4vy/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "gr4vy"
__version__: str = "1.10.5"
__version__: str = "1.10.6"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.787.5"
__user_agent__: str = "speakeasy-sdk/python 1.10.5 2.787.5 1.0.0 gr4vy"
__gen_version__: str = "2.791.1"
__user_agent__: str = "speakeasy-sdk/python 1.10.6 2.791.1 1.0.0 gr4vy"

try:
if __package__ is not None:
Expand Down
44 changes: 41 additions & 3 deletions src/gr4vy/types/basemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from pydantic import ConfigDict, model_serializer
from pydantic import BaseModel as PydanticBaseModel
from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union
from pydantic_core import core_schema
from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union
from typing_extensions import TypeAliasType, TypeAlias


Expand Down Expand Up @@ -35,5 +36,42 @@ def __bool__(self) -> Literal[False]:
"OptionalNullable", Union[Optional[Nullable[T]], Unset], type_params=(T,)
)

UnrecognizedInt: TypeAlias = int
UnrecognizedStr: TypeAlias = str

class UnrecognizedStr(str):
@classmethod
def __get_pydantic_core_schema__(cls, _source_type: Any, _handler: Any) -> core_schema.CoreSchema:
# Make UnrecognizedStr only work in lax mode, not strict mode
# This makes it a "fallback" option when more specific types (like Literals) don't match
def validate_lax(v: Any) -> 'UnrecognizedStr':
if isinstance(v, cls):
return v
return cls(str(v))

# Use lax_or_strict_schema where strict always fails
# This forces Pydantic to prefer other union members in strict mode
# and only fall back to UnrecognizedStr in lax mode
return core_schema.lax_or_strict_schema(
lax_schema=core_schema.chain_schema([
core_schema.str_schema(),
core_schema.no_info_plain_validator_function(validate_lax)
]),
strict_schema=core_schema.none_schema(), # Always fails in strict mode
)


class UnrecognizedInt(int):
@classmethod
def __get_pydantic_core_schema__(cls, _source_type: Any, _handler: Any) -> core_schema.CoreSchema:
# Make UnrecognizedInt only work in lax mode, not strict mode
# This makes it a "fallback" option when more specific types (like Literals) don't match
def validate_lax(v: Any) -> 'UnrecognizedInt':
if isinstance(v, cls):
return v
return cls(int(v))
return core_schema.lax_or_strict_schema(
lax_schema=core_schema.chain_schema([
core_schema.int_schema(),
core_schema.no_info_plain_validator_function(validate_lax)
]),
strict_schema=core_schema.none_schema(), # Always fails in strict mode
)