soia-client 1.1.6__tar.gz → 1.1.8__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 soia-client might be problematic. Click here for more details.

Files changed (35) hide show
  1. {soia_client-1.1.6/soia_client.egg-info → soia_client-1.1.8}/PKG-INFO +1 -1
  2. {soia_client-1.1.6 → soia_client-1.1.8}/pyproject.toml +6 -1
  3. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/arrays.py +1 -1
  4. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/enums.py +1 -1
  5. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/optionals.py +1 -1
  6. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/primitives.py +1 -1
  7. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/structs.py +6 -4
  8. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/timestamp.py +1 -1
  9. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/type_adapter.py +0 -1
  10. {soia_client-1.1.6 → soia_client-1.1.8/soia_client.egg-info}/PKG-INFO +1 -1
  11. {soia_client-1.1.6 → soia_client-1.1.8}/tests/test_module_initializer.py +1 -1
  12. {soia_client-1.1.6 → soia_client-1.1.8}/tests/test_serializers.py +1 -1
  13. {soia_client-1.1.6 → soia_client-1.1.8}/tests/test_timestamp.py +2 -2
  14. {soia_client-1.1.6 → soia_client-1.1.8}/LICENSE +0 -0
  15. {soia_client-1.1.6 → soia_client-1.1.8}/README.md +0 -0
  16. {soia_client-1.1.6 → soia_client-1.1.8}/setup.cfg +0 -0
  17. {soia_client-1.1.6 → soia_client-1.1.8}/soia/__init__.py +0 -0
  18. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/__init__.py +0 -0
  19. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/binary.py +0 -0
  20. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/function_maker.py +0 -0
  21. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/keep.py +0 -0
  22. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/keyed_items.py +0 -0
  23. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/method.py +0 -0
  24. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/never.py +0 -0
  25. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/repr.py +0 -0
  26. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/serializer.py +0 -0
  27. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/serializers.py +0 -0
  28. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/service.py +0 -0
  29. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_impl/service_client.py +0 -0
  30. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_module_initializer.py +0 -0
  31. {soia_client-1.1.6 → soia_client-1.1.8}/soia/_spec.py +0 -0
  32. {soia_client-1.1.6 → soia_client-1.1.8}/soia/reflection.py +0 -0
  33. {soia_client-1.1.6 → soia_client-1.1.8}/soia_client.egg-info/SOURCES.txt +0 -0
  34. {soia_client-1.1.6 → soia_client-1.1.8}/soia_client.egg-info/dependency_links.txt +0 -0
  35. {soia_client-1.1.6 → soia_client-1.1.8}/soia_client.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soia-client
3
- Version: 1.1.6
3
+ Version: 1.1.8
4
4
  Author-email: Tyler Fibonacci <gepheum@gmail.com>
5
5
  License: MIT License
6
6
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "soia-client"
7
- version = "1.1.6"
7
+ version = "1.1.8"
8
8
  description = ""
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Tyler Fibonacci", email = "gepheum@gmail.com" }]
@@ -20,3 +20,8 @@ requires-python = ">=3.10"
20
20
 
21
21
  [project.urls]
22
22
  Homepage = "https://github.com/gepheum/soia-python-client"
23
+
24
+ [tool.isort]
25
+ profile = "black"
26
+ line_length = 127
27
+
@@ -8,7 +8,7 @@ from soia import _spec, reflection
8
8
  from soia._impl.binary import decode_int64, encode_length_prefix
9
9
  from soia._impl.function_maker import Any, Expr, ExprLike, Line, make_function
10
10
  from soia._impl.keyed_items import Item, Key, KeyedItems
11
- from soia._impl.type_adapter import T, ByteStream, TypeAdapter
11
+ from soia._impl.type_adapter import ByteStream, T, TypeAdapter
12
12
 
13
13
 
