Closed Emily-Steel closed 1 month ago
Is this project still maintained?
Unfortunately it doesn't look like it
On Fri, 24 Mar 2023, 15:29 Vasile Cimpean, @.***> wrote:
Is this project still maintained?
— Reply to this email directly, view it on GitHub https://github.com/jsontypedef/json-typedef-codegen/pull/54#issuecomment-1482996541, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2TBG4W4H2UDUEFSDOYML3W5W4UPANCNFSM53N43AQQ . You are receiving this because you authored the thread.Message ID: @.***>
@Christopher-Steel Had to make the same patch locally. It looks like Upstream has been abandoned. Bummer. JSONSchema isn't a good alternative.
TL;DR: This prevents
SyntaxError: invalid escape sequence \d
Longer explanation: Python 3 considers strings to be Unicode rather than ASCII. The
\
in\d
is interpreted as the beginning of a Unicode character escape sequence rather than left as is as part of the Regex.\d
is not a valid Unicode sequence so it was left as is so far with a DeprecationWarning thrown. In Python 3.9+ (maybe earlier, haven't tested) it's now a SyntaxError. The easy solution which I have applied here is to use a raw string literal instead of a typical string literal as raw string literals treat backslashes within the string as "just backslashes" and not escaping characters.