polyapi-python 0.3.18.dev5__tar.gz → 0.3.18.dev7__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.
Files changed (54) hide show
  1. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/PKG-INFO +2 -2
  2. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/cli.py +12 -0
  3. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/generate.py +15 -4
  4. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi_python.egg-info/PKG-INFO +2 -2
  5. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi_python.egg-info/SOURCES.txt +1 -0
  6. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi_python.egg-info/requires.txt +1 -1
  7. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/pyproject.toml +2 -2
  8. polyapi_python-0.3.18.dev7/tests/test_dependency_pins.py +33 -0
  9. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/LICENSE +0 -0
  10. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/README.md +0 -0
  11. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/__init__.py +0 -0
  12. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/__main__.py +0 -0
  13. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/api.py +0 -0
  14. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/auth.py +0 -0
  15. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/cli_constants.py +0 -0
  16. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/client.py +0 -0
  17. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/config.py +0 -0
  18. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/constants.py +0 -0
  19. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/deployables.py +0 -0
  20. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/error_handler.py +0 -0
  21. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/exceptions.py +0 -0
  22. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/execute.py +0 -0
  23. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/function_cli.py +0 -0
  24. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/http_client.py +0 -0
  25. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/parser.py +0 -0
  26. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/poly_schemas.py +0 -0
  27. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/poly_tables.py +0 -0
  28. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/prepare.py +0 -0
  29. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/py.typed +0 -0
  30. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/rendered_spec.py +0 -0
  31. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/schema.py +0 -0
  32. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/server.py +0 -0
  33. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/sync.py +0 -0
  34. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/typedefs.py +0 -0
  35. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/utils.py +0 -0
  36. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/variables.py +0 -0
  37. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi/webhook.py +0 -0
  38. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi_python.egg-info/dependency_links.txt +0 -0
  39. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/polyapi_python.egg-info/top_level.txt +0 -0
  40. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/setup.cfg +0 -0
  41. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_api.py +0 -0
  42. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_async_proof.py +0 -0
  43. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_auth.py +0 -0
  44. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_deployables.py +0 -0
  45. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_generate.py +0 -0
  46. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_parser.py +0 -0
  47. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_poly_custom.py +0 -0
  48. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_poly_schemas.py +0 -0
  49. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_rendered_spec.py +0 -0
  50. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_schema.py +0 -0
  51. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_server.py +0 -0
  52. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_tabi.py +0 -0
  53. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_utils.py +0 -0
  54. {polyapi_python-0.3.18.dev5 → polyapi_python-0.3.18.dev7}/tests/test_variables.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyapi-python
3
- Version: 0.3.18.dev5
3
+ Version: 0.3.18.dev7
4
4
  Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
5
5
  Author-email: PolyAPI <support@polyapi.io>
6
6
  License: MIT License
@@ -35,7 +35,7 @@ Requires-Dist: pydantic==2.8.0
35
35
  Requires-Dist: stdlib_list==0.11.1
36
36
  Requires-Dist: colorama==0.4.4
37
37
  Requires-Dist: python-socketio[asyncio_client]==5.11.1
38
- Requires-Dist: truststore==0.8.0
38
+ Requires-Dist: truststore==0.9.1
39
39
  Requires-Dist: httpx==0.28.1
40
40
  Dynamic: license-file
41
41
 
@@ -1,4 +1,6 @@
1
1
  import os
2
+ import sys
3
+ import tempfile
2
4
  import argparse
3
5
 
4
6
  from polyapi.utils import print_green, print_red
@@ -23,6 +25,16 @@ def _get_version_string():
23
25
 
24
26
 
25
27
  def execute_from_cli():
28
+ # Redirect __pycache__ out of generated dirs to avoid window file-locking
29
+ # failures when rmtree dels on generate.
30
+ if 'PYTHONPYCACHEPREFIX' not in os.environ:
31
+ cache_dir = os.path.join(tempfile.gettempdir(), 'polyapi_pycache')
32
+ os.makedirs(cache_dir, exist_ok=True)
33
+ # here for children just in case
34
+ os.environ['PYTHONPYCACHEPREFIX'] = cache_dir
35
+ # For the startup py_initialize issue
36
+ sys.pycache_prefix = cache_dir
37
+
26
38
  # First we setup all our argument parsing logic
27
39
  # Then we parse the arguments (waaay at the bottom)
