Describe the bug
The pandera extra polars does allow versions beginning with >= 0.20.0 see pyproject.toml of the latest release 0.32.1. Unfortunately, an import of pandera/engines/polars_engine.py raises a ModuleNotFoundError: No module named 'polars._typing' error for polars=0.20.*.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
# Environment: pandera[polars]==0.32.1, polars==0.20.31
import pandera.polars # raises before we even define a schema
Traceback:
File ".../pandera/polars.py", line 10, in <module>
from pandera.api.polars.components import Column
File ".../pandera/api/polars/components.py", line 15, in <module>
from pandera.engines import polars_engine
File ".../pandera/engines/polars_engine.py", line 23, in <module>
from polars._typing import ColumnNameOrSelector, PythonDataType
ModuleNotFoundError: No module named 'polars._typing'
Expected behavior
There should be no ModuleNotFoundError error.
Desktop (please complete the following information):
OS: macOS (Darwin 25.5.0, arm64)
Python: 3.12
pandera version: 0.32.1 (from PyPI)
polars version: 0.20.31
Comment
The polars._typing submodule was removed with polars>=1. If polars<1 should be still supported I'm open to submit a PR fixing this bug. My personal opinion would be to keep polars=0.20.* available for some time to ease migrations.
Describe the bug
The
panderaextrapolarsdoes allow versions beginning with>= 0.20.0seepyproject.tomlof the latest release0.32.1. Unfortunately, an import ofpandera/engines/polars_engine.pyraises aModuleNotFoundError: No module named 'polars._typing'error forpolars=0.20.*.Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Traceback:
Expected behavior
There should be no
ModuleNotFoundErrorerror.Desktop (please complete the following information):
OS: macOS (Darwin 25.5.0, arm64)
Python: 3.12
pandera version: 0.32.1 (from PyPI)
polars version: 0.20.31
Comment
The
polars._typingsubmodule was removed withpolars>=1. Ifpolars<1should be still supported I'm open to submit a PR fixing this bug. My personal opinion would be to keeppolars=0.20.*available for some time to ease migrations.