Bug#985017: python3-whoosh: SyntaxWarning during package installation
Followup-For: Bug #985017 Control: found -1 2.7.4+git6-g9134ad92-8 With python3.12 is installed, there are even more warnings: Setting up python3-whoosh (2.7.4+git6-g9134ad92-8) ... /usr/lib/python3/dist-packages/whoosh/analysis/filters.py:50: SyntaxWarning: invalid escape sequence '\w' url_pattern = rcompile(""" /usr/lib/python3/dist-packages/whoosh/analysis/filters.py:148: SyntaxWarning: invalid escape sequence '\S' """Interleaves the results of two or more filters (or filter chains). /usr/lib/python3/dist-packages/whoosh/analysis/intraword.py:37: SyntaxWarning: invalid escape sequence '\S' """Given a set of words (or any object with a ``__contains__`` method), /usr/lib/python3/dist-packages/whoosh/analysis/intraword.py:224: SyntaxWarning: invalid escape sequence '\S' """Splits words into subwords and performs optional transformations on /usr/lib/python3/dist-packages/whoosh/analysis/intraword.py:285: SyntaxWarning: invalid escape sequence '\|' def __init__(self, delims=u("-_'\"()!@#$%^&*[]{}<>\|;:,./?`~=+"), /usr/lib/python3/dist-packages/whoosh/codec/whoosh3.py:1116: SyntaxWarning: "is" with 'int' literal. Did you mean "=="? elif fixedsize is 0: /usr/lib/python3/dist-packages/whoosh/lang/paicehusk.py:33: SyntaxWarning: invalid escape sequence '\w' stem_expr = re.compile("^\w+", re.UNICODE) /usr/lib/python3/dist-packages/whoosh/lang/porter2.py:67: SyntaxWarning: invalid escape sequence '\g' return ccy_exp.sub('\g<1>Y', word) /usr/lib/python3/dist-packages/whoosh/codec/whoosh3.py:1116: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fixedsize is 0: Andreas
Bug#985017: python3-whoosh: SyntaxWarning during package installation
Issue still exists after being reported over three years ago. :wq! PoC
Bug#985017: python3-whoosh: SyntaxWarning during package installation
Here is the upstream patch for backporting: https://github.com/mchaput/whoosh/commit/d9a3fa2a4905e7326c9623c89e6395713c189161 -AJ
Bug#985017: python3-whoosh: SyntaxWarning during package installation
Package: python3-whoosh Version: 2.7.4+git6-g9134ad92-7 Followup-For: Bug #985017 Dear Maintainer, same here, and since this module is used in mailman3-web and run every hour, cron emails are sent out. Thanks Norbert -- System Information: Debian Release: 12.0 APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.1.0-9-amd64 (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_FIRMWARE_WORKAROUND Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages python3-whoosh depends on: ii python3 3.11.2-1+b1 python3-whoosh recommends no packages. Versions of packages python3-whoosh suggests: pn python-whoosh-doc -- no debconf information
Bug#985017: python3-whoosh: SyntaxWarning during package installation
This issue also affects users of mailman3-web. The warning is issued when running the hourly cronjob: $ sudo -u www-data flock -n /var/run/mailman3-web/cron.hourly /usr/share/mailman3-web/manage.py runjobs hourly /usr/lib/python3/dist-packages/haystack/backends/whoosh_backend.py:734: SyntaxWarning: "is" with a literal. Did you mean "=="? if value is None or len(value) is 0: /usr/lib/python3/dist-packages/whoosh/codec/whoosh3.py:1116: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fixedsize is 0: Both issues can be fixed by replacing "is" with "==" on the respective lines. Imre signature.asc Description: This is a digitally signed message part
Bug#985017: python3-whoosh: SyntaxWarning during package installation
Package: python3-whoosh Version: 2.7.4+git6-g9134ad92-5 Severity: important User: debian...@lists.debian.org Usertags: piuparts Hi, during a test with piuparts I noticed your package emits a SyntaxWarning during installation: Setting up python3-whoosh (2.7.4+git6-g9134ad92-5) ... /usr/lib/python3/dist-packages/whoosh/codec/whoosh3.py:1116: SyntaxWarning: "is" with a literal. Did you mean "=="? elif fixedsize is 0: Andreas