Skip to content

Commit efc7349

Browse files
dimblebyneersighted
authored andcommitted
update vendored dependencies
1 parent 24cb523 commit efc7349

32 files changed

+367
-133
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.18.1'
1+
__version__ = '0.19.2'

src/poetry/core/_vendor/jsonschema/cli.py

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import json
99
import sys
1010
import traceback
11+
import warnings
1112

1213
try:
1314
from importlib import metadata
@@ -24,6 +25,16 @@
2425
from jsonschema.exceptions import SchemaError
2526
from jsonschema.validators import RefResolver, validator_for
2627

28+
warnings.warn(
29+
(
30+
"The jsonschema CLI is deprecated and will be removed in a future "
31+
"version. Please use check-jsonschema instead, which can be installed "
32+
"from https://pypi.org/project/check-jsonschema/"
33+
),
34+
DeprecationWarning,
35+
stacklevel=2,
36+
)
37+
2738

2839
class _CannotLoadFile(Exception):
2940
pass

src/poetry/core/_vendor/jsonschema/exceptions.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ def __len__(self):
297297
return self.total_errors
298298

299299
def __repr__(self):
300-
return f"<{self.__class__.__name__} ({len(self)} total errors)>"
300+
total = len(self)
301+
errors = "error" if total == 1 else "errors"
302+
return f"<{self.__class__.__name__} ({total} total {errors})>"
301303

302304
@property
303305
def total_errors(self):

src/poetry/core/_vendor/jsonschema/schemas/draft3.json

+7-12
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
"properties" : {
1717
"type" : "object",
18-
"additionalProperties" : {"$ref" : "#", "type" : "object"},
18+
"additionalProperties" : {"$ref" : "#"},
1919
"default" : {}
2020
},
2121

@@ -47,7 +47,7 @@
4747
},
4848

