Description
plotly-resampler imports pytz in plotly_resampler/aggregation/plotly_aggregator_parser.py (line 8), but pytz is not declared as a dependency in pyproject.toml.
This causes ModuleNotFoundError: No module named 'pytz' in clean environments (e.g., CI, Docker, fresh virtualenvs) where pytz is not installed as a transitive dependency of another package.
Reproducing the bug
# In a clean virtualenv
pip install plotly-resampler==0.11.0
python -c "from plotly_resampler import FigureResampler"
Traceback (most recent call last):
...
File ".../plotly_resampler/aggregation/plotly_aggregator_parser.py", line 8, in <module>
import pytz
ModuleNotFoundError: No module named 'pytz'
Root cause
plotly_aggregator_parser.py has import pytz at line 8, but pyproject.toml [tool.poetry.dependencies] does not include pytz.
Suggested fix
Either:
- Add
pytz = ">=2020.1" to [tool.poetry.dependencies] in pyproject.toml
- Or replace
pytz usage with datetime.timezone (stdlib, no external dependency needed)
Environment information
- Python version: 3.12
- plotly-resampler version: 0.11.0
- OS: Ubuntu (GitHub Actions runner)
Description
plotly-resamplerimportspytzinplotly_resampler/aggregation/plotly_aggregator_parser.py(line 8), butpytzis not declared as a dependency inpyproject.toml.This causes
ModuleNotFoundError: No module named 'pytz'in clean environments (e.g., CI, Docker, fresh virtualenvs) wherepytzis not installed as a transitive dependency of another package.Reproducing the bug
Root cause
plotly_aggregator_parser.pyhasimport pytzat line 8, butpyproject.toml[tool.poetry.dependencies]does not includepytz.Suggested fix
Either:
pytz = ">=2020.1"to[tool.poetry.dependencies]inpyproject.tomlpytzusage withdatetime.timezone(stdlib, no external dependency needed)Environment information