Hello community,

here is the log from the commit of package fmt for openSUSE:Factory checked in 
at 2020-08-12 10:55:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fmt (Old)
 and      /work/SRC/openSUSE:Factory/.fmt.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fmt"

Wed Aug 12 10:55:20 2020 rev:12 rq:824910 version:7.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/fmt/fmt.changes  2020-08-02 12:29:38.723936530 
+0200
+++ /work/SRC/openSUSE:Factory/.fmt.new.3399/fmt.changes        2020-08-12 
10:55:22.416709798 +0200
@@ -1,0 +2,9 @@
+Fri Aug  7 19:56:36 UTC 2020 - aloi...@gmx.com
+
+- Update to version 7.0.3
+  * Worked around broken ``numeric_limits`` for 128-bit integers
+  * Added error reporting on missing named arguments
+  * Stopped using 128-bit integers with clang-cl
+  * Fixed issues in locale-specific integer formatting
+
+-------------------------------------------------------------------

Old:
----
  fmt-7.0.2.tar.gz

New:
----
  fmt-7.0.3.tar.gz

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

Other differences:
------------------
++++++ fmt.spec ++++++
--- /var/tmp/diff_new_pack.j5TgnE/_old  2020-08-12 10:55:22.936710056 +0200
+++ /var/tmp/diff_new_pack.j5TgnE/_new  2020-08-12 10:55:22.936710056 +0200
@@ -18,7 +18,7 @@
 
 %define sover   7
 Name:           fmt
-Version:        7.0.2
+Version:        7.0.3
 Release:        0
 Summary:        A formatting library for C++
 License:        MIT

++++++ fmt-7.0.2.tar.gz -> fmt-7.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-7.0.2/ChangeLog.rst new/fmt-7.0.3/ChangeLog.rst
--- old/fmt-7.0.2/ChangeLog.rst 2020-07-29 16:30:55.000000000 +0200
+++ new/fmt-7.0.3/ChangeLog.rst 2020-08-06 17:51:01.000000000 +0200
@@ -1,3 +1,20 @@
+7.0.3 - 2020-08-06
+------------------
+
+* Worked around broken ``numeric_limits`` for 128-bit integers
+  (`#1787 <https://github.com/fmtlib/fmt/issues/1787>`_).
+
+* Added error reporting on missing named arguments
+  (`#1796 <https://github.com/fmtlib/fmt/issues/1796>`_).
+
+* Stopped using 128-bit integers with clang-cl
+  (`#1800 <https://github.com/fmtlib/fmt/pull/1800>`_).
+  Thanks `@Kingcom <https://github.com/Kingcom>`_.
+
+* Fixed issues in locale-specific integer formatting
+  (`#1782 <https://github.com/fmtlib/fmt/issues/1782>`_,
+  `#1801 <https://github.com/fmtlib/fmt/issues/1801>`_).
+
 7.0.2 - 2020-07-29
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-7.0.2/doc/build.py new/fmt-7.0.3/doc/build.py
--- old/fmt-7.0.2/doc/build.py  2020-07-29 16:30:55.000000000 +0200
+++ new/fmt-7.0.3/doc/build.py  2020-08-06 17:51:01.000000000 +0200
@@ -6,7 +6,7 @@
 from subprocess import check_call, check_output, CalledProcessError, Popen, 
PIPE
 from distutils.version import LooseVersion
 
-versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', 
'5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0', '6.1.0', '6.1.1', '6.1.2', 
'6.2.0', '6.2.1', '7.0.0', '7.0.1', '7.0.2']
+versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', 
'5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0', '6.1.0', '6.1.1', '6.1.2', 
'6.2.0', '6.2.1', '7.0.0', '7.0.1', '7.0.2', '7.0.3']
 
 def pip_install(package, commit=None, **kwargs):
   "Install package using pip."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-7.0.2/include/fmt/core.h 
new/fmt-7.0.3/include/fmt/core.h
--- old/fmt-7.0.2/include/fmt/core.h    2020-07-29 16:30:55.000000000 +0200
+++ new/fmt-7.0.3/include/fmt/core.h    2020-08-06 17:51:01.000000000 +0200
@@ -18,7 +18,7 @@
 #include <vector>
 
 // The fmt library version in the form major * 10000 + minor * 100 + patch.
-#define FMT_VERSION 70002
+#define FMT_VERSION 70003
 
 #ifdef __clang__
 #  define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
@@ -299,7 +299,7 @@
 
 #ifdef FMT_USE_INT128
 // Do nothing.
-#elif defined(__SIZEOF_INT128__) && !FMT_NVCC
+#elif defined(__SIZEOF_INT128__) && !FMT_NVCC && !(FMT_CLANG_VERSION && 
FMT_MSC_VER)
 #  define FMT_USE_INT128 1
 using int128_t = __int128_t;
 using uint128_t = __uint128_t;