28
40
  parser = argparse.ArgumentParser(
@@ -4,6 +4,7 @@ import uuid
4
4
  import shutil
5
5
  import logging
6
6
  import tempfile
7
+ import stat
7
8
 
8
9
  from copy import deepcopy
9
10
  from typing import Any, List, Optional, Tuple, cast
@@ -209,23 +210,33 @@ def get_tables(specs: List[SpecificationDto]) -> List[TableSpecDto]:
209
210
  return [cast(TableSpecDto, spec) for spec in specs if spec["type"] == "table"]
210
211
 
211
212
 
213
+ def _rmtree_readonly_handler(func, path, exc):
214
+ # Windows marks __pycache__ .pyc files read-only; clear the bit and retry.
215
+ os.chmod(path, stat.S_IWRITE)
216
+ func(path)
217
+
218
+
219
+ def _rmtree(path):
220
+ shutil.rmtree(path, onerror=_rmtree_readonly_handler)
221
+
222
+
212
223
  def remove_old_library():
213
224
  currdir = os.path.dirname(os.path.abspath(__file__))
214
225
  path = os.path.join(currdir, "poly")
215
226
  if os.path.exists(path):
216
- shutil.rmtree(path)
227
+ _rmtree(path)
217
228
 
218
229
  path = os.path.join(currdir, "vari")
219
230
  if os.path.exists(path):
220
- shutil.rmtree(path)
231
+ _rmtree(path)
221
232
 
222
233
  path = os.path.join(currdir, "schemas")
223
234
  if os.path.exists(path):
224
- shutil.rmtree(path)
235
+ _rmtree(path)
225
236
 
226
237
  path = os.path.join(currdir, "tabi")
227
238
  if os.path.exists(path):
228
- shutil.rmtree(path)
239
+ _rmtree(path)
229
240
 
230
241
 
231
242
  def create_empty_schemas_module():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyapi-python
3
- Version: 0.3.18.dev5
3
+ Version: 0.3.18.dev7
4
4
  Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
5
5
  Author-email: PolyAPI <support@polyapi.io>
6
6
  License: MIT License
@@ -35,7 +35,7 @@ Requires-Dist: pydantic==2.8.0
35
35
  Requires-Dist: stdlib_list==0.11.1
36
36
  Requires-Dist: colorama==0.4.4
37
37
  Requires-Dist: python-socketio[asyncio_client]==5.11.1
38
- Requires-Dist: truststore==0.8.0
38
+ Requires-Dist: truststore==0.9.1
39
39
  Requires-Dist: httpx==0.28.1
40
40
  Dynamic: license-file
41
41
 
@@ -38,6 +38,7 @@ polyapi_python.egg-info/top_level.txt
38
38
  tests/test_api.py
39
39
  tests/test_async_proof.py
40
40
  tests/test_auth.py
41
+ tests/test_dependency_pins.py
41
42
  tests/test_deployables.py
42
43
  tests/test_generate.py
43
44
  tests/test_parser.py
@@ -5,5 +5,5 @@ pydantic==2.8.0
5
5
  stdlib_list==0.11.1
6
6
  colorama==0.4.4
7
7
  python-socketio[asyncio_client]==5.11.1
8
- truststore==0.8.0
8
+ truststore==0.9.1
9
9
  httpx==0.28.1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "polyapi-python"
7
- version = "0.3.18.dev5"
7
+ version = "0.3.18.dev7"
8
8
  description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
9
9
  authors = [{ name = "PolyAPI", email = "support@polyapi.io" }]
10
10
  dependencies = [
@@ -15,7 +15,7 @@ dependencies = [
15
15
  "stdlib_list==0.11.1",
16
16
  "colorama==0.4.4",
17
17
  "python-socketio[asyncio_client]==5.11.1",
18
- "truststore==0.8.0",
18
+ "truststore==0.9.1",
19
19
  "httpx==0.28.1"
20
20
  ]
21
21
  readme = "README.md"
@@ -0,0 +1,33 @@
1
+ import re
2
+ import sys
3
+ from pathlib import Path
4
+
5
+
6
+ REPO_ROOT = Path(__file__).resolve().parents[1]
7
+ TRUSTSTORE_MINIMUM_PYTHON_313_VERSION = (0, 9, 1)
8
+
9
+
10
+ def _parse_requirement_version(requirement: str) -> tuple[int, ...]:
11
+ match = re.fullmatch(r"truststore==(\d+)\.(\d+)\.(\d+)", requirement)
12
+ assert match is not None
13
+ return tuple(int(part) for part in match.groups())
14
+
15
+
16
+ def test_truststore_pin_matches_between_dependency_surfaces():
17
+ requirements_lines = (REPO_ROOT / "requirements.txt").read_text(encoding="utf-8").splitlines()
18
+ requirements_pin = next(line for line in requirements_lines if line.startswith("truststore=="))
19
+
20
+ pyproject_text = (REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8")
21
+ pyproject_match = re.search(r'"(truststore==\d+\.\d+\.\d+)"', pyproject_text)
22
+ assert pyproject_match is not None
23
+ pyproject_pin = pyproject_match.group(1)
24
+
25
+ assert requirements_pin == pyproject_pin
26
+
27
+
28
+ def test_truststore_pin_supports_python_313_ssl_chain_api():
29
+ requirements_lines = (REPO_ROOT / "requirements.txt").read_text(encoding="utf-8").splitlines()
30
+ requirements_pin = next(line for line in requirements_lines if line.startswith("truststore=="))
31
+
32
+ if sys.version_info >= (3, 13):
33
+ assert _parse_requirement_version(requirements_pin) >= TRUSTSTORE_MINIMUM_PYTHON_313_VERSION