14
14
  def get_array_adapter(
@@ -7,7 +7,7 @@ from soia import _spec, reflection
7
7
  from soia._impl.binary import decode_int64, decode_unused, encode_int64
8
8
  from soia._impl.function_maker import BodyBuilder, Expr, ExprLike, Line, make_function
9
9
  from soia._impl.repr import repr_impl
10
- from soia._impl.type_adapter import T, ByteStream, TypeAdapter
10
+ from soia._impl.type_adapter import ByteStream, T, TypeAdapter
11
11
 
12
12
 
13
13
  class EnumAdapter(Generic[T], TypeAdapter[T]):
@@ -6,7 +6,7 @@ from weakref import WeakValueDictionary
6
6
 
7
7
  from soia import _spec, reflection
8
8
  from soia._impl.function_maker import Expr, ExprLike
9
- from soia._impl.type_adapter import T, ByteStream, TypeAdapter
9
+ from soia._impl.type_adapter import ByteStream, T, TypeAdapter
10
10
 
11
11
 
12
12
  def get_optional_adapter(other_adapter: TypeAdapter[T]) -> TypeAdapter[T | None]:
@@ -20,7 +20,7 @@ from soia._impl.binary import (
20
20
  )
21
21
  from soia._impl.function_maker import Expr, ExprLike
22
22
  from soia._impl.timestamp import Timestamp
23
- from soia._impl.type_adapter import ByteStream, TypeAdapter, T
23
+ from soia._impl.type_adapter import ByteStream, T, TypeAdapter
24
24
 
25
25
 
26
26
  class AbstractPrimitiveAdapter(TypeAdapter[T]):
@@ -1,10 +1,11 @@
1
1
  import copy
2
+ import itertools
2
3
  from collections.abc import Callable, Sequence
3
4
  from dataclasses import FrozenInstanceError, dataclass
4
- import itertools
5
5
  from typing import Any, Final, Generic, Union, cast
6
6
 
7
7
  from soia import _spec, reflection
8
+ from soia._impl.binary import decode_int64, decode_unused, encode_length_prefix
8
9
  from soia._impl.function_maker import (
9
10
  BodyBuilder,
10
11
  Expr,
@@ -18,8 +19,7 @@ from soia._impl.function_maker import (
18
19
  )
19
20
  from soia._impl.keep import KEEP
20
21
  from soia._impl.repr import repr_impl
21
- from soia._impl.type_adapter import T, ByteStream, TypeAdapter
22
- from soia._impl.binary import decode_int64, decode_unused, encode_length_prefix
22
+ from soia._impl.type_adapter import ByteStream, T, TypeAdapter
23
23
 
24
24
 
25
25
  class StructAdapter(Generic[T], TypeAdapter[T]):
@@ -949,7 +949,9 @@ def _make_decode_fn(
949
949
  f" if array_len > {num_slots_incl_removed} and keep_unrecognized_fields:"
950
950
  )
951
951
  for _ in range(num_slots_incl_removed - num_slots_excl_removed):
952
- builder.append_ln(Expr.local(" decode_unused", decode_unused), "(stream)")
952
+ builder.append_ln(
953
+ " ", Expr.local("decode_unused", decode_unused), "(stream)"
954
+ )
953
955
  builder.append_ln(" start_offset = stream.position")
954
956
  builder.append_ln(" for _ in range(array_len - {num_slots_incl_removed}):")
955
957
  builder.append_ln(" ", Expr.local("decode_unused", decode_unused), "(stream)")
@@ -146,7 +146,7 @@ class Timestamp:
146
146
  dt = self.to_datetime_or_raise()
147
147
  except Exception:
148
148
  return ""
149
- ret = dt.isoformat()
149
+ ret = dt.isoformat(timespec="milliseconds")
150
150
  bad_suffix = "+00:00"
151
151
  if ret.endswith(bad_suffix):
152
152
  ret = ret[0 : -len(bad_suffix)] + "Z"
@@ -5,7 +5,6 @@ from typing import Generic, Protocol, TypeVar
5
5
  from soia import _spec, reflection
6
6
  from soia._impl.function_maker import ExprLike
7
7
 
8
-
9
8
  T = TypeVar("T")
10
9
 
11
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soia-client
3
- Version: 1.1.6
3
+ Version: 1.1.8
4
4
  Author-email: Tyler Fibonacci <gepheum@gmail.com>
5
5
  License: MIT License
6
6
 
@@ -468,7 +468,7 @@ class ModuleInitializerTestCase(unittest.TestCase):
468
468
  )
469
469
  self.assertEqual(
470
470
  str(p),
471
- "Primitives(\n bool=True,\n bytes=b'a',\n f32=3.14,\n f64=3.14,\n i32=1,\n i64=2,\n u64=3,\n s='',\n t=Timestamp(\n unix_millis=4,\n _formatted='1970-01-01T00:00:00.004000Z',\n ),\n)", # noqa: E501
471
+ "Primitives(\n bool=True,\n bytes=b'a',\n f32=3.14,\n f64=3.14,\n i32=1,\n i64=2,\n u64=3,\n s='',\n t=Timestamp(\n unix_millis=4,\n _formatted='1970-01-01T00:00:00.004Z',\n ),\n)", # noqa: E501
472
472
  )
473
473
 
474
474
  def test_from_json_converts_between_ints_and_floats(self):
@@ -120,7 +120,7 @@ class SerializersTestCase(unittest.TestCase):
120
120
  primitive_serializer("timestamp").to_json_code(
121
121
  Timestamp.from_unix_millis(3), readable=True
122
122
  ),
123
- '{\n "unix_millis": 3,\n "formatted": "1970-01-01T00:00:00.003000Z"\n}',
123
+ '{\n "unix_millis": 3,\n "formatted": "1970-01-01T00:00:00.003Z"\n}',
124
124
  )
125
125
  self.assertEqual(
126
126
  primitive_serializer("timestamp").from_json_code("3"),
@@ -127,11 +127,11 @@ class TimestampTestCase(unittest.TestCase):
127
127
  a = Timestamp.from_unix_seconds(123456789)
128
128
  self.assertEqual(
129
129
  repr(a),
130
- "Timestamp(\n unix_millis=123456789000,\n _formatted='1973-11-29T21:33:09Z',\n)",
130
+ "Timestamp(\n unix_millis=123456789000,\n _formatted='1973-11-29T21:33:09.000Z',\n)",
131
131
  )
132
132
  self.assertEqual(
133
133
  str(a),
134
- "Timestamp(\n unix_millis=123456789000,\n _formatted='1973-11-29T21:33:09Z',\n)",
134
+ "Timestamp(\n unix_millis=123456789000,\n _formatted='1973-11-29T21:33:09.000Z',\n)",
135
135
  )
136
136
 
137
137
  def test_repr_when_out_of_bounds(self):
File without changes
File without changes
File without changes
File without changes