@@ -1713,7 +1713,7 @@
   }
 
   template <typename Char> int get_id(basic_string_view<Char> name) const {
-    if (!has_named_args()) return {};
+    if (!has_named_args()) return -1;
     const auto& named_args =
         (is_packed() ? values_[-1] : args_[-1].value_).named_args;
     for (size_t i = 0; i < named_args.size; ++i) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-7.0.2/include/fmt/format.h 
new/fmt-7.0.3/include/fmt/format.h
--- old/fmt-7.0.2/include/fmt/format.h  2020-07-29 16:30:55.000000000 +0200
+++ new/fmt-7.0.3/include/fmt/format.h  2020-08-06 17:51:01.000000000 +0200
@@ -724,13 +724,18 @@
 
 namespace detail {
 
+template <typename T>
+using is_signed =
+    std::integral_constant<bool, std::numeric_limits<T>::is_signed ||
+                                     std::is_same<T, int128_t>::value>;
+
 // Returns true if value is negative, false otherwise.
 // Same as `value < 0` but doesn't produce warnings if T is an unsigned type.
-template <typename T, FMT_ENABLE_IF(std::numeric_limits<T>::is_signed)>
+template <typename T, FMT_ENABLE_IF(is_signed<T>::value)>
 FMT_CONSTEXPR bool is_negative(T value) {
   return value < 0;
 }
-template <typename T, FMT_ENABLE_IF(!std::numeric_limits<T>::is_signed)>
+template <typename T, FMT_ENABLE_IF(!is_signed<T>::value)>
 FMT_CONSTEXPR bool is_negative(T) {
   return false;
 }
@@ -745,9 +750,9 @@
 // Smallest of uint32_t, uint64_t, uint128_t that is large enough to
 // represent all values of T.
 template <typename T>
-using uint32_or_64_or_128_t = conditional_t<
-    num_bits<T>() <= 32, uint32_t,
-    conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t>>;
+using uint32_or_64_or_128_t =
+    conditional_t<num_bits<T>() <= 32, uint32_t,
+                  conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t>>;
 
 // Static data is placed in this class template for the header-only config.
 template <typename T = void> struct FMT_EXTERN_TEMPLATE_API basic_data {
@@ -1593,7 +1598,11 @@
                               make_checked(p, s.size()));
     }
     if (prefix_size != 0) p[-1] = static_cast<Char>('-');
-    write(out, basic_string_view<Char>(buffer.data(), buffer.size()), specs);
+    using iterator = remove_reference_t<decltype(reserve(out, 0))>;
+    auto data = buffer.data();
+    out = write_padded<align::right>(out, specs, size, size, [=](iterator it) {
+      return copy_str<Char>(data, data + size, it);
+    });
   }
 
   void on_chr() { *out++ = static_cast<Char>(abs_value); }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-7.0.2/test/format-test.cc 
new/fmt-7.0.3/test/format-test.cc
--- old/fmt-7.0.2/test/format-test.cc   2020-07-29 16:30:55.000000000 +0200
+++ new/fmt-7.0.3/test/format-test.cc   2020-08-06 17:51:01.000000000 +0200
@@ -543,7 +543,6 @@
 TEST(FormatterTest, NamedArg) {
   EXPECT_EQ("1/a/A", format("{_1}/{a_}/{A_}", fmt::arg("a_", 'a'),
                             fmt::arg("A_", "A"), fmt::arg("_1", 1)));
-  EXPECT_THROW_MSG(format("{a}"), format_error, "argument not found");
   EXPECT_EQ(" -42", format("{0:{width}}", -42, fmt::arg("width", 4)));
   EXPECT_EQ("st", format("{0:.{precision}}", "str", fmt::arg("precision", 2)));
   EXPECT_EQ("1 2", format("{} {two}", 1, fmt::arg("two", 2)));
@@ -553,6 +552,8 @@
                          fmt::arg("i", 0), fmt::arg("j", 0), fmt::arg("k", 0),
                          fmt::arg("l", 0), fmt::arg("m", 0), fmt::arg("n", 0),
                          fmt::arg("o", 0), fmt::arg("p", 0)));
+  EXPECT_THROW_MSG(format("{a}"), format_error, "argument not found");
+  EXPECT_THROW_MSG(format("{a}", 42), format_error, "argument not found");
 }
 
 TEST(FormatterTest, AutoArgIndex) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-7.0.2/test/locale-test.cc 
new/fmt-7.0.3/test/locale-test.cc
--- old/fmt-7.0.2/test/locale-test.cc   2020-07-29 16:30:55.000000000 +0200
+++ new/fmt-7.0.3/test/locale-test.cc   2020-08-06 17:51:01.000000000 +0200
@@ -68,6 +68,11 @@
             fmt::format(small_grouping_loc, "{:L}", max_value<uint32_t>()));
 }
 
+TEST(LocaleTest, FormatDetaultAlign) {
+  std::locale special_grouping_loc(std::locale(), new 
special_grouping<char>());
+  EXPECT_EQ("  12,345", fmt::format(special_grouping_loc, "{:8L}", 12345));
+}
+
 TEST(LocaleTest, WFormat) {
   std::locale loc(std::locale(), new numpunct<wchar_t>());
   EXPECT_EQ(L"1234567", fmt::format(std::locale(), L"{:L}", 1234567));
@@ -89,4 +94,16 @@
             fmt::format(small_grouping_loc, L"{:L}", max_value<uint32_t>()));
 }
 
+TEST(LocaleTest, DoubleFormatter) {
+  auto loc = std::locale(std::locale(), new special_grouping<char>());
+  auto f = fmt::formatter<int>();
+  auto parse_ctx = fmt::format_parse_context("L");
+  f.parse(parse_ctx);
+  char buf[10] = {};
+  fmt::basic_format_context<char*, char> format_ctx(
+      buf, {}, fmt::detail::locale_ref(loc));
+  *f.format(12345, format_ctx) = 0;
+  EXPECT_STREQ("12,345", buf);
+}
+
 #endif  // FMT_STATIC_THOUSANDS_SEPARATOR


Reply via email to