Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-PyICU for openSUSE:Factory 
checked in at 2025-09-26 22:24:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyICU (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyICU.new.11973 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyICU"

Fri Sep 26 22:24:13 2025 rev:24 rq:1307080 version:2.15.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyICU/python-PyICU.changes        
2025-05-07 19:15:29.968786287 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyICU.new.11973/python-PyICU.changes     
2025-09-26 22:24:51.174846132 +0200
@@ -1,0 +2,13 @@
+Thu Sep 25 10:46:41 UTC 2025 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- Update to 2.15.3
+  * switch pl2cpa to new[]
+  * replaced uses of calloc with std::unique_ptr<[]>
+  * changed pl2cpa into template returning std::unique_ptr
+  * switch to is_trivially_copyable for sake of g++ 15+
+  * added wrapper for ES_PUNCTUATION
+  * added wrapper for UProperty.DEPRECATED
+  * drop trainling space from INVALID_CODE wrapper
+- Drop pyicu-2.15-gcc15.patch, merged upstream
+
+-------------------------------------------------------------------

Old:
----
  pyicu-2.15-gcc15.patch
  pyicu-2.15.2.tar.gz

New:
----
  pyicu-2.15.3.tar.gz

----------(Old B)----------
  Old:  * drop trainling space from INVALID_CODE wrapper
- Drop pyicu-2.15-gcc15.patch, merged upstream
----------(Old E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-PyICU.spec ++++++
--- /var/tmp/diff_new_pack.9yfOAw/_old  2025-09-26 22:24:51.802872569 +0200
+++ /var/tmp/diff_new_pack.9yfOAw/_new  2025-09-26 22:24:51.806872737 +0200
@@ -19,7 +19,7 @@
 %global modname PyICU
 %{?sle15_python_module_pythons}
 Name:           python-%{modname}
-Version:        2.15.2
+Version:        2.15.3
 Release:        0
 Summary:        Python Extension Wrapping the ICU C++ API
 License:        MIT
@@ -28,8 +28,6 @@
 # PATCH-FEATURE-UPSTREAM remove_six.patch [email protected]
 # Remove dependency on six
 Patch0:         remove_six.patch
-# PATCH-FIX-UPSTREAM pyicu-2.15-gcc15.patch
-Patch1:         pyicu-2.15-gcc15.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}

++++++ pyicu-2.15.2.tar.gz -> pyicu-2.15.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/CHANGES new/pyicu-2.15.3/CHANGES
--- old/pyicu-2.15.2/CHANGES    2025-04-22 20:48:56.000000000 +0200
+++ new/pyicu-2.15.3/CHANGES    2025-09-15 22:54:39.000000000 +0200
@@ -1,3 +1,12 @@
+Issues can be seen at https://gitlab.pyicu.org/main/pyicu/-/issues/<num>
+
+Version 2.15.2 -> 2.15.3
+------------------------
+  - replaced all malloc/calloc/free with std::unique_ptr<T[]>
+  - fixed issue #173
+  - fixed issue #175
+  - fixed issue #176
+
 Version 2.15.1 -> 2.15.2
 ------------------------
   - fixed calloc/free mismatch with arg::Q() uses (Fredrik Roubert)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/PKG-INFO new/pyicu-2.15.3/PKG-INFO
--- old/pyicu-2.15.2/PKG-INFO   2025-04-22 20:52:24.717897200 +0200
+++ new/pyicu-2.15.3/PKG-INFO   2025-09-15 22:58:26.444424600 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: pyicu
-Version: 2.15.2
+Version: 2.15.3
 Summary: Python extension wrapping the ICU C++ API
 Home-page: https://gitlab.pyicu.org/main/pyicu
 Author: Andi Vajda
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/arg.h new/pyicu-2.15.3/arg.h
--- old/pyicu-2.15.2/arg.h      2025-04-22 20:19:29.000000000 +0200
+++ new/pyicu-2.15.3/arg.h      2025-05-06 03:53:50.000000000 +0200
@@ -385,13 +385,13 @@
 private:
     const classid id;
     PyTypeObject *const type;
-    std::unique_ptr<T *, decltype(free) *> *const array;
+    std::unique_ptr<T *[]> *const array;
     size_t *const len;
 
 public:
     ICUObjectArray() = delete;
 
-    explicit ICUObjectArray(classid param1, PyTypeObject *param2, 
std::unique_ptr<T *, decltype(free) *> *param3, size_t *param4) noexcept
+    explicit ICUObjectArray(classid param1, PyTypeObject *param2, 
std::unique_ptr<T *[]> *param3, size_t *param4) noexcept
         : id(param1), type(param2), array(param3), len(param4) {}
 
     int parse(PyObject *arg) const
@@ -409,7 +409,7 @@
                 return -1;
         }
 
