Skip to content

Change library used to run user-provided regexps #1656

@progval

Description

@progval

We allow users to provide regexps. To avoid them DoSing the bot, we run them in a subprocess, which expensive especially on Windows (and prevents us from using the safer forkserver multiprocessing method on POSIX).

Instead, we could use pyre2 (or its re2 fork).

However, they default to silently falling back to re for regexps that RE2 does not support. re2.set_fallback_notification(re.FALLBACK_EXCEPTION) can prevent it, but it is a global setting that third-party plugins (or even dependencies) may set themselves, so I don't want to rely on it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions