Skip to content

Commit 02f6881

Browse files
Deprecate some Value (and subclasses) methods
1 parent 47d7b0c commit 02f6881

5 files changed

Lines changed: 241 additions & 14 deletions

File tree

CHANGELOG.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,19 @@ Changes in v0.18.0:
2020
1/ Removed features deprecated in v0.13.0:
2121
Value (and derived types) copy constructors
2222
Single value (such as DateValue) index methods
23-
2/ Added binary wheels for Linux on arm64.
24-
3/ Exiv2 struct member names with a trailing underscore have more Pythonic
25-
aliases without the underscore.
26-
4/ Add data() method to exiv2.PreviewImage, deprecate pData() method.
27-
5/ Deprecated many BasicIo methods (read, write, seek, etc.) that should not
23+
2/ Deprecated many BasicIo methods (read, write, seek, etc.) that should not
2824
be needed in Python scripts. Please let me know if this is a problem.
29-
6/ BasicIo.read (& readOrThrow) now extract count from the buffer size.
30-
7/ Deprecated 'buffer interface' to BasicIo, DataBuf, and PreviewImage. They
25+
3/ Deprecated copy, write, and read(buffer) methods of Value (and
26+
subclasses) that should not be needed in Python scripts. Please let me
27+
know if this is a problem.
28+
4/ Deprecated 'buffer interface' to BasicIo, DataBuf, and PreviewImage. They
3129
all have 'data()' to get their contents.
32-
8/ Invalidate data iterators if data is deleted. (Requires swig >= 4.4)
30+
5/ Added binary wheels for Linux on arm64.
31+
6/ Exiv2 struct member names with a trailing underscore have more Pythonic
32+
aliases without the underscore.
33+
7/ Add data() method to exiv2.PreviewImage, deprecate pData() method.
34+
8/ BasicIo.read (& readOrThrow) now extract count from the buffer size.
35+
9/ Invalidate data iterators if data is deleted. (Requires swig >= 4.4)
3336

3437
Changes in v0.17.3:
3538
1/ Binary wheels incorporate libexiv2 v0.28.5.

src/interface/value.i

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,19 @@ DEPRECATED_ENUM(XmpValue, XmpStruct, "XMP structure indicator.",
255255
%noexception type_name::count;
256256
%noexception type_name::size;
257257
UNIQUE_PTR(type_name)
258+
// Deprecate some methods since 2025-08-25
259+
DEPRECATE_FUNCTION(type_name::copy, true)
260+
DEPRECATE_FUNCTION(type_name::read(const byte*, long, ByteOrder), true)
261+
DEPRECATE_FUNCTION(type_name::read(const byte*, size_t, ByteOrder), true)
262+
DEPRECATE_FUNCTION(type_name::write, true)
258263
%enddef // VALUE_SUBCLASS
259264

265+
// Deprecate some base class methods since 2025-08-25
266+
DEPRECATE_FUNCTION(Exiv2::Value::copy, true)
267+
DEPRECATE_FUNCTION(Exiv2::Value::read(const byte*, long, ByteOrder), true)
268+
DEPRECATE_FUNCTION(Exiv2::Value::read(const byte*, size_t, ByteOrder), true)
269+
DEPRECATE_FUNCTION(Exiv2::Value::write, true)
270+
260271
// Macro for Exiv2::ValueType classes
261272
%define VALUETYPE(type_name, item_type, type_id)
262273
VALUE_SUBCLASS(Exiv2::ValueType<item_type>, type_name)

0 commit comments

Comments
 (0)