Skip to content

Commit f404164

Browse files
committed
Upgrade pyparsing to 3.1.2
1 parent 531bf75 commit f404164

File tree

13 files changed

+740
-788
lines changed

13 files changed

+740
-788
lines changed

news/pyparsing.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade pyparsing to 3.1.2

src/pip/_vendor/pyparsing/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ def __repr__(self):
120120
return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})"
121121

122122

123-
__version_info__ = version_info(3, 1, 0, "final", 1)
124-
__version_time__ = "18 Jun 2023 14:05 UTC"
123+
__version_info__ = version_info(3, 1, 2, "final", 1)
124+
__version_time__ = "06 Mar 2024 07:08 UTC"
125125
__version__ = __version_info__.__version__
126126
__versionTime__ = __version_time__
127127
__author__ = "Paul McGuire <[email protected]>"
@@ -319,4 +319,7 @@ def __repr__(self):
319319
"unicodeString",
320320
"withAttribute",
321321
"withClass",
322+
"common",
323+
"unicode",
324+
"testing",
322325
]

src/pip/_vendor/pyparsing/actions.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def with_attribute(*args, **attr_dict):
111111
<div type="graph">1,3 2,3 1,1</div>
112112
<div>this has no type</div>
113113
</div>
114-
115114
'''
116115
div,div_end = make_html_tags("div")
117116
@@ -199,19 +198,9 @@ def with_class(classname, namespace=""):
199198

200199
# pre-PEP8 compatibility symbols
201200
# fmt: off
202-
@replaced_by_pep8(replace_with)
203-
def replaceWith(): ...
204-
205-
@replaced_by_pep8(remove_quotes)
206-
def removeQuotes(): ...
207-
208-
@replaced_by_pep8(with_attribute)
209-
def withAttribute(): ...
210-
211-
@replaced_by_pep8(with_class)
212-
def withClass(): ...
213-
214-
@replaced_by_pep8(match_only_at_col)
215-
def matchOnlyAtCol(): ...
216-
201+
replaceWith = replaced_by_pep8("replaceWith", replace_with)
202+
removeQuotes = replaced_by_pep8("removeQuotes", remove_quotes)
203+
withAttribute = replaced_by_pep8("withAttribute", with_attribute)
204+
withClass = replaced_by_pep8("withClass", with_class)
205+
matchOnlyAtCol = replaced_by_pep8("matchOnlyAtCol", match_only_at_col)
217206
# fmt: on

src/pip/_vendor/pyparsing/common.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class pyparsing_common:
206206
scientific notation and returns a float"""
207207

208208
# streamlining this expression makes the docs nicer-looking
209-
number = (sci_real | real | signed_integer).setName("number").streamline()
209+
number = (sci_real | real | signed_integer).set_name("number").streamline()
210210
"""any numeric expression, returns the corresponding Python type"""
211211

212212
fnumber = (
@@ -216,6 +216,13 @@ class pyparsing_common:
216216
)
217217
"""any int or real number, returned as float"""
218218

219+
ieee_float = (
220+
Regex(r"(?i)[+-]?((\d+\.?\d*(e[+-]?\d+)?)|nan|inf(inity)?)")
221+
.set_name("ieee_float")
222+
.set_parse_action(convert_to_float)
223+
)
224+
"""any floating-point literal (int, real number, infinity, or NaN), returned as float"""
225+
219226
identifier = Word(identchars, identbodychars).set_name("identifier")
220227
"""typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')"""
221228

0 commit comments

Comments
 (0)