Description of problem: python3-regex was recently updated, and this breaks current python3-dateparser. python3-dateparser should be upgraded to current upstream version 1.1.1. Version-Release number of selected component (if applicable): python3-dateparser-0.7.6-4.fc35.noarch python3-regex-2022.3.15-1.fc35.x86_64 How reproducible: Always. Steps to Reproduce: 1. run these lines of python code: import dateparser date_string = 'Fri, 29 Apr 2022 11:30:49 +0200' parsed_date = dateparser.parse(date_string) print(parsed_date) Actual results: raceback (most recent call last): File "./test.py", line 4, in <module> parsed_date = dateparser.parse(date_string) File "/usr/lib/python3.10/site-packages/dateparser/conf.py", line 85, in wrapper return f(*args, **kwargs) File "/usr/lib/python3.10/site-packages/dateparser/__init__.py", line 53, in parse data = parser.get_date_data(date_string, date_formats) File "/usr/lib/python3.10/site-packages/dateparser/date.py", line 417, in get_date_data parsed_date = _DateLocaleParser.parse( File "/usr/lib/python3.10/site-packages/dateparser/date.py", line 194, in parse return instance._parse() File "/usr/lib/python3.10/site-packages/dateparser/date.py", line 198, in _parse date_obj = self._parsers[parser_name]() File "/usr/lib/python3.10/site-packages/dateparser/date.py", line 212, in _try_freshness_parser return freshness_date_parser.get_date_data(self._get_translated_date(), self._settings) File "/usr/lib/python3.10/site-packages/dateparser/date.py", line 261, in _get_translated_date self._translated_date = self.locale.translate( File "/usr/lib/python3.10/site-packages/dateparser/languages/locale.py", line 135, in translate relative_translations = self._get_relative_translations(settings=settings) File "/usr/lib/python3.10/site-packages/dateparser/languages/locale.py", line 164, in _get_relative_translations self._generate_relative_translations(normalize=True)) File "/usr/lib/python3.10/site-packages/dateparser/languages/locale.py", line 178, in _generate_relative_translations pattern = DIGIT_GROUP_PATTERN.sub(r'?P<n>\d+', pattern) File "/usr/lib64/python3.10/site-packages/regex/regex.py", line 700, in _compile_replacement_helper is_group, items = _compile_replacement(source, pattern, is_unicode) File "/usr/lib64/python3.10/site-packages/regex/_regex_core.py", line 1736, in _compile_replacement raise error("bad escape \\%s" % ch, source.string, source.pos) regex._regex_core.error: bad escape \d at position 7 Expected results: 2022-04-29 11:30:49+02:00
Workaround is to downgrade to python3-regex-2021.8.28-1.fc35.x86_64
This may become urgent in Fedora 36, where the workaround to downgrade python-regex, may not be possible.
See https://github.com/mrabarnett/mrab-regex/issues/459. This needs to be fixed in dateparser.
It appears to have been fixed in dateparser 1.1.1 https://github.com/scrapinghub/dateparser/issues/1052 Which is why I suggested that this package should be upgraded to the current upstream version.
IIUC, the issue is 'fixed' by pinning regex to an older version. This won't help us.
Indeed. I placed a comment in https://github.com/scrapinghub/dateparser/issues/1052 referring to this bug. For now, in Fedora 36, the workaround is to downgrade python3-regex to python3-regex-2022.3.2-1.fc36
I added a comment with a possible fix here: https://github.com/scrapinghub/dateparser/issues/1045#issuecomment-1129846022 Not sure it is correct or complete.
https://src.fedoraproject.org/rpms/python-dateparser/c/72836850d9f62f04d224e74673fce83bedd7bb1c?branch=rawhide
FEDORA-2022-cc65cfda8c has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-cc65cfda8c
FEDORA-2022-cc65cfda8c has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
Reopening for older releases.
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13. Fedora Linux 35 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.