utils/types: add regex types
Add types for regex and bytes_regex. In Python 3, regular expression objects differ based on whether they were created with a str or a bytes instance as the pattern, and can only match against instances of the corresponding type. To make sure we always end up using the right version (e.g. pexpect needs bytes regexes), create functions to do the appropriate conversions.
Loading
Please register or sign in to comment