14
0
forked from pool/python-joblib

- Add patch avoid-deprecated-ast.patch:

* Avoid deprecated ast classes.
- Add patch also-filter-new-fork-warning.patch:
  * Filter DeprecationWarning due to calling fork() with multiprocessing.
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=60
This commit is contained in:
2023-11-28 04:00:59 +00:00
committed by Git OBS Bridge
parent 1c31648499
commit af5d476398
4 changed files with 59 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
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