Skip to contentSkip to conversation

decodetree: re.fullmatch was added in 3.4

PATCH Applied Paolo Bonzini 3 participants 3 messages Jan 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 decodetree: re.fullmatch was added in 3.4

Python 3 versions earlier than 3.4 do not have it, use the same workaround that is in place for 3.0.

---
 scripts/decodetree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/decodetree.py +1 -1
index 0bc73b5..e342d27 100755
@@ -204,7 +204,7 @@ def output(*args):
         output_fd.write(a)
 
 
-if sys.version_info >= (3, 0):
+if sys.version_info >= (3, 4):
     re_fullmatch = re.fullmatch
 else:
     def re_fullmatch(pat, str):
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw

Cc'ing maintainers :P

$ ./scripts/get_maintainer.pl -f scripts/decodetree.py
Eduardo Habkost <[email protected]> (odd fixer:Python scripts)
Cleber Rosa <[email protected]> (odd fixer:Python scripts)
Quoted 4 lines · Paolo Bonzini

Python 3 versions earlier than 3.4 do not have it, use the same workaround that is in place for 3.0.

Quoted 18 lines
---
 scripts/decodetree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/decodetree.py +1 -1
index 0bc73b5..e342d27 100755
@@ -204,7 +204,7 @@ def output(*args):
         output_fd.write(a)
 
 
-if sys.version_info >= (3, 0):
+if sys.version_info >= (3, 4):
     re_fullmatch = re.fullmatch
 else:
     def re_fullmatch(pat, str):
#2 lore raw
Quoted 6 lines · Philippe Mathieu-Daudé

Cc'ing maintainers :P

$ ./scripts/get_maintainer.pl -f scripts/decodetree.py
Eduardo Habkost <[email protected]> (odd fixer:Python scripts)
Cleber Rosa <[email protected]> (odd fixer:Python scripts)
Quoted 7 lines
Quoted 4 lines · Paolo Bonzini

Python 3 versions earlier than 3.4 do not have it, use the same workaround that is in place for 3.0.

Queued, thanks!

Signature · 1 line
Eduardo