sentencepiece
sentencepiece copied to clipboard
Suppress the warnings of python module
Python module emits the following warnings. We want to suppress them.
=================================================================================== test session starts ===================================================================================
platform linux -- Python 3.12.11, pytest-8.4.2, pluggy-1.5.0
rootdir: /usr/local/google/home/taku/sentencepiece/python
configfile: pyproject.toml
collected 1 item
check_pytest_spm_segfault.py . [100%]
==================================================================================== warnings summary =====================================================================================
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================== 1 passed, 2 warnings in 0.01s ==============================================================================
sys:1: DeprecationWarning: builtin type swigvarlink has no __module__ attribute