[lldb] Fix issue with re.Pattern availability
authorDave Lee <davelee.com@gmail.com>
Mon, 7 Nov 2022 21:20:48 +0000 (13:20 -0800)
committerDave Lee <davelee.com@gmail.com>
Tue, 8 Nov 2022 03:33:57 +0000 (19:33 -0800)
commit7bf3cb3ee871b6707b7f5114a7fde61485df450e
tree71e7cd80382992c087516a3e01dfb51c3349fcc3
parent674a17e9bbe82e8c53952fd94dcd862b17cb2d2f
[lldb] Fix issue with re.Pattern availability

`re.Pattern` is introduced in Python 3.7. To support Python 3.6, fallback to typechecking against `SRE_Pattern`.

Differential Revision: https://reviews.llvm.org/D137582
lldb/packages/Python/lldbsuite/test/decorators.py
lldb/packages/Python/lldbsuite/test/lldbtest.py