Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package re2 for openSUSE:Factory checked in 
at 2021-09-04 22:32:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/re2 (Old)
 and      /work/SRC/openSUSE:Factory/.re2.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "re2"

Sat Sep  4 22:32:04 2021 rev:40 rq:915620 version:MACRO

Changes:
--------
--- /work/SRC/openSUSE:Factory/re2/re2.changes  2021-08-12 09:01:40.474150212 
+0200
+++ /work/SRC/openSUSE:Factory/.re2.new.1899/re2.changes        2021-09-04 
22:32:13.851903122 +0200
@@ -1,0 +2,6 @@
+Wed Sep  1 20:43:28 UTC 2021 - Callum Farmer <gm...@opensuse.org>
+
+- Update to 2021-09-01:
+  * Permit Unicode characters beyond ASCII in capture names
+
+-------------------------------------------------------------------

Old:
----
  re2-2021-08-01.tar.gz

New:
----
  re2-2021-09-01.tar.gz

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

Other differences:
------------------
++++++ re2.spec ++++++
--- /var/tmp/diff_new_pack.Qx7iB9/_old  2021-09-04 22:32:16.047906028 +0200
+++ /var/tmp/diff_new_pack.Qx7iB9/_new  2021-09-04 22:32:16.051906034 +0200
@@ -16,7 +16,7 @@
 #
 
 
-%global longver 2021-08-01
+%global longver 2021-09-01
 %global shortver %(echo %{longver}|sed 's|-||g')
 %define libname libre2-9
 Name:           re2
@@ -72,26 +72,21 @@
 you will need to install %{name}-devel.
 
 %prep
-%setup -q -n %{name}-%{longver}
+%autosetup -n %{name}-%{longver}
 
 %build
-%if %{do_profiling}
-  %make_build CXXFLAGS="%{optflags} %{cflags_profile_generate}"
-  %make_build CXXFLAGS="%{optflags} %{cflags_profile_generate}" 
LDFLAGS="-lgcov" benchlog
-  %make_build clean
-  %make_build CXXFLAGS="%{optflags} %{cflags_profile_feedback}"
-%else
-  %make_build CXXFLAGS="%{optflags}"
-%endif
+ARCH_FLAGS="`echo %{optflags} | sed -e 's/-O2/-O3/g'`"
+export CXXFLAGS="${ARCH_FLAGS}"
+%make_build
 
 %install
 %make_install includedir=%{_includedir} libdir=%{_libdir}
 
 # Suppress the static library
-find %{buildroot} -name 'lib%{name}.a' -delete
+find %{buildroot} -name '*.a' -delete -print
 
 %check
-%make_build test CXXFLAGS="%{optflags}"
+%make_build shared-testinstall DESTDIR=%{buildroot} includedir=%{_includedir} 
libdir=%{_libdir}
 
 %post -n %{libname} -p /sbin/ldconfig
 %postun -n %{libname} -p /sbin/ldconfig

++++++ re2-2021-08-01.tar.gz -> re2-2021-09-01.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/.github/workflows/ci.yml 
new/re2-2021-09-01/.github/workflows/ci.yml
--- old/re2-2021-08-01/.github/workflows/ci.yml 2021-07-24 13:39:54.000000000 
+0200
+++ new/re2-2021-09-01/.github/workflows/ci.yml 2021-08-31 11:13:56.000000000 
+0200
@@ -21,7 +21,7 @@
     strategy:
       fail-fast: false
       matrix:
-        tag: [9, 10, 11, 12]
+        tag: [9, 10, 11, 12, 13]
     env:
       CC: clang-${{ matrix.tag }}
       CXX: clang++-${{ matrix.tag }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/README new/re2-2021-09-01/README
--- old/re2-2021-08-01/README   2021-07-24 13:39:54.000000000 +0200
+++ new/re2-2021-09-01/README   2021-08-31 11:13:56.000000000 +0200
@@ -31,6 +31,7 @@
 and on PyPI (https://pypi.org/project/google-re2/).
 
 A C wrapper is at https://github.com/marcomaggi/cre2/.
+A D wrapper is at https://github.com/ShigekiKarita/re2d/ and on DUB 
(code.dlang.org).
 An Erlang wrapper is at https://github.com/dukesoferl/re2/ and on Hex (hex.pm).
 An Inferno wrapper is at https://github.com/powerman/inferno-re2/.
 A Node.js wrapper is at https://github.com/uhop/node-re2/ and on NPM 
(npmjs.com).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/re2/parse.cc 
new/re2-2021-09-01/re2/parse.cc
--- old/re2-2021-08-01/re2/parse.cc     2021-07-24 13:39:54.000000000 +0200
+++ new/re2-2021-09-01/re2/parse.cc     2021-08-31 11:13:56.000000000 +0200
@@ -1409,13 +1409,15 @@
     }
   }
 
-  status->set_code(kRegexpBadUTF8);
-  status->set_error_arg(StringPiece());
+  if (status != NULL) {
+    status->set_code(kRegexpBadUTF8);
+    status->set_error_arg(StringPiece());
+  }
   return -1;
 }
 
-// Return whether name is valid UTF-8.
-// If not, set status to kRegexpBadUTF8.
+// Returns whether name is valid UTF-8.
+// If not, sets status to kRegexpBadUTF8.
 static bool IsValidUTF8(const StringPiece& s, RegexpStatus* status) {
   StringPiece t = s;
   Rune r;
@@ -2013,19 +2015,34 @@
   return true;
 }
 
