openapi_spec_validator hands on create_spec on jsonschema 4.0.1
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start by reproducing the hang through openapi_core/spec/shortcuts.py:create_spec with jsonschema 4.0.1, then compare the behavior with version 3.2.0 using the validator stack shown in the report. Trace the interaction across openapi_spec_validator/validators.py, decorators.py, and jsonschema's iter_errors; done means create_spec returns without recursive looping and the regression is covered by a test.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The code appears to enter into a recursive loop within jsonschema 4.0.1, a work around for now is reverting back to jsonschema 3.2.0 and the hang no longer happens.
`Package Version
apispec 5.1.1
apispec-oneofschema 3.0.0
asserts 0.11.1
attrs 21.2.0
azure-common 1.1.27
azure-core 1.19.0
azure-identity 1.6.1
azure-keyvault-secrets 4.3.0
backcall 0.2.0
bandit 1.7.0
certifi 2021.5.30
cffi 1.14.6
charset-normalizer 2.0.6
cryptography 35.0.0
decorator 5.1.0
dictpath 0.1.3
dnspython 1.16.0
eventlet 0.30.2
falcon 2.0.0
falcon-apispec 0.4.0
falcon-swagger-ui 1.2.1
flake8 3.9.2
flake8-broken-line 0.3.0
flake8-bugbear 21.9.2
flake8-debugger 4.0.0
flake8-polyfill 1.0.2
flake8-tidy-imports 4.4.1
gitdb 4.0.7
GitPython 3.1.24
goals-app 0.1
greenlet 1.1.2
gunicorn 20.1.0
idna 3.2
iniconfig 1.1.1
ipdb 0.13.9
ipython 7.28.0
isodate 0.6.0
jedi 0.17.2
Jinja2 3.0.1
jsonschema 4.0.1
lazy-object-proxy 1.6.0
Mako 1.1.5
Markdown 3.3.4
MarkupSafe 2.0.1
marshmallow 3.13.0
marshmallow-oneofschema 3.0.1
matplotlib-inline 0.1.3
mccabe 0.6.1
mock 4.0.3
more-itertools 8.10.0
msal 1.14.0
msal-extensions 0.3.0
msrest 0.6.21
numpy 1.21.2
oauthlib 3.1.1
openapi-core 0.14.2
openapi-schema-validator 0.1.5
openapi-spec-validator 0.3.1
packaging 21.0
parse 1.19.0
parso 0.7.1
pbr 5.6.0
pdoc3 0.10.0
pep8-naming 0.12.1
pexpect 4.8.0
pickleshare 0.7.5
pip 19.3.1
pluggy 1.0.0
portalocker 1.7.1
prompt-toolkit 3.0.20
ptyprocess 0.7.0
py 1.10.0
pycodestyle 2.7.0
pycparser 2.20
pyflakes 2.3.1
Pygments 2.10.0
PyJWT 2.1.0
pyodbc 4.0.32
pyparsing 2.4.7
pyrsistent 0.18.0
pytest 6.2.5
python-dateutil 2.8.2
PyYAML 5.4.1
requests 2.26.0
requests-oauthlib 1.3.0
requests-toolbelt 0.9.1
seqlog 0.3.20
setuptools 41.6.0
six 1.16.0
smmap 4.0.0
stevedore 3.4.0
toml 0.10.2
traitlets 5.1.0
typing-extensions 3.10.0.2
urllib3 1.26.7
wcwidth 0.2.5
Werkzeug 2.0.1 `
File "/usr/local/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py", line 16, in create_spec
openapi_v3_spec_validator.validate(spec_dict, spec_url=spec_url)
File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/validators.py", line 49, in validate
for err in self.iter_errors(spec, spec_url=spec_url):
File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 59, in wrapper
for err in errors:
File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/validators.py", line 58, in iter_errors
for err in validator.iter_errors(spec):
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors
for error in errors:
File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped
for res in func(validator, schema_element, instance, schema):
File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 329, in properties
yield from validator.descend(
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend
for error in self.evolve(schema=schema).iter_errors(instance):
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors
for error in errors:
File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped
for res in func(validator, schema_element, instance, schema):
File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 295, in ref
yield from validator.descend(instance, resolved)
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend
for error in self.evolve(schema=schema).iter_errors(instance):
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors
for error in errors:
File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped
for res in func(validator, schema_element, instance, schema):
File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 25, in patternProperties
yield from validator.descend(
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend
for error in self.evolve(schema=schema).iter_errors(instance):
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors
for error in errors:
File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped
for res in func(validator, schema_element, instance, schema):
File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 295, in ref
yield from validator.descend(instance, resolved)
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend
for error in self.evolve(schema=schema).iter_errors(instance):
File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors
- Vorherrschende Sprache
- Python
- Sterne
- 409
- Forks
- 73
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python-openapi/openapi-spec-validator
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
python-openapi/openapi-spec-validator#400 · 1 Kommentar ·
-
kind/bug/confirmed
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
python-openapi/openapi-spec-validator#373 · 1 Kommentar ·
Alle Issues in python-openapi/openapi-spec-validator
Ähnliche Issues
-
triage/confirmed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
apache/cloudstack#14222 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100