Package: bash-completion
Version: 1:2.11-3
Severity: normal
Tags: patch upstream fixed-upstream

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I wanted to invoke `pyvenv` on my Sid system with Python 3.9, but that
didn't work. The `ls` command told me why:

$ ls -l /usr/share/bash-completion/completions/pyvenv*
- -rw-r--r-- 1 root root 432 aug 28 16:47 
/usr/share/bash-completion/completions/pyvenv
lrwxrwxrwx 1 root root   6 aug 28 16:47 
/usr/share/bash-completion/completions/pyvenv-3.4 -> pyvenv
lrwxrwxrwx 1 root root   6 aug 28 16:47 
/usr/share/bash-completion/completions/pyvenv-3.5 -> pyvenv
lrwxrwxrwx 1 root root   6 aug 28 16:47 
/usr/share/bash-completion/completions/pyvenv-3.6 -> pyvenv
lrwxrwxrwx 1 root root   6 aug 28 16:47 
/usr/share/bash-completion/completions/pyvenv-3.7 -> pyvenv
lrwxrwxrwx 1 root root   6 aug 28 16:47 
/usr/share/bash-completion/completions/pyvenv-3.8 -> pyvenv

https://github.com/scop/bash-completion/commit/dc1c404b3c14cd3e3627a6720cf32a4e27079285
is the upstream commit where support for Python 3.9 was added. 
It should also be attached to this bug report.
Upstream also already has support for Python 3.10 btw.

https://github.com/scop/bash-completion/pull/595 is an upstream PR to
make a new upstream release and I added a comment to that.
I don't know when upstream will actually make a new release, but until
then it may be helpful to (temporary) apply the patch to the Debian
package.

Cheers,
  Diederik

- -- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: arm64

Kernel: Linux 5.14.0-1-amd64 (SMP w/16 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQT1sUPBYsyGmi4usy/XblvOeH7bbgUCYU26EQAKCRDXblvOeH7b
bgQ6AP492PX+xKo0hYJQ40xsQO9OopiQqEybrWwxUn7EEKx9tgEAoYzFrnlNsJAY
V4vdp/07r5T5fVSUo0qexiwyYwxXSwI=
=4sYo
-----END PGP SIGNATURE-----
From dc1c404b3c14cd3e3627a6720cf32a4e27079285 Mon Sep 17 00:00:00 2001
From: Ville Skyttä <[email protected]>
Date: Sun, 6 Sep 2020 22:57:28 +0300
Subject: [PATCH] python, pyvenv: install for 3.9

---
 completions/Makefile.am | 8 ++++++--
 completions/python      | 2 +-
 completions/pyvenv      | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/completions/Makefile.am b/completions/Makefile.am
index e43d0e3c1b8..ba75fa48386 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -677,11 +677,13 @@ CLEANFILES = \
        python3.6 \
        python3.7 \
        python3.8 \
+       python3.9 \
        pyvenv-3.4 \
        pyvenv-3.5 \
        pyvenv-3.6 \
        pyvenv-3.7 \
        pyvenv-3.8 \
+       pyvenv-3.9 \
        qemu-kvm \
        qemu-system-i386 \
        qemu-system-x86_64 \
@@ -894,9 +896,11 @@ symlinks: $(DATA)
        $(ss) pylint \
                pylint-2 pylint-3
        $(ss) python \
-               micropython pypy pypy3 python2 python2.7 python3 python3.3 
python3.4 python3.5 python3.6 python3.7 python3.8
+               micropython pypy pypy3 python2 python2.7 python3 python3.3 \
+               python3.4 python3.5 python3.6 python3.7 python3.8 python3.9
        $(ss) pyvenv \
-               pyvenv-3.4 pyvenv-3.5 pyvenv-3.6 pyvenv-3.7 pyvenv-3.8
+               pyvenv-3.4 pyvenv-3.5 pyvenv-3.6 pyvenv-3.7 pyvenv-3.8 \
+               pyvenv-3.9
        $(ss) qdbus \
                dcop
        $(ss) qemu \
diff --git a/completions/python b/completions/python
index d50c18f0d83..d7e18b90aee 100644
--- a/completions/python
+++ b/completions/python
@@ -62,6 +62,6 @@ _python()
         COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur"))
     fi
 } &&
-    complete -F _python python python2 python2.7 python3 python3.{3..8} pypy 
pypy3 micropython
+    complete -F _python python python2 python2.7 python3 python3.{3..9} pypy 
pypy3 micropython

 # ex: filetype=sh
diff --git a/completions/pyvenv b/completions/pyvenv
index 527a3840a36..3a1ecb37308 100644
--- a/completions/pyvenv
+++ b/completions/pyvenv
@@ -20,6 +20,6 @@ _pyvenv()

     _filedir -d
 } &&
-    complete -F _pyvenv pyvenv pyvenv-3.{4..8}
+    complete -F _pyvenv pyvenv pyvenv-3.{4..9}

 # ex: filetype=sh

Reply via email to