-        array->reset(reinterpret_cast<T **>(pl2cpa(arg, len, id, type)));
+        *array = pl2cpa<T>(arg, len, id, type);
         if (!array->get())
             return -1;
 
@@ -853,7 +853,7 @@
 };
 
 #define _IS_POD(T)                                      \
-  static_assert(std::is_trivial<T>::value);             \
+  static_assert(std::is_trivially_copyable<T>::value);  \
   static_assert(std::is_standard_layout<T>::value)
 
 _IS_POD(AnyPythonObject);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/bidi.cpp new/pyicu-2.15.3/bidi.cpp
--- old/pyicu-2.15.2/bidi.cpp   2025-04-22 20:15:25.000000000 +0200
+++ new/pyicu-2.15.3/bidi.cpp   2025-04-25 02:13:44.000000000 +0200
@@ -672,17 +672,12 @@
     else
         length = ubidi_getProcessedLength(self->object);
 
-    int *indexMap = (int *) calloc(length, sizeof(int));
+    std::unique_ptr<int[]> indexMap(new int[length]);
 
-    if (indexMap == NULL)
+    if (!indexMap.get())
         return PyErr_NoMemory();
 
-    STATUS_CALL(
-        {
-            ubidi_getLogicalMap(self->object, indexMap, &status);
-            if (U_FAILURE(status))
-                free(indexMap);
-        });
+    STATUS_CALL(ubidi_getLogicalMap(self->object, indexMap.get(), &status));
 
     PyObject *result = PyTuple_New(length);
 
@@ -691,7 +686,6 @@
         for (int i = 0; i < length; ++i)
             PyTuple_SET_ITEM(result, i, PyInt_FromLong(indexMap[i]));
     }
-    free(indexMap);
 
     return result;
 }
@@ -705,17 +699,12 @@
     else
         length = ubidi_getResultLength(self->object);
 
-    int *indexMap = (int *) calloc(length, sizeof(int));
+    std::unique_ptr<int[]> indexMap(new int[length]);
 
-    if (indexMap == NULL)
+    if (!indexMap.get())
         return PyErr_NoMemory();
 
-    STATUS_CALL(
-        {
-            ubidi_getVisualMap(self->object, indexMap, &status);
-            if (U_FAILURE(status))
-                free(indexMap);
-        });
+    STATUS_CALL(ubidi_getVisualMap(self->object, indexMap.get(), &status));
 
     PyObject *result = PyTuple_New(length);
 
@@ -724,7 +713,6 @@
         for (int i = 0; i < length; ++i)
             PyTuple_SET_ITEM(result, i, PyInt_FromLong(indexMap[i]));
     }
-    free(indexMap);
 
     return result;
 }
@@ -736,12 +724,12 @@
 
     if (!parseArg(arg, arg::H(&levels, &length)))
     {
-        int *indexMap = (int *) calloc(length, sizeof(int));
+        std::unique_ptr<int[]> indexMap(new int[length]);
 
-        if (indexMap == NULL)
+        if (!indexMap.get())
             return PyErr_NoMemory();
 
-        ubidi_reorderLogical((const UBiDiLevel *) levels.get(), length, 
indexMap);
+        ubidi_reorderLogical((const UBiDiLevel *) levels.get(), length, 
indexMap.get());
 
         PyObject *result = PyTuple_New(length);
 
@@ -750,7 +738,6 @@
             for (size_t i = 0; i < length; ++i)
                 PyTuple_SET_ITEM(result, i, PyInt_FromLong(indexMap[i]));
         }
-        free(indexMap);
 
         return result;
     }
@@ -765,12 +752,12 @@
 
     if (!parseArg(arg, arg::H(&levels, &length)))
     {
-        int *indexMap = (int *) calloc(length, sizeof(int));
+        std::unique_ptr<int[]> indexMap(new int[length]);
 
-        if (indexMap == NULL)
+        if (!indexMap.get())
             return PyErr_NoMemory();
 
-        ubidi_reorderVisual((const UBiDiLevel *) levels.get(), length, 
indexMap);
+        ubidi_reorderVisual((const UBiDiLevel *) levels.get(), length, 
indexMap.get());
 
         PyObject *result = PyTuple_New(length);
 
@@ -779,7 +766,6 @@
             for (size_t i = 0; i < length; ++i)
                 PyTuple_SET_ITEM(result, i, PyInt_FromLong(indexMap[i]));
         }
