-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
Hi all,
I've been attempting to use re2 for easyprivacy on adblockparser, however, setting the use_re2=True option causes a seg fault within Python3.10.
Currently, the code looks like this:
ROOT = os.path.dirname(os.path.abspath(__file__))
ADBLOCK_RULES = os.path.join(ROOT, 'adblockrules')
EASYPRIVACY = os.path.join(ADBLOCK_RULES, 'easyprivacy.txt')
with open(EASYPRIVACY, 'rb') as f:
raw_rules = f.read().decode('utf8').splitlines()
privacy_rules = AdblockRules(raw_rules, use_re2=True) Versions:
Python 3.10.6
Pyre2 0.3.6 from https://github.com/andreasvc/pyre2
Fedora 36
UPDATE: as of this update, I resolved the issue by switching my os to ubuntu 20.04 with Python 3.8.10. Everything installs as needed and adblockparser can now use re2 properly, however, I did have to use the pyre2 from pip. pip3 install pyre2 should assist in this.