scrapinghub / scrapinghub/dateparser
Different result without settings and when passing empty/unrelated settings with languages=[]
Open
Nobody has claimed this yet.
Type: Bug
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
In [22]: dateparser.parse('08 listopad 2017', languages=[], settings={'RELATIVE_BASE': datetime(2018, 6, 28)})
In [23]: dateparser.parse('08 listopad 2017', languages=[], settings={})
In [24]: dateparser.parse('08 listopad 2017', languages=[])
Out[24]: datetime.datetime(2017, 11, 8, 0, 0)
So only the last call works correctly, while passing empty or unrelated settings makes it fail. Also it seems that the issue is with languages=[], passing languages=None works the same in all cases.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three dateparser.parse calls shown in the issue, comparing languages=[] with languages=None and the different settings values. Trace how language selection and settings are handled, then add a regression test covering these cases; done means empty or unrelated settings produce the same successful result as no settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100