Skip to content

Commit

Permalink
Use brotli with CPython, brotlicffi elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
ahesford committed Oct 17, 2023
1 parent c1d9e33 commit d141f6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion httpbin/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
import gzip as gzip2
import zlib

import brotlicffi as _brotli
try:
import brotlicffi as _brotli
except ImportError:
import brotli as _brotli

from six import BytesIO
from decimal import Decimal
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ classifiers = [
]
dependencies = [
"flask >= 2.2.4",
"brotlicffi",
"brotli; platform_python_implementation == 'CPython'",
"brotlicffi; platform_python_implementation != 'CPython'",
"decorator",
"flasgger",
'greenlet < 3.0; python_version<"3.12"',
Expand Down

0 comments on commit d141f6e

Please sign in to comment.