Add parse_tag limit for compressed tags#1224
Conversation
092eeb5 to
4544c0e
Compare
|
This one does need a rebase, has merge conflicts! |
brettcannon
left a comment
There was a problem hiding this comment.
There are unfortunately merge conflicts.
4544c0e to
8ca6def
Compare
|
FWIW, there's one other place this is used; it's part of |
|
I say it can wait for #1113 as this protection is for being extra cautious and not something that is a critical concern, but if @facutuesca wants to add a keyword argument I'm also okay with taking that change. |
|
@facutuesca do you mind fixing the merge conflicts (I don't have permissions to do it myself)? |
Co-authored-by: Brett Cannon <brett@python.org>
248ac24 to
bf04bac
Compare
fixed! |
This PR adds a new kw-only parameter to
parse_tags()to limit the amout of tags that can be generated from compressed tags. If the limit is exceeded, a new exception (TooManyTagsError) is raised.The parameter is
limit: int | Noneand defaults toNone.Fixes #1220