payi 0.1.0a22__tar.gz → 0.1.0a23__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of payi might be problematic. Click here for more details.

Files changed (125) hide show
  1. payi-0.1.0a23/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a22 → payi-0.1.0a23}/CHANGELOG.md +8 -0
  3. {payi-0.1.0a22 → payi-0.1.0a23}/PKG-INFO +1 -1
  4. {payi-0.1.0a22 → payi-0.1.0a23}/pyproject.toml +1 -1
  5. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_base_client.py +2 -2
  6. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_models.py +2 -0
  7. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_version.py +1 -1
  8. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_response.py +38 -1
  9. payi-0.1.0a22/.release-please-manifest.json +0 -3
  10. {payi-0.1.0a22 → payi-0.1.0a23}/.gitignore +0 -0
  11. {payi-0.1.0a22 → payi-0.1.0a23}/CONTRIBUTING.md +0 -0
  12. {payi-0.1.0a22 → payi-0.1.0a23}/LICENSE +0 -0
  13. {payi-0.1.0a22 → payi-0.1.0a23}/README.md +0 -0
  14. {payi-0.1.0a22 → payi-0.1.0a23}/SECURITY.md +0 -0
  15. {payi-0.1.0a22 → payi-0.1.0a23}/api.md +0 -0
  16. {payi-0.1.0a22 → payi-0.1.0a23}/bin/check-release-environment +0 -0
  17. {payi-0.1.0a22 → payi-0.1.0a23}/bin/publish-pypi +0 -0
  18. {payi-0.1.0a22 → payi-0.1.0a23}/examples/.keep +0 -0
  19. {payi-0.1.0a22 → payi-0.1.0a23}/mypy.ini +0 -0
  20. {payi-0.1.0a22 → payi-0.1.0a23}/noxfile.py +0 -0
  21. {payi-0.1.0a22 → payi-0.1.0a23}/release-please-config.json +0 -0
  22. {payi-0.1.0a22 → payi-0.1.0a23}/requirements-dev.lock +0 -0
  23. {payi-0.1.0a22 → payi-0.1.0a23}/requirements.lock +0 -0
  24. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/__init__.py +0 -0
  25. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_client.py +0 -0
  26. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_compat.py +0 -0
  27. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_constants.py +0 -0
  28. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_exceptions.py +0 -0
  29. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_files.py +0 -0
  30. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_qs.py +0 -0
  31. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_resource.py +0 -0
  32. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_response.py +0 -0
  33. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_streaming.py +0 -0
  34. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_types.py +0 -0
  35. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/__init__.py +0 -0
  36. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_logs.py +0 -0
  37. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_proxy.py +0 -0
  38. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_reflection.py +0 -0
  39. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_streams.py +0 -0
  40. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_sync.py +0 -0
  41. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_transform.py +0 -0
  42. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_typing.py +0 -0
  43. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/_utils/_utils.py +0 -0
  44. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/lib/.keep +0 -0
  45. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/lib/helpers.py +0 -0
  46. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/py.typed +0 -0
  47. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/__init__.py +0 -0
  48. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/budgets/__init__.py +0 -0
  49. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/budgets/budgets.py +0 -0
  50. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/budgets/tags.py +0 -0
  51. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/categories/__init__.py +0 -0
  52. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/categories/categories.py +0 -0
  53. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/categories/resources.py +0 -0
  54. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/experiences/__init__.py +0 -0
  55. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/experiences/experiences.py +0 -0
  56. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/experiences/types.py +0 -0
  57. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/resources/ingest.py +0 -0
  58. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/__init__.py +0 -0
  59. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budget_create_params.py +0 -0
  60. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budget_history_response.py +0 -0
  61. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budget_list_params.py +0 -0
  62. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budget_response.py +0 -0
  63. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budget_update_params.py +0 -0
  64. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/__init__.py +0 -0
  65. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/budget_tags.py +0 -0
  66. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_create_params.py +0 -0
  67. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_create_response.py +0 -0
  68. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_delete_response.py +0 -0
  69. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_list_response.py +0 -0
  70. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_remove_params.py +0 -0
  71. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_remove_response.py +0 -0
  72. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_update_params.py +0 -0
  73. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/budgets/tag_update_response.py +0 -0
  74. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/bulk_ingest_response.py +0 -0
  75. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/categories/__init__.py +0 -0
  76. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/categories/resource_create_params.py +0 -0
  77. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/categories/resource_list_response.py +0 -0
  78. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/category_delete_resource_response.py +0 -0
  79. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/category_delete_response.py +0 -0
  80. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/category_list_resources_response.py +0 -0
  81. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/category_list_response.py +0 -0
  82. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/category_resource_response.py +0 -0
  83. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/category_response.py +0 -0
  84. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/cost_data.py +0 -0
  85. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/cost_details.py +0 -0
  86. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/default_response.py +0 -0
  87. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/experience_instance.py +0 -0
  88. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/experiences/__init__.py +0 -0
  89. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/experiences/experience_type.py +0 -0
  90. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/experiences/type_create_params.py +0 -0
  91. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/experiences/type_list_response.py +0 -0
  92. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/experiences/type_update_params.py +0 -0
  93. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/ingest_bulk_params.py +0 -0
  94. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/ingest_event_param.py +0 -0
  95. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/ingest_response.py +0 -0
  96. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/ingest_units_params.py +0 -0
  97. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/paged_budget_list.py +0 -0
  98. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/requests_data.py +0 -0
  99. {payi-0.1.0a22 → payi-0.1.0a23}/src/payi/types/total_cost_data.py +0 -0
  100. {payi-0.1.0a22 → payi-0.1.0a23}/tests/__init__.py +0 -0
  101. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/__init__.py +0 -0
  102. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/budgets/__init__.py +0 -0
  103. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/budgets/test_tags.py +0 -0
  104. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/categories/__init__.py +0 -0
  105. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/categories/test_resources.py +0 -0
  106. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/experiences/__init__.py +0 -0
  107. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/experiences/test_types.py +0 -0
  108. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/test_budgets.py +0 -0
  109. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/test_categories.py +0 -0
  110. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/test_experiences.py +0 -0
  111. {payi-0.1.0a22 → payi-0.1.0a23}/tests/api_resources/test_ingest.py +0 -0
  112. {payi-0.1.0a22 → payi-0.1.0a23}/tests/conftest.py +0 -0
  113. {payi-0.1.0a22 → payi-0.1.0a23}/tests/sample_file.txt +0 -0
  114. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_client.py +0 -0
  115. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_deepcopy.py +0 -0
  116. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_extract_files.py +0 -0
  117. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_files.py +0 -0
  118. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_models.py +0 -0
  119. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_qs.py +0 -0
  120. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_required_args.py +0 -0
  121. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_streaming.py +0 -0
  122. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_transform.py +0 -0
  123. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_utils/test_proxy.py +0 -0
  124. {payi-0.1.0a22 → payi-0.1.0a23}/tests/test_utils/test_typing.py +0 -0
  125. {payi-0.1.0a22 → payi-0.1.0a23}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.23"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.23 (2024-09-03)
