From 8968aaec61fdc17e9432ea9ad5081ac5d7e23034 Mon Sep 17 00:00:00 2001 From: James Weaver Date: Wed, 6 Nov 2019 14:48:40 +0000 Subject: [PATCH] Bugfix: Restore behaviour whereby `gsf.GSFEncoder.dump` calls `gsf.GSFEncoder.start_dump` and `gsf.GSFEncoder.end_dump` (this matters if subclasses have overridden these methods) --- CHANGELOG.md | 4 ++++ mediagrains/gsf.py | 4 ++-- setup.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c351903..0eaf3f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Mediagrains Library Changelog +## 2.7.1 +- Bugfix: Restore behaviour whereby `gsf.GSFEncoder.dump` calls `gsf.GSFEncoder.start_dump` and `gsf.GSFEncoder.end_dump` + (this matters if subclasses have overridden these methods) + ## 2.7.0 - Dropped all support for Python2.7 - Moved python3.6 specific submodules in tree diff --git a/mediagrains/gsf.py b/mediagrains/gsf.py index cd0ece0..534c3cb 100644 --- a/mediagrains/gsf.py +++ b/mediagrains/gsf.py @@ -1514,8 +1514,8 @@ def add_grains(self, def dump(self): """Dump the whole contents of this encoder to the file in one go, replacing anything that's already there.""" - with self: - pass + self.start_dump(all_at_once=True) + self.end_dump(all_at_once=True) @deprecated(version="2.7.0", reason="This mechanism is deprecated, use a context manager instead") def start_dump(self, all_at_once=False): diff --git a/setup.py b/setup.py index 3dba6c8..8b4c697 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ ] setup(name="mediagrains", - version="2.7.0", + version="2.7.1", python_requires='>=3.6.0', description="Simple utility for grain-based media", url='https://github.com/bbc/rd-apmm-python-lib-mediagrains',