summaryrefslogtreecommitdiff
path: root/dev-python/sympy/files/sympy-1.11-no-deprecated-threading-event-api.patch
blob: eaffd3f1fbe12f3a36af4428d912c21f1fda2c0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Patch back-ported from the sympy git repo
url: https://github.com/sympy/sympy/commit/b89ca436cf25e2a1caf82c9d33221d06698d0ff5

commit b89ca436cf25e2a1caf82c9d33221d06698d0ff5
Author: Chris Kerr <chris.kerr@mykolab.ch>
Date:   Thu Sep 22 19:32:27 2022 +0300

    Replace deprecated .isSet() method with .is_set()
    
    Fixes https://github.com/sympy/sympy/issues/24074

diff --git a/sympy/plotting/pygletplot/plot_mode_base.py b/sympy/plotting/pygletplot/plot_mode_base.py
index c1c2b0a6ec..2c6503650a 100644
--- a/sympy/plotting/pygletplot/plot_mode_base.py
+++ b/sympy/plotting/pygletplot/plot_mode_base.py
@@ -269,7 +269,7 @@ def _calculate_all(self):
         self._calculate_cverts()
 
     def _calculate_verts(self):
-        if self._calculating_verts.isSet():
+        if self._calculating_verts.is_set():
             return
         self._calculating_verts.set()
         try:
@@ -280,9 +280,9 @@ def _calculate_verts(self):
             self.bounds_callback()
 
     def _calculate_cverts(self):
-        if self._calculating_verts.isSet():
+        if self._calculating_verts.is_set():
             return
-        while self._calculating_cverts.isSet():
+        while self._calculating_cverts.is_set():
             sleep(0)  # wait for previous calculation
         self._calculating_cverts.set()
         try:
@@ -291,7 +291,7 @@ def _calculate_cverts(self):
             self._calculating_cverts.clear()
 
     def _get_calculating_verts(self):
-        return self._calculating_verts.isSet()
+        return self._calculating_verts.is_set()
 
     def _get_calculating_verts_pos(self):
         return self._calculating_verts_pos
@@ -300,7 +300,7 @@ def _get_calculating_verts_len(self):
         return self._calculating_verts_len
 
     def _get_calculating_cverts(self):
-        return self._calculating_cverts.isSet()
+        return self._calculating_cverts.is_set()
 
     def _get_calculating_cverts_pos(self):
         return self._calculating_cverts_pos