4
+
5
+ Full Changelog: [v0.1.0-alpha.22...v0.1.0-alpha.23](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.22...v0.1.0-alpha.23)
6
+
7
+ ### Chores
8
+
9
+ * **internal:** codegen related update ([#106](https://github.com/Pay-i/pay-i-python/issues/106)) ([2d1f2f7](https://github.com/Pay-i/pay-i-python/commit/2d1f2f7db30d05b63ed85b7fe41962c6bfda2a9e))
10
+
3
11
  ## 0.1.0-alpha.22 (2024-08-14)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a22
3
+ Version: 0.1.0a23
4
4
  Summary: The official Python library for the payi API
5
5
  Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
6
6
  Project-URL: Repository, https://github.com/Pay-i/pay-i-python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.22"
3
+ version = "0.1.0-alpha.23"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import sys
3
4
  import json
4
5
  import time
5
6
  import uuid
@@ -1982,7 +1983,6 @@ def get_python_version() -> str:
1982
1983
 
1983
1984
  def get_architecture() -> Arch:
1984
1985
  try:
1985
- python_bitness, _ = platform.architecture()
1986
1986
  machine = platform.machine().lower()
1987
1987
  except Exception:
1988
1988
  return "unknown"
@@ -1998,7 +1998,7 @@ def get_architecture() -> Arch:
1998
1998
  return "x64"
1999
1999
 
2000
2000
  # TODO: untested
2001
- if python_bitness == "32bit":
2001
+ if sys.maxsize <= 2**32:
2002
2002
  return "x32"
2003
2003
 
2004
2004
  if machine:
@@ -380,6 +380,8 @@ def is_basemodel(type_: type) -> bool:
380
380
 
381
381
  def is_basemodel_type(type_: type) -> TypeGuard[type[BaseModel] | type[GenericModel]]:
382
382
  origin = get_origin(type_) or type_
383
+ if not inspect.isclass(origin):
384
+ return False
383
385
  return issubclass(origin, BaseModel) or issubclass(origin, GenericModel)
384
386
 
385
387
 
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "payi"
4
- __version__ = "0.1.0-alpha.22" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.23" # x-release-please-version
@@ -1,5 +1,5 @@
1
1
  import json
2
- from typing import List, cast
2
+ from typing import Any, List, Union, cast
3
3
  from typing_extensions import Annotated
4
4
 
5
5
  import httpx
@@ -188,3 +188,40 @@ async def test_async_response_parse_annotated_type(async_client: AsyncPayi) -> N
188
188
  )
189
189
  assert obj.foo == "hello!"
190
190
  assert obj.bar == 2
191
+
192
+
193
+ class OtherModel(BaseModel):
194
+ a: str
195
+
196
+
197
+ @pytest.mark.parametrize("client", [False], indirect=True) # loose validation
198
+ def test_response_parse_expect_model_union_non_json_content(client: Payi) -> None:
199
+ response = APIResponse(
200
+ raw=httpx.Response(200, content=b"foo", headers={"Content-Type": "application/text"}),
201
+ client=client,
202
+ stream=False,
203
+ stream_cls=None,
204
+ cast_to=str,
205
+ options=FinalRequestOptions.construct(method="get", url="/foo"),
206
+ )
207
+
208
+ obj = response.parse(to=cast(Any, Union[CustomModel, OtherModel]))
209
+ assert isinstance(obj, str)
210
+ assert obj == "foo"
211
+
212
+
213
+ @pytest.mark.asyncio
214
+ @pytest.mark.parametrize("async_client", [False], indirect=True) # loose validation
215
+ async def test_async_response_parse_expect_model_union_non_json_content(async_client: AsyncPayi) -> None:
216
+ response = AsyncAPIResponse(
217
+ raw=httpx.Response(200, content=b"foo", headers={"Content-Type": "application/text"}),
218
+ client=async_client,
219
+ stream=False,
220
+ stream_cls=None,
221
+ cast_to=str,
222
+ options=FinalRequestOptions.construct(method="get", url="/foo"),
223
+ )
224
+
225
+ obj = await response.parse(to=cast(Any, Union[CustomModel, OtherModel]))
226
+ assert isinstance(obj, str)
227
+ assert obj == "foo"
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.22"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes