Orjson

Latest version: v3.10.3

Safety actively analyzes 630217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 14 of 21

3.1.2

Not secure
Fixed

- Fix serializing zero-dimension `numpy.ndarray`.

3.1.1

Not secure
Fixed

- Fix repeated serialization of `str` that are ASCII-only and have a legacy
(non-compact) layout.

3.1.0

Not secure
Added

- `orjson.OPT_PASSTHROUGH_SUBCLASS` causes `orjson.dumps()` to pass
subclasses of builtin types to `default` so the caller can customize the
output.
- `orjson.OPT_PASSTHROUGH_DATETIME` causes `orjson.dumps()` to pass
`datetime` objects to `default` so the caller can customize the
output.

3.0.2

Not secure
Changed

- `orjson.dumps()` does not serialize `dataclasses.dataclass` attributes
that begin with a leading underscore, e.g., `_attr`. This is because of the
Python idiom that a leading underscores marks an attribute as "private."
- `orjson.dumps()` does not serialize `dataclasses.dataclass` attributes that
are `InitVar` or `ClassVar` whether using `__slots__` or not.

3.0.1

Not secure
Fixed

- `orjson.dumps()` raises an exception if the object to be serialized
is not given as a positional argument. `orjson.dumps({})` is intended and ok
while `orjson.dumps(obj={})` is an error. This makes it consistent with the
documentation, `help()` annotation, and type annotation.
- Fix orphan reference in exception creation that leaks memory until the
garbage collector runs.

Changed

- Improve serialization performance marginally by using the fastcall/vectorcall
calling convention on python3.7 and above.
- Reduce build time.

3.0.0

Not secure
Added

- `orjson.dumps()` serializes subclasses of `str`, `int`, `list`, and `dict`.

Changed

- `orjson.dumps()` serializes `dataclasses.dataclass` and `uuid.UUID`
instances by default. The options `OPT_SERIALIZE_DATACLASS` and
`OPT_SERIALIZE_UUID` can still be specified but have no effect.

Page 14 of 21

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.