Package: python-argcomplete
Version: 3.5.1-1
Followup-For: Bug #1087455
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu plucky ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/python-3.13-compat.patch: add a patch to fix crashes with Python 3.13
    (LP: #2088928)

The patch has been forwarded to the upstream as:
https://github.com/kislyuk/argcomplete/pull/513.

Thanks for considering the patch.


-- System Information:
Debian Release: trixie/sid
  APT prefers oracular-updates
  APT policy: (500, 'oracular-updates'), (500, 'oracular-security'), (500, 
'oracular')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.11.0-9-generic (SMP w/10 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru python-argcomplete-3.5.1/debian/patches/python-3.13-compat.patch 
python-argcomplete-3.5.1/debian/patches/python-3.13-compat.patch
--- python-argcomplete-3.5.1/debian/patches/python-3.13-compat.patch    
1969-12-31 17:00:00.000000000 -0700
+++ python-argcomplete-3.5.1/debian/patches/python-3.13-compat.patch    
2024-11-18 16:28:10.000000000 -0700
@@ -0,0 +1,46 @@
+Description: Fix Python 3.13 compatibility
+Author: Zixing Liu <zixing....@canonical.com>
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/python-argcomplete/+bug/2088928
+Forwarded: https://github.com/kislyuk/argcomplete/pull/513
+Last-Update: 2024-11-18
+---
+Index: python-argcomplete/argcomplete/packages/_argparse.py
+===================================================================
+--- python-argcomplete.orig/argcomplete/packages/_argparse.py
++++ python-argcomplete/argcomplete/packages/_argparse.py
+@@ -5,6 +5,7 @@
+ 
+ # This file contains argparse introspection utilities used in the course of 
argcomplete execution.
+ 
++import sys
+ from argparse import (
+     ONE_OR_MORE,
+     OPTIONAL,
+@@ -15,6 +16,7 @@ from argparse import (
+     Action,
+     ArgumentError,
+     ArgumentParser,
++    Namespace,
+     _get_action_name,
+     _SubParsersAction,
+ )
+@@ -75,6 +77,19 @@ class IntrospectiveArgumentParser(Argume
+     except for the lines that contain the string "Added by argcomplete".
+     '''
+ 
++    def _parse_known_args2(self, args, namespace, intermixed):
++        if args is None:
++            # args default to the system args
++            args = sys.argv[1:]
++        else:
++            # make sure that args are mutable
++            args = list(args)
++
++        # default Namespace built from parser defaults
++        if namespace is None:
++            namespace = Namespace()
++        return self._parse_known_args(args, namespace)
++
+     def _parse_known_args(self, arg_strings, namespace):
+         _num_consumed_args.clear()  # Added by argcomplete
+         self._argcomplete_namespace = namespace
diff -Nru python-argcomplete-3.5.1/debian/patches/series 
python-argcomplete-3.5.1/debian/patches/series
--- python-argcomplete-3.5.1/debian/patches/series      2024-10-23 
02:55:13.000000000 -0600
+++ python-argcomplete-3.5.1/debian/patches/series      2024-11-18 
16:28:10.000000000 -0700
@@ -1,3 +1,4 @@
 py3k-tests.patch
 tests_pip_fix.patch
 python-argcomplete-check-easy-install-script_help_fix.patch
+python-3.13-compat.patch

Reply via email to