-        free(indexMap);
 
         return result;
     }
@@ -801,12 +787,12 @@
                 maxSrc = srcMap[i];
 
         int destLength = maxSrc + 1;
-        int *destMap = (int *) calloc(destLength, sizeof(int));
+        std::unique_ptr<int[]> destMap(new int[destLength]);
 
-        if (destMap == NULL)
+        if (!destMap.get())
             return PyErr_NoMemory();
 
-        ubidi_invertMap((const int *) srcMap.get(), destMap, srcLength);
+        ubidi_invertMap((const int *) srcMap.get(), destMap.get(), srcLength);
 
         PyObject *result = PyTuple_New(destLength);
 
@@ -815,7 +801,6 @@
             for (int i = 0; i < destLength; ++i)
                 PyTuple_SET_ITEM(result, i, PyInt_FromLong(destMap[i]));
         }
-        free(destMap);
 
         return result;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/char.cpp new/pyicu-2.15.3/char.cpp
--- old/pyicu-2.15.2/char.cpp   2024-10-29 21:45:39.000000000 +0100
+++ new/pyicu-2.15.3/char.cpp   2025-05-29 06:02:02.000000000 +0200
@@ -1,5 +1,5 @@
 /* ====================================================================
- * Copyright (c) 2004-2024 Open Source Applications Foundation.
+ * Copyright (c) 2004-2025 Open Source Applications Foundation.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -1166,6 +1166,7 @@
     INSTALL_ENUM(UProperty, "BIDI_MIRRORED", UCHAR_BIDI_MIRRORED);
     INSTALL_ENUM(UProperty, "DASH", UCHAR_DASH);
     INSTALL_ENUM(UProperty, "DEFAULT_IGNORABLE_CODE_POINT", 
UCHAR_DEFAULT_IGNORABLE_CODE_POINT);
+    INSTALL_ENUM(UProperty, "DEPRECATED", UCHAR_DEPRECATED);
     INSTALL_ENUM(UProperty, "DIACRITIC", UCHAR_DIACRITIC);
     INSTALL_ENUM(UProperty, "EXTENDER", UCHAR_EXTENDER);
     INSTALL_ENUM(UProperty, "FULL_COMPOSITION_EXCLUSION", 
UCHAR_FULL_COMPOSITION_EXCLUSION);
@@ -1305,7 +1306,7 @@
     INSTALL_ENUM(UProperty, "IDENTIFIER_STATUS", UCHAR_IDENTIFIER_STATUS);
     INSTALL_ENUM(UProperty, "IDENTIFIER_TYPE", UCHAR_IDENTIFIER_TYPE);
 #endif
-    INSTALL_ENUM(UProperty, "INVALID_CODE ", UCHAR_INVALID_CODE );
+    INSTALL_ENUM(UProperty, "INVALID_CODE", UCHAR_INVALID_CODE);
 
     INSTALL_ENUM(UCharDirection, "LEFT_TO_RIGHT", U_LEFT_TO_RIGHT);
     INSTALL_ENUM(UCharDirection, "RIGHT_TO_LEFT", U_RIGHT_TO_LEFT);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/collator.cpp 
new/pyicu-2.15.3/collator.cpp
--- old/pyicu-2.15.2/collator.cpp       2025-04-22 20:15:25.000000000 +0200
+++ new/pyicu-2.15.3/collator.cpp       2025-04-25 02:18:49.000000000 +0200
@@ -536,7 +536,7 @@
     UnicodeString *u;
     UnicodeString _u;
     int len, size;
-    uint8_t *buf;
+    std::unique_ptr<uint8_t[]> buf;
     PyObject *key;
 
     switch (PyTuple_Size(args)) {
@@ -544,21 +544,18 @@
         if (!parseArgs(args, arg::S(&u, &_u)))
         {
             len = u->length() * 4 + 8;
-            buf = (uint8_t *) malloc(len);
+            buf.reset(new uint8_t[len]);
           retry:
-            if (buf == NULL)
+            if (!buf.get())
                 return PyErr_NoMemory();
 
-            size = self->object->getSortKey(*u, buf, len);
+            size = self->object->getSortKey(*u, buf.get(), len);
             if (size <= len)
-            {
-                key = PyBytes_FromStringAndSize((char *) buf, size);
-                free(buf);
-            }
+                key = PyBytes_FromStringAndSize((char *) buf.get(), size);
             else
             {
                 len = size;
-                buf = (uint8_t *) realloc(buf, len);
+                buf.reset(new uint8_t[len]);
                 goto retry;
             }
 
@@ -568,13 +565,12 @@
       case 2:
         if (!parseArgs(args, arg::S(&u, &_u), arg::i(&len)))
         {
-            buf = (uint8_t *) calloc(len, 1);
-            if (buf == NULL)
+            buf.reset(new uint8_t[len]);
+            if (!buf.get())
                 return PyErr_NoMemory();
 
-            len = self->object->getSortKey(*u, buf, len);
-            key = PyBytes_FromStringAndSize((char *) buf, len);
-            free(buf);
+            len = self->object->getSortKey(*u, buf.get(), len);
+            key = PyBytes_FromStringAndSize((char *) buf.get(), len);
 
             return key;
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/common.cpp new/pyicu-2.15.3/common.cpp
--- old/pyicu-2.15.2/common.cpp 2025-04-22 20:15:25.000000000 +0200
+++ new/pyicu-2.15.3/common.cpp 2025-04-29 02:50:23.000000000 +0200
@@ -645,35 +645,6 @@
     return 0;
 }
 
-UObject **pl2cpa(PyObject *arg, size_t *len, classid id, PyTypeObject *type)
-{
-    if (PySequence_Check(arg))
-    {
-        *len = (int) PySequence_Size(arg);
-        UObject **array = (UObject **) calloc(*len, sizeof(UObject *));
-
-        for (size_t i = 0; i < *len; i++) {
-            PyObject *obj = PySequence_GetItem(arg, i);
-
-            if (isInstance(obj, id, type))
-            {
-                array[i] = ((t_uobject *) obj)->object;
-                Py_DECREF(obj);
-            }
-            else
-            {
-                Py_DECREF(obj);
-                free(array);
-                return NULL;
-            }
-        }
-
-        return array;
-    }
-
-    return NULL;
-}
-
 PyObject *cpa2pl(UObject **array, size_t len, PyObject *(*wrap)(UObject *, 
int))
 {
     PyObject *list = PyList_New(len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/common.h new/pyicu-2.15.3/common.h
--- old/pyicu-2.15.2/common.h   2024-11-01 01:39:47.000000000 +0100
+++ new/pyicu-2.15.3/common.h   2025-04-29 02:58:06.000000000 +0200
@@ -449,7 +449,42 @@
 Formattable *toFormattableArray(PyObject *arg, size_t *len,
                                 classid id, PyTypeObject *type);
 
-UObject **pl2cpa(PyObject *arg, size_t *len, classid id, PyTypeObject *type);
+#include "bases.h"
+
+template <typename T>
+std::unique_ptr<T *[]> pl2cpa(PyObject *arg, size_t *len, classid id, 
PyTypeObject *type)
+{
+    std::unique_ptr<T *[]> array;
+
+    if (PySequence_Check(arg))
+    {
+        *len = (int) PySequence_Size(arg);
+        array.reset(new T *[*len]);
+        if (!array.get())
+            PyErr_NoMemory();
+        else
+        {
+            for (size_t i = 0; i < *len; i++) {
+                PyObject *obj = PySequence_GetItem(arg, i);
+
+                if (isInstance(obj, id, type))
+                {
+                    array[i] = reinterpret_cast<T *>(((t_uobject *) 
obj)->object);
+                    Py_DECREF(obj);
+                }
+                else
+                {
+                    Py_DECREF(obj);
+                    array.reset(nullptr);
+                    break;
+                }
+            }
+        }
+    }
+
+    return array;
+}
+
 PyObject *cpa2pl(UObject **array, size_t len, PyObject *(*wrap)(UObject *, 
int));
 
 int *toIntArray(PyObject *arg, size_t *len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/format.cpp new/pyicu-2.15.3/format.cpp
--- old/pyicu-2.15.2/format.cpp 2025-04-22 20:19:29.000000000 +0200
+++ new/pyicu-2.15.3/format.cpp 2025-04-23 03:22:17.000000000 +0200
@@ -964,7 +964,7 @@
 static PyObject *t_measureformat_formatMeasures(t_measureformat *self,
                                                 PyObject *args)
 {
-    std::unique_ptr<Measure *, decltype(free) *> measures(NULL, free);
+    std::unique_ptr<Measure *[]> measures;
     size_t len;
     FieldPosition dont_care(FieldPosition::DONT_CARE);
     FieldPosition *fp;
@@ -1288,7 +1288,7 @@
 static PyObject *t_messageformat_setFormats(t_messageformat *self,
                                             PyObject *arg)
 {
-    std::unique_ptr<Format *, decltype(free) *> formats(NULL, free);
+    std::unique_ptr<Format *[]> formats;
     size_t len;
 
     if (!parseArg(arg, arg::Q<Format>(TYPE_ID(Format), &formats, &len)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/iterators.cpp 
new/pyicu-2.15.3/iterators.cpp
--- old/pyicu-2.15.2/iterators.cpp      2025-04-22 20:15:25.000000000 +0200
+++ new/pyicu-2.15.3/iterators.cpp      2025-04-25 02:20:12.000000000 +0200
@@ -1142,33 +1142,25 @@
 
     if (status == U_BUFFER_OVERFLOW_ERROR)
     {
-        int32_t *buffer = (int32_t *) calloc(count, sizeof(int32_t));
+        std::unique_ptr<int32_t[]> buffer(new int32_t[count]);
 
-        if (buffer == NULL)
+        if (!buffer.get())
             return PyErr_NoMemory();
 
         status = U_ZERO_ERROR;
-        count = self->object->getRuleStatusVec(buffer, count, status);
+        count = self->object->getRuleStatusVec(buffer.get(), count, status);
 
         if (U_FAILURE(status))
-        {
-            free(buffer);
             return ICUException(status).reportError();
-        }
 
         PyObject *tuple = PyTuple_New(count);
 
         if (!tuple)
-        {
-            free(buffer);
             return NULL;
-        }
 
         for (int i = 0; i < count; ++i)
             PyTuple_SET_ITEM(tuple, i, PyInt_FromLong(buffer[i]));
 
-        free(buffer);
-
         return tuple;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/locale.cpp new/pyicu-2.15.3/locale.cpp
--- old/pyicu-2.15.2/locale.cpp 2025-04-22 20:19:29.000000000 +0200
+++ new/pyicu-2.15.3/locale.cpp 2025-05-06 04:42:03.000000000 +0200
@@ -2253,33 +2253,25 @@
 
 #if U_ICU_VERSION_HEX >= VERSION_HEX(65, 0, 0)
 
-// takes ownership of locales pointer array
 class LocaleIterator : public Locale::Iterator {
   public:
-    LocaleIterator(Locale **locales, int len) :
-        locales_(locales), len_(len),
-        current_(0)
+    LocaleIterator(std::unique_ptr<Locale *[]> &&locales, int len) :
+        locales(std::move(locales)), len(len), current(0)
     {}
 
-    ~LocaleIterator()
-    {
-        free(locales_);  // allocated with calloc in pl2cpa in common.cpp
-    }
-
     UBool hasNext() const override
     {
-        return current_ < len_;
+        return current < len;
     }
 
     const Locale &next() override
     {
-        return *locales_[current_++];
+        return *locales[current++];
     }
 
   private:
-    Locale **locales_;
-    int len_;
-    int current_;
+    std::unique_ptr<Locale *[]> locales;
+    int len, current;
 };
 
 
@@ -2322,12 +2314,12 @@
 static PyObject *t_localematcherbuilder_setSupportedLocales(
     t_localematcherbuilder *self, PyObject *arg)
 {
-    std::unique_ptr<Locale *, decltype(free) *> locales(NULL, free);
+    std::unique_ptr<Locale *[]> locales;
     size_t len;
 
     if (!parseArg(arg, arg::Q<Locale>(TYPE_CLASSID(Locale), &locales, &len)))
     {
-        LocaleIterator it(locales.release(), len);
+        LocaleIterator it(std::move(locales), len);
 
         self->object->setSupportedLocales(it);
         Py_RETURN_SELF();
@@ -2499,7 +2491,7 @@
                                               PyObject *arg)
 {
     Locale *locale;
-    std::unique_ptr<Locale *, decltype(free) *> locales(NULL, free);
+    std::unique_ptr<Locale *[]> locales;
     size_t len;
 
     if (!parseArg(arg, arg::P<Locale>(TYPE_CLASSID(Locale), &locale)))
@@ -2512,7 +2504,7 @@
 
     if (!parseArg(arg, arg::Q<Locale>(TYPE_CLASSID(Locale), &locales, &len)))
     {
-        LocaleIterator it(locales.release(), len);
+        LocaleIterator it(std::move(locales), len);
         const Locale *result;
 
         STATUS_CALL(result = self->object->getBestMatch(it, status));
@@ -2546,7 +2538,7 @@
     t_localematcher *self, PyObject *arg)
 {
     Locale *locale;
-    std::unique_ptr<Locale *, decltype(free) *> locales(NULL, free);
+    std::unique_ptr<Locale *[]> locales;
     size_t len;
 
     if (!parseArg(arg, arg::P<Locale>(TYPE_CLASSID(Locale), &locale)))
@@ -2559,7 +2551,7 @@
 
     if (!parseArg(arg, arg::Q<Locale>(TYPE_CLASSID(Locale), &locales, &len)))
     {
-        LocaleIterator it(locales.release(), len);
+        LocaleIterator it(std::move(locales), len);
 
         STATUS_RESULT_CALL(
             LocaleMatcherResult result = self->object->getBestMatchResult(
@@ -2608,17 +2600,11 @@
                        arg::m(&accepts, &num_accepts),
                        arg::m(&locales, &num_locales)))
         {
-            const char **accept_buffers =
-                (const char **) calloc(num_accepts, sizeof(char *));
-            const char **locale_buffers =
-                (const char **) calloc(num_locales, sizeof(char *));
+            std::unique_ptr<const char *[]> accept_buffers(new const char 
*[num_accepts]);
+            std::unique_ptr<const char *[]> locale_buffers(new const char 
*[num_locales]);
 
-            if (!accept_buffers || !locale_buffers)
-            {
-                free(locale_buffers);
-                free(accept_buffers);
+            if (!accept_buffers.get() || !locale_buffers.get())
                 return PyErr_NoMemory();
-            }
 
             for (size_t i = 0; i < num_accepts; ++i)
                 accept_buffers[i] = accepts[i].c_str();
@@ -2628,14 +2614,10 @@
 
             UErrorCode status = U_ZERO_ERROR;
             UEnumeration *locale_enum = uenum_openCharStringsEnumeration(
-                locale_buffers, num_locales, &status);
+                locale_buffers.get(), num_locales, &status);
 
             if (U_FAILURE(status))
-            {
-                free(locale_buffers);
-                free(accept_buffers);
                 return ICUException(status).reportError();
-            }
             else
                 status = U_ZERO_ERROR;
 
@@ -2643,11 +2625,9 @@
             char buffer[128];
             size_t size = uloc_acceptLanguage(
                 buffer, sizeof(buffer), &result,
-                accept_buffers, num_accepts, locale_enum, &status);
+                accept_buffers.get(), num_accepts, locale_enum, &status);
 
             uenum_close(locale_enum);
-            free(locale_buffers);
-            free(accept_buffers);
 
             if (U_FAILURE(status))
                 return ICUException(status).reportError();
@@ -2682,10 +2662,9 @@
                        arg::n(&header_value),
                        arg::m(&locales, &num_locales)))
         {
-            const char **locale_buffers =
-                (const char **) calloc(num_locales, sizeof(char *));
+            std::unique_ptr<const char *[]> locale_buffers(new const char 
*[num_locales]);
 
-            if (!locale_buffers)
+            if (!locale_buffers.get())
                 return PyErr_NoMemory();
 
             for (size_t i = 0; i < num_locales; ++i)
@@ -2693,13 +2672,10 @@
 
             UErrorCode status = U_ZERO_ERROR;
             UEnumeration *locale_enum = uenum_openCharStringsEnumeration(
-                locale_buffers, num_locales, &status);
+                locale_buffers.get(), num_locales, &status);
 
             if (U_FAILURE(status))
-            {
-                free(locale_buffers);
                 return ICUException(status).reportError();
-            }
             else
                 status = U_ZERO_ERROR;
 
@@ -2710,7 +2686,6 @@
                 header_value.c_str(), locale_enum, &status);
 
             uenum_close(locale_enum);
-            free(locale_buffers);
 
             if (U_FAILURE(status))
                 return ICUException(status).reportError();
@@ -3003,11 +2978,23 @@
 
     INSTALL_ENUM(ULocaleDataExemplarSetType, "ES_STANDARD",
                  ULOCDATA_ES_STANDARD);
+    INSTALL_ENUM(ULocaleDataExemplarSetType, "STANDARD",
+                 ULOCDATA_ES_STANDARD);
     INSTALL_ENUM(ULocaleDataExemplarSetType, "ES_AUXILIARY",
                  ULOCDATA_ES_AUXILIARY);
+    INSTALL_ENUM(ULocaleDataExemplarSetType, "AUXILIARY",
+                 ULOCDATA_ES_AUXILIARY);
 #if U_ICU_VERSION_HEX >= 0x04080000
     INSTALL_ENUM(ULocaleDataExemplarSetType, "ES_INDEX",
                  ULOCDATA_ES_INDEX);
+    INSTALL_ENUM(ULocaleDataExemplarSetType, "INDEX",
+                 ULOCDATA_ES_INDEX);
+#endif
+#if U_ICU_VERSION_HEX >= VERSION_HEX(51, 0, 0)
+    INSTALL_ENUM(ULocaleDataExemplarSetType, "ES_PUNCTUATION",
+                 ULOCDATA_ES_PUNCTUATION);
+    INSTALL_ENUM(ULocaleDataExemplarSetType, "PUNCTUATION",
+                 ULOCDATA_ES_PUNCTUATION);
 #endif
 
     INSTALL_ENUM(UMeasurementSystem, "SI", UMS_SI);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/py/PyICU.egg-info/PKG-INFO 
new/pyicu-2.15.3/py/PyICU.egg-info/PKG-INFO
--- old/pyicu-2.15.2/py/PyICU.egg-info/PKG-INFO 2025-04-22 20:52:24.000000000 
+0200
+++ new/pyicu-2.15.3/py/PyICU.egg-info/PKG-INFO 2025-09-15 22:58:26.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: pyicu
-Version: 2.15.2
+Version: 2.15.3
 Summary: Python extension wrapping the ICU C++ API
 Home-page: https://gitlab.pyicu.org/main/pyicu
 Author: Andi Vajda
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/setup.py new/pyicu-2.15.3/setup.py
--- old/pyicu-2.15.2/setup.py   2025-04-22 20:49:00.000000000 +0200
+++ new/pyicu-2.15.3/setup.py   2025-09-15 22:54:46.000000000 +0200
@@ -8,7 +8,7 @@
 
 from distutils.spawn import find_executable
 
-VERSION = '2.15.2'
+VERSION = '2.15.3'
 ICU_MAX_MAJOR_VERSION = '77'  # max supported major version of ICU
 
 try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyicu-2.15.2/timezone.cpp 
new/pyicu-2.15.3/timezone.cpp
--- old/pyicu-2.15.2/timezone.cpp       2025-04-22 20:15:25.000000000 +0200
+++ new/pyicu-2.15.3/timezone.cpp       2025-04-25 02:27:18.000000000 +0200
@@ -1419,33 +1419,25 @@
     STATUS_CALL(count = self->object->countTransitionRules(status));
 
     const InitialTimeZoneRule *initial;
-    const TimeZoneRule **rules =
-        (const TimeZoneRule **) calloc(count, sizeof(const TimeZoneRule *));
-    if (rules == NULL)
+    std::unique_ptr<const TimeZoneRule *[]> rules(new const TimeZoneRule 
*[count]);
+    if (!rules.get())
         return PyErr_NoMemory();
 
     UErrorCode status = U_ZERO_ERROR;
 
-    self->object->getTimeZoneRules(initial, rules, count, status);
+    self->object->getTimeZoneRules(initial, rules.get(), count, status);
     if (U_FAILURE(status))
-    {
-        free(rules);
         return ICUException(status).reportError();
-    }
 
     PyObject *result = PyTuple_New(count + 1);
 
     if (result == NULL)
-    {
-        free(rules);
         return NULL;
-    }
 
     PyTuple_SET_ITEM(result, 0, wrap_TimeZoneRule(*initial));
     for (int i = 0; i < count; ++i)
       PyTuple_SET_ITEM(result, i + 1, wrap_TimeZoneRule(*rules[i]));
 
-    free(rules);
     return result;
 }
 

Reply via email to