[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1033076: unblock: python-motor/2.3.0-3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: python-motor@packages.debian.org
Control: affects -1 + src:python-motor

Please unblock package python-motor

[ Reason ]
python-motor in testing is affected by the grave RC bug #1031763
reported by an end user.

[ Impact ]
If python-motor doesn't migrate, the RC bug will cause a removal
of the package from bookworm, but it won't pull reverse
dependencies in the process on first sight.  Overall impact
looks thus somewhat low.

[ Tests ]
I didn't run the test suite as I discovered the registered
autopkgtest needed a package mongodb-server, which is not
available in any section of the archive currently.  Build time
tests also require a running mongodb server to be actually
executed, which I don't have at hand, nor I have the energy to
deploy.  Best I could do was to mimick autodep8 in unstable and
testing context:

	(sid-amd64-sbuild)$ python3
	Python 3.11.2 (main, Mar  5 2023, 08:28:49) [GCC 12.2.0] on linux
	Type "help", "copyright", "credits" or "license" for more information.
	>>> import motor
	>>> motor
	<module 'motor' from '/usr/lib/python3/dist-packages/motor/__init__.py'>

	(testing-amd64-sbuild)$ python3
	Python 3.11.2 (main, Feb 12 2023, 00:48:52) [GCC 12.2.0] on linux
	Type "help", "copyright", "credits" or "license" for more information.
	>>> import motor
	>>> motor
	<module 'motor' from '/usr/lib/python3/dist-packages/motor/__init__.py'>

[ Risks ]
As I didn't extensively test the package, it is quite possible
issues are hidden, but I didn't get any (negative) feedback from
the bug submitter so far, so maybe things are okay after all.

The package does not have reverse dependencies so risks of
affecting other packages look low.

[ Checklist ]
  [*] all changes are documented in the d/changelog
  [*] I reviewed all changes and I approve them
  [*] attach debdiff against the package in testing

[ Other info ]
There was a standards version bump from 4.5.1 to 4.6.2 by the
Janitor lingering in the repository.  Said bump didn't seem to
require changes from packaging perspective, so I kept the
modification as is.  This change may be reverted if deemed not
appropriate.

unblock python-motor/2.3.0-3

Have a nice day,  :)
-- 
Étienne Mollier <emollier@emlwks999.eu>
Fingerprint:  8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/5, please excuse my verbosity.
On air: Pendragon - Indigo
diff -Nru python-motor-2.3.0/debian/changelog python-motor-2.3.0/debian/changelog
--- python-motor-2.3.0/debian/changelog	2022-05-26 20:39:58.000000000 +0200
+++ python-motor-2.3.0/debian/changelog	2023-03-03 14:29:00.000000000 +0100
@@ -1,3 +1,17 @@
+python-motor (2.3.0-3) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Debian Janitor ]
+  * Update standards version to 4.6.2, no changes needed.
+
+  [ Étienne Mollier ]
+  * python-3.11.patch: add patch from upstream.
+    This fixes an import error of motor.motor_asyncio.
+    Thanks to Andrey Rakhmatullin for the hint!  (Closes: #1031763)
+
+ -- Étienne Mollier <emollier@debian.org>  Fri, 03 Mar 2023 14:29:00 +0100
+
 python-motor (2.3.0-2) unstable; urgency=medium
 
   * Remove obsolete field Name from debian/upstream/metadata (already present in
diff -Nru python-motor-2.3.0/debian/control python-motor-2.3.0/debian/control
--- python-motor-2.3.0/debian/control	2022-05-26 20:39:58.000000000 +0200
+++ python-motor-2.3.0/debian/control	2023-03-03 14:29:00.000000000 +0100
@@ -7,7 +7,7 @@
                dh-python,
                python3-all,
                python3-setuptools,
-Standards-Version: 4.5.1
+Standards-Version: 4.6.2
 Homepage: https://github.com/mongodb/motor
 Vcs-Browser: https://salsa.debian.org/python-team/packages/python-motor
 Vcs-Git: https://salsa.debian.org/python-team/packages/python-motor.git
diff -Nru python-motor-2.3.0/debian/patches/python-3.11.patch python-motor-2.3.0/debian/patches/python-3.11.patch
--- python-motor-2.3.0/debian/patches/python-3.11.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-motor-2.3.0/debian/patches/python-3.11.patch	2023-03-03 14:29:00.000000000 +0100
@@ -0,0 +1,34 @@
+Description: fix asyncio.coroutine import error with python3.11
+Author: Steven Silvester
+Bug: https://github.com/mongodb/motor/pull/185
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031763
+Reviewed-By: Étienne Mollier <emollier@debian.org>
+Last-Update: 2023-03-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- python-motor.orig/motor/frameworks/asyncio/__init__.py
++++ python-motor/motor/frameworks/asyncio/__init__.py
+@@ -25,7 +25,6 @@
+ import os
+ import warnings
+ 
+-from asyncio import coroutine  # For framework interface.
+ from concurrent.futures import ThreadPoolExecutor
+ 
+ 
+@@ -34,6 +33,15 @@
+ except ImportError:
+     contextvars = None
+ 
++try:
++    from asyncio import coroutine
++except ImportError:
++
++    def coroutine():
++        raise RuntimeError(
++            "The coroutine decorator was removed in Python 3.11.  Use 'async def' instead"
++        )
++
+ 
+ CLASS_PREFIX = 'AsyncIO'
+ 
diff -Nru python-motor-2.3.0/debian/patches/series python-motor-2.3.0/debian/patches/series
--- python-motor-2.3.0/debian/patches/series	2022-05-26 20:39:58.000000000 +0200
+++ python-motor-2.3.0/debian/patches/series	2023-03-03 14:29:00.000000000 +0100
@@ -1 +1,2 @@
 new-crt.patch
+python-3.11.patch

Attachment: signature.asc
Description: PGP signature


Reply to: