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 Feb 2, 2024
1 parent 1f6e049 commit 7ab2459
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 @@ -31,7 +31,8 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
"brotlicffi",
"brotli; platform_python_implementation == 'CPython'",
"brotlicffi; platform_python_implementation != 'CPython'",
"decorator",
"flasgger",
"flask >= 2.2.4",
Expand Down

0 comments on commit 7ab2459

Please sign in to comment.