Skip to content

Commit

Permalink
Update lark and jsonschema (#357)
Browse files Browse the repository at this point in the history
* set shell in makefile
* update lark
* pyrsistent is obtained via jsonschema
* update jsonschema too
* add typing-extensions
* stop pre-commit from breaking the patch file
* code review markup

Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
  • Loading branch information
dimbleby and abn authored May 17, 2022
1 parent 060a2ef commit 0904607
Show file tree
Hide file tree
Showing 67 changed files with 9,272 additions and 3,512 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repos:
rev: v4.2.0
hooks:
- id: trailing-whitespace
exclude: "vendors/patches/jsonschema.patch"
- id: end-of-file-fixer
- id: debug-statements
- id: check-merge-conflict
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SHELL := $(shell which bash) -e
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
ROOT_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))

Expand Down
19 changes: 19 additions & 0 deletions src/poetry/core/_vendor/jsonschema/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2012 Julian Berman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
35 changes: 31 additions & 4 deletions src/poetry/core/_vendor/jsonschema/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,52 @@
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
import warnings

from jsonschema.exceptions import (
ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
)
from jsonschema._format import (
FormatChecker,
draft3_format_checker,
draft4_format_checker,
draft6_format_checker,
draft7_format_checker,
draft201909_format_checker,
draft202012_format_checker,
)
from jsonschema._types import TypeChecker
from jsonschema.exceptions import (
ErrorTree,
FormatError,
RefResolutionError,
SchemaError,
ValidationError,
)
from jsonschema.protocols import Validator
from jsonschema.validators import (
Draft3Validator,
Draft4Validator,
Draft6Validator,
Draft7Validator,
Draft201909Validator,
Draft202012Validator,
RefResolver,
validate,
)

__version__ = "3.2.0"

def __getattr__(name):
if name == "__version__":
warnings.warn(
"Accessing jsonschema.__version__ is deprecated and will be "
"removed in a future release. Use importlib.metadata directly "
"to query for jsonschema's version.",
DeprecationWarning,
stacklevel=2,
)

try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata

return metadata.version("jsonschema")
raise AttributeError(f"module {__name__} has no attribute {name}")
1 change: 1 addition & 0 deletions src/poetry/core/_vendor/jsonschema/__main__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from jsonschema.cli import main

main()
Loading

0 comments on commit 0904607

Please sign in to comment.