Remarshal

Latest version: v1.0.0

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

Scan your dependencies

Page 1 of 5

1.0

The YAML 1.2 upgrade in version 0.18 caught some downstream users off guard when their output documents were no longer valid YAML 1.1. We could have signaled this big break change with an increment to the major version. However, Remarshal was still version 0.x.

We should be done with minor breaking changes now. We shouldn't postpone a version 1.0 release because our new YAML library isn't stable. My plan is to release version 1.0 as the next release or the one after that. Going forward, we will be able to use semantic versioning to signal breaking changes.

1.0.0

- **BREAKING CHANGE:** Dropped support for Python 3.9. Remarshal requires Python 3.10 or later.
- TOML arrays that have more than a set number of items and aren't nested are formatted as multiline. Added the command-line option `--multiline` to control this.
- The Remarshal CLI and public Python API should be considered stable.

1.0.0rc3

- Fixed a bug when parsing YAML like `- src: {url: http://example.com}`.
- Switched to always using the pure-Python implementation of ruamel.yaml.

1.0.0rc2

Breaking changes

- **Python API:**
The API has undergone significant changes in how formatting options are handled.
- The formatting parameters to `remarshal.remarshal` have been removed and replaced with format-specific option classes. It makes clear what format uses what options.
- While this is a breaking change, it should have no impact as Remarshal is used through its command-line interface.
- `--json-indent` and `--yaml-indent` are now synonyms. See below for why. This should also have minimal impact.

Non-breaking changes

- **New Python output format:**
Added support for outputting data as Python code.
- **Unified formatting options:**
There are several improvements to make the formatting options more consistent.
- A new unified `--indent` option. The option acts as a synonym for `--json-indent` and `--yaml-indent`. The old options remain available, though they have been hidden in the help message.
- A new `--width` option acts as a synonym for `--yaml-width`. Besides YAML, it sets the width for Python output.
- Improved the limitations section in the readme.

0.20.0

- YAML: Emit `null` instead of an empty scalar for nulls. In 0.18.0 Remarshal switched to an empty scalar (meaning, `foo:` with no value after the key) to represent nulls. This was the result of migrating to the ruamel.yaml library, where it is the default. While both representations are [valid YAML 1.2](https://yaml.org/spec/1.2-old/spec.html#id2786563), people tend to write and expect `null`. The current release restores pre-0.18.0 behavior.

0.19.1

- YAML: Fixed error handling that broke in version 0.18.0. Improved the error messages.

Page 1 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.