python-hyper / python-hyper/brotlicffi

`Decompressor` uses inexistent dictionary API

Open
#215 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
154
Forks
34
Avg merge
1d 1h
Merged PRs (30d)
3

Description

While I was working on #207, I noticed that the decompressor class allows passing a custom dictionary, but the functionality is not working because lib.BrotliDecoderSetCustomDictionary was dropped since v1.0.9.0.

https://github.com/python-hyper/brotlicffi/blob/75ac96915b8fc18d90177d416a14f1ea4c224630/src/brotlicffi/_api.py#L369-L376

AttributeError: cffi library '_brotlicffi' has no function, constant or global variable named 'BrotliDecoderSetCustomDictionary'. Did you mean: 'BrotliDecoderAttachDictionary'?

It may be possible to use BrotliDecoderAttachDictionary instead of BrotliDecoderSetCustomDictionary.

This functionality has been broken for a few releases, so I hope it doesn't block releasing v1.2.0.0.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/brotlicffi/_api.py around lines 369-376, where Decompressor calls the removed BrotliDecoderSetCustomDictionary symbol. Read the current BrotliDecoderAttachDictionary API and its surrounding bindings, then verify that custom-dictionary decompression works without the AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.