arrow-py / arrow

🏹 Better dates & times for Python
https://arrow.readthedocs.io
Apache License 2.0
8.71k stars 673 forks source link

Raise ParserMatchError rather than TypeError/re.error in certain scenarios #862

Closed jadchaar closed 3 years ago

jadchaar commented 4 years ago

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

Closes: https://github.com/arrow-py/arrow/issues/860 Closes: https://github.com/arrow-py/arrow/issues/854

I had to ignore the tests on Python 2.7 due to unicode errors. I tried decoding the bytes beforehand, but this just led to more issues. Since we are about to drop py27, I decided to just ignore it for now.

Relates to https://github.com/arrow-py/arrow/issues/861.

codecov[bot] commented 4 years ago

Codecov Report

Merging #862 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #862   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines         1808      1809    +1     
  Branches       312       312           
=========================================
+ Hits          1808      1809    +1     
Impacted Files Coverage Δ
arrow/parser.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3709e32...07e1cfe. Read the comment docs.