From a4c10e977b574114613431394b30412b50aaacce Mon Sep 17 00:00:00 2001 From: Chris Griffith Date: Sat, 21 Feb 2026 10:19:51 -0600 Subject: [PATCH 1/2] Version 7.4.1 (#304) --- CHANGES.rst | 10 ++++++++++ box/__init__.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 07f555f..c4a347d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,11 @@ Changelog ========= +Version 7.4.1 +------------- + +* Fixing #303 Wrong version number (7.3.3) in 7.4.0 release (thanks to Michał Górny) + Version 7.4.0 ------------- @@ -11,6 +16,11 @@ Version 7.4.0 * Fixing #291 adding frozen boxes (thanks to m-janicki) * Removing support for Python 3.9 as it is EOL +Version 7.3.3 +------------- + +* Mistakenly released 7.4.0 as 7.3.3 in PyPI, same as above + Version 7.3.2 ------------- diff --git a/box/__init__.py b/box/__init__.py index 8d9d2b5..23ebd2e 100644 --- a/box/__init__.py +++ b/box/__init__.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- __author__ = "Chris Griffith" -__version__ = "7.3.3" +__version__ = "7.4.1" from box.box import Box from box.box_list import BoxList From bf2fd65b6bf6613fe7079f324e233275349c0711 Mon Sep 17 00:00:00 2001 From: highoncomputers Date: Mon, 22 Jun 2026 03:55:14 +0530 Subject: [PATCH 2/2] fix: expose ruamel_typ and ruamel_attrs in to_yaml method The _to_yaml function already supports ruamel_typ and ruamel_attrs parameters, but Box.to_yaml() didn't expose them, making it impossible for users to configure ruamel.yaml behavior (e.g., increasing width to prevent unwanted line wrapping of long values). This change passes these parameters through. Fixes #307 --- box/box.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/box/box.py b/box/box.py index 8252643..f5d4a70 100644 --- a/box/box.py +++ b/box/box.py @@ -1022,6 +1022,8 @@ def to_yaml( encoding: str = "utf-8", errors: str = "strict", width: int = 120, + ruamel_typ: str = "rt", + ruamel_attrs: dict | None = None, **yaml_kwargs, ): """ @@ -1032,6 +1034,8 @@ def to_yaml( :param encoding: File encoding :param errors: How to handle encoding errors :param width: Line width for YAML output + :param ruamel_typ: ruamel.yaml parser type (default "rt") + :param ruamel_attrs: Additional attributes to set on the ruamel dumper :param yaml_kwargs: additional arguments to pass to yaml.dump :return: string of YAML (if no filename provided) """ @@ -1042,6 +1046,8 @@ def to_yaml( encoding=encoding, errors=errors, width=width, + ruamel_typ=ruamel_typ, + ruamel_attrs=ruamel_attrs, **yaml_kwargs, )