#5 ANNOUNCED: Update to 23.1.21 (close RHBZ#2159100)
Merged a year ago by music. Opened a year ago by music.
Unknown source v23.1.21  into  rawhide

file modified
+1
@@ -17,3 +17,4 @@

  /flatbuffers-22.11.23.tar.gz

  /flatbuffers-22.12.06.tar.gz

  /flatbuffers-23.1.4.tar.gz

+ /flatbuffers-23.1.21.tar.gz

file removed
-51
@@ -1,51 +0,0 @@

- From 35b0844f4dbe2934ce672ab31e8a5f7c798ea83a Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Sun, 8 Jan 2023 11:54:15 -0500

- Subject: [PATCH] Fix some identity/equality confusion in Python tests

- 

- Comparing short strings, small integers, and Booleans by identity

- (memory address) can work due to optimizations in the Python

- interpreter, but it is neither formally correct nor reliable. Use

- equality comparisons instead.

- ---

-  tests/py_test.py | 8 ++++----

-  1 file changed, 4 insertions(+), 4 deletions(-)

- 

- diff --git a/tests/py_test.py b/tests/py_test.py

- index 204a96dd4be..7d3d0905ff9 100644

- --- a/tests/py_test.py

- +++ b/tests/py_test.py

- @@ -195,13 +195,13 @@ def test_default_values_with_pack_and_unpack(self):

-      self.assertEqual(monster2.InventoryAsNumpy(), 0)

-      self.assertEqual(monster2.InventoryLength(), 0)

-      self.assertTrue(monster2.InventoryIsNone())

- -    self.assertTrue(monster2.Color() is 8)

- +    self.assertEqual(monster2.Color(), 8)

-      self.assertEqual(monster2.TestType(), 0)

-      self.assertTrue(monster2.Test() is None)

-      self.assertTrue(monster2.Test4(0) is None)

-      self.assertEqual(monster2.Test4Length(), 0)

-      self.assertTrue(monster2.Test4IsNone())

- -    self.assertTrue(monster2.Testarrayofstring(0) is '')

- +    self.assertEqual(monster2.Testarrayofstring(0), '')

-      self.assertEqual(monster2.TestarrayofstringLength(), 0)

-      self.assertTrue(monster2.TestarrayofstringIsNone())

-      self.assertTrue(monster2.Testarrayoftables(0) is None)

- @@ -213,7 +213,7 @@ def test_default_values_with_pack_and_unpack(self):

-      self.assertEqual(monster2.TestnestedflatbufferLength(), 0)

-      self.assertTrue(monster2.TestnestedflatbufferIsNone())

-      self.assertTrue(monster2.Testempty() is None)

- -    self.assertTrue(monster2.Testbool() is False)

- +    self.assertFalse(monster2.Testbool())

-      self.assertEqual(monster2.Testhashs32Fnv1(), 0)

-      self.assertEqual(monster2.Testhashu32Fnv1(), 0)

-      self.assertEqual(monster2.Testhashs64Fnv1(), 0)

- @@ -229,7 +229,7 @@ def test_default_values_with_pack_and_unpack(self):

-      self.assertEqual(monster2.Testf(), 3.14159)

-      self.assertEqual(monster2.Testf2(), 3.0)

-      self.assertEqual(monster2.Testf3(), 0.0)

- -    self.assertTrue(monster2.Testarrayofstring2(0) is '')

- +    self.assertEqual(monster2.Testarrayofstring2(0), '')

-      self.assertEqual(monster2.Testarrayofstring2Length(), 0)

-      self.assertTrue(monster2.Testarrayofstring2IsNone())

-      self.assertTrue(monster2.Testarrayofsortedstruct(0) is None)

file removed
-113
@@ -1,113 +0,0 @@

- From ad5e93fb8ef13499ac47049dd6492ec0345b71c1 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Sun, 8 Jan 2023 12:39:08 -0500

- Subject: [PATCH] Stop using deprecated imp package in Python tests

- 

- It is deprecated in favour of importlib and slated for removal in Python

- 3.12. Since the return value of imp.find_module('numpy') is unused, the

- only effect of calling this function is to raise an ImportError when

