[gem5-dev] Change in gem5/gem5[master]: python: Replace deprecated repr syntax

2019-02-13 Thread Andreas Sandberg (Gerrit)
Andreas Sandberg has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/c/public/gem5/+/15989 )


Change subject: python: Replace deprecated repr syntax
..

python: Replace deprecated repr syntax

Change-Id: I5f9538cf2ca5ee17c51e7c5388d3aef363fcfa54
Signed-off-by: Andreas Sandberg 
Reviewed-on: https://gem5-review.googlesource.com/c/15989
Reviewed-by: Giacomo Travaglini 
---
M src/python/m5/util/grammar.py
M src/python/m5/util/multidict.py
M src/python/m5/util/sorteddict.py
3 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/src/python/m5/util/grammar.py b/src/python/m5/util/grammar.py
index fcd8df2..2d9e82c 100644
--- a/src/python/m5/util/grammar.py
+++ b/src/python/m5/util/grammar.py
@@ -134,5 +134,5 @@

 def t_error(self, t):
 msg = "Illegal character %s @ %d:%d" % \
-(`t.value[0]`, t.lineno, t.lexpos)
+(repr(t.value[0]), t.lineno, t.lexpos)
 raise ParseError(msg, t)
diff --git a/src/python/m5/util/multidict.py  
b/src/python/m5/util/multidict.py

index 58898a5..5cc13ee 100644
--- a/src/python/m5/util/multidict.py
+++ b/src/python/m5/util/multidict.py
@@ -40,7 +40,7 @@
 return str(dict(self.items()))

 def __repr__(self):
-return `dict(self.items())`
+return repr(dict(list(self.items(

 def __contains__(self, key):
 return key in self.local or key in self.parent
@@ -175,7 +175,7 @@
 test2.setdefault('b', 'blah')
 print(test1)
 print(test2)
-print(`test2`)
+print(repr(test2))

 print(len(test2))

diff --git a/src/python/m5/util/sorteddict.py  
b/src/python/m5/util/sorteddict.py

index abe2837..dd534b3 100644
--- a/src/python/m5/util/sorteddict.py
+++ b/src/python/m5/util/sorteddict.py
@@ -214,7 +214,7 @@
 d['y'] = 26
 display(d)

-print(`d`)
+print(repr(d))

 print(d.copy())


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15989
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I5f9538cf2ca5ee17c51e7c5388d3aef363fcfa54
Gerrit-Change-Number: 15989
Gerrit-PatchSet: 7
Gerrit-Owner: Andreas Sandberg 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Juha Jäykkä 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: python: Replace deprecated repr syntax

2019-02-12 Thread Andreas Sandberg (Gerrit)
Hello Gabe Black, Jason Lowe-Power, Juha Jäykkä, Giacomo Travaglini, Ciro  
Santilli,


I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/15989

to look at the new patch set (#6).

Change subject: python: Replace deprecated repr syntax
..

python: Replace deprecated repr syntax

Change-Id: I5f9538cf2ca5ee17c51e7c5388d3aef363fcfa54
Signed-off-by: Andreas Sandberg 
---
M src/python/m5/util/grammar.py
M src/python/m5/util/multidict.py
M src/python/m5/util/sorteddict.py
3 files changed, 4 insertions(+), 4 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15989
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I5f9538cf2ca5ee17c51e7c5388d3aef363fcfa54
Gerrit-Change-Number: 15989
Gerrit-PatchSet: 6
Gerrit-Owner: Andreas Sandberg 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Juha Jäykkä 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: python: Replace deprecated repr syntax

2019-01-28 Thread Andreas Sandberg (Gerrit)
Andreas Sandberg has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/15989



Change subject: python: Replace deprecated repr syntax
..

python: Replace deprecated repr syntax

Change-Id: I5f9538cf2ca5ee17c51e7c5388d3aef363fcfa54
Signed-off-by: Andreas Sandberg 
---
M src/python/m5/util/multidict.py
M src/python/m5/util/sorteddict.py
2 files changed, 3 insertions(+), 3 deletions(-)



diff --git a/src/python/m5/util/multidict.py  
b/src/python/m5/util/multidict.py

index 58898a5..5cc13ee 100644
--- a/src/python/m5/util/multidict.py
+++ b/src/python/m5/util/multidict.py
@@ -40,7 +40,7 @@
 return str(dict(self.items()))

 def __repr__(self):
-return `dict(self.items())`
+return repr(dict(list(self.items(

 def __contains__(self, key):
 return key in self.local or key in self.parent
@@ -175,7 +175,7 @@
 test2.setdefault('b', 'blah')
 print(test1)
 print(test2)
-print(`test2`)
+print(repr(test2))

 print(len(test2))

diff --git a/src/python/m5/util/sorteddict.py  
b/src/python/m5/util/sorteddict.py

index de144a7..d85bef0 100644
--- a/src/python/m5/util/sorteddict.py
+++ b/src/python/m5/util/sorteddict.py
@@ -215,7 +215,7 @@
 d['y'] = 26
 display(d)

-print(`d`)
+print(repr(d))

 print(d.copy())


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15989
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I5f9538cf2ca5ee17c51e7c5388d3aef363fcfa54
Gerrit-Change-Number: 15989
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev