monim67 / django-bootstrap-datepicker-plus

Bootstrap3/Bootstrap4/Bootstrap5 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput with date-range-picker functionality for django >= 2.0
https://pypi.python.org/pypi/django-bootstrap-datepicker-plus
MIT License
223 stars 61 forks source link

Doesn't support pydantic v2.0 (just released today) #99

Closed WoosterInitiative closed 1 year ago

WoosterInitiative commented 1 year ago

Describe the bug I noticed that my CI (using CircleCI) started failing suddenly, but would pass on my main branch. It should have been obvious, but I didn't expect a dependency change to be the issue.

With the new branch, CircleCI pulled all new dependences and got pydantic v2.0 and now I get

ImportError: cannot import name 'BaseSettings' from 'pydantic.env_settings' (/home/circleci/project/venv/lib/python3.10/site-packages/pydantic/env_settings.py)

To Reproduce Steps to reproduce the behavior:

  1. Create a clean virtualenv (python -m venv .venv)
  2. Install Django project requirements (in my case python -m pip install -r requirements/local.txt which includes django-bootstrap-datepicker-plus==5.0.2, same problem with 5.0.3)
  3. Try to run a test that uses a form that has a datepicker
  4. Test fails with ImportError shown above.

Expected behavior Test should pass without issue.

Setup Information (please complete the following information):

[x] I have followed the configuration instructions and checked out the common error troubleshooting page.

WoosterInitiative commented 1 year ago

Temporary Workaround

I pinned pydantic with ~=1.10.9 (the version that was working, though the newer 1.10.10 also does) in my requirements file to fix this until either

  1. this tool gets updated to be compatible or
  2. this tool gets updated to specify a pydantic version < 2.0