Skip to content

Commit f937b17

Browse files
Removed features deprecated in v0.13.0
1 parent 5c3eb35 commit f937b17

File tree

9 files changed

+802
-3417
lines changed

9 files changed

+802
-3417
lines changed

CHANGELOG.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ You should have received a copy of the GNU General Public License
1616
along with this program. If not, see
1717
<http://www.gnu.org/licenses/>.
1818

19+
Changes in v0.18.0:
20+
1/ Removed features deprecated in v0.13.0:
21+
Value (and derived types) copy constructors
22+
Single value (such as DateValue) index methods
23+
1924
Changes in v0.17.3:
2025
1/ Binary wheels incorporate libexiv2 v0.28.5.
2126

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python-exiv2 v\ 0.17.3
1+
python-exiv2 v\ 0.18.0
22
======================
33

44
python-exiv2 is a low level interface (or binding) to the exiv2_ C++ library.

src/doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
exiv2 <= 0.17.3
1+
exiv2 <= 0.18.0
22
sphinx == 7.2.6
33
sphinx-rtd-theme == 2.0.0

src/interface/value.i

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// python-exiv2 - Python interface to libexiv2
22
// http://github.com/jim-easterbrook/python-exiv2
3-
// Copyright (C) 2021-24 Jim Easterbrook [email protected]
3+
// Copyright (C) 2021-25 Jim Easterbrook [email protected]
44
//
55
// This program is free software: you can redistribute it and/or modify
66
// it under the terms of the GNU General Public License as published by
@@ -265,44 +265,9 @@ DEPRECATED_ENUM(XmpValue, XmpStruct, "XMP structure indicator.",
265265
%noexception type_name::append;
266266
%noexception type_name::count;
267267
%noexception type_name::size;
268-
%extend type_name {
269-
part_name(const Exiv2::Value& value) {
270-
// deprecated since 2022-12-28
271-
PyErr_WarnEx(PyExc_DeprecationWarning,
272-
"Use '" #type_name ".clone()' to copy value", 1);
273-
type_name* pv = dynamic_cast< type_name* >(value.clone().release());
274-
if (pv == 0) {
275-
std::string msg = "Cannot cast type '";
276-
msg += Exiv2::TypeInfo::typeName(value.typeId());
277-
msg += "' to type '";
278-
msg += Exiv2::TypeInfo::typeName(type_name().typeId());
279-
msg += "'.";
280-
#if EXIV2_VERSION_HEX < 0x001c0000
281-
throw Exiv2::Error(Exiv2::kerErrorMessage, msg);
282-
#else
283-
throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, msg);
284-
#endif
285-
}
286-
return pv;
287-
}
288-
}
289268
UNIQUE_PTR(type_name)
290269
%enddef // VALUE_SUBCLASS
291270

292-
// Subscript macro for classes that can only hold one value
293-
%define SUBSCRIPT_SINGLE(type_name, item_type, method)
294-
%feature("python:slot", "sq_item", functype="ssizeargfunc")
295-
type_name::__getitem__;
296-
%extend type_name {
297-
item_type __getitem__(long single_idx) {
298-
// deprecated since 2022-12-15
299-
PyErr_WarnEx(PyExc_DeprecationWarning,
300-
"Use 'value = " #type_name "." #method "()'", 1);
301-
return $self->method();
302-
}
303-
}
304-
%enddef // SUBSCRIPT_SINGLE
305-
306271
// Macro for Exiv2::ValueType classes
307272
%define VALUETYPE(type_name, item_type, type_id)
308273
VALUE_SUBCLASS(Exiv2::ValueType<item_type>, type_name)
@@ -529,11 +494,6 @@ VALUE_SUBCLASS(Exiv2::LangAltValue, LangAltValue)
529494
VALUE_SUBCLASS(Exiv2::XmpArrayValue, XmpArrayValue)
530495
VALUE_SUBCLASS(Exiv2::XmpTextValue, XmpTextValue)
531496

532-
SUBSCRIPT_SINGLE(Exiv2::DateValue, Exiv2::DateValue::Date, getDate)
533-
SUBSCRIPT_SINGLE(Exiv2::TimeValue, Exiv2::TimeValue::Time, getTime)
534-
SUBSCRIPT_SINGLE(Exiv2::StringValueBase, std::string, toString)
535-
SUBSCRIPT_SINGLE(Exiv2::XmpTextValue, std::string, toString)
536-
537497
// Allow access to Exiv2::StringValueBase and Exiv2::XmpTextValue raw data
538498
%define RAW_STRING_DATA(class)
539499
RETURN_VIEW(const char* data, arg1->value_.size(), PyBUF_READ,

src/swig-0_27_7/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def __init__(self, code, message):
2020
self.message = message
2121

2222
#: python-exiv2 version as a string
23-
__version__ = "0.17.3"
23+
__version__ = "0.18.0"
2424
#: python-exiv2 version as a tuple of ints
25-
__version_tuple__ = tuple((0, 17, 3))
25+
__version_tuple__ = tuple((0, 18, 0))
2626

2727
__all__ = ["Exiv2Error"]
2828
from exiv2.basicio import *

0 commit comments

Comments
 (0)