davidfoerster/aptsources-cleanup

Assertion fails when using the built-in "re" module

Closed this issue · 2 comments

I get this:

  File "aptsources-cleanup.pyz/aptsources_cleanup/util/gettext.py", line 213, in ChoiceHighlighters
    builtins.__dict__['_'] = self.gettext
AssertionError: "unprintable_delimiters" contains regex meta-characters.

Ugh, looks like re.escape (before Python 3.9) escapes all non-ASCII characters. I’ll release a fix/work-around some time soon.

In the mean time you can skip assertion checks if you invoke Python with the -O flag. I also rebuilt the PYZ bundle for the current release to include a shebang line, so you can actually execute it as described in Usage which also skips assertion checks.