File: 0004-Update-test-ast-usage-for-Python-3.14.patch

package info (click to toggle)
ipython 8.35.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,900 kB
  • sloc: python: 42,442; sh: 376; makefile: 243
file content (22 lines) | stat: -rw-r--r-- 882 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Stuart Prescott <stuart@debian.org>
Date: Mon, 12 Jan 2026 11:45:43 +1100
Subject: Update test ast usage for Python 3.14

Backports part of an upstream change from newer releases.
---
 IPython/core/tests/test_interactiveshell.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py
index f87d96f..e358fef 100644
--- a/IPython/core/tests/test_interactiveshell.py
+++ b/IPython/core/tests/test_interactiveshell.py
@@ -823,7 +823,7 @@ class IntegerWrapper(ast.NodeTransformer):
 
     # for Python 3.7 and earlier
     def visit_Num(self, node):
-        if isinstance(node.n, int):
+        if isinstance(node.value, int):
             return ast.Call(func=ast.Name(id='Integer', ctx=ast.Load()),
                             args=[node], keywords=[])
         return node