You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a settings dictionary when parsing a date results in an error if the provided object is a subclass of the type specified in the dateparser settings schema, such as when using a pendulum.DateTime object . So running
Even though a pendulum.DateTime is a subclass of a datetime object. The check at this line https://github.com/scrapinghub/dateparser/blob/master/dateparser/conf.py#L243
should call isinstance instead of directly checking type equality to ensure subclassed objects are allowed in settings definitions. This is a regression from previous versions where pendulum.DateTime objects were allowed.
The text was updated successfully, but these errors were encountered:
Using a settings dictionary when parsing a date results in an error if the provided object is a subclass of the type specified in the
dateparser
settings schema, such as when using a pendulum.DateTime object . So runningwill generate the error
Even though a pendulum.DateTime is a subclass of a datetime object. The check at this line https://github.com/scrapinghub/dateparser/blob/master/dateparser/conf.py#L243
should call
isinstance
instead of directly checking type equality to ensure subclassed objects are allowed in settings definitions. This is a regression from previous versions where pendulum.DateTime objects were allowed.The text was updated successfully, but these errors were encountered: