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
and is likely referring to both ParserBase.date_from() and DateParse.date_from() that assume a default of datetime.utcnow() when their own basedate parameter is None, other functions called within DateParserPlugin, like whoosh.util.times.timespan.disambiguated() require a non-None value.
As such, submitting a date range query like [oct 1970 to dec 8 19z70] (intentional typo), throws:
https://packaging.python.org/en/latest/discussions/pip-vs-easy-install/#pip-vs-easy-install
# Description
Please include:
* relevant motivation
* a summary of the change
* which issue is fixed.
* any additional dependencies that are required for this change.
Closes: # (issue)
# Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
Although
DateParserPlugin.__init__
states:and is likely referring to both
ParserBase.date_from()
andDateParse.date_from()
that assume a default ofdatetime.utcnow()
when their ownbasedate
parameter isNone
, other functions called withinDateParserPlugin
, likewhoosh.util.times.timespan.disambiguated()
require a non-None
value.As such, submitting a date range query like
[oct 1970 to dec 8 19z70]
(intentional typo), throws:Proposed fix
I may have missed something, but as both
date_from()
are only called withindateparse.py
from what I can tell, it might make sense to removeand
=None
parameter defaults and simply set withinDateParserPlugin.__init__
as follows?Collecting these issues for now, will fix in a fork eventually.
The text was updated successfully, but these errors were encountered: