Closed ygalvao closed 2 months ago
Is this only required when brotlipy
is installed instead of/in addition to brotli
?
Yes. I don't know why, but when setting up conda environments and installing scrapy and other packages it seems Conda / Mamba only installs brotlipy.
Maybe we should do something to make Scrapy distinguish the 2, and only enable brotli support when the right one is installed.
Yeah.
when setting up conda environments and installing scrapy and other packages it seems Conda / Mamba only installs brotlipy.
Note that Scrapy currently does not depend on brotli (or on brotlipy), neither on PyPI nor on Conda, and if something installs brotlipy as opposed to not installing anything it's either "other packages" you mentioned or some other things you do when "setting up".
I understand. However, in my current conda env I just have a few packages installed, most of them are well-known ones like Scrapy, Selenium, Pandas, Numpy, etc. and somehow, Conda or Mamba installed brotlipy, which throws an AttributeError when running Scrapy. So this simple change solves this issue, adding compatibility with brotlipy and hence with other packages installed using Conda / Mamba as well.
Merging #6261 (9cbdacb) into master (ee51958) will increase coverage by
0.00%
. The diff coverage is100.00%
.
Increase compatibility across different virtual environments, particularly with Conda, when using brotli.Decompressor()