- numpy is not available; importing numpy directly is already sufficient

- to do this.

- 

- The imp package is still used in python/flatbuffers/compat.py, but only

- on Python 2, where it is not deprecated and will not be removed.

- ---

-  tests/py_test.py | 13 ++-----------

-  1 file changed, 2 insertions(+), 11 deletions(-)

- 

- diff --git a/tests/py_test.py b/tests/py_test.py

- index 204a96dd4be..e2dcf18191a 100644

- --- a/tests/py_test.py

- +++ b/tests/py_test.py

- @@ -15,7 +15,6 @@

-  

-  import os.path

-  import sys

- -import imp

-  PY_VERSION = sys.version_info[:2]

-  

-  import ctypes

- @@ -695,7 +694,6 @@ def asserter(stmt):

-    ]))

-  

-    try:

- -    imp.find_module('numpy')

-      # if numpy exists, then we should be able to get the

-      # vector as a numpy array

-      import numpy as np

- @@ -1074,7 +1072,6 @@ def test_create_byte_vector(self):

-  

-    def test_create_numpy_vector_int8(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -1120,7 +1117,6 @@ def test_create_numpy_vector_int8(self):

-  

-    def test_create_numpy_vector_uint16(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -1174,7 +1170,6 @@ def test_create_numpy_vector_uint16(self):

-  

-    def test_create_numpy_vector_int64(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -1261,7 +1256,6 @@ def test_create_numpy_vector_int64(self):

-  

-    def test_create_numpy_vector_float32(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -1324,7 +1318,6 @@ def test_create_numpy_vector_float32(self):

-  

-    def test_create_numpy_vector_float64(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -1411,7 +1404,6 @@ def test_create_numpy_vector_float64(self):

-  

-    def test_create_numpy_vector_bool(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -1458,7 +1450,6 @@ def test_create_numpy_vector_bool(self):

-  

-    def test_create_numpy_vector_reject_strings(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -1476,7 +1467,6 @@ def test_create_numpy_vector_reject_strings(self):

-  

-    def test_create_numpy_vector_reject_object(self):

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

-        import numpy as np

- @@ -2343,9 +2333,10 @@ def test_nondefault_monster_testnestedflatbuffer(self):

-      self.assertEqual(2, mon2.Testnestedflatbuffer(1))

-      self.assertEqual(4, mon2.Testnestedflatbuffer(2))

-      try:

- -      imp.find_module('numpy')

-        # if numpy exists, then we should be able to get the

-        # vector as a numpy array

- +      import numpy as np

- +

-        self.assertEqual([0, 2, 4], mon2.TestnestedflatbufferAsNumpy().tolist())

-      except ImportError:

-        assertRaises(self, lambda: mon2.TestnestedflatbufferAsNumpy(),

file removed
-153
@@ -1,153 +0,0 @@

- From 6d6e5fc28f5cb4543cea9f7280831e4118b91e41 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Sun, 8 Jan 2023 15:53:55 -0500

- Subject: [PATCH 1/2] In Python tests, use host-endian-independent dtypes

- 

- ---

-  tests/py_test.py | 30 +++++++++++++++---------------

-  1 file changed, 15 insertions(+), 15 deletions(-)

- 

- diff --git a/tests/py_test.py b/tests/py_test.py

- index 204a96dd4be..70cf07b989b 100644

- --- a/tests/py_test.py

- +++ b/tests/py_test.py

- @@ -701,18 +701,18 @@ def asserter(stmt):

-      import numpy as np

-  

-      asserter(monster.InventoryAsNumpy().sum() == 10)

- -    asserter(monster.InventoryAsNumpy().dtype == np.dtype('uint8'))

- +    asserter(monster.InventoryAsNumpy().dtype == np.dtype('<u1'))

-  

-      VectorOfLongs = monster.VectorOfLongsAsNumpy()

- -    asserter(VectorOfLongs.dtype == np.dtype('int64'))

- +    asserter(VectorOfLongs.dtype == np.dtype('<i8'))

-      for i in range(5):

-        asserter(VectorOfLongs[i] == 10**(i * 2))

-  

-      VectorOfDoubles = monster.VectorOfDoublesAsNumpy()

- -    asserter(VectorOfDoubles.dtype == np.dtype('float64'))

- -    asserter(VectorOfDoubles[0] == np.finfo('float64').min)

- +    asserter(VectorOfDoubles.dtype == np.dtype('<f8'))

- +    asserter(VectorOfDoubles[0] == np.finfo('<f8').min)

-      asserter(VectorOfDoubles[1] == 0.0)

- -    asserter(VectorOfDoubles[2] == np.finfo('float64').max)

- +    asserter(VectorOfDoubles[2] == np.finfo('<f8').max)

-  

-    except ImportError:

-      # If numpy does not exist, trying to get vector as numpy

- @@ -857,33 +857,33 @@ def check(table, desc, want, got):

-            check(table, 'bool', self.boolVal,

-                  table.GetSlot(f, False, N.BoolFlags))

-          elif choice == 1:

- -          check(table, 'int8', self.int8Val, table.GetSlot(f, 0, N.Int8Flags))

- +          check(table, '<i1', self.int8Val, table.GetSlot(f, 0, N.Int8Flags))

-          elif choice == 2:

- -          check(table, 'uint8', self.uint8Val,

- +          check(table, '<u1', self.uint8Val,

-                  table.GetSlot(f, 0, N.Uint8Flags))

-          elif choice == 3:

- -          check(table, 'int16', self.int16Val,

- +          check(table, '<i2', self.int16Val,

-                  table.GetSlot(f, 0, N.Int16Flags))

-          elif choice == 4:

- -          check(table, 'uint16', self.uint16Val,

- +          check(table, '<u2', self.uint16Val,

-                  table.GetSlot(f, 0, N.Uint16Flags))

-          elif choice == 5:

- -          check(table, 'int32', self.int32Val,

- +          check(table, '<i4', self.int32Val,

-                  table.GetSlot(f, 0, N.Int32Flags))

-          elif choice == 6:

- -          check(table, 'uint32', self.uint32Val,

- +          check(table, '<u4', self.uint32Val,

-                  table.GetSlot(f, 0, N.Uint32Flags))

-          elif choice == 7:

- -          check(table, 'int64', self.int64Val,

- +          check(table, '<i8', self.int64Val,

-                  table.GetSlot(f, 0, N.Int64Flags))

-          elif choice == 8:

- -          check(table, 'uint64', self.uint64Val,

- +          check(table, '<u8', self.uint64Val,

-                  table.GetSlot(f, 0, N.Uint64Flags))

-          elif choice == 9:

- -          check(table, 'float32', self.float32Val,

- +          check(table, '<f4', self.float32Val,

-                  table.GetSlot(f, 0, N.Float32Flags))

-          elif choice == 10:

- -          check(table, 'float64', self.float64Val,

- +          check(table, '<f8', self.float64Val,

-                  table.GetSlot(f, 0, N.Float64Flags))

-          else:

-            raise RuntimeError('unreachable')

- 

- From 85285ac9efce74320d367c7d8c7874b4d55cfb10 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Sun, 8 Jan 2023 19:56:42 -0500

- Subject: [PATCH 2/2] Fix host endianness dependence in Python flexbuffers

- 

- ---

-  python/flatbuffers/flexbuffers.py | 10 +++++-----

-  tests/py_flexbuffers_test.py      |  6 +++---

-  2 files changed, 8 insertions(+), 8 deletions(-)

- 

- diff --git a/python/flatbuffers/flexbuffers.py b/python/flatbuffers/flexbuffers.py

- index aaa02fdaf3f..34d42a6986c 100644

- --- a/python/flatbuffers/flexbuffers.py

- +++ b/python/flatbuffers/flexbuffers.py

- @@ -75,7 +75,7 @@ def I(value):

-    @staticmethod

-    def F(value):

-      """Returns the `BitWidth` to encode floating point value."""

- -    if struct.unpack('f', struct.pack('f', value))[0] == value:

- +    if struct.unpack('<f', struct.pack('<f', value))[0] == value:

-        return BitWidth.W32

-      return BitWidth.W64

-  

- @@ -95,20 +95,20 @@ def B(byte_width):

-  

-  

-  def _Unpack(fmt, buf):

- -  return struct.unpack(fmt[len(buf)], buf)[0]

- +  return struct.unpack('<%s' % fmt[len(buf)], buf)[0]

-  

-  

-  def _UnpackVector(fmt, buf, length):

-    byte_width = len(buf) // length

- -  return struct.unpack('%d%s' % (length, fmt[byte_width]), buf)

- +  return struct.unpack('<%d%s' % (length, fmt[byte_width]), buf)

-  

-  

-  def _Pack(fmt, value, byte_width):

- -  return struct.pack(fmt[byte_width], value)

- +  return struct.pack('<%s' % fmt[byte_width], value)

-  

-  

-  def _PackVector(fmt, values, byte_width):

- -  return struct.pack('%d%s' % (len(values), fmt[byte_width]), *values)

- +  return struct.pack('<%d%s' % (len(values), fmt[byte_width]), *values)

-  

-  

-  def _Mutate(fmt, buf, value, byte_width, value_bit_width):

- diff --git a/tests/py_flexbuffers_test.py b/tests/py_flexbuffers_test.py

- index 6696b3e23e4..fcd17faaa37 100644

- --- a/tests/py_flexbuffers_test.py

- +++ b/tests/py_flexbuffers_test.py

- @@ -74,15 +74,15 @@ def int_sizes(value):

-  

-  

-  def int_bytes(value, byte_width):

- -  return struct.pack({1: 'b', 2: 'h', 4: 'i', 8: 'q'}[byte_width], value)

- +  return struct.pack('<%s' % {1: 'b', 2: 'h', 4: 'i', 8: 'q'}[byte_width], value)

-  

-  

-  def uint_bytes(value, byte_width):

- -  return struct.pack({1: 'B', 2: 'H', 4: 'I', 8: 'Q'}[byte_width], value)

- +  return struct.pack('<%s' % {1: 'B', 2: 'H', 4: 'I', 8: 'Q'}[byte_width], value)

-  

-  

-  def float_bytes(value, byte_width):

- -  return struct.pack({4: 'f', 8: 'd'}[byte_width], value)

- +  return struct.pack('<%s' % {4: 'f', 8: 'd'}[byte_width], value)

-  

-  

-  def min_value(type_, byte_width):

file removed
-22
@@ -1,22 +0,0 @@

- From 7234b20c6a541fa1a3b676d551f168950107ac10 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Sun, 8 Jan 2023 20:23:10 -0500

- Subject: [PATCH] Fix a typo in a Python test name

- 

- ---

-  tests/py_test.py | 2 +-

-  1 file changed, 1 insertion(+), 1 deletion(-)

- 

- diff --git a/tests/py_test.py b/tests/py_test.py

- index 204a96dd4be..623760b0649 100644

- --- a/tests/py_test.py

- +++ b/tests/py_test.py

- @@ -131,7 +131,7 @@ def test_wire_format(self):

-  class TestObjectBasedAPI(unittest.TestCase):

-    """ Tests the generated object based API."""

-  

- -  def test_consistenty_with_repeated_pack_and_unpack(self):

- +  def test_consistency_with_repeated_pack_and_unpack(self):

-      """ Checks the serialization and deserialization between a buffer and

-  

-          its python object. It tests in the same way as the C++ object API test,

file modified
+6 -26
@@ -12,15 +12,12 @@

  %bcond_with doc_pdf

  

  Name:           flatbuffers

- Version:        23.1.4

- # The .so version is explicitly constructed from project version—search

- # CMakeLists.txt for FlatBuffers_Library_SONAME_MAJOR and

- # FlatBuffers_Library_SONAME_FULL—but we manually repeat the SOVERSION here,

- # and use the macro in the file lists, as a reminder to avoid undetected .so

- # version bumps. Be aware that upstream does not offer ABI stability

- # guarantees; they have been asked to use the full version number as the .so

- # version in https://github.com/google/flatbuffers/issues/7759.

- %global so_version 23

+ Version:        23.1.21

+ # The .so version is equal to the project version since upstream offers no ABI

+ # stability guarantees. We manually repeat it here and and use the macro in the

+ # file lists as a reminder to avoid undetected .so version bumps. See

+ # https://github.com/google/flatbuffers/issues/7759.

+ %global so_version 23.1.21

  Release:        %autorelease

  Summary:        FlatBuffers: Memory Efficient Serialization Library

  
@@ -34,22 +31,6 @@

  # Hand-written for Fedora in groff_man(7) format based on --help output

  Source1:        flatc.1

  

- # Fix some identity/equality confusion in Python tests

- # https://github.com/google/flatbuffers/pull/7768

- Patch:          https://github.com/google/flatbuffers/pull/7768.patch

- # Stop using deprecated imp package in Python tests

- # https://github.com/google/flatbuffers/pull/7769

- Patch:          https://github.com/google/flatbuffers/pull/7769.patch

- # Fix Python host-endianness dependencies

- # https://github.com/google/flatbuffers/pull/7769

- #   Fixes:

- # Python test failures on s390x (big-endian)

- # https://github.com/google/flatbuffers/issues/7772

- Patch:          https://github.com/google/flatbuffers/pull/7773.patch

- # Fix a typo in a Python test name

- # https://github.com/google/flatbuffers/pull/7774

- Patch:          https://github.com/google/flatbuffers/pull/7774.patch

- 

  # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval

  ExcludeArch:    %{ix86}

  
@@ -247,7 +228,6 @@

  %license LICENSE.txt

  

  %{_libdir}/libflatbuffers.so.%{so_version}

- %{_libdir}/libflatbuffers.so.%{version}

  

  

  %files devel

file modified
+15 -1
@@ -123,6 +123,13 @@

  Also implies

  .BR \-\-no\-prefix .

  .TP

+ .B \-\-no\-emit\-min\-max\-enum\-values

+ Disable generation of

+ .B MIN

+ and

+ .B MAX

+ enumerated values for scoped enums and prefixed enums.

+ .TP

  .B \-\-gen\-includes

  .RI ( deprecated ),

  this is the default behavior.
@@ -392,9 +399,16 @@

  which is unsafe unless checked by a verifier afterwards.

  .TP

  .B \-\-ts\-flat\-files

- Only generated one typescript file per

+ Generate a single typescript file per

  .B .fbs

  file.

+ Implies

+ .BR \-\-ts\-entry\-points .

+ .TP

+ .B \-\-ts\-entry\-points

+ Generate entry point typescript per namespace.

+ Implies

+ .BR \-\-gen\-all .

  .TP

  .B \-\-annotate\ \fISCHEMA

  Annotate the provided

file modified
+1 -1
@@ -1,1 +1,1 @@

- SHA512 (flatbuffers-23.1.4.tar.gz) = 8b3e1b9596a76548faca529fe5070e775be50bfdea079ba4f66014f5a1bfb93f8edd7e56f97363c897d2db8391277a9099a61d14e4298c3669ab7068bbf07865

+ SHA512 (flatbuffers-23.1.21.tar.gz) = fa62188f773ad044644a58caf1e25bef417dfdea47c9da8a2ea7f997154b4f3976019e32e73cc533696a3d4e45ec4a8402b6df140878dfa2ff078740d61b4b0f

https://github.com/google/flatbuffers/compare/v23.1.4...v23.1.21

https://github.com/google/flatbuffers/releases/tag/v23.1.21

https://github.com/google/flatbuffers/releases/tag/v23.1.20

## [23.1.21 (Jan 21 2023)](https://github.com/google/flatbuffers/releases/tag/v23.1.20)

* Reworked entry points for Typescript/Javascript and compatibility for single
  file build (#7510)

## [23.1.20 (Jan 20 2023)](https://github.com/google/flatbuffers/releases/tag/v23.1.20)

* Removed go.mod files after some versioning issues were being report (#7780).

Announced to the devel list 2022-01-23. Merge and build no earlier than 2022-01-30.

rebased onto ed9000d

a year ago

Build succeeded.

Build succeeded.

Pull-Request has been merged by music

a year ago