4949
"dependencies" : {
50-
"type" : ["string", "array", "object"],
50+
"type" : "object",
5151
"additionalProperties" : {
5252
"type" : ["string", "array", {"$ref" : "#"}],
5353
"items" : {
@@ -75,11 +75,6 @@
7575
"default" : false
7676
},
7777

78-
"maxDecimal": {
79-
"minimum": 0,
80-
"type": "number"
81-
},
82-
8378
"minItems" : {
8479
"type" : "integer",
8580
"minimum" : 0,
@@ -112,7 +107,9 @@
112107
},
113108

114109
"enum" : {
115-
"type" : "array"
110+
"type" : "array",
111+
"minItems" : 1,
112+
"uniqueItems" : true
116113
},
117114

118115
"default" : {
@@ -153,13 +150,11 @@
153150
},
154151

155152
"id" : {
156-
"type" : "string",
157-
"format" : "uri"
153+
"type" : "string"
158154
},
159155

160156
"$ref" : {
161-
"type" : "string",
162-
"format" : "uri"
157+
"type" : "string"
163158
},
164159

165160
"$schema" : {

src/poetry/core/_vendor/jsonschema/schemas/draft4.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@
2828
"type": "object",
2929
"properties": {
3030
"id": {
31-
"format": "uri",
3231
"type": "string"
3332
},
3433
"$schema": {
35-
"type": "string",
36-
"format": "uri"
34+
"type": "string"
3735
},
3836
"title": {
3937
"type": "string"
@@ -122,7 +120,9 @@
122120
}
123121
},
124122
"enum": {
125-
"type": "array"
123+
"type": "array",
124+
"minItems": 1,
125+
"uniqueItems": true
126126
},
127127
"type": {
128128
"anyOf": [

src/poetry/core/_vendor/jsonschema/validators.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,15 @@ def __attrs_post_init__(self):
215215
)
216216

217217
@classmethod
218-
def check_schema(cls, schema):
218+
def check_schema(cls, schema, format_checker=_UNSET):
219219
Validator = validator_for(cls.META_SCHEMA, default=cls)
220-
for error in Validator(cls.META_SCHEMA).iter_errors(schema):
220+
if format_checker is _UNSET:
221+
format_checker = Validator.FORMAT_CHECKER
222+
validator = Validator(
223+
schema=cls.META_SCHEMA,
224+
format_checker=format_checker,
225+
)
226+
for error in validator.iter_errors(schema):
221227
raise exceptions.SchemaError.create_from(error)
222228

223229
def evolve(self, **changes):
@@ -758,7 +764,7 @@ def from_schema(cls, schema, id_of=_id_of, *args, **kwargs):
758764
`RefResolver`
759765
"""
760766

761-
return cls(base_uri=id_of(schema), referrer=schema, *args, **kwargs)
767+
return cls(base_uri=id_of(schema), referrer=schema, *args, **kwargs) # noqa: B026, E501
762768

763769
def push_scope(self, scope):
764770
"""

src/poetry/core/_vendor/lark/LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1616
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1717
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1818
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19-
+36-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
1-
from .utils import logger
2-
from .tree import Tree, ParseTree
3-
from .visitors import Transformer, Visitor, v_args, Discard, Transformer_NonRecursive
4-
from .exceptions import (ParseError, LexError, GrammarError, UnexpectedToken,
5-
UnexpectedInput, UnexpectedCharacters, UnexpectedEOF, LarkError)
6-
from .lexer import Token
1+
from .exceptions import (
2+
GrammarError,
3+
LarkError,
4+
LexError,
5+
ParseError,
6+
UnexpectedCharacters,
7+
UnexpectedEOF,
8+
UnexpectedInput,
9+
UnexpectedToken,
10+
)
711
from .lark import Lark
12+
from .lexer import Token
13+
from .tree import ParseTree, Tree
14+
from .utils import logger
15+
from .visitors import Discard, Transformer, Transformer_NonRecursive, Visitor, v_args
16+
17+
__version__: str = "1.1.4"
818

9-
__version__: str = "1.1.3"
19+
__all__ = (
20+
"GrammarError",
21+
"LarkError",
22+
"LexError",
23+
"ParseError",
24+
"UnexpectedCharacters",
25+
"UnexpectedEOF",
26+
"UnexpectedInput",
27+
"UnexpectedToken",
28+
"Lark",
29+
"Token",
30+
"ParseTree",
31+
"Tree",
32+
"logger",
33+
"Discard",
34+
"Transformer",
35+
"Transformer_NonRecursive",
36+
"Visitor",
37+
"v_args",
38+
)

src/poetry/core/_vendor/lark/__pyinstaller/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
import os
44

55
def get_hook_dirs():
6-
return [os.path.dirname(__file__)]
6+
return [os.path.dirname(__file__)]

src/poetry/core/_vendor/lark/ast_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def create_transformer(ast_module: types.ModuleType,
4444
Parameters:
4545
ast_module: A Python module containing all the subclasses of ``ast_utils.Ast``
4646
transformer (Optional[Transformer]): An initial transformer. Its attributes may be overwritten.
47-
decorator_factory (Callable): An optional callable accepting two booleans, inline, and meta,
47+
decorator_factory (Callable): An optional callable accepting two booleans, inline, and meta,
4848
and returning a decorator for the methods of ``transformer``. (default: ``v_args``).
4949
"""
5050
t = transformer or Transformer()

src/poetry/core/_vendor/lark/exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def __str__(self):
168168

169169

170170
class UnexpectedCharacters(LexError, UnexpectedInput):
171-
"""An exception that is raised by the lexer, when it cannot match the next
171+
"""An exception that is raised by the lexer, when it cannot match the next
172172
string of characters to any of its terminals.
173173
"""
174174

src/poetry/core/_vendor/lark/grammars/python.lark

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ lambda_kwparams: "**" name ","?
5050
?stmt: simple_stmt | compound_stmt
5151
?simple_stmt: small_stmt (";" small_stmt)* [";"] _NEWLINE
5252
?small_stmt: (expr_stmt | assign_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | nonlocal_stmt | assert_stmt)
53-
expr_stmt: testlist_star_expr
53+
expr_stmt: testlist_star_expr
5454
assign_stmt: annassign | augassign | assign
5555

5656
annassign: testlist_star_expr ":" test ["=" test]
5757
assign: testlist_star_expr ("=" (yield_expr|testlist_star_expr))+
5858
augassign: testlist_star_expr augassign_op (yield_expr|testlist)
5959
!augassign_op: "+=" | "-=" | "*=" | "@=" | "/=" | "%=" | "&=" | "|=" | "^=" | "<<=" | ">>=" | "**=" | "//="
60-
?testlist_star_expr: test_or_star_expr
60+
?testlist_star_expr: test_or_star_expr
6161
| test_or_star_expr ("," test_or_star_expr)+ ","? -> tuple
6262
| test_or_star_expr "," -> tuple
6363

@@ -95,13 +95,13 @@ for_stmt: "for" exprlist "in" testlist ":" suite ["else" ":" suite]
9595
try_stmt: "try" ":" suite except_clauses ["else" ":" suite] [finally]
9696
| "try" ":" suite finally -> try_finally
9797
finally: "finally" ":" suite
98-
except_clauses: except_clause+
98+
except_clauses: except_clause+
9999
except_clause: "except" [test ["as" name]] ":" suite
100100
// NB compile.c makes sure that the default except clause is last
101101

102102

103103
with_stmt: "with" with_items ":" suite
104-
with_items: with_item ("," with_item)*
104+
with_items: with_item ("," with_item)*
105105
with_item: test ["as" name]
106106

107107
match_stmt: "match" test ":" _NEWLINE _INDENT case+ _DEDENT
@@ -204,7 +204,7 @@ AWAIT: "await"
204204
| "{" _set_exprlist "}" -> set
205205
| "{" comprehension{test} "}" -> set_comprehension
206206
| name -> var
207-
| number
207+
| number
208208
| string_concat
209209
| "(" test ")"
210210
| "..." -> ellipsis
@@ -217,7 +217,7 @@ AWAIT: "await"
217217

218218
_testlist_comp: test | _tuple_inner
219219
_tuple_inner: test_or_star_expr (("," test_or_star_expr)+ [","] | ",")
220-
220+
221221

222222
?test_or_star_expr: test
223223
| star_expr
@@ -253,7 +253,7 @@ kwargs: "**" test ("," argvalue)*
253253

254254

255255
comprehension{comp_result}: comp_result comp_fors [comp_if]
256-
comp_fors: comp_for+
256+
comp_fors: comp_for+
257257
comp_for: [ASYNC] "for" exprlist "in" or_test
258258
ASYNC: "async"
259259
?comp_if: "if" test_nocond

src/poetry/core/_vendor/lark/lark.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from abc import ABC, abstractmethod
22
import getpass
3-
import sys, os, pickle, hashlib
3+
import sys, os, pickle
44
import tempfile
55
import types
66
import re
@@ -17,7 +17,7 @@
1717
else:
1818
from typing_extensions import Literal
1919
from .parser_frontends import ParsingFrontend
20-
20+
2121
from .exceptions import ConfigurationError, assert_config, UnexpectedInput
2222
from .utils import Serialize, SerializeMemoizer, FS, isascii, logger
2323
from .load_grammar import load_grammar, FromPackageLoader, Grammar, verify_used_files, PackageResource, md5_digest

0 commit comments

Comments
 (0)