forked from pool/python-joblib
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=63
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
From 05caf0772d605799e5d2337018fd32ac829b37aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= <loic.esteve@ymail.com>
|
||||
Date: Fri, 20 Oct 2023 19:59:00 +0200
|
||||
Subject: [PATCH] MNT fix Python 3.12 deprecation warning (#1518)
|
||||
|
||||
---
|
||||
joblib/_utils.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/joblib/_utils.py b/joblib/_utils.py
|
||||
index 7693310e0..6cd99ad31 100644
|
||||
--- a/joblib/_utils.py
|
||||
+++ b/joblib/_utils.py
|
||||
@@ -35,8 +35,8 @@ def eval_expr(expr):
|
||||
|
||||
|
||||
def eval_(node):
|
||||
- if isinstance(node, ast.Num): # <number>
|
||||
- return node.n
|
||||
+ if isinstance(node, ast.Constant): # <constant>
|
||||
+ return node.value
|
||||
elif isinstance(node, ast.BinOp): # <left> <operator> <right>
|
||||
return operators[type(node.op)](eval_(node.left), eval_(node.right))
|
||||
elif isinstance(node, ast.UnaryOp): # <operator> <operand> e.g., -1
|
Reference in New Issue
Block a user