-// Is this a valid capture name?  [A-Za-z0-9_]+
-// PCRE limits names to 32 bytes.
-// Python rejects names starting with digits.
-// We don't enforce either of those.
+// Returns whether name is a valid capture name.
 static bool IsValidCaptureName(const StringPiece& name) {
   if (name.empty())
     return false;
-  for (size_t i = 0; i < name.size(); i++) {
-    int c = name[i];
-    if (('0' <= c && c <= '9') ||
-        ('a' <= c && c <= 'z') ||
-        ('A' <= c && c <= 'Z') ||
-        c == '_')
+
+  // Historically, we effectively used [0-9A-Za-z_]+ to validate; that
+  // followed Python 2 except for not restricting the first character.
+  // As of Python 3, Unicode characters beyond ASCII are also allowed;
+  // accordingly, we permit the Lu, Ll, Lt, Lm, Lo, Nl, Mn, Mc, Nd and
+  // Pc categories, but again without restricting the first character.
+  // Also, Unicode normalization (e.g. NFKC) isn't performed: Python 3
+  // performs it for identifiers, but seemingly not for capture names;
+  // if they start doing that for capture names, we won't follow suit.
+  static const CharClass* const cc = []() {
+    CharClassBuilder ccb;
+    for (StringPiece group :
+         {"Lu", "Ll", "Lt", "Lm", "Lo", "Nl", "Mn", "Mc", "Nd", "Pc"})
+      AddUGroup(&ccb, LookupGroup(group, unicode_groups, num_unicode_groups),
+                +1, Regexp::NoParseFlags);
+    return ccb.GetCharClass();
+  }();
+
+  StringPiece t = name;
+  Rune r;
+  while (!t.empty()) {
+    if (StringPieceToRune(&r, &t, NULL) < 0)
+      return false;
+    if (cc->Contains(r))
       continue;
     return false;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/re2/re2.cc 
new/re2-2021-09-01/re2/re2.cc
--- old/re2-2021-08-01/re2/re2.cc       2021-07-24 13:39:54.000000000 +0200
+++ new/re2-2021-09-01/re2/re2.cc       2021-08-31 11:13:56.000000000 +0200
@@ -801,7 +801,7 @@
       // it doesn't have the shared state and occasional mutex that
       // the DFA does.
       if (can_one_pass && text.size() <= 4096 &&
-          (ncap > 1 || text.size() <= 8)) {
+          (ncap > 1 || text.size() <= 16)) {
         skipped_test = true;
         break;
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/re2/re2.h new/re2-2021-09-01/re2/re2.h
--- old/re2-2021-08-01/re2/re2.h        2021-07-24 13:39:54.000000000 +0200
+++ new/re2-2021-09-01/re2/re2.h        2021-08-31 11:13:56.000000000 +0200
@@ -967,8 +967,11 @@
 // thread_local, but for the sake of brevity, we lump together all versions
 // of Apple platforms that aren't macOS. If an iOS application really needs
 // the context pointee someday, we can get more specific then...
+//
+// As per https://github.com/google/re2/issues/325, thread_local support in
+// MinGW seems to be buggy. (FWIW, Abseil folks also avoid it.)
 #define RE2_HAVE_THREAD_LOCAL
-#if defined(__APPLE__) && !TARGET_OS_OSX
+#if (defined(__APPLE__) && !TARGET_OS_OSX) || defined(__MINGW32__)
 #undef RE2_HAVE_THREAD_LOCAL
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/re2/regexp.cc 
new/re2-2021-09-01/re2/regexp.cc
--- old/re2-2021-08-01/re2/regexp.cc    2021-07-24 13:39:54.000000000 +0200
+++ new/re2-2021-09-01/re2/regexp.cc    2021-08-31 11:13:56.000000000 +0200
@@ -955,7 +955,7 @@
   return cc;
 }
 
-bool CharClass::Contains(Rune r) {
+bool CharClass::Contains(Rune r) const {
   RuneRange* rr = ranges_;
   int n = nranges_;
   while (n > 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/re2/regexp.h 
new/re2-2021-09-01/re2/regexp.h
--- old/re2-2021-08-01/re2/regexp.h     2021-07-24 13:39:54.000000000 +0200
+++ new/re2-2021-09-01/re2/regexp.h     2021-08-31 11:13:56.000000000 +0200
@@ -254,7 +254,7 @@
   bool full() { return nrunes_ == Runemax+1; }
   bool FoldsASCII() { return folds_ascii_; }
 
-  bool Contains(Rune r);
+  bool Contains(Rune r) const;
   CharClass* Negate();
 
  private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/re2/testing/parse_test.cc 
new/re2-2021-09-01/re2/testing/parse_test.cc
--- old/re2-2021-08-01/re2/testing/parse_test.cc        2021-07-24 
13:39:54.000000000 +0200
+++ new/re2-2021-09-01/re2/testing/parse_test.cc        2021-08-31 
11:13:56.000000000 +0200
@@ -164,6 +164,7 @@
 
   // Test named captures
   { "(?P<name>a)", "cap{name:lit{a}}" },
+  { "(?P<??????>a)", "cap{??????:lit{a}}" },
 
   // Case-folded literals
   { "[Aa]", "litfold{a}" },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2021-08-01/util/mutex.h 
new/re2-2021-09-01/util/mutex.h
--- old/re2-2021-08-01/util/mutex.h     2021-07-24 13:39:54.000000000 +0200
+++ new/re2-2021-09-01/util/mutex.h     2021-08-31 11:13:56.000000000 +0200
@@ -66,7 +66,7 @@
 
 #if defined(MUTEX_IS_WIN32_SRWLOCK)
 
-Mutex::Mutex()             { InitializeSRWLock(&mutex_); }
+Mutex::Mutex()             : mutex_(SRWLOCK_INIT) { }
 Mutex::~Mutex()            { }
 void Mutex::Lock()         { AcquireSRWLockExclusive(&mutex_); }
 void Mutex::Unlock()       { ReleaseSRWLockExclusive(&mutex_); }

Reply via email to