GJvignesh opened a new issue, #4502: URL: https://github.com/apache/iceberg-python/issues/4502
### Feature Request / Improvement ### Motivation PyIceberg currently depends on `strictyaml` (`>=1.7.0,<2.0.0`) solely in `pyiceberg/utils/config.py` to parse `.pyiceberg.yaml` files via `strictyaml.load(yml_str).data`. However, `strictyaml` is no longer actively maintained: * Its last PyPI release (`1.7.3`) was in **March 2023**, with no active development since. * It vendors an outdated internal copy of `ruamel.yaml`, which triggers security and dependency-hygiene flags in enterprise environments and poses ongoing Python compatibility risks. ### Proposed Change Because PyIceberg only calls `strictyaml.load(yml_str).data` without a StrictYAML schema—relying on it primarily to prevent YAML 1.1 implicit type coercion (such as `yes`/`no` -> `bool` or `1.0` -> `float`, as discussed in apache/iceberg#7524)—we can cleanly replace it with an actively maintained package: 1. **`ruamel.yaml` (`YAML(typ="safe")`):** `strictyaml` is already built on top of `ruamel.yaml`. Using `ruamel.yaml` directly gives native YAML 1.2 parsing (avoiding YAML 1.1 implicit boolean/octal surprises) with active maintenance. 2. **`PyYAML` (`yaml.load(..., Loader=yaml.BaseLoader)`):** `BaseLoader` keeps all scalars as strings—matching `strictyaml.load(yml_str).data` behavior without a schema—while relying on the most standard YAML library in Python. I can update `pyproject.toml`, `uv.lock`, and `pyiceberg/utils/config.py`, along with unit tests covering YAML scalar edge cases (e.g., unquoted numbers and boolean-like strings). Please let me know which option (`ruamel.yaml` vs. `PyYAML` with `BaseLoader`) maintainers prefer before I open the PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
