Make warnings suppressible through the python warnings module
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
fastexcel uses this warn macro here
Over on the python side I want to suppress that through
from warnings import catch_warnings, simplefilter
with catch_warnings():
simplefilter("ignore")
read_excel(file_path).load_sheet(0)
but the warning persists. It seems that warnings from rust ought to be caught with the warnings module too.
I was able to do this as a workaround
import logging
fe=logging.getLogger("fastexcel.types.dtype")
fe.disabled=True
from fastexcel import read_excel
read_excel(file_path).load_sheet(0)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior from the fastexcel call at src/types/dtype.rs:303 using Python warnings.catch_warnings and simplefilter("ignore"). Start by tracing how PyO3 exposes Rust warnings to Python, then verify that the warning from read_excel(file_path).load_sheet(0) is suppressible through the warnings module while preserving the existing logging workaround behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100