smithy-json 0.2.2__tar.gz → 0.2.3__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.
@@ -0,0 +1,8 @@
1
+ {
2
+ "changes": [
3
+ {
4
+ "type": "bugfix",
5
+ "description": "Serialize `IntEnum` members as their underlying integer instead of their `repr`."
6
+ }
7
+ ]
8
+ }
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.3
4
+
5
+ ### Bug fixes
6
+ * Serialize `IntEnum` members as their underlying integer instead of their `repr`.
7
+
3
8
  ## v0.2.2
4
9
 
5
10
  ### Enhancements
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smithy-json
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: JSON serialization and deserialization support for Smithy tooling.
5
5
  Project-URL: Changelog, https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-json/CHANGELOG.md
6
6
  Project-URL: Code, https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-json/
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
23
  Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
24
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
26
  Classifier: Topic :: Software Development :: Libraries
26
27
  Requires-Python: >=3.12
@@ -23,6 +23,7 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3.13",
24
24
  "Programming Language :: Python :: 3.14",
25
25
  "Programming Language :: Python :: Implementation :: CPython",
26
+ "Programming Language :: Python :: Free Threading :: 2 - Beta",
26
27
  "Topic :: Software Development :: Libraries"
27
28
  ]
28
29
  dependencies = [
@@ -13,7 +13,7 @@ from ._private.documents import JSONDocument
13
13
  from ._private.serializers import JSONShapeSerializer as _JSONShapeSerializer
14
14
  from .settings import JSONSettings
15
15
 
16
- __version__ = "0.2.2"
16
+ __version__ = "0.2.3"
17
17
  __all__ = ("JSONCodec", "JSONDocument", "JSONSettings")
18
18
 
19
19
 
@@ -300,7 +300,8 @@ class StreamingJSONEncoder:
300
300
  self._sink.write(b'"')
301
301
 
302
302
  def write_int(self, value: int) -> None:
303
- self._sink.write(repr(value).encode("utf-8"))
303
+ # int() unwraps IntEnum members; otherwise repr would emit "<MyEnum.A: 1>".
304
+ self._sink.write(str(int(value)).encode("utf-8"))
304
305
 
305
306
  def write_float(self, value: float | Decimal) -> None:
306
307
  if not self._write_non_numeric_float(value=value):
File without changes
File without changes
File without changes