Address four deprecation warnings #375
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tests/formatting/test_formatter.py:241 /home/altendky/pendulum/tests/formatting/test_formatter.py:241: DeprecationWarning: invalid escape sequence \[ assert f.format(d, "[YYYY] YYYY \[YYYY\]") == "YYYY 2016 [2016]" tests/formatting/test_formatter.py:242 /home/altendky/pendulum/tests/formatting/test_formatter.py:242: DeprecationWarning: invalid escape sequence \D assert f.format(d, "\D D \\\D") == "D 28 \\28" tests/datetime/test_from_format.py::test_from_format_with_escaped_elements /home/altendky/pendulum/pendulum/formatting/formatter.py:406: DeprecationWarning: Flags not at the start of the expression '(?P<YYYY>\\d{1,4}|\\d{' (truncated) if not re.match(pattern, time): tests/datetime/test_from_format.py::test_from_format[Thursday 25th December 1975 02:15:16 PM -05:00-dddd Do MMMM YYYY hh:mm:ss A Z-1975-12-25T14:15:16-05:00-None] /home/altendky/pendulum/pendulum/formatting/formatter.py:406: DeprecationWarning: Flags not at the start of the expression '(?P<dddd>Sunday|Mond' (truncated) if not re.match(pattern, time):