Jason Lowe-Power has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/42643 )

Change subject: python: Use Pattern from typing
......................................................................

python: Use Pattern from typing

Python <3.7 must import Pattern from typing not re

Change-Id: I56acb466aef40b7188e4cd58d3ba5d0b0cc9b090
Signed-off-by: Jason Lowe-Power <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42643
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/python/m5/ext/pystats/group.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/python/m5/ext/pystats/group.py b/src/python/m5/ext/pystats/group.py
index bde1c40..22d11b2 100644
--- a/src/python/m5/ext/pystats/group.py
+++ b/src/python/m5/ext/pystats/group.py
@@ -25,7 +25,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 import re
-from typing import Callable, Dict, Iterator, List, Optional, Union
+from typing import Callable, Dict, Iterator, List, Optional, Pattern, Union

 from .jsonserializable import JsonSerializable
 from .statistic import Scalar, Statistic
@@ -99,7 +99,7 @@
         """
         yield from self.children(lambda _name: _name in name)

-    def find_re(self, regex: Union[str, re.Pattern]
+    def find_re(self, regex: Union[str, Pattern]
                 ) -> Iterator[Union["Group", Statistic]]:
         """ Find all stats that match the name


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

Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v21-0
Gerrit-Change-Id: I56acb466aef40b7188e4cd58d3ba5d0b0cc9b090
Gerrit-Change-Number: 42643
Gerrit-PatchSet: 2
Gerrit-Owner: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to