diff --git a/.gitignore b/.gitignore index 675a5a4..a112b81 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /syncevolution-1.*.tar.gz +/syncevolution-2.0.0.tar.gz diff --git a/sources b/sources index dc2ea07..a023b36 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (syncevolution-1.5.3.tar.gz) = ebfd0b8eac8c44eeb6e0d5d60c3f9aa79a545d24628b913c1358a60fe5be47369860a63f5e80fa11db1172a6c281aad1685bb6baf11869c5cf19fd0f67fbb312 +SHA512 (syncevolution-2.0.0.tar.gz) = 83f0794035d3f62da5ba885849cb060b9f50008e45a220b7fa70b0b632bb2ad4327ef3593675824242394be50437397da56f7521baf52e3122cbcc6cb79d8841 diff --git a/syncevolution-1.4.1-akonadi.patch b/syncevolution-1.4.1-akonadi.patch deleted file mode 100644 index d57df4d..0000000 --- a/syncevolution-1.4.1-akonadi.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up syncevolution-1.5.1/src/backends/akonadi/configure-sub.in.akonadi syncevolution-1.5.1/src/backends/akonadi/configure-sub.in ---- syncevolution-1.5.1/src/backends/akonadi/configure-sub.in.akonadi 2015-06-09 14:55:29.814137191 +0200 -+++ syncevolution-1.5.1/src/backends/akonadi/configure-sub.in 2015-06-09 14:55:58.152135990 +0200 -@@ -14,7 +14,7 @@ if ! test "$KDEPIM_CFLAGS"; then - fi - fi - if ! test "$KDEPIM_LIBS"; then -- KDEPIM_LIBS="-L`kde4-config --install lib` -lakonadi-kde `${PKG_CONFIG} --libs QtDBus` -lQtCore -lkdeui -lkdecore" -+ KDEPIM_LIBS="-L`kde4-config --install lib` -lakonadi-kde `${PKG_CONFIG} --libs QtDBus` -lQtCore" - fi - AC_LANG_PUSH(C++) - old_CPPFLAGS="$CPPFLAGS" diff --git a/syncevolution-1.5.3-bind.patch b/syncevolution-1.5.3-bind.patch deleted file mode 100644 index b36faae..0000000 --- a/syncevolution-1.5.3-bind.patch +++ /dev/null @@ -1,546 +0,0 @@ -diff -up syncevolution-1.5.3/src/backends/activesync/ActiveSyncSource.h.7 syncevolution-1.5.3/src/backends/activesync/ActiveSyncSource.h ---- syncevolution-1.5.3/src/backends/activesync/ActiveSyncSource.h.7 2020-07-07 13:58:12.779492076 +0200 -+++ syncevolution-1.5.3/src/backends/activesync/ActiveSyncSource.h 2020-07-07 13:58:30.314408226 +0200 -@@ -31,7 +31,7 @@ - #include - #include - --#include -+#include - - #include - #include -@@ -41,6 +41,9 @@ - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - -diff -up syncevolution-1.5.3/src/backends/akonadi/akonadisyncsource.cpp.7 syncevolution-1.5.3/src/backends/akonadi/akonadisyncsource.cpp ---- syncevolution-1.5.3/src/backends/akonadi/akonadisyncsource.cpp.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/backends/akonadi/akonadisyncsource.cpp 2020-07-07 13:41:01.828429631 +0200 -@@ -41,12 +41,13 @@ - - #include - #include --#include -+#include - - #include - - SE_BEGIN_CXX - using namespace Akonadi; -+using namespace boost::placeholders; - - /** - * We take over ownership of jobs by storing them in smart pointers -diff -up syncevolution-1.5.3/src/backends/pbap/PbapSyncSource.cpp.7 syncevolution-1.5.3/src/backends/pbap/PbapSyncSource.cpp ---- syncevolution-1.5.3/src/backends/pbap/PbapSyncSource.cpp.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/backends/pbap/PbapSyncSource.cpp 2020-07-07 13:41:01.829429626 +0200 -@@ -45,11 +45,14 @@ - #include "gdbus-cxx-bridge.h" - - #include --#include -+#include - - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - #define OBC_SERVICE "org.openobex.client" // obexd < 0.47 -diff -up syncevolution-1.5.3/src/backends/sqlite/SQLiteContactSource.h.7 syncevolution-1.5.3/src/backends/sqlite/SQLiteContactSource.h ---- syncevolution-1.5.3/src/backends/sqlite/SQLiteContactSource.h.7 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/sqlite/SQLiteContactSource.h 2020-07-07 13:41:01.829429626 +0200 -@@ -25,9 +25,12 @@ - #include - #include - --#include -+#include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - #ifdef ENABLE_SQLITE -diff -up syncevolution-1.5.3/src/backends/webdav/CalDAVSource.cpp.7 syncevolution-1.5.3/src/backends/webdav/CalDAVSource.cpp ---- syncevolution-1.5.3/src/backends/webdav/CalDAVSource.cpp.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/backends/webdav/CalDAVSource.cpp 2020-07-07 13:41:01.829429626 +0200 -@@ -11,10 +11,13 @@ - - #include "CalDAVSource.h" - --#include -+#include - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - /** -diff -up syncevolution-1.5.3/src/backends/webdav/CardDAVSource.cpp.7 syncevolution-1.5.3/src/backends/webdav/CardDAVSource.cpp ---- syncevolution-1.5.3/src/backends/webdav/CardDAVSource.cpp.7 2014-07-23 10:38:16.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/webdav/CardDAVSource.cpp 2020-07-07 13:41:01.830429622 +0200 -@@ -7,6 +7,8 @@ - #ifdef ENABLE_DAV - - #include -+ -+using namespace boost::placeholders; - SE_BEGIN_CXX - - // TODO: use EDS backend icalstrdup.c -diff -up syncevolution-1.5.3/src/backends/webdav/NeonCXX.cpp.7 syncevolution-1.5.3/src/backends/webdav/NeonCXX.cpp ---- syncevolution-1.5.3/src/backends/webdav/NeonCXX.cpp.7 2015-04-17 11:19:46.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/webdav/NeonCXX.cpp 2020-07-07 13:51:27.319430971 +0200 -@@ -15,7 +15,7 @@ - #include - #include - #include --#include -+#include - #include - - #include -@@ -30,6 +30,9 @@ - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - namespace Neon { -diff -up syncevolution-1.5.3/src/backends/webdav/WebDAVSource.cpp.7 syncevolution-1.5.3/src/backends/webdav/WebDAVSource.cpp ---- syncevolution-1.5.3/src/backends/webdav/WebDAVSource.cpp.7 2015-04-01 17:14:39.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/webdav/WebDAVSource.cpp 2020-07-07 13:41:01.831429617 +0200 -@@ -4,7 +4,7 @@ - - #include "WebDAVSource.h" - --#include -+#include - #include - #include - #include -@@ -20,6 +20,8 @@ - #include - #include - -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - BoolConfigProperty &WebDAVCredentialsOkay() -diff -up syncevolution-1.5.3/src/backends/webdav/WebDAVSourceRegister.cpp.7 syncevolution-1.5.3/src/backends/webdav/WebDAVSourceRegister.cpp ---- syncevolution-1.5.3/src/backends/webdav/WebDAVSourceRegister.cpp.7 2016-09-26 13:20:05.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/webdav/WebDAVSourceRegister.cpp 2020-07-07 13:41:01.831429617 +0200 -@@ -16,11 +16,14 @@ - #include - #endif - --#include -+#include - #include - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - static SyncSource *createSource(const SyncSourceParams ¶ms) -diff -up syncevolution-1.5.3/src/client-test-app.cpp.7 syncevolution-1.5.3/src/client-test-app.cpp ---- syncevolution-1.5.3/src/client-test-app.cpp.7 2020-07-07 13:57:41.623641061 +0200 -+++ syncevolution-1.5.3/src/client-test-app.cpp 2020-07-07 13:57:57.447565391 +0200 -@@ -33,10 +33,12 @@ - #include - #include - --#include -+#include - - #include - -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - /* -diff -up syncevolution-1.5.3/src/dbus/server/dbus-callbacks.h.7 syncevolution-1.5.3/src/dbus/server/dbus-callbacks.h ---- syncevolution-1.5.3/src/dbus/server/dbus-callbacks.h.7 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/src/dbus/server/dbus-callbacks.h 2020-07-07 13:41:01.832429612 +0200 -@@ -22,7 +22,7 @@ - - #include - #include --#include -+#include - - #include - -diff -up syncevolution-1.5.3/src/dbus/server/pim/folks.cpp.7 syncevolution-1.5.3/src/dbus/server/pim/folks.cpp ---- syncevolution-1.5.3/src/dbus/server/pim/folks.cpp.7 2020-07-07 13:56:48.672894268 +0200 -+++ syncevolution-1.5.3/src/dbus/server/pim/folks.cpp 2020-07-07 13:57:09.469794816 +0200 -@@ -23,7 +23,7 @@ - #include "filtered-view.h" - #include "individual-traits.h" - #include "persona-details.h" --#include -+#include - #include "test.h" - #include - #include -@@ -31,6 +31,9 @@ - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - /** -diff -up syncevolution-1.5.3/src/dbus/server/server.cpp.7 syncevolution-1.5.3/src/dbus/server/server.cpp ---- syncevolution-1.5.3/src/dbus/server/server.cpp.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/dbus/server/server.cpp 2020-07-07 13:41:01.832429612 +0200 -@@ -20,7 +20,7 @@ - - #include - --#include -+#include - - #include - #include -@@ -39,6 +39,7 @@ - - #include - -+using namespace boost::placeholders; - using namespace GDBusCXX; - - SE_BEGIN_CXX -diff -up syncevolution-1.5.3/src/gdbus/gdbus-cxx-bridge.h.7 syncevolution-1.5.3/src/gdbus/gdbus-cxx-bridge.h ---- syncevolution-1.5.3/src/gdbus/gdbus-cxx-bridge.h.7 2020-07-07 13:56:02.836113458 +0200 -+++ syncevolution-1.5.3/src/gdbus/gdbus-cxx-bridge.h 2020-07-07 13:56:36.432952799 +0200 -@@ -84,7 +84,7 @@ void intrusive_ptr_release(DBusPendingCa - static inline void intrusive_ptr_add_ref(DBusServer *server) { dbus_server_ref(server); } - static inline void intrusive_ptr_release(DBusServer *server) { dbus_server_unref(server); } - --#include -+#include - #include - #include - #include -@@ -96,6 +96,8 @@ static inline void intrusive_ptr_release - # include - #endif - -+using namespace boost::placeholders; -+ - /* The connection is the only client-exposed type from the C API. To - * keep changes to a minimum while supporting both dbus - * implementations, this is made to be a define. The intention is to -diff -up syncevolution-1.5.3/src/gdbusxx/gdbus-cxx-bridge.h.7 syncevolution-1.5.3/src/gdbusxx/gdbus-cxx-bridge.h ---- syncevolution-1.5.3/src/gdbusxx/gdbus-cxx-bridge.h.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/gdbusxx/gdbus-cxx-bridge.h 2020-07-07 13:41:01.833429607 +0200 -@@ -68,7 +68,7 @@ - #include - #include - --#include -+#include - #include - #include - #include -@@ -79,6 +79,8 @@ - #include - #include - -+using namespace boost::placeholders; -+ - /* The SyncEvolution exception handler must integrate into the D-Bus - * C++ wrapper. In contrast to the rest of the code, that handler uses - * some of the internal classes. -diff -up syncevolution-1.5.3/src/syncevo/BoostHelper.h.7 syncevolution-1.5.3/src/syncevo/BoostHelper.h ---- syncevolution-1.5.3/src/syncevo/BoostHelper.h.7 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/src/syncevo/BoostHelper.h 2020-07-07 13:41:01.834429602 +0200 -@@ -44,10 +44,13 @@ - #ifndef INCL_SYNCEVOLUTION_BOOST_HELPER - # define INCL_SYNCEVOLUTION_BOOST_HELPER - --#include -+#include - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - template -diff -up syncevolution-1.5.3/src/syncevo/Cmdline.cpp.7 syncevolution-1.5.3/src/syncevo/Cmdline.cpp ---- syncevolution-1.5.3/src/syncevo/Cmdline.cpp.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/syncevo/Cmdline.cpp 2020-07-07 13:41:01.835429598 +0200 -@@ -48,6 +48,7 @@ using namespace std; - #include - #include - #include -+#include - #include - #include - #include -@@ -56,6 +57,7 @@ using namespace std; - - #include - using namespace std; -+using namespace boost::placeholders; - SE_BEGIN_CXX - - // synopsis and options char strings -diff -up syncevolution-1.5.3/src/syncevo/EDSClient.h.7 syncevolution-1.5.3/src/syncevo/EDSClient.h ---- syncevolution-1.5.3/src/syncevo/EDSClient.h.7 2014-05-02 16:46:58.000000000 +0200 -+++ syncevolution-1.5.3/src/syncevo/EDSClient.h 2020-07-07 13:41:01.836429593 +0200 -@@ -31,7 +31,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -@@ -40,6 +40,8 @@ SE_GOBJECT_TYPE(ESourceRegistry) - SE_GOBJECT_TYPE(ESource) - SE_GOBJECT_TYPE(EClient) - -+using namespace boost::placeholders; -+ - #endif // HAVE_EDS && USE_EDS_CLIENT - - #include -diff -up syncevolution-1.5.3/src/syncevo/GLibSupport.cpp.7 syncevolution-1.5.3/src/syncevo/GLibSupport.cpp ---- syncevolution-1.5.3/src/syncevo/GLibSupport.cpp.7 2020-07-07 13:55:27.506282406 +0200 -+++ syncevolution-1.5.3/src/syncevo/GLibSupport.cpp 2020-07-07 13:55:45.172197928 +0200 -@@ -24,7 +24,7 @@ - #include "test.h" - #endif - --#include -+#include - #include - #include - -@@ -36,6 +36,7 @@ - #endif - - using namespace std; -+using namespace boost::placeholders; - - SE_BEGIN_CXX - -diff -up syncevolution-1.5.3/src/syncevo/GLibSupport.h.7 syncevolution-1.5.3/src/syncevo/GLibSupport.h ---- syncevolution-1.5.3/src/syncevo/GLibSupport.h.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/syncevo/GLibSupport.h 2020-07-07 13:41:01.836429593 +0200 -@@ -38,7 +38,7 @@ typedef void *GMainLoop; - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -49,6 +49,9 @@ typedef void *GMainLoop; - #include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - enum { -diff -up syncevolution-1.5.3/src/syncevo/LogStdout.cpp.7 syncevolution-1.5.3/src/syncevo/LogStdout.cpp ---- syncevolution-1.5.3/src/syncevo/LogStdout.cpp.7 2020-07-07 13:54:53.562444724 +0200 -+++ syncevolution-1.5.3/src/syncevo/LogStdout.cpp 2020-07-07 13:55:14.398345087 +0200 -@@ -22,10 +22,11 @@ - #include - #include - --#include -+#include - - #include - using namespace std; -+using namespace boost::placeholders; - SE_BEGIN_CXX - - -diff -up syncevolution-1.5.3/src/syncevo/LogSyslog.cpp.7 syncevolution-1.5.3/src/syncevo/LogSyslog.cpp ---- syncevolution-1.5.3/src/syncevo/LogSyslog.cpp.7 2020-07-07 13:54:11.454646080 +0200 -+++ syncevolution-1.5.3/src/syncevo/LogSyslog.cpp 2020-07-07 13:54:41.181503928 +0200 -@@ -22,10 +22,11 @@ - #include - #include - --#include -+#include - - #include - using namespace std; -+using namespace boost::placeholders; - SE_BEGIN_CXX - - LoggerSyslog::LoggerSyslog(const std::string &processName) : -diff -up syncevolution-1.5.3/src/syncevo/SyncContext.cpp.7 syncevolution-1.5.3/src/syncevo/SyncContext.cpp ---- syncevolution-1.5.3/src/syncevo/SyncContext.cpp.7 2020-07-07 13:53:27.631855639 +0200 -+++ syncevolution-1.5.3/src/syncevo/SyncContext.cpp 2020-07-07 13:53:56.981715286 +0200 -@@ -56,7 +56,7 @@ using namespace std; - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -82,6 +82,9 @@ using namespace std; - #include "test.h" - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - SyncContext *SyncContext::m_activeContext; -diff -up syncevolution-1.5.3/src/syncevo/SyncSource.cpp.7 syncevolution-1.5.3/src/syncevo/SyncSource.cpp ---- syncevolution-1.5.3/src/syncevo/SyncSource.cpp.7 2020-07-07 13:52:39.939083705 +0200 -+++ syncevolution-1.5.3/src/syncevo/SyncSource.cpp 2020-07-07 13:53:07.389952434 +0200 -@@ -32,7 +32,7 @@ - #include - #include - --#include -+#include - #include - #include - #include -@@ -51,6 +51,9 @@ - #endif - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - void SyncSourceBase::throwError(const SourceLocation &where, const string &action, int error) -diff -up syncevolution-1.5.3/src/syncevo/timeout.h.7 syncevolution-1.5.3/src/syncevo/timeout.h ---- syncevolution-1.5.3/src/syncevo/timeout.h.7 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/syncevo/timeout.h 2020-07-07 13:41:01.837429588 +0200 -@@ -24,9 +24,12 @@ - #include - - #include --#include -+#include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - /** -diff -up syncevolution-1.5.3/src/syncevo/TrackingSyncSource.cpp.7 syncevolution-1.5.3/src/syncevo/TrackingSyncSource.cpp ---- syncevolution-1.5.3/src/syncevo/TrackingSyncSource.cpp.7 2014-09-15 14:23:19.000000000 +0200 -+++ syncevolution-1.5.3/src/syncevo/TrackingSyncSource.cpp 2020-07-07 13:41:01.837429588 +0200 -@@ -22,9 +22,12 @@ - #include - #include - --#include -+#include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - TrackingSyncSource::TrackingSyncSource(const SyncSourceParams ¶ms, -diff -up syncevolution-1.5.3/src/syncevo/UserInterface.cpp.7 syncevolution-1.5.3/src/syncevo/UserInterface.cpp ---- syncevolution-1.5.3/src/syncevo/UserInterface.cpp.7 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/src/syncevo/UserInterface.cpp 2020-07-07 13:41:01.837429588 +0200 -@@ -20,9 +20,12 @@ - #include - #include - --#include -+#include - - #include -+ -+using namespace boost::placeholders; -+ - SE_BEGIN_CXX - - std::string ConfigPasswordKey::toString() const -diff -up syncevolution-1.5.3/test/ClientTest.cpp.7 syncevolution-1.5.3/test/ClientTest.cpp ---- syncevolution-1.5.3/test/ClientTest.cpp.7 2020-07-07 13:51:50.720319069 +0200 -+++ syncevolution-1.5.3/test/ClientTest.cpp 2020-07-07 13:52:17.543190803 +0200 -@@ -61,7 +61,7 @@ - #include - #include - --#include -+#include - #include - #include - #include -@@ -75,6 +75,8 @@ - - #include - -+using namespace boost::placeholders; -+ - namespace CppUnit { - - /** -diff -up syncevolution-1.5.3/test/dbus-client-server.cpp.7 syncevolution-1.5.3/test/dbus-client-server.cpp ---- syncevolution-1.5.3/test/dbus-client-server.cpp.7 2014-07-23 10:38:16.000000000 +0200 -+++ syncevolution-1.5.3/test/dbus-client-server.cpp 2020-07-07 13:41:01.838429583 +0200 -@@ -6,10 +6,12 @@ - #include - #include - --#include -+#include - #include - #include - -+using namespace boost::placeholders; -+ - SyncEvo::GMainLoopCXX loop; - - // closes child connection diff --git a/syncevolution-1.5.3-eds-libecal-2.0-b.patch b/syncevolution-1.5.3-eds-libecal-2.0-b.patch deleted file mode 100644 index 0fa627b..0000000 --- a/syncevolution-1.5.3-eds-libecal-2.0-b.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp.eds-libecal-2.0-b syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp ---- syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp.eds-libecal-2.0-b 2019-11-11 09:27:55.148982120 +0100 -+++ syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp 2019-11-11 09:27:56.117982106 +0100 -@@ -370,7 +370,11 @@ static void list_revisions(const GSList - const GSList *l; - - for (l = objects; l; l = l->next) { -+#ifdef HAVE_LIBECAL_2_0 -+ ICalComponent *icomp = (ICalComponent*)l->data; -+#else - icalcomponent *icomp = (icalcomponent*)l->data; -+#endif - EvolutionCalendarSource::ItemID id = EvolutionCalendarSource::getItemID(icomp); - string luid = id.getLUID(); - string modTime = EvolutionCalendarSource::getItemModTime(icomp); diff --git a/syncevolution-1.5.3-eds-libecal-2.0.patch b/syncevolution-1.5.3-eds-libecal-2.0.patch deleted file mode 100644 index ff16ddc..0000000 --- a/syncevolution-1.5.3-eds-libecal-2.0.patch +++ /dev/null @@ -1,855 +0,0 @@ -diff -up syncevolution-1.5.3/src/backends/evolution/configure-sub.in.eds-libecal-2.0 syncevolution-1.5.3/src/backends/evolution/configure-sub.in ---- syncevolution-1.5.3/src/backends/evolution/configure-sub.in.eds-libecal-2.0 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/evolution/configure-sub.in 2019-05-21 13:54:38.676855604 +0200 -@@ -15,13 +15,23 @@ $anymissing" - - dnl check for Evolution packages - PKG_CHECK_MODULES(EPACKAGE, libedataserver-1.2, EDSFOUND=yes, [EDSFOUND=no]) --PKG_CHECK_MODULES(ECAL, libecal-1.2, ECALFOUND=yes, [ECALFOUND=no]) -+PKG_CHECK_MODULES(ECAL, libecal-2.0, ECALFOUND=yes, [ECALFOUND=no]) - PKG_CHECK_MODULES(EBOOK, libebook-1.2, EBOOKFOUND=yes, [EBOOKFOUND=no]) - -+if test "$ECALFOUND" = "yes"; then -+ AC_DEFINE(HAVE_LIBECAL_2_0, 1, [libecal 2.0]) -+else -+ PKG_CHECK_MODULES(ECAL, libecal-1.2, ECALFOUND=yes, [ECALFOUND=no]) -+fi -+ - PKG_CHECK_MODULES(EBOOK_VERSION, [libebook-1.2 >= 3.3], - [AC_DEFINE(HAVE_E_CONTACT_INLINE_LOCAL_PHOTOS, 1, [have e_contact_inline_local_photos()])], - [true]) - -+PKG_CHECK_MODULES(EBOOK_VERSION_3_33, [libebook-1.2 >= 3.33.2], -+ [AC_DEFINE(HAVE_E_BOOK_OPERATION_FLAGS, 1, [have EBookOperationFlags])], -+ [true]) -+ - SE_ARG_ENABLE_BACKEND(ebook, evolution, - [AS_HELP_STRING([--disable-ebook], - [disable access to Evolution addressbooks (must be used to compile without it)])], -diff -up syncevolution-1.5.3/src/backends/evolution/e-cal-check-timezones.c.eds-libecal-2.0 syncevolution-1.5.3/src/backends/evolution/e-cal-check-timezones.c ---- syncevolution-1.5.3/src/backends/evolution/e-cal-check-timezones.c.eds-libecal-2.0 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/evolution/e-cal-check-timezones.c 2019-05-21 13:54:38.676855604 +0200 -@@ -414,7 +414,11 @@ gboolean e_cal_check_timezones(icalcompo - goto done; - nomem: - /* set gerror for "out of memory" if possible, otherwise abort via g_error() */ -+#ifdef HAVE_LIBECAL_2_0 -+ *error = g_error_new(E_CLIENT_ERROR, E_CLIENT_ERROR_OTHER_ERROR, "out of memory"); -+#else - *error = g_error_new(E_CALENDAR_ERROR, E_CALENDAR_STATUS_OTHER_ERROR, "out of memory"); -+#endif - if (!*error) { - g_error("e_cal_check_timezones(): out of memory, cannot proceed - sorry!"); - } -@@ -451,6 +455,10 @@ icaltimezone *e_cal_tzlookup_ecal(const - const void *custom, - GError **error) - { -+#ifdef HAVE_LIBECAL_2_0 -+ g_propagate_error(error, e_client_error_create(E_CLIENT_ERROR_NOT_SUPPORTED, NULL)); -+ return NULL; -+#else - ECal *ecal = (ECal *)custom; - icaltimezone *zone = NULL; - -@@ -470,6 +478,7 @@ icaltimezone *e_cal_tzlookup_ecal(const - } - return NULL; - } -+#endif - } - - /** -diff -up syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp.eds-libecal-2.0 syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp ---- syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp.eds-libecal-2.0 2014-10-10 11:43:09.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.cpp 2019-05-21 13:54:38.678855604 +0200 -@@ -189,7 +189,7 @@ static EClient *newECalClient(ESource *s - ECalClientSourceType ecalSourceType, - GError **gerror) - { -- return E_CLIENT(e_cal_client_new(source, ecalSourceType, gerror)); -+ return E_CLIENT(e_cal_client_connect_sync(source, ecalSourceType, -1, NULL, gerror)); - } - #else - char *EvolutionCalendarSource::authenticate(const char *prompt, -@@ -440,13 +440,25 @@ void EvolutionCalendarSource::readItem(c - } - - #ifdef USE_EDS_CLIENT -+#ifdef HAVE_LIBECAL_2_0 -+ICalTimezone * -+#else /* HAVE_LIBECAL_2_0 */ - icaltimezone * -+#endif /* HAVE_LIBECAL_2_0 */ - my_tzlookup(const gchar *tzid, -+#ifdef HAVE_LIBECAL_2_0 -+ gpointer ecalclient, -+#else - gconstpointer ecalclient, -+#endif - GCancellable *cancellable, - GError **error) - { -+#ifdef HAVE_LIBECAL_2_0 -+ ICalTimezone *zone = NULL; -+#else - icaltimezone *zone = NULL; -+#endif - GError *local_error = NULL; - - if (e_cal_client_get_timezone_sync((ECalClient *)ecalclient, tzid, &zone, cancellable, &local_error)) { -@@ -503,8 +515,12 @@ EvolutionCalendarSource::InsertItemResul - if (modified) { - SE_LOG_DEBUG(getDisplayName(), "after replacing , with \\, in CATEGORIES:\n%s", data.c_str()); - } -- -+#ifdef HAVE_LIBECAL_2_0 -+ eptr icomp(i_cal_component_new_from_string((char *)data.c_str())); -+#else - eptr icomp(icalcomponent_new_from_string((char *)data.c_str())); -+#endif -+ - - if( !icomp ) { - throwError(SE_HERE, string("failure parsing ical") + data); -@@ -515,10 +531,19 @@ EvolutionCalendarSource::InsertItemResul - // fix up TZIDs - if ( - #ifdef USE_EDS_CLIENT -- !e_cal_client_check_timezones(icomp, -+#ifdef HAVE_LIBECAL_2_0 -+ !e_cal_client_check_timezones_sync( -+#else -+ !e_cal_client_check_timezones( -+#endif -+ icomp, - NULL, - my_tzlookup, -+#ifdef HAVE_LIBECAL_2_0 -+ (gpointer)m_calendar.get(), -+#else - (const void *)m_calendar.get(), -+#endif - NULL, - gerror) - #else -@@ -535,14 +560,28 @@ EvolutionCalendarSource::InsertItemResul - - // insert before adding/updating the event so that the new VTIMEZONE is - // immediately available should anyone want it -+#ifdef HAVE_LIBECAL_2_0 -+ for (ICalComponent *tcomp = i_cal_component_get_first_component(icomp, I_CAL_VTIMEZONE_COMPONENT); -+ tcomp; -+ g_object_unref (tcomp), tcomp = i_cal_component_get_next_component(icomp, I_CAL_VTIMEZONE_COMPONENT)) { -+ eptr zone(i_cal_timezone_new(), "icaltimezone"); -+ i_cal_timezone_set_component(zone, tcomp); -+#else - for (icalcomponent *tcomp = icalcomponent_get_first_component(icomp, ICAL_VTIMEZONE_COMPONENT); - tcomp; - tcomp = icalcomponent_get_next_component(icomp, ICAL_VTIMEZONE_COMPONENT)) { - eptr zone(icaltimezone_new(), "icaltimezone"); - icaltimezone_set_component(zone, tcomp); -+#endif - - GErrorCXX gerror; -- const char *tzid = icaltimezone_get_tzid(zone); -+ const char *tzid; -+ -+#ifdef HAVE_LIBECAL_2_0 -+ tzid = i_cal_timezone_get_tzid(zone); -+#else -+ tzid = icaltimezone_get_tzid(zone); -+#endif - if (!tzid || !tzid[0]) { - // cannot add a VTIMEZONE without TZID - SE_LOG_DEBUG(getDisplayName(), "skipping VTIMEZONE without TZID"); -@@ -564,8 +603,14 @@ EvolutionCalendarSource::InsertItemResul - // the component to update/add must be the - // ICAL_VEVENT/VTODO_COMPONENT of the item, - // e_cal_create/modify_object() fail otherwise -+#ifdef HAVE_LIBECAL_2_0 -+ ICalComponent *subcomp = i_cal_component_get_first_component(icomp, -+ getCompType()); -+#else - icalcomponent *subcomp = icalcomponent_get_first_component(icomp, - getCompType()); -+#endif -+ - if (!subcomp) { - throwError(SE_HERE, "extracting event"); - } -@@ -573,12 +618,16 @@ EvolutionCalendarSource::InsertItemResul - // Remove LAST-MODIFIED: the Evolution Exchange Connector does not - // properly update this property if it is already present in the - // incoming data. -+#ifdef HAVE_LIBECAL_2_0 -+ e_cal_util_component_remove_property_by_kind(subcomp, I_CAL_LASTMODIFIED_PROPERTY, TRUE); -+#else - icalproperty *modprop; - while ((modprop = icalcomponent_get_first_property(subcomp, ICAL_LASTMODIFIED_PROPERTY)) != NULL) { - icalcomponent_remove_property(subcomp, modprop); - icalproperty_free(modprop); - modprop = NULL; - } -+#endif - - if (!update) { - ItemID id = getItemID(subcomp); -@@ -628,8 +677,11 @@ EvolutionCalendarSource::InsertItemResul - // creating new objects works for normal events and detached occurrences alike - if ( - #ifdef USE_EDS_CLIENT -- e_cal_client_create_object_sync(m_calendar, subcomp, (gchar **)&uid, -- NULL, gerror) -+ e_cal_client_create_object_sync(m_calendar, subcomp, -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OPERATION_FLAG_NONE, -+#endif -+ (gchar **)&uid, NULL, gerror) - #else - e_cal_create_object(m_calendar, subcomp, (gchar **)&uid, gerror) - #endif -@@ -650,12 +702,20 @@ EvolutionCalendarSource::InsertItemResul - - // Recreate any children removed earlier: when we get here, - // the parent exists and we must update it. -+#ifdef HAVE_LIBECAL_2_0 -+ BOOST_FOREACH(boost::shared_ptr< eptr > &icalcomp, children) { -+#else - BOOST_FOREACH(boost::shared_ptr< eptr > &icalcomp, children) { -+#endif - if ( - #ifdef USE_EDS_CLIENT - !e_cal_client_modify_object_sync(m_calendar, *icalcomp, -- CALOBJ_MOD_THIS, NULL, -- gerror) -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OBJ_MOD_THIS, E_CAL_OPERATION_FLAG_NONE, -+#else -+ CALOBJ_MOD_THIS, -+#endif -+ NULL, gerror) - #else - !e_cal_modify_object(m_calendar, *icalcomp, - CALOBJ_MOD_THIS, -@@ -679,13 +739,33 @@ EvolutionCalendarSource::InsertItemResul - // RECURRENCE-ID - if (update) { - if (!id.m_uid.empty()) { -+#ifdef HAVE_LIBECAL_2_0 -+ i_cal_component_set_uid(subcomp, id.m_uid.c_str()); -+#else - icalcomponent_set_uid(subcomp, id.m_uid.c_str()); -+#endif - } - if (!id.m_rid.empty()) { - // Reconstructing the RECURRENCE-ID is non-trivial, - // because our luid only contains the date-time, but - // not the time zone. Only do the work if the event - // really doesn't have a RECURRENCE-ID. -+#ifdef HAVE_LIBECAL_2_0 -+ ICalTime *rid; -+ rid = i_cal_component_get_recurrenceid(subcomp); -+ if (!rid || i_cal_time_is_null_time(rid)) { -+ // Preserve the original RECURRENCE-ID, including -+ // timezone, no matter what the update contains -+ // (might have wrong timezone or UTC). -+ eptr orig(retrieveItem(id)); -+ ICalProperty *orig_rid = i_cal_component_get_first_property(orig, I_CAL_RECURRENCEID_PROPERTY); -+ if (orig_rid) { -+ i_cal_component_take_property(subcomp, i_cal_property_clone(orig_rid)); -+ } -+ g_clear_object(&orig_rid); -+ } -+ g_clear_object(&rid); -+#else - struct icaltimetype rid; - rid = icalcomponent_get_recurrenceid(subcomp); - if (icaltime_is_null_time(rid)) { -@@ -698,6 +778,7 @@ EvolutionCalendarSource::InsertItemResul - icalcomponent_add_property(subcomp, icalproperty_new_clone(orig_rid)); - } - } -+#endif - } - } - -@@ -728,8 +809,11 @@ EvolutionCalendarSource::InsertItemResul - const char *uid = NULL; - if ( - #ifdef USE_EDS_CLIENT -- !e_cal_client_create_object_sync(m_calendar, subcomp, (char **)&uid, -- NULL, gerror) -+ !e_cal_client_create_object_sync(m_calendar, subcomp, -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OPERATION_FLAG_NONE, -+#endif -+ (char **)&uid, NULL, gerror) - #else - !e_cal_create_object(m_calendar, subcomp, (char **)&uid, gerror) - #endif -@@ -742,12 +826,20 @@ EvolutionCalendarSource::InsertItemResul - - // Recreate any children removed earlier: when we get here, - // the parent exists and we must update it. -+#ifdef HAVE_LIBECAL_2_0 -+ BOOST_FOREACH(boost::shared_ptr< eptr > &icalcomp, children) { -+#else - BOOST_FOREACH(boost::shared_ptr< eptr > &icalcomp, children) { -+#endif - if ( - #ifdef USE_EDS_CLIENT - !e_cal_client_modify_object_sync(m_calendar, *icalcomp, -- CALOBJ_MOD_THIS, NULL, -- gerror) -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OBJ_MOD_THIS, E_CAL_OPERATION_FLAG_NONE, -+#else -+ CALOBJ_MOD_THIS, -+#endif -+ NULL, gerror) - #else - !e_cal_modify_object(m_calendar, *icalcomp, - CALOBJ_MOD_THIS, -@@ -762,8 +854,12 @@ EvolutionCalendarSource::InsertItemResul - if ( - #ifdef USE_EDS_CLIENT - !e_cal_client_modify_object_sync(m_calendar, subcomp, -- CALOBJ_MOD_ALL, NULL, -- gerror) -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OBJ_MOD_ALL, E_CAL_OPERATION_FLAG_NONE, -+#else -+ CALOBJ_MOD_ALL, -+#endif -+ NULL, gerror) - #else - !e_cal_modify_object(m_calendar, subcomp, - CALOBJ_MOD_ALL, -@@ -778,8 +874,12 @@ EvolutionCalendarSource::InsertItemResul - if ( - #ifdef USE_EDS_CLIENT - !e_cal_client_modify_object_sync(m_calendar, subcomp, -- CALOBJ_MOD_THIS, NULL, -- gerror) -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OBJ_MOD_THIS, E_CAL_OPERATION_FLAG_NONE, -+#else -+ CALOBJ_MOD_THIS, -+#endif -+ NULL, gerror) - #else - !e_cal_modify_object(m_calendar, subcomp, - CALOBJ_MOD_THIS, -@@ -795,6 +895,8 @@ EvolutionCalendarSource::InsertItemResul - modTime = getItemModTime(newid); - } - -+ g_clear_object (&subcomp); -+ - return InsertItemResult(newluid, modTime, state); - } - -@@ -806,12 +908,24 @@ EvolutionCalendarSource::ICalComps_t Evo - if (it != m_allLUIDs.end()) { - BOOST_FOREACH(const string &rid, it->second) { - ItemID id(uid, rid); -+#ifdef HAVE_LIBECAL_2_0 -+ ICalComponent *icomp = retrieveItem(id); -+#else - icalcomponent *icomp = retrieveItem(id); -+#endif - if (icomp) { - if (id.m_rid.empty() && returnOnlyChildren) { -+#ifdef HAVE_LIBECAL_2_0 -+ g_clear_object(&icomp); -+#else - icalcomponent_free(icomp); -+#endif - } else { -+#ifdef HAVE_LIBECAL_2_0 -+ events.push_back(ICalComps_t::value_type(new eptr(icomp))); -+#else - events.push_back(ICalComps_t::value_type(new eptr(icomp))); -+#endif - } - } - } -@@ -821,8 +935,12 @@ EvolutionCalendarSource::ICalComps_t Evo - GErrorCXX gerror; - if (!uid.empty() && // e_cal_client_remove_object_sync() in EDS 3.8 aborts the process for empty UID, other versions cannot succeed, so skip the call. - #ifdef USE_EDS_CLIENT -- !e_cal_client_remove_object_sync(m_calendar, -- uid.c_str(), NULL, CALOBJ_MOD_ALL, -+ !e_cal_client_remove_object_sync(m_calendar, uid.c_str(), NULL, -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OBJ_MOD_ALL, E_CAL_OPERATION_FLAG_NONE, -+#else -+ CALOBJ_MOD_ALL, -+#endif - NULL, gerror) - - #else -@@ -862,14 +980,21 @@ void EvolutionCalendarSource::removeItem - - // recreate children - bool first = true; -+#ifdef HAVE_LIBECAL_2_0 -+ BOOST_FOREACH(boost::shared_ptr< eptr > &icalcomp, children) { -+#else - BOOST_FOREACH(boost::shared_ptr< eptr > &icalcomp, children) { -+#endif - if (first) { - char *uid; - - if ( - #ifdef USE_EDS_CLIENT -- !e_cal_client_create_object_sync(m_calendar, *icalcomp, &uid, -- NULL, gerror) -+ !e_cal_client_create_object_sync(m_calendar, *icalcomp, -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OPERATION_FLAG_NONE, -+#endif -+ &uid, NULL, gerror) - #else - !e_cal_create_object(m_calendar, *icalcomp, &uid, gerror) - #endif -@@ -884,8 +1009,12 @@ void EvolutionCalendarSource::removeItem - if ( - #ifdef USE_EDS_CLIENT - !e_cal_client_modify_object_sync(m_calendar, *icalcomp, -- CALOBJ_MOD_THIS, NULL, -- gerror) -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OBJ_MOD_THIS, E_CAL_OPERATION_FLAG_NONE, -+#else -+ CALOBJ_MOD_THIS, -+#endif -+ NULL, gerror) - #else - !e_cal_modify_object(m_calendar, *icalcomp, - CALOBJ_MOD_THIS, -@@ -900,14 +1029,23 @@ void EvolutionCalendarSource::removeItem - // workaround for EDS 2.32 API semantic: succeeds even if - // detached recurrence doesn't exist and adds EXDATE, - // therefore we have to check for existence first -+#ifdef HAVE_LIBECAL_2_0 -+ eptr item(retrieveItem(id)); -+#else - eptr item(retrieveItem(id)); -+#endif - gboolean success = !item ? false : - #ifdef USE_EDS_CLIENT - // TODO: is this necessary? - e_cal_client_remove_object_sync(m_calendar, - id.m_uid.c_str(), - id.m_rid.c_str(), -+#ifdef HAVE_LIBECAL_2_0 -+ E_CAL_OBJ_MOD_ONLY_THIS, -+ E_CAL_OPERATION_FLAG_NONE, -+#else - CALOBJ_MOD_ONLY_THIS, -+#endif - NULL, - gerror) - #else -@@ -951,10 +1089,18 @@ void EvolutionCalendarSource::removeItem - } - } - -+#ifdef HAVE_LIBECAL_2_0 -+ICalComponent *EvolutionCalendarSource::retrieveItem(const ItemID &id) -+#else - icalcomponent *EvolutionCalendarSource::retrieveItem(const ItemID &id) -+#endif - { - GErrorCXX gerror; -+#ifdef HAVE_LIBECAL_2_0 -+ ICalComponent *comp = NULL; -+#else - icalcomponent *comp = NULL; -+#endif - - if ( - #ifdef USE_EDS_CLIENT -@@ -981,7 +1127,11 @@ icalcomponent *EvolutionCalendarSource:: - if (!comp) { - throwError(SE_HERE, string("retrieving item: ") + id.getLUID()); - } -+#ifdef HAVE_LIBECAL_2_0 -+ eptr ptr(comp); -+#else - eptr ptr(comp); -+#endif - - /* - * EDS bug: if a parent doesn't exist while a child does, and we ask -@@ -989,8 +1139,15 @@ icalcomponent *EvolutionCalendarSource:: - * turn it into a "not found" error. - */ - if (id.m_rid.empty()) { -+#ifdef HAVE_LIBECAL_2_0 -+ ICalTime *rid = i_cal_component_get_recurrenceid(comp); -+ if (!rid || i_cal_time_is_null_time(rid)) { -+ g_clear_object(&rid); -+ } else { -+#else - struct icaltimetype rid = icalcomponent_get_recurrenceid(comp); - if (!icaltime_is_null_time(rid)) { -+#endif - throwError(SE_HERE, string("retrieving item: got child instead of parent: ") + id.m_uid); - } - } -@@ -1000,7 +1157,11 @@ icalcomponent *EvolutionCalendarSource:: - - string EvolutionCalendarSource::retrieveItemAsString(const ItemID &id) - { -+#ifdef HAVE_LIBECAL_2_0 -+ eptr comp(retrieveItem(id)); -+#else - eptr comp(retrieveItem(id)); -+#endif - eptr icalstr; - - #ifdef USE_EDS_CLIENT -@@ -1015,6 +1176,15 @@ string EvolutionCalendarSource::retrieve - // definition. Evolution GUI ignores the TZID and interprets - // the times as local time. Do the same when exporting the - // event by removing the bogus TZID. -+#ifdef HAVE_LIBECAL_2_0 -+ ICalProperty *prop; -+ for (prop = i_cal_component_get_first_property (comp, I_CAL_ANY_PROPERTY); -+ prop; -+ g_object_unref(prop), prop = i_cal_component_get_next_property (comp, I_CAL_ANY_PROPERTY)) { -+ // removes only the *first* TZID - but there shouldn't be more than one -+ i_cal_property_remove_parameter_by_kind(prop, I_CAL_TZID_PARAMETER); -+ } -+#else - icalproperty *prop = icalcomponent_get_first_property (comp, - ICAL_ANY_PROPERTY); - -@@ -1024,6 +1194,7 @@ string EvolutionCalendarSource::retrieve - prop = icalcomponent_get_next_property (comp, - ICAL_ANY_PROPERTY); - } -+#endif - - // now try again - #ifdef USE_EDS_CLIENT -@@ -1075,16 +1246,28 @@ string EvolutionCalendarSource::retrieve - std::string EvolutionCalendarSource::getDescription(const string &luid) - { - try { -+#ifdef HAVE_LIBECAL_2_0 -+ eptr comp(retrieveItem(ItemID(luid))); -+#else - eptr comp(retrieveItem(ItemID(luid))); -+#endif - std::string descr; - -+#ifdef HAVE_LIBECAL_2_0 -+ const char *summary = i_cal_component_get_summary(comp); -+#else - const char *summary = icalcomponent_get_summary(comp); -+#endif - if (summary && summary[0]) { - descr += summary; - } - - if (m_type == EVOLUTION_CAL_SOURCE_TYPE_EVENTS) { -+#ifdef HAVE_LIBECAL_2_0 -+ const char *location = i_cal_component_get_location(comp); -+#else - const char *location = icalcomponent_get_location(comp); -+#endif - if (location && location[0]) { - if (!descr.empty()) { - descr += ", "; -@@ -1096,9 +1279,17 @@ std::string EvolutionCalendarSource::get - if (m_type == EVOLUTION_CAL_SOURCE_TYPE_MEMOS && - descr.empty()) { - // fallback to first line of body text -+#ifdef HAVE_LIBECAL_2_0 -+ ICalProperty *desc = i_cal_component_get_first_property(comp, I_CAL_DESCRIPTION_PROPERTY); -+#else - icalproperty *desc = icalcomponent_get_first_property(comp, ICAL_DESCRIPTION_PROPERTY); -+#endif - if (desc) { -+#ifdef HAVE_LIBECAL_2_0 -+ const char *text = i_cal_property_get_description(desc); -+#else - const char *text = icalproperty_get_description(desc); -+#endif - if (text) { - const char *eol = strchr(text, '\n'); - if (eol) { -@@ -1107,6 +1298,9 @@ std::string EvolutionCalendarSource::get - descr = text; - } - } -+#ifdef HAVE_LIBECAL_2_0 -+ g_object_unref(desc); -+#endif - } - } - -@@ -1144,7 +1338,11 @@ EvolutionCalendarSource::ItemID::ItemID( - - EvolutionCalendarSource::ItemID EvolutionCalendarSource::getItemID(ECalComponent *ecomp) - { -+#ifdef HAVE_LIBECAL_2_0 -+ ICalComponent *icomp = e_cal_component_get_icalcomponent(ecomp); -+#else - icalcomponent *icomp = e_cal_component_get_icalcomponent(ecomp); -+#endif - if (!icomp) { - SE_THROW("internal error in getItemID(): ECalComponent without icalcomp"); - } -@@ -1162,15 +1360,38 @@ EvolutionCalendarSource::ItemID Evolutio - icalTime2Str(rid)); - } - -+#ifdef HAVE_LIBECAL_2_0 -+EvolutionCalendarSource::ItemID EvolutionCalendarSource::getItemID(ICalComponent *icomp) -+{ -+ icalcomponent *native_icomp; -+ -+ native_icomp = static_cast(i_cal_object_get_native(I_CAL_OBJECT (icomp))); -+ if (!native_icomp) { -+ SE_THROW("internal error in getItemID(): ICalComponent without native icalcomp"); -+ } -+ return getItemID(native_icomp); -+} -+#endif -+ - string EvolutionCalendarSource::getItemModTime(ECalComponent *ecomp) - { -+#ifdef HAVE_LIBECAL_2_0 -+ ICalTime *modTime; -+ modTime = e_cal_component_get_last_modified(ecomp); -+ eptr > modTimePtr(modTime); -+#else - struct icaltimetype *modTime; - e_cal_component_get_last_modified(ecomp, &modTime); - eptr > modTimePtr(modTime); -+#endif - if (!modTimePtr) { - return ""; - } else { -+#ifdef HAVE_LIBECAL_2_0 -+ return icalTime2Str(modTimePtr.get()); -+#else - return icalTime2Str(*modTimePtr.get()); -+#endif - } - } - -@@ -1179,7 +1400,11 @@ string EvolutionCalendarSource::getItemM - if (!needChanges()) { - return ""; - } -+#ifdef HAVE_LIBECAL_2_0 -+ eptr icomp(retrieveItem(id)); -+#else - eptr icomp(retrieveItem(id)); -+#endif - return getItemModTime(icomp); - } - -@@ -1194,6 +1419,15 @@ string EvolutionCalendarSource::getItemM - return icalTime2Str(modTime); - } - -+#ifdef HAVE_LIBECAL_2_0 -+string EvolutionCalendarSource::getItemModTime(ICalComponent *icomp) -+{ -+ icalcomponent *native_icomp = static_cast(i_cal_object_get_native(I_CAL_OBJECT (icomp))); -+ -+ return getItemModTime(native_icomp); -+} -+#endif -+ - string EvolutionCalendarSource::icalTime2Str(const icaltimetype &tt) - { - static const struct icaltimetype null = { 0 }; -@@ -1208,6 +1442,21 @@ string EvolutionCalendarSource::icalTime - } - } - -+#ifdef HAVE_LIBECAL_2_0 -+string EvolutionCalendarSource::icalTime2Str(const ICalTime *tt) -+{ -+ if (tt || !i_cal_time_is_valid_time (tt) || i_cal_time_is_null_time (tt)) { -+ return ""; -+ } else { -+ eptr timestr(i_cal_time_as_ical_string(tt)); -+ if (!timestr) { -+ SE_THROW("cannot convert to time string"); -+ } -+ return timestr.get(); -+ } -+} -+#endif -+ - SE_END_CXX - - #endif /* ENABLE_ECAL */ -diff -up syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.h.eds-libecal-2.0 syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.h ---- syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.h.eds-libecal-2.0 2014-07-21 12:20:53.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/evolution/EvolutionCalendarSource.h 2019-05-21 13:54:38.676855604 +0200 -@@ -134,6 +134,9 @@ class EvolutionCalendarSource : public E - */ - static ItemID getItemID(ECalComponent *ecomp); - static ItemID getItemID(icalcomponent *icomp); -+ #ifdef HAVE_LIBECAL_2_0 -+ static ItemID getItemID(ICalComponent *icomp); -+ #endif - - /** - * Extract modification string from calendar item. -@@ -141,6 +144,9 @@ class EvolutionCalendarSource : public E - */ - static string getItemModTime(ECalComponent *ecomp); - static string getItemModTime(icalcomponent *icomp); -+ #ifdef HAVE_LIBECAL_2_0 -+ static string getItemModTime(ICalComponent *icomp); -+ #endif - - protected: - // -@@ -196,18 +202,30 @@ class EvolutionCalendarSource : public E - * - * caller has to free result - */ -+#ifdef HAVE_LIBECAL_2_0 -+ ICalComponent *retrieveItem(const ItemID &id); -+#else - icalcomponent *retrieveItem(const ItemID &id); -+#endif - - /** retrieve the item with the given luid as VCALENDAR string - may throw exception */ - string retrieveItemAsString(const ItemID &id); - - - /** returns the type which the ical library uses for our components */ -+#ifdef HAVE_LIBECAL_2_0 -+ ICalComponentKind getCompType() { -+ return m_type == EVOLUTION_CAL_SOURCE_TYPE_EVENTS ? I_CAL_VEVENT_COMPONENT : -+ m_type == EVOLUTION_CAL_SOURCE_TYPE_MEMOS ? I_CAL_VJOURNAL_COMPONENT : -+ I_CAL_VTODO_COMPONENT; -+ } -+#else - icalcomponent_kind getCompType() { - return m_type == EVOLUTION_CAL_SOURCE_TYPE_EVENTS ? ICAL_VEVENT_COMPONENT : - m_type == EVOLUTION_CAL_SOURCE_TYPE_MEMOS ? ICAL_VJOURNAL_COMPONENT : - ICAL_VTODO_COMPONENT; - } -+#endif - - #ifndef USE_EDS_CLIENT - /** ECalAuthFunc which calls the authenticate() methods */ -@@ -239,6 +257,9 @@ class EvolutionCalendarSource : public E - * Convert to string in canonical representation. - */ - static string icalTime2Str(const struct icaltimetype &tt); -+#ifdef HAVE_LIBECAL_2_0 -+ static string icalTime2Str(const ICalTime *tt); -+#endif - - /** - * A set of all existing objects. Initialized in the last call to -@@ -263,7 +284,11 @@ class EvolutionCalendarSource : public E - * will destroy the smart pointer, which then calls - * icalcomponent_free(). - */ -+#ifdef HAVE_LIBECAL_2_0 -+ typedef list< boost::shared_ptr< eptr > > ICalComps_t; -+#else - typedef list< boost::shared_ptr< eptr > > ICalComps_t; -+#endif - - /** - * Utility function which extracts all icalcomponents with -diff -up syncevolution-1.5.3/src/backends/evolution/EvolutionContactSource.cpp.eds-libecal-2.0 syncevolution-1.5.3/src/backends/evolution/EvolutionContactSource.cpp ---- syncevolution-1.5.3/src/backends/evolution/EvolutionContactSource.cpp.eds-libecal-2.0 2016-09-26 13:20:05.000000000 +0200 -+++ syncevolution-1.5.3/src/backends/evolution/EvolutionContactSource.cpp 2019-05-21 13:54:38.676855604 +0200 -@@ -988,7 +988,11 @@ void EvolutionContactSource::flushItemCh - this, - batched, - _1, _2, _3), -- m_addressbook, contacts, NULL); -+ m_addressbook, contacts, -+#ifdef HAVE_E_BOOK_OPERATION_FLAGS -+ E_BOOK_OPERATION_FLAG_NONE, -+#endif -+ NULL); - } - if (!m_batchedUpdate.empty()) { - SE_LOG_DEBUG(getDisplayName(), "batch update of %d contacts starting", (int)m_batchedUpdate.size()); -@@ -1004,7 +1008,11 @@ void EvolutionContactSource::flushItemCh - this, - batched, - _1, _2), -- m_addressbook, contacts, NULL); -+ m_addressbook, contacts, -+#ifdef HAVE_E_BOOK_OPERATION_FLAGS -+ E_BOOK_OPERATION_FLAG_NONE, -+#endif -+ NULL); - } - } - -@@ -1037,14 +1045,22 @@ EvolutionContactSource::insertItem(const - case SYNCHRONOUS: - if (uid.empty()) { - gchar* newuid; -- if (!e_book_client_add_contact_sync(m_addressbook, contact, &newuid, NULL, gerror)) { -+ if (!e_book_client_add_contact_sync(m_addressbook, contact, -+#ifdef HAVE_E_BOOK_OPERATION_FLAGS -+ E_BOOK_OPERATION_FLAG_NONE, -+#endif -+ &newuid, NULL, gerror)) { - throwError(SE_HERE, "add new contact", gerror); - } - PlainGStr newuidPtr(newuid); - string newrev = getRevision(newuid); - return InsertItemResult(newuid, newrev, ITEM_OKAY); - } else { -- if (!e_book_client_modify_contact_sync(m_addressbook, contact, NULL, gerror)) { -+ if (!e_book_client_modify_contact_sync(m_addressbook, contact, -+#ifdef HAVE_E_BOOK_OPERATION_FLAGS -+ E_BOOK_OPERATION_FLAG_NONE, -+#endif -+ NULL, gerror)) { - throwError(SE_HERE, "updating contact "+ uid, gerror); - } - string newrev = getRevision(uid); -@@ -1102,7 +1118,11 @@ void EvolutionContactSource::removeItem( - if ( - #ifdef USE_EDS_CLIENT - (invalidateCachedContact(uid), -- !e_book_client_remove_contact_by_uid_sync(m_addressbook, uid.c_str(), NULL, gerror)) -+ !e_book_client_remove_contact_by_uid_sync(m_addressbook, uid.c_str(), -+#ifdef HAVE_E_BOOK_OPERATION_FLAGS -+ E_BOOK_OPERATION_FLAG_NONE, -+#endif -+ NULL, gerror)) - #else - !e_book_remove_contact(m_addressbook, uid.c_str(), gerror) - #endif -diff -up syncevolution-1.5.3/src/syncevo/SmartPtr.h.eds-libecal-2.0 syncevolution-1.5.3/src/syncevo/SmartPtr.h ---- syncevolution-1.5.3/src/syncevo/SmartPtr.h.eds-libecal-2.0 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/src/syncevo/SmartPtr.h 2019-05-21 13:54:38.677855604 +0200 -@@ -76,6 +76,12 @@ class Unref { - static void unref(icalproperty *pointer) { icalproperty_free(pointer); } - static void unref(icalparameter *pointer) { icalparameter_free(pointer); } - static void unref(icaltimezone *pointer) { icaltimezone_free(pointer, 1); } -+#ifdef HAVE_LIBECAL_2_0 -+ static void unref(ICalComponent *pointer) { g_clear_object(&pointer); } -+ static void unref(ICalProperty *pointer) { g_clear_object(&pointer); } -+ static void unref(ICalParameter *pointer) { g_clear_object(&pointer); } -+ static void unref(ICalTimezone *pointer) { g_clear_object(&pointer); } -+#endif - #endif // ENABLE_ICAL - }; - diff --git a/syncevolution-1.5.3-extern-c-include.patch b/syncevolution-1.5.3-extern-c-include.patch deleted file mode 100644 index 75b6cea..0000000 --- a/syncevolution-1.5.3-extern-c-include.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up syncevolution-1.5.3/src/backends/gnome/GNOMEPlatform.cpp.x syncevolution-1.5.3/src/backends/gnome/GNOMEPlatform.cpp ---- syncevolution-1.5.3/src/backends/gnome/GNOMEPlatform.cpp.x 2021-02-08 14:50:48.223307152 +0100 -+++ syncevolution-1.5.3/src/backends/gnome/GNOMEPlatform.cpp 2021-02-08 14:51:09.931315257 +0100 -@@ -21,9 +21,7 @@ - - #ifdef USE_GNOME_KEYRING - --extern "C" { - #include --} - - #include "GNOMEPlatform.h" - diff --git a/syncevolution-1.5.3-python3-b.patch b/syncevolution-1.5.3-python3-b.patch deleted file mode 100644 index 0372fd3..0000000 --- a/syncevolution-1.5.3-python3-b.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -up syncevolution-1.5.3/test/syncevo-http-server.py.python3-2 syncevolution-1.5.3/test/syncevo-http-server.py ---- syncevolution-1.5.3/test/syncevo-http-server.py.python3-2 2020-05-11 12:10:50.479969706 +0200 -+++ syncevolution-1.5.3/test/syncevo-http-server.py 2020-05-11 12:12:43.627963000 +0200 -@@ -131,7 +131,7 @@ class SyncMLSession: - then remove the session''' - logger.debug("destructing connection %s with code %s message %s", self.conpath, code, message) - if self.request: -- self.request.setResponseCode(code, message) -+ self.request.setResponseCode(code, message.encode()) - self.request.finish() - self.request = None - if self.connection: -@@ -179,7 +179,7 @@ class SyncMLSession: - OldRequest.type = type - if request: - request.setHeader('Content-Type', type) -- request.setHeader('Content-Length', len(data)) -+ request.setHeader('Content-Length', str(len(data))) - request.setResponseCode(http.OK) - request.write(data) - request.finish() -@@ -243,7 +243,6 @@ class SyncMLSession: - 'org.syncevolution', - self.conpath, - path_keyword='conpath', -- utf8_strings=True, - byte_arrays=True) - self.reply_match = \ - Context.bus.add_signal_receiver(self.reply, -@@ -252,7 +251,6 @@ class SyncMLSession: - 'org.syncevolution', - self.conpath, - path_keyword='conpath', -- utf8_strings=True, - byte_arrays=True) - - # feed new data into SyncEvolution and wait for reply -@@ -319,16 +317,16 @@ class SyncMLPost(resource.Resource): - config = "" - type = request.getHeader('content-type') - len = request.getHeader('content-length') -- sessionid = request.args.get('sessionid') -+ sessionid = request.args.get(b'sessionid') - if sessionid: -- sessionid = sessionid[0] -+ sessionid = sessionid[0].decode() - logger.debug("POST from %s config %s type %s session %s args %s length %s", - request.getClientIP(), config, type, sessionid, request.args, len) - if not sessionid: - logger.info("new SyncML session for %s", request.getClientIP()) - session = SyncMLSession() - session.start(request, config, -- urllib.parse.urljoin(self.url.geturl(), request.path)) -+ urllib.parse.urljoin(self.url.geturl(), request.path.decode())) - return server.NOT_DONE_YET - else: - data = request.content.read() -@@ -587,7 +585,7 @@ syncevo-http-server itself is installed" - - url = urllib.parse.urlparse(args[0]) - root = resource.Resource() -- root.putChild(url.path[1:], SyncMLPost(url)) -+ root.putChild(url.path[1:].encode(), SyncMLPost(url)) - site = server.Site(root) - if url.scheme == "https": - if not options.cert: diff --git a/syncevolution-1.5.3-python3.patch b/syncevolution-1.5.3-python3.patch deleted file mode 100644 index 6c19d59..0000000 --- a/syncevolution-1.5.3-python3.patch +++ /dev/null @@ -1,2015 +0,0 @@ -diff -up syncevolution-1.5.3/build/source2html.py.python3 syncevolution-1.5.3/build/source2html.py ---- syncevolution-1.5.3/build/source2html.py.python3 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/build/source2html.py 2019-05-21 17:35:12.461672604 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - - """ - Converts source code (first parameter, can be - for stdin) to HTML -@@ -29,8 +29,8 @@ try: - pygments.highlight(code, lexer, formatter, out) - except: - import cgi -- print >>sys.stderr, "source2html.py failed with pygments:", sys.exc_info() -- print >>sys.stderr, "falling back to internal code" -+ print("source2html.py failed with pygments:", sys.exc_info(), file=sys.stderr) -+ print("falling back to internal code", file=sys.stderr) - - out.write(''' - -diff -up syncevolution-1.5.3/configure.ac.python3 syncevolution-1.5.3/configure.ac ---- syncevolution-1.5.3/configure.ac.python3 2018-01-09 16:53:28.000000000 +0100 -+++ syncevolution-1.5.3/configure.ac 2019-05-21 17:35:12.462672604 +0200 -@@ -62,6 +62,11 @@ dnl check for programs. - AC_PROG_CXX - AC_PROG_MAKE_SET - -+AC_PATH_PROGS(PYTHON, python3 python, "") -+if test "x$PYTHON" = "x" ; then -+ AC_ERROR([python3 not found]) -+fi -+ - dnl Use the most recent C++ standard that is supported by the code. - dnl We can fall back to older versions, but not below C++11. - dnl Akonadi/Qt don't work with C++17 yet, so we can't enable that. -diff -up syncevolution-1.5.3/src/dbus/server/pim/examples/search.py.python3 syncevolution-1.5.3/src/dbus/server/pim/examples/search.py ---- syncevolution-1.5.3/src/dbus/server/pim/examples/search.py.python3 2014-10-30 17:54:09.000000000 +0100 -+++ syncevolution-1.5.3/src/dbus/server/pim/examples/search.py 2019-05-21 17:35:12.462672604 +0200 -@@ -1,4 +1,4 @@ --#! /usr/bin/python -u -+#!/usr/bin/python3 -u - # -*- coding: utf-8 -*- - # vim: set fileencoding=utf-8 :# - # -@@ -140,21 +140,21 @@ dbus_type_mapping = { - dbus.Double: float, - dbus.Int16: int, - dbus.Int32: int, -- dbus.Int64: long, -+ dbus.Int64: int, - dbus.ObjectPath: str, - dbus.Signature: str, -- dbus.String: unicode, -+ dbus.String: str, - dbus.Struct: tuple, - dbus.UInt16: int, - dbus.UInt32: int, -- dbus.UInt64: long, -- dbus.UTF8String: unicode -+ dbus.UInt64: int, -+ dbus.UTF8String: str - } - - def strip_dbus(instance): - base = dbus_type_mapping.get(type(instance), None) - if base == dict or isinstance(instance, dict): -- return dict([(strip_dbus(k), strip_dbus(v)) for k, v in instance.iteritems()]) -+ return dict([(strip_dbus(k), strip_dbus(v)) for k, v in instance.items()]) - if base == list or isinstance(instance, list): - l = [strip_dbus(v) for v in instance] - l.sort() -@@ -163,7 +163,7 @@ def strip_dbus(instance): - return tuple([strip_dbus(v) for v in instance]) - if base == None: - return instance -- if base == unicode: -+ if base == str: - # try conversion to normal string - try: - return str(instance) -@@ -178,7 +178,7 @@ def checkpoint(operation): - global starttime, running - if running: - now = time.time() -- print "+%04.3fs %s stopping '%s', duration %fs" % (now - begin, time.ctime(now), running, now - starttime) -+ print("+%04.3fs %s stopping '%s', duration %fs" % (now - begin, time.ctime(now), running, now - starttime)) - if options.end_operation: - subprocess.check_call(options.end_operation % {'operation': running}, - shell=True) -@@ -188,7 +188,7 @@ def checkpoint(operation): - subprocess.check_call(options.start_operation % {'operation': operation}, - shell=True) - now = time.time() -- print "+%04.3fs %s starting '%s'" % (now - begin, time.ctime(now), operation) -+ print("+%04.3fs %s starting '%s'" % (now - begin, time.ctime(now), operation)) - starttime = now - running = operation - -@@ -200,7 +200,7 @@ def nothrow(fn): - try: - fn(*a, **b) - except: -- print traceback.format_exc() -+ print(traceback.format_exc()) - - return wrapper - -@@ -224,7 +224,7 @@ class ContactsView(dbus.service.Object): - - def search(self, filter): - '''Start a search.''' -- print 'searching: %s' % filter -+ print('searching: %s' % filter) - self.viewPath = manager.Search(filter, self.path, - timeout=100000) - # This example uses the ViewControl to read contact data. -@@ -254,19 +254,19 @@ class ContactsView(dbus.service.Object): - for index, contact in enumerate(self.contacts): - if start == index: - # empty line with marker where range starts -- print '=> ' -- print '%s %03d %s' % \ -+ print('=> ') -+ print('%s %03d %s' % \ - (start != None and index >= start and index < start + count and '*' or ' ', - index, -- isinstance(contact, dict) and contact.get('full-name', '<>') or '<>') -+ isinstance(contact, dict) and contact.get('full-name', '<>') or '<>')) - if options.verbosity >= VERBOSITY_DATA_FULL: -- print ' ', strip_dbus(contact) -- print -+ print(' ', strip_dbus(contact)) -+ print() - - @nothrow - def ContactsRead(self, ids, contacts): - if options.verbosity >= VERBOSITY_DATA_FULL: -- print 'got contact data %s => %s ' % (ids, strip_dbus(contacts)) -+ print('got contact data %s => %s ' % (ids, strip_dbus(contacts))) - min = len(contacts) - max = -1 - for index, contact in contacts: -@@ -283,17 +283,17 @@ class ContactsView(dbus.service.Object): - - @nothrow - def ReadFailed(self, ids, error): -- print 'request for contact data %s failed: %s' % \ -- (ids, error) -+ print('request for contact data %s failed: %s' % \ -+ (ids, error)) - - @nothrow - @dbus.service.method(dbus_interface='org._01.pim.contacts.ViewAgent', - in_signature='oias', out_signature='') - def ContactsModified(self, view, start, ids): - if options.verbosity >= VERBOSITY_NOTIFICATIONS: -- print 'contacts modified: %s, start %d, count %d, ids %s' % \ -+ print('contacts modified: %s, start %d, count %d, ids %s' % \ - (view, start, len(ids), -- options.verbosity >= VERBOSITY_DATA_SUMMARY and strip_dbus(ids) or '<...>') -+ options.verbosity >= VERBOSITY_DATA_SUMMARY and strip_dbus(ids) or '<...>')) - self.contacts[start:start + len(ids)] = ids - self.dump(start, len(ids)) - if not options.read_all: -@@ -304,9 +304,9 @@ class ContactsView(dbus.service.Object): - in_signature='oias', out_signature='') - def ContactsAdded(self, view, start, ids): - if options.verbosity >= VERBOSITY_NOTIFICATIONS: -- print 'contacts added: %s, start %d, count %d, ids %s' % \ -+ print('contacts added: %s, start %d, count %d, ids %s' % \ - (view, start, len(ids), -- options.verbosity >= VERBOSITY_DATA_SUMMARY and strip_dbus(ids) or '<...>') -+ options.verbosity >= VERBOSITY_DATA_SUMMARY and strip_dbus(ids) or '<...>')) - self.contacts[start:start] = ids - self.dump(start, len(ids)) - if not options.read_all: -@@ -317,9 +317,9 @@ class ContactsView(dbus.service.Object): - in_signature='oii', out_signature='') - def ContactsRemoved(self, view, start, count): - if options.verbosity >= VERBOSITY_NOTIFICATIONS: -- print 'contacts removed: %s, start %d, count %d, ids %s' % \ -+ print('contacts removed: %s, start %d, count %d, ids %s' % \ - (view, start, len(ids), -- options.verbosity >= VERBOSITY_DATA_SUMMARY and strip_dbus(ids) or '<...>') -+ options.verbosity >= VERBOSITY_DATA_SUMMARY and strip_dbus(ids) or '<...>')) - # Remove obsolete entries. - del self.contacts[start:start + len(ids)] - self.dump(start, 0) -@@ -329,7 +329,7 @@ class ContactsView(dbus.service.Object): - in_signature='o', out_signature='') - def Quiescent(self, view): - if options.verbosity >= VERBOSITY_NOTIFICATIONS: -- print 'view is stable' -+ print('view is stable') - if options.read_all: - # Avoid reading in parallel, if quiescence signal repeats. - if running != 'read': -@@ -340,26 +340,26 @@ class ContactsView(dbus.service.Object): - - checkpoint('getallpeers') - peers = strip_dbus(manager.GetAllPeers()) --print 'peers: %s' % peers --print 'available databases: %s' % ([''] + ['peer-' + uid for uid in peers.keys()]) -+print('peers: %s' % peers) -+print('available databases: %s' % ([''] + ['peer-' + uid for uid in list(peers.keys())])) - - checkpoint('getactiveaddressbooks') - address_books = strip_dbus(manager.GetActiveAddressBooks()) - if options.address_books: -- print 'active address books %s -> %s' % (address_books, options.address_books) -+ print('active address books %s -> %s' % (address_books, options.address_books)) - checkpoint('setactiveaddressbooks') - manager.SetActiveAddressBooks(options.address_books) - else: -- print 'active address books: %s' % options.address_books -+ print('active address books: %s' % options.address_books) - - checkpoint('getsortorder') - order = strip_dbus(manager.GetSortOrder()) - if options.order: -- print 'active sort order %s -> %s' % (order, options.order) -+ print('active sort order %s -> %s' % (order, options.order)) - checkpoint('setsortorder') - manager.SetSortOrder(options.order) - else: -- print 'active sort order: %s' % order -+ print('active sort order: %s' % order) - - if options.search != None: - checkpoint('search') -@@ -367,6 +367,6 @@ if options.search != None: - view.search(eval(options.search)) - loop.run() - else: -- print 'no search expression given, quitting' -+ print('no search expression given, quitting') - - checkpoint(None) -diff -up syncevolution-1.5.3/src/dbus/server/pim/examples/sync.py.python3 syncevolution-1.5.3/src/dbus/server/pim/examples/sync.py ---- syncevolution-1.5.3/src/dbus/server/pim/examples/sync.py.python3 2014-10-30 17:54:09.000000000 +0100 -+++ syncevolution-1.5.3/src/dbus/server/pim/examples/sync.py 2019-05-21 17:35:12.462672604 +0200 -@@ -1,4 +1,4 @@ --#! /usr/bin/python -u -+#!/usr/bin/python3 -u - # -*- coding: utf-8 -*- - # vim: set fileencoding=utf-8 :# - # -@@ -112,7 +112,7 @@ manager = dbus.Interface(bus.get_object( - - # Capture and print debug output. - def log_output(path, level, output, component): -- print '%s %s: %s' % (level, (component or 'sync'), output) -+ print('%s %s: %s' % (level, (component or 'sync'), output)) - - # Format seconds as mm:ss[.mmm]. - def format_seconds(seconds, with_milli): -@@ -137,9 +137,9 @@ def log_progress(uid, event, data): - bar = int(percent * BAR_LENGTH) * '-' - if len(bar) > 0 and len(bar) < BAR_LENGTH: - bar = bar[0:-1] + '>' -- print prefix, '|%s%s| %.1f%% %s' % (bar, (BAR_LENGTH - len(bar)) * ' ', percent * 100, strip_dbus(data)) -+ print(prefix, '|%s%s| %.1f%% %s' % (bar, (BAR_LENGTH - len(bar)) * ' ', percent * 100, strip_dbus(data))) - else: -- print prefix, '%s = %s' % (event, strip_dbus(data)) -+ print(prefix, '%s = %s' % (event, strip_dbus(data))) - last = now - - if options.debug: -@@ -167,21 +167,21 @@ dbus_type_mapping = { - dbus.Double: float, - dbus.Int16: int, - dbus.Int32: int, -- dbus.Int64: long, -+ dbus.Int64: int, - dbus.ObjectPath: str, - dbus.Signature: str, -- dbus.String: unicode, -+ dbus.String: str, - dbus.Struct: tuple, - dbus.UInt16: int, - dbus.UInt32: int, -- dbus.UInt64: long, -- dbus.UTF8String: unicode -+ dbus.UInt64: int, -+ dbus.UTF8String: str - } - - def strip_dbus(instance): - base = dbus_type_mapping.get(type(instance), None) - if base == dict or isinstance(instance, dict): -- return dict([(strip_dbus(k), strip_dbus(v)) for k, v in instance.iteritems()]) -+ return dict([(strip_dbus(k), strip_dbus(v)) for k, v in instance.items()]) - if base == list or isinstance(instance, list): - l = [strip_dbus(v) for v in instance] - l.sort() -@@ -190,7 +190,7 @@ def strip_dbus(instance): - return tuple([strip_dbus(v) for v in instance]) - if base == None: - return instance -- if base == unicode: -+ if base == str: - # try conversion to normal string - try: - return str(instance) -@@ -217,13 +217,13 @@ def run(syncing=False): - global result - result = None - if syncing: -- print 'Running a sync, press CTRL-C to control it interactively.' -+ print('Running a sync, press CTRL-C to control it interactively.') - while result is None and error is None: - try: - loop.run() - except KeyboardInterrupt: - while True: -- print '[a]bort, [s]uspend, [r]esume, continue? ', -+ print('[a]bort, [s]uspend, [r]esume, continue? ', end=' ') - response = sys.stdin.readline() - try: - if response == 'a\n': -@@ -238,16 +238,16 @@ def run(syncing=False): - elif response == '\n': - break - else: -- print 'Unknown response, try again.' -- except dbus.exceptions.DBusException, ex: -- print 'operation %s failed: %s' % (response, ex) -+ print('Unknown response, try again.') -+ except dbus.exceptions.DBusException as ex: -+ print('operation %s failed: %s' % (response, ex)) - else: - loop.run() - - if error: -- print -- print error -- print -+ print() -+ print(error) -+ print() - return result - async_args = { - 'reply_handler': done, -@@ -257,8 +257,8 @@ async_args = { - - manager.GetAllPeers(**async_args) - peers = strip_dbus(run()) --print 'peers: %s' % peers --print 'available databases: %s' % ([''] + ['peer-' + uid for uid in peers.keys()]) -+print('peers: %s' % peers) -+print('available databases: %s' % ([''] + ['peer-' + uid for uid in list(peers.keys())])) - - if not error and options.configure: - peer = json.loads(options.peer_config) -@@ -267,13 +267,13 @@ if not error and options.configure: - peer['protocol'] = 'PBAP' - if not 'address' in peer: - peer['address'] = options.mac -- print 'adding peer config %s = %s' % (peername, peer) -+ print('adding peer config %s = %s' % (peername, peer)) - manager.SetPeer(peername, peer, **async_args) - run() - - def pull_progress(): - status = manager.GetPeerStatus(peername) -- print 'Poll status:', strip_dbus(status) -+ print('Poll status:', strip_dbus(status)) - return True - - if not error and options.sync: -@@ -281,7 +281,7 @@ if not error and options.sync: - if options.poll_progress is not None: - pull_progress() - -- print 'syncing peer %s' % peername -+ print('syncing peer %s' % peername) - flags = json.loads(options.sync_flags) - if options.progress_frequency != 0.0: - flags['progress-frequency'] = options.progress_frequency -@@ -307,10 +307,10 @@ if not error and options.sync: - timeout.destroy() - - if not error and options.remove: -- print 'removing peer %s' % peername -+ print('removing peer %s' % peername) - manager.RemovePeer(peername, **async_args) - run() - - if options.debug: -- print "waiting for further debug output, press CTRL-C to stop" -+ print("waiting for further debug output, press CTRL-C to stop") - loop.run() -diff -up syncevolution-1.5.3/src/dbus/server/pim/testpim.py.python3 syncevolution-1.5.3/src/dbus/server/pim/testpim.py ---- syncevolution-1.5.3/src/dbus/server/pim/testpim.py.python3 2014-10-30 17:54:09.000000000 +0100 -+++ syncevolution-1.5.3/src/dbus/server/pim/testpim.py 2019-05-21 17:35:12.463672604 +0200 -@@ -1,4 +1,4 @@ --#! /usr/bin/python -u -+#!/usr/bin/python3 -u - # -*- coding: utf-8 -*- - # vim: set fileencoding=utf-8 :# - # -@@ -44,7 +44,7 @@ import itertools - import codecs - import pprint - import shutil --import ConfigParser -+import configparser - import io - - import localed -@@ -274,7 +274,7 @@ class Watchdog(): - self.timeout.set_callback(self._ping) - self.timeout.attach(loop.get_context()) - if self.threshold < 0: -- print '\nPinging server at intervals of %fs.' % self.interval -+ print('\nPinging server at intervals of %fs.' % self.interval) - - def stop(self): - if self.timeout: -@@ -298,7 +298,7 @@ class Watchdog(): - logging.printf('ping results for %s: %s', name, self.results) - if self.threshold < 0: - for result in self.results: -- print '%s: ping duration: %f' % (name, result[1]) -+ print('%s: ping duration: %f' % (name, result[1])) - self.reset() - - def _ping(self): -@@ -528,7 +528,7 @@ VERSION:3.0\r? - # text, but some other error messages) and the servers stdout. - def unicodeLog(test, log): - open('/tmp/out', 'wb').write(log) -- print re.match(r'ERROR(?! SUMMARY:)', log) -+ print(re.match(r'ERROR(?! SUMMARY:)', log)) - # Using assertNotRegexMatches with a negative lookahead led to unicode errors?! - # Therefore stick to plain text checks and avoid false matches against valgind's - # 'ERROR SUMMARY' by replacing that first. -@@ -553,7 +553,7 @@ VERSION:3.0\r? - dest = os.path.join(dirname, dir) - try: - os.rmdir(dest) -- except OSError, ex: -+ except OSError as ex: - if ex.errno != errno.ENOTEMPTY: - raise - for file in files: -@@ -635,7 +635,7 @@ XDG root. - - def testUIDError(self): - '''TestContacts.testUIDError - check that invalid UID is properly detected and reported''' -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - 'invalid peer uid: CAPITAL-LETTERS-NOT-ALLOWED'): - self.manager.SetPeer('CAPITAL-LETTERS-NOT-ALLOWED', - {}) -@@ -671,7 +671,7 @@ XDG root. - - # PIM Manager must not allow overwriting an existing config. - # Uses the new name for SetPeer(). -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - 'org._01.pim.contacts.Manager.AlreadyExists: uid ' + uid + ' is already in use') as cm: - self.manager.CreatePeer(uid, - peers[uid]) -@@ -830,11 +830,11 @@ XDG root. - testcases = os.environ.get('TESTPIM_TEST_SYNC_TESTCASES', None) - if testcases: - def progress(step, duration): -- print -+ print() - edslogs = [x for x in os.listdir(logdir) if x.startswith('eds@')] - edslogs.sort() -- print '%s: %fs, see %s' % (step, duration, -- os.path.join(logdir, edslogs[-1])) -+ print('%s: %fs, see %s' % (step, duration, -+ os.path.join(logdir, edslogs[-1]))) - else: - def progress(*args1, **args2): - pass -@@ -880,7 +880,7 @@ XDG root. - self.assertEqual(len(newsessions), 1) - session = newsessions[0] - targetsessions.extend(newsessions) -- config = ConfigParser.ConfigParser() -+ config = configparser.ConfigParser() - content = '[fake]\n' + open(os.path.join(session, 'status.ini')).read() - config.readfp(io.BytesIO(content)) - content = dict(config.items('fake')) -@@ -1309,7 +1309,7 @@ END:VCARD''' - - # Test invalid maxsession values. - if not testcases: -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - "negative 'maxsessions' not allowed: -1"): - self.manager.SetPeer(uid, - {'protocol': 'PBAP', -@@ -1318,7 +1318,7 @@ END:VCARD''' - if not "SYNCEVOLUTION_LOGLEVEL" in os.environ: - self.assertEqual(files, listsyncevo(exclude=exclude)) - -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - 'bad lexical cast: source type value could not be interpreted as target'): - self.manager.SetPeer(uid, - {'protocol': 'PBAP', -@@ -1707,7 +1707,7 @@ END:VCARD''') - self.assertEqual("first/last", self.manager.GetSortOrder()) - - # Expect an error, no change to sort order. -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - 'sort order.*not supported'): - self.manager.SetSortOrder('no-such-order') - self.assertEqual("first/last", self.manager.GetSortOrder()) -@@ -1716,17 +1716,17 @@ END:VCARD''') - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Äbraham - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Bénjamin - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Chàrly Xing - N:Xing;Chàrly -@@ -1756,9 +1756,9 @@ END:VCARD''']): - self.runUntil('contacts', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0)) -- self.assertEqual(u'Äbraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Bénjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Chàrly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Äbraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Bénjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Chàrly', self.view.contacts[2]['structured-name']['given']) - - # Invert sort order. - self.manager.SetSortOrder("last/first") -@@ -1796,9 +1796,9 @@ END:VCARD''']): - self.runUntil('contacts', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0)) -- self.assertEqual(u'Äbraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Bénjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Chàrly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Äbraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Bénjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Chàrly', self.view.contacts[2]['structured-name']['given']) - - @timeout(60) - @property("snapshot", "simple-sort") -@@ -1913,9 +1913,9 @@ END:VCARD - contact = copy.deepcopy(self.view.contacts[0]) - # Simplify the photo URI, if there was one. Avoid any assumptions - # about the filename, except that it is a file:/// uri. -- if contact.has_key('photo'): -+ if 'photo' in contact: - contact['photo'] = re.sub('^file:///.*', 'file:///', contact['photo']) -- if contact.has_key('id'): -+ if 'id' in contact: - contact['id'] = '' - self.assertEqual({'full-name': 'John Doe', - 'groups': ['TEST1', 'TEST2'], -@@ -2307,8 +2307,7 @@ END:VCARD''' % {'peer': peer, 'index': i - - # Now test all subsets until we are back at 'all active'. - current = ['', 'a', 'b', 'c'] -- for active in [filter(lambda x: x != None, -- [s, a, b, c]) -+ for active in [[x for x in [s, a, b, c] if x != None] - for s in [None, ''] - for a in [None, 'a'] - for b in [None, 'b'] -@@ -2340,7 +2339,7 @@ END:VCARD''' % {'peer': peer, 'index': i - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:Ace -@@ -2351,7 +2350,7 @@ TEL:089/7888-99 - EMAIL:az@example.com - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - TEL:+1-89-7888-99 -@@ -2360,7 +2359,7 @@ END:VCARD''', - # Chárleß has chárless as representation after folding the case. - # This is different from lower case. - # See http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/glossary.html#term_case_folding --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -2390,9 +2389,9 @@ END:VCARD''']): - self.runUntil('contacts', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 3)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Find Charly by his FN (case insensitive by default). - view = ContactsView(self.manager) -@@ -2405,7 +2404,7 @@ END:VCARD''']): - self.runUntil('charles', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) - - # We can expand the search with ReplaceSearch(). - view.view.ReplaceSearch([], False) -@@ -2416,9 +2415,9 @@ END:VCARD''']): - self.runUntil('expanded contacts', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 3)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Find Charly by his FN (case insensitive explicitly). - view = ContactsView(self.manager) -@@ -2431,7 +2430,7 @@ END:VCARD''']): - self.runUntil('charles', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) - - # Find Charly by his FN (case sensitive explicitly). - view = ContactsView(self.manager) -@@ -2444,7 +2443,7 @@ END:VCARD''']): - self.runUntil('charles', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) - - # Do not find Charly by his FN (case sensitive explicitly). - view = ContactsView(self.manager) -@@ -2465,8 +2464,8 @@ END:VCARD''']): - self.runUntil('two contacts', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[1]['structured-name']['given']) - - # Refine search without actually changing the result. - for refine in [True, False]: -@@ -2475,8 +2474,8 @@ END:VCARD''']): - self.runUntil('end of search refinement', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.quiescentCount > 0) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[1]['structured-name']['given']) - - # Restrict search to Benjamin. The result is a view - # which has different indices than the full view. -@@ -2486,7 +2485,7 @@ END:VCARD''']): - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.quiescentCount > 0) - self.assertEqual(1, len(view.contacts)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) - - # Refine again, without changes. - view.quiescentCount = 0 -@@ -2495,7 +2494,7 @@ END:VCARD''']): - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.quiescentCount > 0) - self.assertEqual(1, len(view.contacts)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) - - # Refine to empty view. - view.quiescentCount = 0 -@@ -2516,7 +2515,7 @@ END:VCARD''']): - self.runUntil('two contacts', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham by his email. - view = ContactsView(self.manager) -@@ -2529,7 +2528,7 @@ END:VCARD''']): - self.runUntil('two contacts', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham by his 1234 telephone number. - view = ContactsView(self.manager) -@@ -2542,7 +2541,7 @@ END:VCARD''']): - self.runUntil('1234 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham by his 1234 telephone number, as sub-string. - view = ContactsView(self.manager) -@@ -2555,7 +2554,7 @@ END:VCARD''']): - self.runUntil('23 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham by his 1234 telephone number, ignoring - # formatting. -@@ -2569,7 +2568,7 @@ END:VCARD''']): - self.runUntil('12/34 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham by his 56/78 telephone number, ignoring - # slash in contact. -@@ -2583,7 +2582,7 @@ END:VCARD''']): - self.runUntil('5678 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham via the +1-800-FOOBAR vanity number. - view = ContactsView(self.manager) -@@ -2596,7 +2595,7 @@ END:VCARD''']): - self.runUntil('+1-800-foobar data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham via the +1-800-FOOBAR vanity number, with digits - # instead of alpha characters. -@@ -2610,7 +2609,7 @@ END:VCARD''']): - self.runUntil('366227 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham via caller ID for +1-800-FOOBAR. - view = ContactsView(self.manager) -@@ -2623,7 +2622,7 @@ END:VCARD''']): - self.runUntil('+1800366227 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham via caller ID for 089/7888-99 (country is Germany). - view = ContactsView(self.manager) -@@ -2636,7 +2635,7 @@ END:VCARD''']): - self.runUntil('+4989788899 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham via caller ID for +44 89 7888-99 (Abraham has no country code - # set and matches, whereas Benjamin has +1 as country code and does not match). -@@ -2650,7 +2649,7 @@ END:VCARD''']): - self.runUntil('+4489788899 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Find Abraham and Benjamin via 089/7888-99 (not a full caller - # ID, but at least a valid phone number). Benjamin matches -@@ -2666,8 +2665,8 @@ END:VCARD''']): - self.runUntil('089788899 data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[1]['structured-name']['given']) - - # Don't find anyone. - view = ContactsView(self.manager) -@@ -2695,7 +2694,7 @@ END:VCARD''']): - names.append(contact[0]) - else: - # just the name -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - FN:%(name)s - N:%(name)s;;;; -@@ -2726,30 +2725,30 @@ END:VCARD - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, numtestcases)) - for i, name in enumerate(names): -- msg = u'contact #%d with name %s in\n%s' % (i, name, pprint.pformat(self.stripDBus(self.view.contacts, sortLists=False))) -+ msg = 'contact #%d with name %s in\n%s' % (i, name, pprint.pformat(self.stripDBus(self.view.contacts, sortLists=False))) - self.assertEqual(name, self.view.contacts[i]['full-name']) - - # Run searches and compare results. - for i, (query, names) in enumerate(searches): -- msg = u'query %s, names %s' % (query, names) -+ msg = 'query %s, names %s' % (query, names) - view = ContactsView(self.manager) - view.search(query) - self.runUntil('search %d: %s' % (i, query), - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.quiescentCount > 0) -- msg = u'query %s, names %s in\n%s' % (query, names, pprint.pformat(self.stripDBus(view.contacts, sortLists=False))) -+ msg = 'query %s, names %s in\n%s' % (query, names, pprint.pformat(self.stripDBus(view.contacts, sortLists=False))) - self.assertEqual(len(names), len(view.contacts)) - view.read(0, len(names)) - self.runUntil('data %d: %s' % (i, query), - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0, len(names))) - for e, name in enumerate(names): -- msg = u'query %s, names %s, name #%d %s in\n%s' % (query, names, e, name, pprint.pformat(self.stripDBus(view.contacts, sortLists=False))) -+ msg = 'query %s, names %s, name #%d %s in\n%s' % (query, names, e, name, pprint.pformat(self.stripDBus(view.contacts, sortLists=False))) - self.assertEqual(name, view.contacts[e]['full-name']) -- except Exception, ex: -+ except Exception as ex: - if msg: - info = sys.exc_info() -- raise Exception('%s:\n%s' % (msg, repr(ex))), None, info[2] -+ raise Exception('%s:\n%s' % (msg, repr(ex))).with_traceback(info[2]) - else: - raise - return view -@@ -2758,11 +2757,11 @@ END:VCARD - @property("ENV", "LC_TYPE=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8 LANG=ja_JP.UTF-8") - def testFilterJapanese(self): - self.doFilter(# Names of all contacts, sorted as expected. -- ('111', u'1月', 'Bad'), -+ ('111', '1月', 'Bad'), - # Query + expected results. -- (([], ('111', u'1月', 'Bad')), -- ([['any-contains', '1']], ('111', u'1月')), -- ([['any-contains', u'1月']], (u'1月',))) -+ (([], ('111', '1月', 'Bad')), -+ ([['any-contains', '1']], ('111', '1月')), -+ ([['any-contains', '1月']], ('1月',))) - ) - - @timeout(60) -@@ -2771,19 +2770,19 @@ END:VCARD - self.doFilter(# Names of all contacts, sorted as expected. - # 江 = jiāng = Jiang when using Pinyin and thus after Jeffries and before Meadows. - # 鳥 = niǎo before 女性 = nǚ xìng (see FDO #66618) -- ('Adams', 'Jeffries', u'江', 'jiang', 'Meadows', u'鳥', u'女性' ), -+ ('Adams', 'Jeffries', '江', 'jiang', 'Meadows', '鳥', '女性' ), - # 'J' may or may not match Jiang; by default, it matches. -- (([['any-contains', 'J']], ('Jeffries', u'江', 'jiang')), -+ (([['any-contains', 'J']], ('Jeffries', '江', 'jiang')), - ([['any-contains', 'J', 'no-transliteration']], ('Jeffries', 'jiang')), - ([['any-contains', 'J', 'no-transliteration', 'case-sensitive']], ('Jeffries',)), -- ([['any-contains', u'江']], (u'江', 'jiang')), -- ([['any-contains', u'jiang']], (u'江', 'jiang')), -- ([['any-contains', u'jiāng']], (u'江', 'jiang')), -- ([['any-contains', u'jiāng', 'no-transliteration']], ('jiang',)), -- ([['any-contains', u'jiāng', 'accent-sensitive']], (u'江',)), -- ([['any-contains', u'jiāng', 'accent-sensitive', 'case-sensitive']], (u'江',)), -- ([['any-contains', u'Jiāng', 'accent-sensitive', 'case-sensitive']], ()), -- ([['any-contains', u'Jiang']], (u'江', 'jiang')), -+ ([['any-contains', '江']], ('江', 'jiang')), -+ ([['any-contains', 'jiang']], ('江', 'jiang')), -+ ([['any-contains', 'jiāng']], ('江', 'jiang')), -+ ([['any-contains', 'jiāng', 'no-transliteration']], ('jiang',)), -+ ([['any-contains', 'jiāng', 'accent-sensitive']], ('江',)), -+ ([['any-contains', 'jiāng', 'accent-sensitive', 'case-sensitive']], ('江',)), -+ ([['any-contains', 'Jiāng', 'accent-sensitive', 'case-sensitive']], ()), -+ ([['any-contains', 'Jiang']], ('江', 'jiang')), - ), - ) - -@@ -2794,7 +2793,7 @@ END:VCARD - # DIN 5007 Variant 2 defines phone book sorting in - # Germany. It does not apply to Austria. - # Example from http://de.wikipedia.org/wiki/Alphabetische_Sortierung -- (u'Göbel', u'Goethe', u'Göthe', u'Götz', u'Goldmann'), -+ ('Göbel', 'Goethe', 'Göthe', 'Götz', 'Goldmann'), - (), - ) - -@@ -2802,8 +2801,8 @@ END:VCARD - @property("ENV", "LC_TYPE=zh_CN.UTF-8 LANG=zh_CN.UTF-8") - def testLocaled(self): - # Use mixed Chinese/Western names, because then the locale really matters. -- namespinyin = ('Adams', 'Jeffries', u'江', 'Meadows', u'鳥', u'女性' ) -- namesgerman = ('Adams', 'Jeffries', 'Meadows', u'女性', u'江', u'鳥' ) -+ namespinyin = ('Adams', 'Jeffries', '江', 'Meadows', '鳥', '女性' ) -+ namesgerman = ('Adams', 'Jeffries', 'Meadows', '女性', '江', '鳥' ) - numtestcases = len(namespinyin) - self.doFilter(namespinyin, ()) - -@@ -2822,7 +2821,7 @@ END:VCARD - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, numtestcases)) - for i, name in enumerate(namesgerman): -- msg = u'contact #%d with name %s in\n%s' % (i, name, pprint.pformat(self.stripDBus(self.view.contacts, sortLists=False))) -+ msg = 'contact #%d with name %s in\n%s' % (i, name, pprint.pformat(self.stripDBus(self.view.contacts, sortLists=False))) - self.assertEqual(name, self.view.contacts[i]['full-name']) - - # Switch back to Pinyin without including the new value. -@@ -2837,12 +2836,12 @@ END:VCARD - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, numtestcases)) - for i, name in enumerate(namespinyin): -- msg = u'contact #%d with name %s in\n%s' % (i, name, pprint.pformat(self.stripDBus(self.view.contacts, sortLists=False))) -+ msg = 'contact #%d with name %s in\n%s' % (i, name, pprint.pformat(self.stripDBus(self.view.contacts, sortLists=False))) - self.assertEqual(name, self.view.contacts[i]['full-name']) -- except Exception, ex: -+ except Exception as ex: - if msg: - info = sys.exc_info() -- raise Exception('%s:\n%s' % (msg, repr(ex))), None, info[2] -+ raise Exception('%s:\n%s' % (msg, repr(ex))).with_traceback(info[2]) - else: - raise - finally: -@@ -2908,10 +2907,10 @@ END:VCARD - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.quiescentCount > (usingEDS and 2 or 1)) - self.assertEqual(len(view.contacts), 1) -- except Exception, ex: -+ except Exception as ex: - if msg: - info = sys.exc_info() -- raise Exception('%s:\n%s' % (msg, repr(ex))), None, info[2] -+ raise Exception('%s:\n%s' % (msg, repr(ex))).with_traceback(info[2]) - else: - raise - finally: -@@ -3088,7 +3087,7 @@ END:VCARD - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:Ace -@@ -3096,7 +3095,7 @@ TEL:1234 - EMAIL:az@example.com - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - END:VCARD''', -@@ -3104,7 +3103,7 @@ END:VCARD''', - # Chárleß has chárless as representation after folding the case. - # This is different from lower case. - # See http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/glossary.html#term_case_folding --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -3144,16 +3143,16 @@ END:VCARD''']): - self.assertEqual([], self.view.errors)), - until=lambda: view.haveData(0) and \ - self.view.haveData(0, 3)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Unmatched contact remains unmatched. - # Modified phone number no longer matched. - item = os.path.join(self.contacts, 'contact%d.vcf' % 0) - output = codecs.open(item, "w", "utf-8") -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:King -@@ -3178,8 +3177,8 @@ END:VCARD''') - self.runUntil('Abraham nickname read', - check=check, - until=lambda: self.view.haveData(0)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) - - # No longer part of the telephone search view. - self.runUntil('phone results', -@@ -3191,7 +3190,7 @@ END:VCARD''') - check1 = view.setCheck(lambda: self.assertEqual(1, len(view.contacts))) - item = os.path.join(self.contacts, 'contact%d.vcf' % 2) - output = codecs.open(item, "w", "utf-8") -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - NICKNAME:Angel -@@ -3210,14 +3209,14 @@ END:VCARD''') - check=check, - until=lambda: self.view.haveData(2) and \ - view.haveData(0)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Unmatched contact gets matched. - check1 = view.setCheck(lambda: self.assertLess(0, len(view.contacts))) - item = os.path.join(self.contacts, 'contact%d.vcf' % 0) - output = codecs.open(item, "w", "utf-8") -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:Chárleß alter ego -@@ -3240,9 +3239,9 @@ END:VCARD''') - check=check, - until=lambda: self.view.haveData(0) and \ - view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Charly', view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) - - # Invert sort order. - check1 = view.setCheck(None) -@@ -3259,12 +3258,12 @@ END:VCARD''') - until=lambda: self.view.haveData(0, 3) and \ - view.haveData(0, 2)) - self.assertEqual(2, len(view.contacts)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[1]['structured-name']['given']) - self.assertEqual(3, len(self.view.contacts)) -- self.assertEqual(u'Charly', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[2]['structured-name']['given']) - - # And back again. - self.manager.SetSortOrder("first/last") -@@ -3280,18 +3279,18 @@ END:VCARD''') - until=lambda: self.view.haveData(0, 3) and \ - view.haveData(0, 2)) - self.assertEqual(2, len(view.contacts)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Charly', view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[1]['structured-name']['given']) - self.assertEqual(3, len(self.view.contacts)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Matched contact gets unmatched. - check1 = view.setCheck(lambda: self.assertLess(0, len(view.contacts))) - item = os.path.join(self.contacts, 'contact%d.vcf' % 0) - output = codecs.open(item, "w", "utf-8") -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:None -@@ -3312,8 +3311,8 @@ END:VCARD''') - self.runUntil('Abraham nickname read, None', - check=check, - until=lambda: self.view.haveData(0)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) - - # Finally, remove everything. - logging.log('remove contacts') -@@ -3339,7 +3338,7 @@ END:VCARD''') - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:Ace -@@ -3350,7 +3349,7 @@ TEL:089/7888-99 - EMAIL:az@example.com - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - TEL:+1-89-7888-99 -@@ -3359,7 +3358,7 @@ END:VCARD''', - # Chárleß has chárless as representation after folding the case. - # This is different from lower case. - # See http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/glossary.html#term_case_folding --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -3389,9 +3388,9 @@ END:VCARD''']): - self.runUntil('contacts', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 3)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Browse initial two contacts (= uses MatchAll filter with limit). - view = ContactsView(self.manager) -@@ -3404,8 +3403,8 @@ END:VCARD''']): - self.runUntil('browse data', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0, 2)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) - view.close() - - # Find Abraham and Benjamin but stop at first contact. -@@ -3419,10 +3418,10 @@ END:VCARD''']): - self.runUntil('one contact', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Changing the limit is not supported. -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - r'.*: refining the search must not change the maximum number of results$'): - view.view.RefineSearch([['limit', '3'], ['any-contains', 'foo']]) - -@@ -3433,7 +3432,7 @@ END:VCARD''']): - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.quiescentCount > 0) - self.assertEqual(1, len(view.contacts)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - - # Restrict search to Benjamin. We can leave out the limit, the old - # stays active automatically. Abraham drops out of the view -@@ -3449,7 +3448,7 @@ END:VCARD''']): - self.runUntil('Benjamin', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) - - # Refine again, without changes. - view.quiescentCount = 0 -@@ -3458,7 +3457,7 @@ END:VCARD''']): - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.quiescentCount > 0) - self.assertEqual(1, len(view.contacts)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) - - # Refine to empty view. - view.quiescentCount = 0 -@@ -3479,7 +3478,7 @@ END:VCARD''']): - self.runUntil('Benjamin', - check=lambda: self.assertEqual([], view.errors), - until=lambda: view.haveData(0)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) - - @timeout(60) - @property("ENV", "LC_TYPE=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LANG=de_DE.UTF-8") -@@ -3501,14 +3500,14 @@ END:VCARD''']): - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - FN:Abraham Zoo - NICKNAME:Ace - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - END:VCARD''', -@@ -3516,7 +3515,7 @@ END:VCARD''', - # Chárleß has chárless as representation after folding the case. - # This is different from lower case. - # See http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/glossary.html#term_case_folding --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -3552,15 +3551,15 @@ END:VCARD''']): - check=check, - until=lambda: view.haveData(0) and \ - self.view.haveData(0, 3)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Matched contact remains matched. - item = os.path.join(self.contacts, 'contact%d.vcf' % 0) - output = codecs.open(item, "w", "utf-8") -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - FN:Abraham Zoo -@@ -3578,13 +3577,13 @@ END:VCARD''') - self.runUntil('Abraham nickname read', - check=check, - until=lambda: self.view.haveData(0) and view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) - - # Unmatched contact gets matched, but stays out of view. - item = os.path.join(self.contacts, 'contact%d.vcf' % 0) - output = codecs.open(item, "w", "utf-8") -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - VERSION:3.0 - FN:Charly 'Chárleß' Xing -@@ -3601,17 +3600,17 @@ END:VCARD''') - check1 = view.setCheck(lambda: self.assertEqual(1, len(view.contacts))) - self.assertEqual(1, len(view.contacts)) - self.assertTrue(view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - self.assertFalse(self.view.haveData(2)) - self.view.read(2, 1) - self.runUntil('Abraham nickname read, II', - check=check, - until=lambda: self.view.haveData(2) and \ - view.haveData(0)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Invert sort order. - check1 = view.setCheck(None) -@@ -3628,11 +3627,11 @@ END:VCARD''') - until=lambda: self.view.haveData(0, 3) and \ - view.haveData(0, 1)) - self.assertEqual(1, len(view.contacts)) -- self.assertEqual(u'Charly', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', view.contacts[0]['structured-name']['given']) - self.assertEqual(3, len(self.view.contacts)) -- self.assertEqual(u'Charly', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[2]['structured-name']['given']) - - # And back again. - self.manager.SetSortOrder("first/last") -@@ -3648,16 +3647,16 @@ END:VCARD''') - until=lambda: self.view.haveData(0, 3) and \ - view.haveData(0, 1)) - self.assertEqual(1, len(view.contacts)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) - self.assertEqual(3, len(self.view.contacts)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Matched contact gets unmatched. - item = os.path.join(self.contacts, 'contact%d.vcf' % 0) - output = codecs.open(item, "w", "utf-8") -- output.write(u'''BEGIN:VCARD -+ output.write('''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abrahan - FN:Abrahan Zoo -@@ -3677,8 +3676,8 @@ END:VCARD''') - self.runUntil('Abrahan read', - check=check, - until=lambda: self.view.haveData(0) and view.haveData(0)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abrahan', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abrahan', self.view.contacts[0]['structured-name']['given']) - - # Finally, remove everything. - logging.log('remove contacts') -@@ -3709,14 +3708,14 @@ END:VCARD''') - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - FN:Abraham Zoo - NICKNAME:Ace - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - FN:Benjamin Yeah -@@ -3725,7 +3724,7 @@ END:VCARD''', - # Chárleß has chárless as representation after folding the case. - # This is different from lower case. - # See http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/glossary.html#term_case_folding --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -3757,10 +3756,10 @@ END:VCARD''']): - self.assertEqual([], self.view.errors)), - until=lambda: view.haveData(0) and \ - self.view.haveData(0, 3)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[2]['structured-name']['given']) - - @timeout(60) - @property("ENV", "LC_TYPE=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LANG=de_DE.UTF-8") -@@ -3782,14 +3781,14 @@ END:VCARD''']): - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - FN:Abraham Zoo - NICKNAME:Ace - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - END:VCARD''', -@@ -3797,7 +3796,7 @@ END:VCARD''', - # Chárleß has chárless as representation after folding the case. - # This is different from lower case. - # See http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/glossary.html#term_case_folding --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -3829,10 +3828,10 @@ END:VCARD''']): - self.assertEqual([], self.view.errors)), - until=lambda: view.haveData(0) and \ - self.view.haveData(0, 3)) -- self.assertEqual(u'Abraham', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[2]['structured-name']['given']) -+ self.assertEqual('Abraham', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[2]['structured-name']['given']) - - # Remove Abraham. Gets replaced by Benjamin in the view. - self.runCmdline(['--delete-items', '@' + self.managerPrefix + self.uid, 'local', luids[0]]) -@@ -3845,16 +3844,16 @@ END:VCARD''']): - self.assertEqual([], self.view.errors)), - until=lambda: view.haveData(0) and \ - self.view.haveData(0, 2)) -- self.assertEqual(u'Benjamin', view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Charly', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Benjamin', view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[1]['structured-name']['given']) - - # Remove Benjamin. - self.runCmdline(['--delete-items', '@' + self.managerPrefix + self.uid, 'local', luids[1]]) - self.runUntil('view without Benjamin', - check=lambda: self.assertEqual([], view.errors), - until=lambda: len(view.contacts) == 0 and len(self.view.contacts) == 1) -- self.assertEqual(u'Charly', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Charly', self.view.contacts[0]['structured-name']['given']) - - @timeout(60) - @property("snapshot", "simple-sort") -@@ -3939,14 +3938,14 @@ END:VCARD''']): - ], - } - -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - r'.*: only the system address book is writable'): - self.manager.AddContact('no-such-address-book', - john) - - # Add new contact. - localID = self.manager.AddContact('', john) -- john['source'] = [('', unicode(localID))] -+ john['source'] = [('', str(localID))] - - self.runUntil('view with one contact', - check=lambda: self.assertEqual([], self.view.errors), -@@ -3960,7 +3959,7 @@ END:VCARD''']): - john['id'] = contact.get('id', '') - self.assertEqual(john, contact, sortLists=True) - -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - r'''.*: contact with local ID 'no-such-local-id' not found in system address book'''): - self.manager.ModifyContact('', - 'no-such-local-id', -@@ -4107,7 +4106,7 @@ END:VCARD''']): - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:Ace -@@ -4118,13 +4117,13 @@ TEL:089/788899 - EMAIL:az@example.com - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - TEL:+49-89-788899 - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -4148,8 +4147,8 @@ END:VCARD''']): - self.runUntil('phone results', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 2)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) - - # Wait for final results from folks. The same in this case. - self.runUntil('phone results', -@@ -4160,8 +4159,8 @@ END:VCARD''']): - self.runUntil('phone results', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 2)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) - - # Nothing changed when folks became active. - self.assertEqual([ -@@ -4183,7 +4182,7 @@ END:VCARD''']): - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:Ace -@@ -4197,13 +4196,13 @@ END:VCARD''', - # Extra space, breaks suffix match in EDS. - # A more intelligent phone number search in EDS - # will find this again. --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - TEL:+49-89-7888 99 - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -4232,9 +4231,9 @@ END:VCARD''']): - self.runUntil('phone results', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, simpleSearch and 1 or 2)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) - if not simpleSearch: -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) - - # Wait for final results from folks. Also finds Benjamin. - self.runUntil('phone results', -@@ -4245,8 +4244,8 @@ END:VCARD''']): - self.runUntil('phone results', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 2)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) - - if simpleSearch: - # One contact added by folks. -@@ -4294,7 +4293,7 @@ END:VCARD''']): - # - # The names are chosen so that sorting by first name and sorting by last name needs to - # reverse the list. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - N:Zoo;Abraham - NICKNAME:Ace -@@ -4305,13 +4304,13 @@ TEL:089/788899 - EMAIL:az@example.com - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - N:Yeah;Benjamin - TEL:+49-89-788899 - END:VCARD''', - --u'''BEGIN:VCARD -+'''BEGIN:VCARD - VERSION:3.0 - FN:Charly 'Chárleß' Xing - N:Xing;Charly -@@ -4336,8 +4335,8 @@ END:VCARD''']): - self.runUntil('phone results', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 2)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) - - # Wait for final results from folks. The same in this case. - self.runUntil('phone results', -@@ -4348,8 +4347,8 @@ END:VCARD''']): - self.runUntil('phone results', - check=lambda: self.assertEqual([], self.view.errors), - until=lambda: self.view.haveData(0, 2)) -- self.assertEqual(u'Abraham', self.view.contacts[0]['structured-name']['given']) -- self.assertEqual(u'Benjamin', self.view.contacts[1]['structured-name']['given']) -+ self.assertEqual('Abraham', self.view.contacts[0]['structured-name']['given']) -+ self.assertEqual('Benjamin', self.view.contacts[1]['structured-name']['given']) - - # Nothing changed when folks became active. - self.assertEqual([ -@@ -4365,7 +4364,7 @@ END:VCARD''']): - self.setUpView(search=None, peers=[], withSystemAddressBook=True) - - # Insert new contact. -- for i, contact in enumerate([u'''BEGIN:VCARD -+ for i, contact in enumerate(['''BEGIN:VCARD - VERSION:3.0 - FN:John Doe - N:Doe;John -@@ -4407,7 +4406,7 @@ END:VCARD''', - self.view.events) - - # Expect an error, view should have been closed already. -- with self.assertRaisesRegexp(dbus.DBusException, -+ with self.assertRaisesRegex(dbus.DBusException, - "org.freedesktop.DBus.Error.UnknownMethod: .*"): - self.view.close() - -diff -up syncevolution-1.5.3/src/src.am.python3 syncevolution-1.5.3/src/src.am ---- syncevolution-1.5.3/src/src.am.python3 2018-01-05 16:10:27.000000000 +0100 -+++ syncevolution-1.5.3/src/src.am 2019-05-21 17:35:12.463672604 +0200 -@@ -42,12 +42,12 @@ if COND_DBUS - nodist_bin_SCRIPTS += src/syncevo-http-server - endif - src/syncevo-http-server: $(top_srcdir)/test/syncevo-http-server.py -- $(AM_V_GEN)cp $< $@ -+ $(AM_V_GEN)sed -e 's|\@PYTHON\@|$(PYTHON)|' $< > $@ - CLEANFILES += src/syncevo-http-server - - nodist_bin_SCRIPTS += src/syncevo-phone-config - src/syncevo-phone-config: $(top_srcdir)/test/syncevo-phone-config.py -- $(AM_V_GEN)cp $< $@ -+ $(AM_V_GEN)sed -e 's|\@PYTHON\@|$(PYTHON)|' $< > $@ - CLEANFILES += src/syncevo-phone-config - - SYNCEVOLUTION_DEP = -@@ -72,7 +72,7 @@ src/synccompare : $(top_srcdir)/test/Alg - bin_SCRIPTS += src/synclog2html - CLEANFILES += src/synclog2html - src/synclog2html: $(top_srcdir)/test/log2html.py -- $(AM_V_GEN)cp $< $@ && chmod u+x $@ -+ $(AM_V_GEN)sed -e 's|\@PYTHON\@|$(PYTHON)|' $< > $@ && chmod u+x $@ - - CORE_SOURCES = - -@@ -367,7 +367,7 @@ testcase2patch: $(TEST_FILES_GENERATED) - nodist_noinst_DATA += src/ClientTest.cpp.html - CLEANFILES += src/ClientTest.cpp.html - src/ClientTest.cpp.html: build/source2html.py test/ClientTest.cpp -- $(AM_V_GEN)python $+ >$@ -+ $(AM_V_GEN)$(PYTHON) $+ >$@ - - # copy base test files - $(filter-out %.tem, $(filter src/testcases/%, $(subst $(top_srcdir)/test/,src/,$(CLIENT_LIB_TEST_FILES)))) : src/% : $(top_srcdir)/test/% -diff -up syncevolution-1.5.3/test/log2html.py.python3 syncevolution-1.5.3/test/log2html.py ---- syncevolution-1.5.3/test/log2html.py.python3 2014-04-25 09:55:47.000000000 +0200 -+++ syncevolution-1.5.3/test/log2html.py 2019-05-21 17:35:12.463672604 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!@PYTHON@ - - """ - Converts the .log output for a client-test test into HTML, with -diff -up syncevolution-1.5.3/test/syncevo-http-server.py.python3 syncevolution-1.5.3/test/syncevo-http-server.py ---- syncevolution-1.5.3/test/syncevo-http-server.py.python3 2016-09-26 13:20:05.000000000 +0200 -+++ syncevolution-1.5.3/test/syncevo-http-server.py 2019-05-22 10:16:30.254545191 +0200 -@@ -1,4 +1,4 @@ --#! /usr/bin/python -+#!@PYTHON@ - - '''Usage: syncevo-http-server.py - Runs a SyncML HTTP server under the given base URL.''' -@@ -10,9 +10,8 @@ DBusGMainLoop(set_as_default=True) - glib2reactor.install() - - import dbus --import gobject - import sys --import urlparse -+import urllib.parse - import optparse - import os - import atexit -@@ -138,7 +137,7 @@ class SyncMLSession: - if self.connection: - try: - self.connection.Close(False, message, timeout=timeout) -- except dbus.exceptions.DBusException, ex: -+ except dbus.exceptions.DBusException as ex: - if ex.get_dbus_name() == "org.freedesktop.DBus.Error.UnknownMethod": - # triggered if connection instance is already gone, hide from user - logger.debug("self.connection.Close() failed, connection probably already gone: %s", ex) -@@ -329,7 +328,7 @@ class SyncMLPost(resource.Resource): - logger.info("new SyncML session for %s", request.getClientIP()) - session = SyncMLSession() - session.start(request, config, -- urlparse.urljoin(self.url.geturl(), request.path)) -+ urllib.parse.urljoin(self.url.geturl(), request.path)) - return server.NOT_DONE_YET - else: - data = request.content.read() -@@ -536,7 +535,7 @@ syncevo-http-server itself is installed" - # use this X11 session to find D-Bus session bus - os.environ["DISPLAY"] = dpy - havedbus = True -- except dbus.exceptions.DBusException, ex: -+ except dbus.exceptions.DBusException as ex: - if ex.get_dbus_name() == "org.freedesktop.DBus.Error.ServiceUnknown": - logger.debug("org.freedesktop.ConsoleKit service not available") - else: -@@ -586,7 +585,7 @@ syncevo-http-server itself is installed" - logger.error("need exactly on URL as command line parameter") - exit(1) - -- url = urlparse.urlparse(args[0]) -+ url = urllib.parse.urlparse(args[0]) - root = resource.Resource() - root.putChild(url.path[1:], SyncMLPost(url)) - site = server.Site(root) -diff -up syncevolution-1.5.3/test/syncevo-phone-config.py.python3 syncevolution-1.5.3/test/syncevo-phone-config.py ---- syncevolution-1.5.3/test/syncevo-phone-config.py.python3 2014-04-25 09:55:48.000000000 +0200 -+++ syncevolution-1.5.3/test/syncevo-phone-config.py 2019-05-21 17:35:12.463672604 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!@PYTHON@ - # - # Copyright (C) 2010 Intel Corporation - # -@@ -23,7 +23,7 @@ SyncEvolution. - ''' - import sys, optparse, os, time, tempfile - import shutil --import ConfigParser -+import configparser - import glob - import os.path - -@@ -94,13 +94,13 @@ class ConfigurationParameter: - self.identifier = identifier - - def printMe(self): -- print "Test parameter: " -- print "With CTCap: %s" %(self.ctcap,) -- print "Identifier: %s" %(self.identifier,) -- print "SyncML version: %s" %(self.version,) -- print "Sync Source: %s" %(self.source,) -- print "URI: %s" %(self.uri,) -- print "Content Type: %s" %(self.type,) -+ print("Test parameter: ") -+ print("With CTCap: %s" %(self.ctcap,)) -+ print("Identifier: %s" %(self.identifier,)) -+ print("SyncML version: %s" %(self.version,)) -+ print("Sync Source: %s" %(self.source,)) -+ print("URI: %s" %(self.uri,)) -+ print("Content Type: %s" %(self.type,)) - - def __str__(self): - res = [] -@@ -249,10 +249,10 @@ def compareSyncData(sources, type): - except: - return False - if (options.verbose > 1): -- print "comparing received file:" -- print received -- print "with built in keywords in test case:" -- print keys -+ print("comparing received file:") -+ print(received) -+ print("with built in keywords in test case:") -+ print(keys) - for key in keys: - if (received.find(key) <0): - return False -@@ -262,7 +262,7 @@ def compareSyncData(sources, type): - def runCommand(cmd, exception = True): - """Log and run the given command, throwing an exception if it fails.""" - if (options.verbose > 1): -- print "%s: %s" % (os.getcwd(), cmd) -+ print("%s: %s" % (os.getcwd(), cmd)) - else: - cmd += ' >/dev/null' - sys.stdout.flush() -@@ -298,7 +298,7 @@ def runSync(sync): - else: - return self.fp.readline() - -- ini = ConfigParser.ConfigParser({"status": "0", "error": ""}) -+ ini = configparser.ConfigParser({"status": "0", "error": ""}) - ini.readfp(IniFile(resultFile)) - statuscode = ini.get("main", "status") - if statuscode == "20015": -@@ -307,7 +307,7 @@ def runSync(sync): - interrupt = True - if statuscode == "22002": - # syncevolution failed (for example, kill -9), warn and abort -- print "\nSyncEvolution binary died prematurely, aborting testing." -+ print("\nSyncEvolution binary died prematurely, aborting testing.") - status = False - interrupt = True - return (status, interrupt) -@@ -320,7 +320,7 @@ def rm_r(dirname): - def hash2ini(hash): - """convert key/value pairs into .ini file without sections""" - res = [] -- for key, value in hash.items(): -+ for key, value in list(hash.items()): - res.append("%s = %s" % (key, value)) - return "\n".join(res) - -@@ -399,29 +399,29 @@ class TestingConfiguration(): - # 3) we already found a working configuration for combined calendar and - # task, thus seperate testing for calendar and task is not needed. - skip = False -- for source, config in self.wConfigs.items(): -+ for source, config in list(self.wConfigs.items()): - if (config): - if ( (config.source == self.source) or (config.identifier != self.identifier ) or (config.ctcap != self.ctcap) or (config.version != self.version)): - skip = True - if (skip): - if (options.verbose > 1): -- print "Test %d/%d skipped because already found a working configuration" % (curconfig, allconfigs) -+ print("Test %d/%d skipped because already found a working configuration" % (curconfig, allconfigs)) - elif options.verbose > 0: -- print "Test %d/%d skipped" %(curconfig, allconfigs), \ -- ConfigurationParameter(self.version, self.source, self.uri, self.type, self.ctcap, self.identifier) -+ print("Test %d/%d skipped" %(curconfig, allconfigs), \ -+ ConfigurationParameter(self.version, self.source, self.uri, self.type, self.ctcap, self.identifier)) - else: -- print "Test %d/%d skipped" %(curconfig, allconfigs) -+ print("Test %d/%d skipped" %(curconfig, allconfigs)) - else: -- print ("Start %d/%d test" % (curconfig, allconfigs)), -+ print(("Start %d/%d test" % (curconfig, allconfigs)), end=' ') - if (options.verbose > 0): - config = ConfigurationParameter(self.version, self.source, self.uri, self.type, self.ctcap, self.identifier) - if (options.verbose > 1): -- print -+ print() - config.printMe() - else: -- print config -+ print(config) - else: -- print -+ print() - - return skip - -@@ -526,7 +526,7 @@ class TestingConfiguration(): - for self.uri in self.uris[self.source]: - for self.type in self.types[self.source]: - allconfigs +=1 -- print "Starting test for %d configurations..." %(allconfigs,) -+ print("Starting test for %d configurations..." %(allconfigs,)) - - curconfig = 0 - self.wConfigs = {} -@@ -557,33 +557,33 @@ class TestingConfiguration(): - (status, interrupt) = self.testWithCurrentConfiguration () - if (status and not interrupt): - self.wConfigs[self.source] = ConfigurationParameter (self.version, self.source, self.uri, self.type, self.ctcap, self.identifier) -- print "Found a working configuration for %s" % (self.source,) -+ print("Found a working configuration for %s" % (self.source,)) - if (options.verbose > 0): - self.wConfigs[self.source].printMe() - if (interrupt): - break; - if(interrupt): -- print "Test Interrupted" -+ print("Test Interrupted") - return 1 - -- print "Test Ended" -+ print("Test Ended") - - #Test finished, print summary and generating configurations -- print "****************SUMMARY****************" -+ print("****************SUMMARY****************") - found = False -- for source,config in self.wConfigs.items(): -+ for source,config in list(self.wConfigs.items()): - if (config): - found = True -- print "------------------------------------------" -- print "Configuration parameter for %s:" % (source,) -+ print("------------------------------------------") -+ print("Configuration parameter for %s:" % (source,)) - config.printMe() - - if (not found): -- print "No working configuration found" -+ print("No working configuration found") - else: - have_combined = \ -- self.wConfigs.has_key('calendar') and \ -- self.wConfigs.has_key('todo') and \ -+ 'calendar' in self.wConfigs and \ -+ 'todo' in self.wConfigs and \ - self.wConfigs['calendar'] and \ - self.wConfigs['todo'] and \ - self.wConfigs['calendar'].uri == self.wConfigs['todo'].uri -@@ -606,7 +606,7 @@ class TestingConfiguration(): - runCommand(cmd) - - syncCreated = False -- for source,config in self.wConfigs.items(): -+ for source,config in list(self.wConfigs.items()): - if (config): - if (not syncCreated): - #set the sync parameter -@@ -628,17 +628,17 @@ class TestingConfiguration(): - - - if (options.advanced): -- print "" -- print "We have conducted basic test by sending and receiving" -- print "data to the phone. You can help the SyncEvolution project" -- print "and other users by submitting the following configuration" -- print "template at http://syncevolution.org/wiki/phone-compatibility-template" -- print "" -+ print("") -+ print("We have conducted basic test by sending and receiving") -+ print("data to the phone. You can help the SyncEvolution project") -+ print("and other users by submitting the following configuration") -+ print("template at http://syncevolution.org/wiki/phone-compatibility-template") -+ print("") - - configini = { "peerIsClient": "1" } - sourceConfigInis = {} - -- for source,config in self.wConfigs.items(): -+ for source,config in list(self.wConfigs.items()): - if(config): - sourceini = {} - if (config.identifier): -@@ -667,27 +667,27 @@ class TestingConfiguration(): - - # print template to stdout - sep = "--------------------> snip <--------------------" -- print sep -- print "=== template.ini ===" -- print "fingerprint = " -- print "=== config.ini ===" -- print hash2ini(configini) -- print "consumerReady = 1" -- for source, configini in sourceConfigInis.items(): -- print "=== sources/%s/config.ini ===" % source -- print hash2ini(configini) -- print sep -+ print(sep) -+ print("=== template.ini ===") -+ print("fingerprint = ") -+ print("=== config.ini ===") -+ print(hash2ini(configini)) -+ print("consumerReady = 1") -+ for source, configini in list(sourceConfigInis.items()): -+ print("=== sources/%s/config.ini ===" % source) -+ print(hash2ini(configini)) -+ print(sep) - else: -- print "" -- print "We just conducted minimum test by syncing with the phone" -- print "without checking received data. For more reliable result," -- print "use the --advanced option, but beware that it will overwrite" -- print "contacts, events, tasks and memos on the phone." -+ print("") -+ print("We just conducted minimum test by syncing with the phone") -+ print("without checking received data. For more reliable result,") -+ print("use the --advanced option, but beware that it will overwrite") -+ print("contacts, events, tasks and memos on the phone.") - - if (options.create): -- print "" -- print "Created configuration: %s" %(options.create) -- print "You may start syncing with: syncevolution %s" %(options.create) -+ print("") -+ print("Created configuration: %s" %(options.create)) -+ print("You may start syncing with: syncevolution %s" %(options.create)) - - def main(): - versions = [] -@@ -721,7 +721,7 @@ def main(): - testFolder = tmpdir+'/data' - testResult = tmpdir+'/cache' - testConfig = tmpdir+'/config' -- print "Running test with test data inside %s and test results inside %s" %(testFolder, testResult) -+ print("Running test with test data inside %s and test results inside %s" %(testFolder, testResult)) - config.run() - - if __name__ == "__main__": diff --git a/syncevolution.spec b/syncevolution.spec index 3aa1a0d..7ff0961 100644 --- a/syncevolution.spec +++ b/syncevolution.spec @@ -1,20 +1,13 @@ Summary: SyncML client for evolution Name: syncevolution Epoch: 1 -Version: 1.5.3 -Release: 18%{?dist} +Version: 2.0.0 +Release: 1%{?dist} License: LGPLv2+ URL: http://syncevolution.org/ Source: http://downloads.syncevolution.org/%{name}/sources/%{name}-%{version}.tar.gz -Patch0: syncevolution-1.4.1-akonadi.patch Patch1: syncevolution-1.5.1-libical2.patch -Patch2: syncevolution-1.5.3-eds-libecal-2.0.patch -Patch3: syncevolution-1.5.3-python3.patch -Patch4: syncevolution-1.5.3-eds-libecal-2.0-b.patch -Patch5: syncevolution-1.5.3-python3-b.patch -Patch6: syncevolution-1.5.3-bind.patch -Patch7: syncevolution-1.5.3-extern-c-include.patch Patch8: syncevolution-1.5.3-autoconf-2.71.patch BuildRequires: pkgconfig(dbus-glib-1) @@ -97,23 +90,12 @@ Summary: Akonadi backend package for %{name} Akonadi backend for %{name}. %prep -%setup -q -%patch0 -p1 -b .akonadi -%patch1 -p1 -b .libical2 -%patch2 -p1 -b .eds-libecal-2.0 -%patch3 -p1 -b .python3 -%patch4 -p1 -b .eds-libecal-2.0-b -%patch5 -p1 -b .python3-b -%patch6 -p1 -b .bind -%patch7 -p1 -b .extern-c-include -%patch8 -p1 -b .autoconf-2.71 +%autosetup -p1 -S gendiff # use the ac macros in Makefile.am sed -i '/^ACLOCAL_AMFLAGS/{ /m4-repo/!s/$/ -I m4-repo/ }' Makefile*.am %build -export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" - autoupdate intltoolize --automake --copy --force autoreconf -fiv @@ -215,6 +197,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/sync.desktop %{_datadir}/syncevolution/xml/*.pl %changelog +* Tue Apr 06 2021 Milan Crha - 1:2.0.0-1 +- Update to 2.0.0 + * Fri Mar 26 2021 Milan Crha - 1:1.5.3-18 - Add patch to build with autoconf 2.71