Skip to content

Commit c03cd84

Browse files
committed
Add a PendingDeprecationWarning to the old string literal syntax
1 parent 3fe80d1 commit c03cd84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jmespath/lexer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import re
2+
import warnings
23
from json import loads
34

45
from jmespath.exceptions import LexerError, EmptyExpressionError
@@ -118,6 +119,8 @@ def _token_literal(self, value, start, end):
118119
# string doesn't start with chars that could start a valid
119120
# JSON value.
120121
value = loads(potential_value)
122+
warnings.warn("deprecated string literal syntax",
123+
PendingDeprecationWarning)
121124
return value
122125
except ValueError:
123126
raise LexerError(lexer_position=start,

0 commit comments

Comments
 (0)