Bug#1033970: unblock: src:python-nbxmpp/4.2.2-2

2023-04-08 Thread Martin
Control: close -1

On 2023-04-08 22:03, Paul Gevers wrote:
> python-nbxmpp is not a key package, so with a passing autopkgtest [0],
> your package won't be blocked, see our policy [1]. Why are you asking
> for clearance?

OK, thanks for confirming! Uploaded to unstable.



Bug#1033970: unblock: src:python-nbxmpp/4.2.2-2

2023-04-08 Thread Paul Gevers

Control: tags -1 moreinfo

Hi Martin,

On 05-04-2023 10:26, Martin wrote:

I like to get clearance for uploading python-nbxmpp 4.2.2-2 to unstable, to get
it into bookworm. 4.2.2-1 is already uploaded to experimental. The
package has extensive autopkgtests. debdiff attached.


python-nbxmpp is not a key package, so with a passing autopkgtest [0], 
your package won't be blocked, see our policy [1]. Why are you asking 
for clearance?


Paul

[0] https://qa.debian.org/excuses.php?experimental=1=python-nbxmpp
[1] https://release.debian.org/testing/freeze_policy.html


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1033970: unblock: src:python-nbxmpp/4.2.2-2

2023-04-05 Thread Martin
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock

Dear release team,

I like to get clearance for uploading python-nbxmpp 4.2.2-2 to unstable, to get
it into bookworm. 4.2.2-1 is already uploaded to experimental. The
package has extensive autopkgtests. debdiff attached.

Upstream release text:

>  * HTTP: Reset attributes on redirect (#141)
>  * HTTP: Make sure streams are closed only once (#139)

Thanks in advance & Cheers
diff -Nru python-nbxmpp-4.2.0/ChangeLog python-nbxmpp-4.2.2/ChangeLog
--- python-nbxmpp-4.2.0/ChangeLog	2023-02-05 16:23:56.0 +
+++ python-nbxmpp-4.2.2/ChangeLog	2023-03-25 16:33:26.0 +
@@ -1,3 +1,15 @@
+nbxmpp 4.2.2 (25 Mar 2023)
+
+  Bug Fixes
+
+  * HTTP: Reset attributes on redirect (#141)
+
+nbxmpp 4.2.1 (18 Mar 2023)
+
+  Bug Fixes
+
+  * HTTP: Make sure streams are closed only once (#139)
+
 nbxmpp 4.2.0 (05 Feb 2023)
 
   New
diff -Nru python-nbxmpp-4.2.0/debian/changelog python-nbxmpp-4.2.2/debian/changelog
--- python-nbxmpp-4.2.0/debian/changelog	2023-02-06 19:54:25.0 +
+++ python-nbxmpp-4.2.2/debian/changelog	2023-04-05 07:26:16.0 +
@@ -1,3 +1,9 @@
+python-nbxmpp (4.2.2-1) experimental; urgency=medium
+
+  * New upstream bug fix release (solves HTTP issues)
+
+ -- Martin   Wed, 05 Apr 2023 07:26:16 +
+
 python-nbxmpp (4.2.0-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru python-nbxmpp-4.2.0/nbxmpp/__init__.py python-nbxmpp-4.2.2/nbxmpp/__init__.py
--- python-nbxmpp-4.2.0/nbxmpp/__init__.py	2023-02-05 16:23:56.0 +
+++ python-nbxmpp-4.2.2/nbxmpp/__init__.py	2023-03-25 16:33:26.0 +
@@ -3,4 +3,4 @@
 
 from .protocol import *  # pylint: disable=wrong-import-position
 
-__version__: str = '4.2.0'
+__version__: str = '4.2.2'
diff -Nru python-nbxmpp-4.2.0/nbxmpp/http.py python-nbxmpp-4.2.2/nbxmpp/http.py
--- python-nbxmpp-4.2.0/nbxmpp/http.py	2023-02-05 16:23:56.0 +
+++ python-nbxmpp-4.2.2/nbxmpp/http.py	2023-03-25 16:33:26.0 +
@@ -276,6 +276,7 @@
 
 self._message.connect('content-sniffed', self._on_content_sniffed)
 self._message.connect('got-body', self._on_got_body)
+self._message.connect('restarted', self._on_restarted)
 self._message.connect('finished', self._on_finished)
 
 soup_session = self._session.get_soup_session()
@@ -431,6 +432,12 @@
 self._log.info('Body received')
 self._body_received = True
 
+def _on_restarted(self, _message: Soup.Message) -> None:
+self._log.info('Restarted')
+self._body_received = False
+self._response_content_type = ''
+self._response_content_length = 0
+
 def _on_finished(self, _message: Soup.Message) -> None:
 self._log.info('Message finished')
 if not self._body_received:
@@ -483,13 +490,24 @@
 self._cleanup()
 
 def _close_all_streams(self) -> None:
-if self._input_stream is not None:
-if not self._input_stream.is_closed():
-self._input_stream.close(None)
-
-if self._output_stream is not None:
-if not self._output_stream.is_closed():
-self._output_stream.close(None)
+# stream.close() will invoke signals on the Message object
+# which in turn can lead to this method called again in the
+# same Mainloop iteration. This means is_closed() will not
+# return True and we get an GLib.IOError.PENDING error.
+
+input_stream = self._input_stream
+output_stream = self._output_stream
+
+self._input_stream = None
+self._output_stream = None
+
+if input_stream is not None:
+if not input_stream.is_closed():
+input_stream.close(None)
+
+if output_stream is not None:
+if not output_stream.is_closed():
+output_stream.close(None)
 
 def _cleanup(self) -> None:
 self._log.info('Run cleanup')
@@ -501,9 +519,6 @@
 del self._session
 del self._user_data
 
-self._input_stream = None
-self._output_stream = None
-
 if self._timeout_id is not None:
 GLib.source_remove(self._timeout_id)
 self._timeout_id = None