-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brotli 1.1.0 breaks Python 2 compatibility #1074
Comments
temporarily fix by pinning to brotli 1.0.9. google/brotli#1074
* Fixed bug by creating a new client for each process instead of trying to reuse a global client * Removed debug param * Downgraded brotli due to breaking change: google/brotli#1074 * Updated brotli
... The same underlying root cause (no support for python -m pip install -U brotli =>
Collecting brotli
Downloading https://files.pythonhosted.org/packages/2f/c2/f9e977608bdf958650638c3f1e28f85a1b075f075ebbe77db8555463787b/Brotli-1.1.0.tar.gz (7.4MB)
|████████████████████████████████| 7.4MB 386kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Complete output from command 'C:\Python3410-32\python.exe' 'C:\Python3410-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\<redacted>\AppData\Local\Temp\tmpgh2zno9_':
ERROR: Traceback (most recent call last):
File "C:\Python3410-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in <module>
main()
File "C:\Python3410-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Python3410-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 54, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\<redacted>\AppData\Local\Temp\pip-build-env-hltq7py2\overlay\Lib\site-packages\setuptools\build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\<redacted>\AppData\Local\Temp\pip-build-env-hltq7py2\overlay\Lib\site-packages\setuptools\build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "C:\Users\<redacted>\AppData\Local\Temp\pip-build-env-hltq7py2\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 30
m = re.match(rf'#define\s{macro}\s+(.+)', line)
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command "'C:\Python3410-32\python.exe' 'C:\Python3410-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\<redacted>\AppData\Local\Temp\tmpgh2zno9_'" failed with error code 1 in C:\Users\<redacted>\AppData\Local\Temp\pip-install-e18xc5rq\brotli PyPI, on the
For those not fluent in Python 😉 , what was the exact code you used in lieu of L30+L44 of current Thanks 😄 |
Can you try:
and see if that works. If so the other rf line can be similarly munged by:
|
This is affecting me too, how can I help? I'm trying to install in Python 2.7.18 venv on a rPi. I can successfully install version 1.0.9 |
The latest release of Brotli breaks compatibility with Python 2, due to using
f
-strings in thesetup.py
:I'm not sure of the correct way to solve the issue:
f
-strings fixes the issue and that the package can then be installed with Python 2.python_requires
field was used to specify that the package needs at least Python 3.6+.The text was updated successfully, but these errors were encountered: