--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock python3.11 for bookworm. Changes include:
- one code change to fix a regression compared to 3.11.1
#1032019
- making the python3-dbg-config script usable again.
- Emit a proper error when users try to use venv
without having it installed.
- Documentation and lintian cleanups.
python3.11 (3.11.2-6) unstable; urgency=high
[ Stefano Rivera ]
* Explain more ways to pass --break-system-packages to pip.
[ Matthias Klose ]
* Fix syntax error in python3-dbg-config script. LP: #2009967.
-- Matthias Klose <doko@debian.org> Mon, 13 Mar 2023 13:18:29 +0100
python3.11 (3.11.2-5) unstable; urgency=medium
[ Matthias Klose ]
* Update VCS attributes.
* Fix error message for 'python3 -m venv dir`, when python3-venv
is not installed. Closes: #1026268.
[ Stefano Rivera ]
* Mention that deleting EXTERNALLY-MANAGED is an option, in README.venv.
* Patch: fix deadlock at shutdown when clearing thread states.
Closes: #1032019.
* Override expat embedded-library lintian false-positives. (See: #1031859)
-- Matthias Klose <doko@debian.org> Sun, 05 Mar 2023 09:28:49 +0100
diff -Nru python3.11-3.11.2/debian/changelog python3.11-3.11.2/debian/changelog
--- python3.11-3.11.2/debian/changelog 2023-02-12 01:48:52.000000000 +0100
+++ python3.11-3.11.2/debian/changelog 2023-03-13 13:18:29.000000000 +0100
@@ -1,3 +1,28 @@
+python3.11 (3.11.2-6) unstable; urgency=high
+
+ [ Stefano Rivera ]
+ * Explain more ways to pass --break-system-packages to pip.
+
+ [ Matthias Klose ]
+ * Fix syntax error in python3-dbg-config script. LP: #2009967.
+
+ -- Matthias Klose <doko@debian.org> Mon, 13 Mar 2023 13:18:29 +0100
+
+python3.11 (3.11.2-5) unstable; urgency=medium
+
+ [ Matthias Klose ]
+ * Update VCS attributes.
+ * Fix error message for 'python3 -m venv dir`, when python3-venv
+ is not installed. Closes: #1026268.
+
+ [ Stefano Rivera ]
+ * Mention that deleting EXTERNALLY-MANAGED is an option, in README.venv.
+ * Patch: fix deadlock at shutdown when clearing thread states.
+ Closes: #1032019.
+ * Override expat embedded-library lintian false-positives. (See: #1031859)
+
+ -- Matthias Klose <doko@debian.org> Sun, 05 Mar 2023 09:28:49 +0100
+
python3.11 (3.11.2-4) unstable; urgency=medium
[ Stefano Rivera ]
diff -Nru python3.11-3.11.2/debian/control python3.11-3.11.2/debian/control
--- python3.11-3.11.2/debian/control 2023-02-12 01:48:02.000000000 +0100
+++ python3.11-3.11.2/debian/control 2023-02-15 06:29:54.000000000 +0100
@@ -20,8 +20,8 @@
valgrind-if-available,
Build-Depends-Indep: python3-sphinx, python3-docs-theme, texinfo
Standards-Version: 4.6.2
-Vcs-Browser: https://salsa.debian.org/cpython-team/python3
-Vcs-Git: https://salsa.debian.org/cpython-team/python3.git
+Vcs-Browser: https://salsa.debian.org/cpython-team/python3/tree/python3.11
+Vcs-Git: https://salsa.debian.org/cpython-team/python3.git -b python3.11
XS-Testsuite: autopkgtest
Package: python3.11
diff -Nru python3.11-3.11.2/debian/control.in python3.11-3.11.2/debian/control.in
--- python3.11-3.11.2/debian/control.in 2023-02-12 01:47:59.000000000 +0100
+++ python3.11-3.11.2/debian/control.in 2023-02-15 05:16:46.000000000 +0100
@@ -20,8 +20,8 @@
valgrind-if-available,
Build-Depends-Indep: python3-sphinx, python3-docs-theme, texinfo
Standards-Version: 4.6.2
-Vcs-Browser: https://salsa.debian.org/cpython-team/python3
-Vcs-Git: https://salsa.debian.org/cpython-team/python3.git
+Vcs-Browser: https://salsa.debian.org/cpython-team/python3/tree/python3.11
+Vcs-Git: https://salsa.debian.org/cpython-team/python3.git -b python3.11
XS-Testsuite: autopkgtest
Package: @PVER@
diff -Nru python3.11-3.11.2/debian/libPVER-dbg.overrides.in python3.11-3.11.2/debian/libPVER-dbg.overrides.in
--- python3.11-3.11.2/debian/libPVER-dbg.overrides.in 2019-02-06 13:02:26.000000000 +0100
+++ python3.11-3.11.2/debian/libPVER-dbg.overrides.in 2023-03-05 09:27:09.000000000 +0100
@@ -15,3 +15,6 @@
# yes, some extensions don't have references to any external lib
lib@PVER@-dbg binary: shared-lib-without-dependency-information
lib@PVER@-dbg binary: library-not-linked-against-libc
+
+# pyexpat.c contains expat error messages that lintian mis-attributes to embedding
+lib@PVER@-dbg binary: embedded-library
diff -Nru python3.11-3.11.2/debian/libPVER.overrides.in python3.11-3.11.2/debian/libPVER.overrides.in
--- python3.11-3.11.2/debian/libPVER.overrides.in 2013-11-23 13:09:48.000000000 +0100
+++ python3.11-3.11.2/debian/libPVER.overrides.in 2023-03-05 09:27:20.000000000 +0100
@@ -1 +1,4 @@
lib@PVER@ binary: package-name-doesnt-match-sonames
+
+# pyexpat.c contains expat error messages that lintian mis-attributes to embedding
+lib@PVER@ binary: embedded-library
diff -Nru python3.11-3.11.2/debian/patches/ensurepip-disabled.diff python3.11-3.11.2/debian/patches/ensurepip-disabled.diff
--- python3.11-3.11.2/debian/patches/ensurepip-disabled.diff 2023-02-08 22:58:13.000000000 +0100
+++ python3.11-3.11.2/debian/patches/ensurepip-disabled.diff 2023-02-18 14:01:57.000000000 +0100
@@ -78,7 +78,7 @@
+package, recreate your virtual environment.
+
+Failing command: {}
-+""".format(sysconfig.get_python_version(), err.cmd))
++""".format(sysconfig.get_python_version(), context.env_exec_cmd))
+ sys.exit(1)
+ raise
diff -Nru python3.11-3.11.2/debian/patches/series python3.11-3.11.2/debian/patches/series
--- python3.11-3.11.2/debian/patches/series 2023-02-08 22:58:13.000000000 +0100
+++ python3.11-3.11.2/debian/patches/series 2023-03-01 10:58:01.000000000 +0100
@@ -38,3 +38,4 @@
destshared-location.diff
fix-py_compile.diff
ntpath-import.diff
+shutdown-deadlock.diff
diff -Nru python3.11-3.11.2/debian/patches/shutdown-deadlock.diff python3.11-3.11.2/debian/patches/shutdown-deadlock.diff
--- python3.11-3.11.2/debian/patches/shutdown-deadlock.diff 1970-01-01 01:00:00.000000000 +0100
+++ python3.11-3.11.2/debian/patches/shutdown-deadlock.diff 2023-03-01 10:58:01.000000000 +0100
@@ -0,0 +1,30 @@
+Description: [3.11] GH-102126: fix deadlock at shutdown when clearing thread states (GH-102222)
+ (cherry picked from commit 5f11478ce7fda826d399530af4c5ca96c592f144)
+Author: Kumar Aditya
+Origin: upstream, https://github.com/python/cpython/commit/026faf20cc9d1d5913ff7c01a93d8934594d7fec
+Bug-Debian: https://bugs.debian.org/1032019
+Bug-Upstream: https://github.com/python/cpython/issues/102126
+--- a/Python/pystate.c
++++ b/Python/pystate.c
+@@ -396,11 +396,19 @@
+ _PyErr_Clear(tstate);
+ }
+
++ // Clear the current/main thread state last.
+ HEAD_LOCK(runtime);
+- for (PyThreadState *p = interp->threads.head; p != NULL; p = p->next) {
++ PyThreadState *p = interp->threads.head;
++ HEAD_UNLOCK(runtime);
++ while (p != NULL) {
++ // See https://github.com/python/cpython/issues/102126
++ // Must be called without HEAD_LOCK held as it can deadlock
++ // if any finalizer tries to acquire that lock.
+ PyThreadState_Clear(p);
++ HEAD_LOCK(runtime);
++ p = p->next;
++ HEAD_UNLOCK(runtime);
+ }
+- HEAD_UNLOCK(runtime);
+
+ Py_CLEAR(interp->audit_hooks);
+
diff -Nru python3.11-3.11.2/debian/PVER-dbg.overrides.in python3.11-3.11.2/debian/PVER-dbg.overrides.in
--- python3.11-3.11.2/debian/PVER-dbg.overrides.in 2018-04-28 14:36:55.000000000 +0200
+++ python3.11-3.11.2/debian/PVER-dbg.overrides.in 2023-03-05 09:27:35.000000000 +0100
@@ -5,3 +5,6 @@
@PVER@-dbg binary: hardening-no-fortify-functions
@PVER@-dbg binary: command-with-path-in-maintainer-script
+
+# pyexpat.c contains expat error messages that lintian mis-attributes to embedding
+@PVER@-dbg binary: embedded-library
diff -Nru python3.11-3.11.2/debian/PVER-minimal.overrides.in python3.11-3.11.2/debian/PVER-minimal.overrides.in
--- python3.11-3.11.2/debian/PVER-minimal.overrides.in 2018-04-28 14:36:08.000000000 +0200
+++ python3.11-3.11.2/debian/PVER-minimal.overrides.in 2023-03-05 09:27:46.000000000 +0100
@@ -1 +1,4 @@
@PVER@-minimal binary: command-with-path-in-maintainer-script
+
+# pyexpat.c contains expat error messages that lintian mis-attributes to embedding
+@PVER@-minimal binary: embedded-library
diff -Nru python3.11-3.11.2/debian/PVER-nopie.overrides.in python3.11-3.11.2/debian/PVER-nopie.overrides.in
--- python3.11-3.11.2/debian/PVER-nopie.overrides.in 1970-01-01 01:00:00.000000000 +0100
+++ python3.11-3.11.2/debian/PVER-nopie.overrides.in 2023-03-05 09:27:51.000000000 +0100
@@ -0,0 +1,2 @@
+# pyexpat.c contains expat error messages that lintian mis-attributes to embedding
+@PVER@-nopie binary: embedded-library
diff -Nru python3.11-3.11.2/debian/README.venv python3.11-3.11.2/debian/README.venv
--- python3.11-3.11.2/debian/README.venv 2023-02-08 22:58:13.000000000 +0100
+++ python3.11-3.11.2/debian/README.venv 2023-03-13 13:18:29.000000000 +0100
@@ -9,9 +9,9 @@
If you need to install a Python application (or version) that isn't packaged in
Debian, we recommend that you install it with pipx (in the "pipx" Debian
-package). pipx will create an isolated environment to install the application
-and its dependencies in, separate from all other applications and system Python
-modules.
+package). pipx will set up an environment isolated from other applications and
+system Python modules, and install the application and its dependencies into
+that.
Python library modules
----------------------
@@ -26,6 +26,13 @@
After activating the environment, you can install python applications and
library modules into the virtual environment.
+e.g. instead of running:
+$ pip install --user foo
+run:
+$ mkdir -p ~/.venvs
+$ python3 -m venv ~/.venvs/foo
+$ ~/.venvs/foo/bin/python -m pip install foo
+
If needed, the isolated environment can also have access to system Python
modules, with the "--system-site-packages" flag.
@@ -46,7 +53,20 @@
This can be overriden by passing the --break-system-packages option to pip. You
do this at your own risk: pip may break Python modules that part of your Debian
-system depends on.
+system depends on. This option can also be specified by exporting
+PIP_BREAK_SYSTEM_PACKAGES=1 or configuring the following in
+~/.config/pip/pip.conf or /etc/pip.conf:
+
+[global]
+break-system-packages = true
+
+You can also override this system-wide by removing
+/usr/lib/python3.*/EXTERNALLY-MANAGED. Again, you do this at your own risk,
+with the understanding that Debian-provided Python modules may be broken by pip
+/ other installers. The best way to do this is to move it with dpkg-divert,
+which will survive security updates):
+
+# dpkg-divert --rename --add /usr/lib/$(py3versions -d)/EXTERNALLY-MANAGED
-Another option is to install your own Python (from source) in /usr/local, that
+A clean option is to install your own Python (from source) in /usr/local, that
isn't EXTERNALLY-MANAGED.
diff -Nru python3.11-3.11.2/debian/rules python3.11-3.11.2/debian/rules
--- python3.11-3.11.2/debian/rules 2023-02-12 01:48:12.000000000 +0100
+++ python3.11-3.11.2/debian/rules 2023-03-13 11:29:53.000000000 +0100
@@ -248,9 +248,9 @@
-e 's/-O3/-O2/g' \
-e 's/-fprofile-use *-fprofile-correction//g' \
-e 's/-fstack-protector /-fstack-protector-strong /g' \
- -e "s/-specs=[^ ']*//g" \
- -e "s/-fdebug-prefix-map=[^ ']*//g" \
- -e "s/-ffile-prefix-map=[^ ']*//g" \
+ -e "s/-specs=[^ '\"]*//g" \
+ -e "s/-fdebug-prefix-map=[^ '\"]*//g" \
+ -e "s/-ffile-prefix-map=[^ '\"]*//g" \
-e 's/-Wl,-z,relro//g' \
-e 's,^RUNSHARED *=.*,RUNSHARED=,' \
-e '/BLDLIBRARY/s/-L\. //'
--- End Message ---