Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#985018: python3-django-haystack: SyntaxWarning during package installation

0 views
Skip to first unread message

Andreas Beckmann

unread,
Mar 11, 2021, 3:50:03 PM3/11/21
to
Package: python3-django-haystack
Version: 3.0-1
Severity: important
User: debi...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package emits a SyntaxWarning
during installation:

Setting up python3-django-haystack (3.0-1) ...
/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:


Andreas

Salman Mohammadi

unread,
Apr 26, 2021, 4:50:03 AM4/26/21
to
> during a test with piuparts I noticed your package emits a SyntaxWarning
> during installation:
>
> Setting up python3-django-haystack (3.0-1) ...
>
/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:
>
>
> Andreas
>
>

This SyntaxWarning has been resolved in upstream code.

https://github.com/django-haystack/django-haystack/commit/fed2621dee77f74464febc0290218f5f6b6fa6d6#diff-9038404f6e9df0a87187fc4deb3be7d1a5ebcd49e346ad6207978f602d71e57d


Cheers,

Salman

Imre Jonk

unread,
Sep 17, 2021, 6:50:04 AM9/17/21
to
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
0 new messages