Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-lxml for openSUSE:Factory 
checked in at 2023-01-30 17:09:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-lxml (Old)
 and      /work/SRC/openSUSE:Factory/.python-lxml.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-lxml"

Mon Jan 30 17:09:44 2023 rev:96 rq:1061830 version:4.9.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-lxml/python-lxml.changes  2023-01-03 
15:04:37.082248153 +0100
+++ /work/SRC/openSUSE:Factory/.python-lxml.new.32243/python-lxml.changes       
2023-01-30 17:13:57.521439399 +0100
@@ -1,0 +2,6 @@
+Fri Jan 20 16:00:15 UTC 2023 - Matej Cepl <mc...@suse.com>
+
+- Add close_file_before_test.patch, to make sure the testing data
+  are flushed to the file (bsc#1206555).
+
+-------------------------------------------------------------------

New:
----
  close_file_before_test.patch

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

Other differences:
------------------
++++++ python-lxml.spec ++++++
--- /var/tmp/diff_new_pack.JhBPr9/_old  2023-01-30 17:13:58.013442435 +0100
+++ /var/tmp/diff_new_pack.JhBPr9/_new  2023-01-30 17:13:58.017442460 +0100
@@ -26,6 +26,9 @@
 Source0:        
https://files.pythonhosted.org/packages/source/l/lxml/lxml-%{version}.tar.gz
 Source1:        https://lxml.de/lxmldoc-4.5.2.pdf
 Source99:       python-lxml.rpmlintrc
+# PATCH-FIX-UPSTREAM close_file_before_test.patch bsc#1206555 mc...@suse.com
+# make sure the testing data are flushed to the file
+Patch0:         close_file_before_test.patch
 BuildRequires:  %{python_module Cython >= 0.29.7}
 BuildRequires:  %{python_module base}
 BuildRequires:  %{python_module cssselect >= 0.9.1}
@@ -70,7 +73,8 @@
 This package contains header files needed to use lxml's C API.
 
 %prep
-%setup -q -n lxml-%{version}
+%autosetup -p1 -n lxml-%{version}
+
 cp %{SOURCE1} .
 
 # remove generated files

++++++ close_file_before_test.patch ++++++
---
 src/lxml/tests/test_etree.py |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/src/lxml/tests/test_etree.py
+++ b/src/lxml/tests/test_etree.py
@@ -18,6 +18,7 @@ import re
 import gc
 import operator
 import textwrap
+import tempfile
 import zlib
 import gzip
 
@@ -5276,9 +5277,11 @@ class ETreeWriteTestCase(HelperTestCase)
 
     def test_write_file_gzip_parse(self):
         tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>'))
-        with tmpfile() as filename:
-            tree.write(filename, compression=9)
-            data = etree.tostring(etree.parse(filename))
+        with tempfile.NamedTemporaryFile() as f:
+            tree.write(f.name, compression=9)
+            f.file.flush()
+            f.file.seek(0)
+            data = etree.tostring(etree.parse(f.name))
         self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'),
                           data)
 

Reply via email to