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
Lines changed: 1 addition & 1 deletion
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

Lines changed: 11 additions & 0 deletions
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 7 additions & 12 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 9 additions & 3 deletions
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

Lines changed: 0 additions & 1 deletion
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-
Lines changed: 36 additions & 7 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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()

0 commit comments

Comments
 (0)