@@ -26,6 +26,11 @@ def is_str(string):
26
26
bool: True or False
27
27
28
28
"""
29
+ warnings .warn (
30
+ "The is_str function is deprecated. \
31
+ Use isinstance(string, str) instead." ,
32
+ DeprecationWarning )
33
+
29
34
if sys .version_info [:2 ] >= (3 , 0 ):
30
35
return isinstance (string , str )
31
36
@@ -50,35 +55,12 @@ def find_xml_generator(name="castxml", search_path=None):
50
55
51
56
"""
52
57
53
- if sys .version_info [:2 ] >= (3 , 3 ):
54
- path = _find_xml_generator_for_python_greater_equals_33 (
55
- name , search_path = search_path )
56
- else :
57
- path = _find_xml_generator_for_legacy_python (name )
58
-
58
+ path = shutil .which (name , path = search_path )
59
59
if path == "" or path is None :
60
60
raise Exception ("No c++ parser found. Please install castxml." )
61
61
return path .rstrip (), name
62
62
63
63
64
- def _find_xml_generator_for_python_greater_equals_33 (name , search_path = None ):
65
- return shutil .which (name , path = search_path )
66
-
67
-
68
- def _find_xml_generator_for_legacy_python (name ):
69
- if platform .system () == "Windows" :
70
- command = "where"
71
- else :
72
- command = "which"
73
- p = subprocess .Popen ([command , name ], stdout = subprocess .PIPE ,
74
- stderr = subprocess .PIPE )
75
- path = p .stdout .read ().decode ("utf-8" )
76
- p .wait ()
77
- p .stdout .close ()
78
- p .stderr .close ()
79
- return path .rstrip ()
80
-
81
-
82
64
def _create_logger_ (name ):
83
65
"""Implementation detail, creates a logger."""
84
66
logger = logging .getLogger (name )
@@ -295,8 +277,12 @@ class cxx_standard(object):
295
277
'-std=c++17' : 201703 ,
296
278
'-std=gnu++1z' : 201703 ,
297
279
'-std=gnu++17' : 201703 ,
298
- '-std=c++2a' : float ('inf' ),
299
- '-std=gnu++2a' : float ('inf' ),
280
+ '-std=c++2a' : 202002 ,
281
+ '-std=gnu++2a' : 202002 ,
282
+ '-std=c++20' : 202002 ,
283
+ '-std=gnu++20' : 202002 ,
284
+ '-std=c++23' : float ('inf' ),
285
+ '-std=gnu++23' : float ('inf' ),
300
286
}
301
287
302
288
def __init__ (self , cflags ):
0 commit comments