Skip to content

Format checker deepcopy to shallowcopy #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openapi_core/unmarshalling/schemas/factories.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from copy import deepcopy
from copy import copy
import warnings

from openapi_schema_validator import OAS30Validator, oas30_format_checker
Expand Down Expand Up @@ -89,7 +89,7 @@ def get_validator(self, schema):
return OAS30Validator(schema.__dict__, **kwargs)

def _get_format_checker(self):
fc = deepcopy(oas30_format_checker)
fc = copy(oas30_format_checker)
for name, formatter in self.custom_formatters.items():
fc.checks(name)(formatter.validate)
return fc