whitenoise: test_get_brotli failed in whitenoise 4.1.3
I am getting the following test failures with the new release:
======================================================================
ERROR: test_get_brotli (tests.test_django_whitenoise.DjangoWhiteNoiseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-whitenoise/src/whitenoise-4.1.3/tests/test_django_whitenoise.py", line 94, in test_get_brotli
self.assertEqual(brotli.decompress(response.content), self.static_files.js_content)
brotli.error: BrotliDecompress failed
----------------------------------------------------------------------
Test environment contains the following Arch Linux x86_64 packages:
Packages (13) python-appdirs-1.4.3-2 python-chardet-3.0.4-2 python-idna-2.8-1 python-packaging-19.0-1 python-pyparsing-2.4.0-1
python-pytz-2019.1-1 python-six-1.12.0-1 python-sqlparse-0.2.4-2 python-urllib3-1.25.3-1 python-brotli-1.0.7-1
python-django-2.2.3-1 python-requests-2.22.0-1 python-setuptools-1:41.0.1-1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Fix Brotli test to work with updated `requests` Newer versions of `requests` depend on an updated version of `urllib3` which transparently decodes Brotli just as it does for gzip. References #225 — committed to evansd/whitenoise by evansd 5 years ago
- Support running tests with newer versions of `requests` This is to enable running the tests as part of Fedora's build pipeline when packing WhiteNoise. See #225 — committed to evansd/whitenoise by evansd 5 years ago
- Support running tests with newer versions of `requests` This is to enable running the tests as part of Fedora's build pipeline when packing WhiteNoise. See #225 — committed to dmsimard/whitenoise by evansd 5 years ago
- py-whitenoise: updated to 4.1.4 v4.1.4 * Make tests more deterministic and easier to run outside of ``tox``. * Fix Fedora packaging `issue <https://github.com/evansd/whitenoise/issues/225>`_. * Us... — committed to NetBSD/pkgsrc by deleted user 5 years ago
@evansd works for me, I managed to get a successful scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=37843426
I can submit the updated spec to get the successful build into the distro as soon as 4.1.4 is tagged. Thanks a lot for your help 😃
@evansd It looks like the issue no longer occurs on master with https://github.com/evansd/whitenoise/commit/ca6714490aa5d8143d1e96ca6f7fbf7de7482e5f.
Would it be possible to tag and ship a release with this commit ? It’ll allow me to fix the chain of failed builds in Fedora.
Thanks !
I am able to reproduce the issue on both Fedora and Ubuntu with the following:
However, on these same systems, running the tests from source with tox doesn’t return any failures. I don’t know why yet but I’m out of time for this issue today, will continue looking when I have a chance.