You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.4 KiB
35 lines
1.4 KiB
4 weeks ago
|
From f0b39dae0a02138a21eaa1f280b1be7cb7f1ff3c Mon Sep 17 00:00:00 2001
|
||
|
From: Adi Roiban <adi.roiban@chevah.com>
|
||
|
Date: Thu, 21 Dec 2023 10:05:32 +0000
|
||
|
Subject: [PATCH] Update twisted.python._shellcomp.ZshArgumentsGenerator for
|
||
|
Python 3.13.
|
||
|
|
||
|
---
|
||
|
src/twisted/newsfragments/12065.feature | 1 +
|
||
|
src/twisted/python/_shellcomp.py | 4 +++-
|
||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||
|
create mode 100644 src/twisted/newsfragments/12065.feature
|
||
|
|
||
|
diff --git a/src/twisted/newsfragments/12065.feature b/src/twisted/newsfragments/12065.feature
|
||
|
new file mode 100644
|
||
|
index 00000000000..4b9b4b2f07c
|
||
|
--- /dev/null
|
||
|
+++ b/src/twisted/newsfragments/12065.feature
|
||
|
@@ -0,0 +1 @@
|
||
|
+twisted.python._shellcomp.ZshArgumentsGenerator was updated for Python 3.13.
|
||
|
diff --git a/src/twisted/python/_shellcomp.py b/src/twisted/python/_shellcomp.py
|
||
|
index e36620210b2..9c9a46a8d42 100644
|
||
|
--- a/src/twisted/python/_shellcomp.py
|
||
|
+++ b/src/twisted/python/_shellcomp.py
|
||
|
@@ -603,7 +603,9 @@ def getDescription(self, longname):
|
||
|
obj = getattr(self.options, "opt_%s" % longMangled, None)
|
||
|
if obj is not None:
|
||
|
descr = descrFromDoc(obj)
|
||
|
- if descr is not None:
|
||
|
+ # On Python3.13 we have an empty string instead of None,
|
||
|
+ # for missing description.
|
||
|
+ if descr:
|
||
|
return descr
|
||
|
|
||
|
return longname # we really ought to have a good description to use
|