Skip to content

Commit 51fa9cd

Browse files
authored
Merge pull request #389 from p1c2u/feature/switch-to-pathable
switch to pathable
2 parents 1702c16 + a8a27e7 commit 51fa9cd

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

openapi_core/spec/accessors.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
from contextlib import contextmanager
22

3-
from dictpath.accessors import DictOrListAccessor
3+
from pathable.accessors import LookupAccessor
44

55

6-
class SpecAccessor(DictOrListAccessor):
7-
def __init__(self, dict_or_list, dereferencer):
8-
super().__init__(dict_or_list)
6+
class SpecAccessor(LookupAccessor):
7+
def __init__(self, lookup, dereferencer):
8+
super().__init__(lookup)
99
self.dereferencer = dereferencer
1010

1111
@contextmanager
1212
def open(self, parts):
13-
content = self.dict_or_list
13+
content = self.lookup
1414
for part in parts:
1515
content = content[part]
1616
if "$ref" in content:

openapi_core/spec/paths.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from dictpath.paths import AccessorPath
1+
from pathable.paths import AccessorPath
22

33
from openapi_core.spec.accessors import SpecAccessor
44

poetry.lock

+13-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ classifiers = [
3434

3535
[tool.poetry.dependencies]
3636
python = "^3.7.0"
37-
dictpath = "*"
37+
pathable = "^0.4.0"
3838
django = {version = ">=3.0", optional = true}
3939
falcon = {version = ">=3.0", optional = true}
4040
flask = {version = "*", optional = true}

0 commit comments

Comments
 (0)