forked from python-poetry/poetry-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vendors: sync packages and update tomlkit
- Loading branch information
1 parent
d2bb112
commit d04d1a9
Showing
24 changed files
with
497 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,10 @@ | |
__summary__ = "Core utilities for Python packages" | ||
__uri__ = "https://github.com/pypa/packaging" | ||
|
||
__version__ = "20.3" | ||
__version__ = "20.4" | ||
|
||
__author__ = "Donald Stufft and individual contributors" | ||
__email__ = "[email protected]" | ||
|
||
__license__ = "BSD or Apache License, Version 2.0" | ||
__license__ = "BSD-2-Clause or Apache-2.0" | ||
__copyright__ = "Copyright 2014-2019 %s" % __author__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,8 +95,8 @@ | |
namespace class | ||
""" | ||
|
||
__version__ = "2.4.6" | ||
__versionTime__ = "24 Dec 2019 04:27 UTC" | ||
__version__ = "2.4.7" | ||
__versionTime__ = "30 Mar 2020 00:43 UTC" | ||
__author__ = "Paul McGuire <[email protected]>" | ||
|
||
import string | ||
|
@@ -1391,6 +1391,12 @@ def inlineLiteralsUsing(cls): | |
""" | ||
ParserElement._literalStringClass = cls | ||
|
||
@classmethod | ||
def _trim_traceback(cls, tb): | ||
while tb.tb_next: | ||
tb = tb.tb_next | ||
return tb | ||
|
||
def __init__(self, savelist=False): | ||
self.parseAction = list() | ||
self.failAction = None | ||
|
@@ -1943,7 +1949,9 @@ def parseString(self, instring, parseAll=False): | |
if ParserElement.verbose_stacktrace: | ||
raise | ||
else: | ||
# catch and re-raise exception from here, clears out pyparsing internal stack trace | ||
# catch and re-raise exception from here, clearing out pyparsing internal stack trace | ||
if getattr(exc, '__traceback__', None) is not None: | ||
exc.__traceback__ = self._trim_traceback(exc.__traceback__) | ||
raise exc | ||
else: | ||
return tokens | ||
|
@@ -2017,7 +2025,9 @@ def scanString(self, instring, maxMatches=_MAX_INT, overlap=False): | |
if ParserElement.verbose_stacktrace: | ||
raise | ||
else: | ||
# catch and re-raise exception from here, clears out pyparsing internal stack trace | ||
# catch and re-raise exception from here, clearing out pyparsing internal stack trace | ||
if getattr(exc, '__traceback__', None) is not None: | ||
exc.__traceback__ = self._trim_traceback(exc.__traceback__) | ||
raise exc | ||
|
||
def transformString(self, instring): | ||
|
@@ -2063,7 +2073,9 @@ def transformString(self, instring): | |
if ParserElement.verbose_stacktrace: | ||
raise | ||
else: | ||
# catch and re-raise exception from here, clears out pyparsing internal stack trace | ||
# catch and re-raise exception from here, clearing out pyparsing internal stack trace | ||
if getattr(exc, '__traceback__', None) is not None: | ||
exc.__traceback__ = self._trim_traceback(exc.__traceback__) | ||
raise exc | ||
|
||
def searchString(self, instring, maxMatches=_MAX_INT): | ||
|
@@ -2093,7 +2105,9 @@ def searchString(self, instring, maxMatches=_MAX_INT): | |
if ParserElement.verbose_stacktrace: | ||
raise | ||
else: | ||
# catch and re-raise exception from here, clears out pyparsing internal stack trace | ||
# catch and re-raise exception from here, clearing out pyparsing internal stack trace | ||
if getattr(exc, '__traceback__', None) is not None: | ||
exc.__traceback__ = self._trim_traceback(exc.__traceback__) | ||
raise exc | ||
|
||
def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False): | ||
|
@@ -2565,7 +2579,9 @@ def parseFile(self, file_or_filename, parseAll=False): | |
if ParserElement.verbose_stacktrace: | ||
raise | ||
else: | ||
# catch and re-raise exception from here, clears out pyparsing internal stack trace | ||
# catch and re-raise exception from here, clearing out pyparsing internal stack trace | ||
if getattr(exc, '__traceback__', None) is not None: | ||
exc.__traceback__ = self._trim_traceback(exc.__traceback__) | ||
raise exc | ||
|
||
def __eq__(self, other): | ||
|
@@ -2724,7 +2740,7 @@ def runTests(self, tests, parseAll=True, comment='#', | |
continue | ||
if not t: | ||
continue | ||
out = ['\n'.join(comments), t] | ||
out = ['\n' + '\n'.join(comments) if comments else '', t] | ||
comments = [] | ||
try: | ||
# convert newline marks to actual newlines, and strip leading BOM if present | ||
|
@@ -3312,7 +3328,7 @@ def __init__(self, pattern, flags=0, asGroupList=False, asMatch=False): | |
self.name = _ustr(self) | ||
self.errmsg = "Expected " + self.name | ||
self.mayIndexError = False | ||
self.mayReturnEmpty = True | ||
self.mayReturnEmpty = self.re_match("") is not None | ||
self.asGroupList = asGroupList | ||
self.asMatch = asMatch | ||
if self.asGroupList: | ||
|
@@ -3993,6 +4009,7 @@ def __init__(self, *args, **kwargs): | |
self.leaveWhitespace() | ||
|
||
def __init__(self, exprs, savelist=True): | ||
exprs = list(exprs) | ||
if exprs and Ellipsis in exprs: | ||
tmp = [] | ||
for i, expr in enumerate(exprs): | ||
|
@@ -4358,7 +4375,7 @@ def parseImpl(self, instring, loc, doActions=True): | |
if self.initExprGroups: | ||
self.opt1map = dict((id(e.expr), e) for e in self.exprs if isinstance(e, Optional)) | ||
opt1 = [e.expr for e in self.exprs if isinstance(e, Optional)] | ||
opt2 = [e for e in self.exprs if e.mayReturnEmpty and not isinstance(e, Optional)] | ||
opt2 = [e for e in self.exprs if e.mayReturnEmpty and not isinstance(e, (Optional, Regex))] | ||
self.optionals = opt1 + opt2 | ||
self.multioptionals = [e.expr for e in self.exprs if isinstance(e, ZeroOrMore)] | ||
self.multirequired = [e.expr for e in self.exprs if isinstance(e, OneOrMore)] | ||
|
@@ -5435,8 +5452,8 @@ def mustMatchTheseTokens(s, l, t): | |
return rep | ||
|
||
def _escapeRegexRangeChars(s): | ||
# ~ escape these chars: ^-] | ||
for c in r"\^-]": | ||
# ~ escape these chars: ^-[] | ||
for c in r"\^-[]": | ||
s = s.replace(c, _bslash + c) | ||
s = s.replace("\n", r"\n") | ||
s = s.replace("\t", r"\t") | ||
|
@@ -6550,10 +6567,10 @@ class pyparsing_common: | |
"""mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" | ||
mixed_integer.addParseAction(sum) | ||
|
||
real = Regex(r'[+-]?(:?\d+\.\d*|\.\d+)').setName("real number").setParseAction(convertToFloat) | ||
real = Regex(r'[+-]?(?:\d+\.\d*|\.\d+)').setName("real number").setParseAction(convertToFloat) | ||
"""expression that parses a floating point number and returns a float""" | ||
|
||
sci_real = Regex(r'[+-]?(:?\d+(:?[eE][+-]?\d+)|(:?\d+\.\d*|\.\d+)(:?[eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) | ||
sci_real = Regex(r'[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) | ||
"""expression that parses a floating point number with optional | ||
scientific notation and returns a float""" | ||
|
||
|
Oops, something went wrong.