Skip to content
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

Fix DeprecationWarning from jsonschema #25

Merged
merged 2 commits into from
Jan 4, 2022
Merged

Conversation

lyang
Copy link
Contributor

@lyang lyang commented Dec 2, 2021

        def iter_errors(self, instance, _schema=None):
            if _schema is not None:
                warnings.warn(
                    (
                        "Passing a schema to Validator.iter_errors "
                        "is deprecated and will be removed in a future "
                        "release. Call validator.evolve(schema=new_schema)."
                        "iter_errors(...) instead."
                    ),
                    DeprecationWarning,
                )

https://github.com/Julian/jsonschema/blob/main/jsonschema/validators.py#L189-L198

@rsokolovski-fincad
Copy link

LGTM

@p1c2u
Copy link
Collaborator

p1c2u commented Dec 23, 2021

this requires requirement update for jsonschema to jsonschema>=4.0.0

@sthagen
Copy link

sthagen commented Dec 23, 2021

this requires requirement update for jsonschema to jsonschema>=4.0.0

I would support that … and maybe keep requirements.txt and dependency section in setup.cfg in sync.

@p1c2u
Copy link
Collaborator

p1c2u commented Dec 28, 2021

fixes #22

@p1c2u p1c2u mentioned this pull request Dec 28, 2021
@p1c2u
Copy link
Collaborator

p1c2u commented Dec 29, 2021

Tests doesn't pass because of recursion errors

@sthagen
Copy link

sthagen commented Dec 29, 2021

Hm, the 2.7 test run failed because the attribute evolve is not where it should, right?

@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #25 (759b2b4) into master (b36c12b) will increase coverage by 0.20%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage   62.08%   62.29%   +0.20%     
==========================================
  Files           6        6              
  Lines         182      183       +1     
  Branches       39       39              
==========================================
+ Hits          113      114       +1     
  Misses         54       54              
  Partials       15       15              
Impacted Files Coverage Δ
openapi_schema_validator/validators.py 94.44% <100.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b36c12b...759b2b4. Read the comment docs.

@p1c2u p1c2u merged commit c8813cb into python-openapi:master Jan 4, 2022
@lyang
Copy link
Contributor Author

lyang commented Jan 4, 2022

Thank you!

@lyang lyang deleted the patch-1 branch January 4, 2022 20:34
p1c2u added a commit that referenced this pull request Jan 25, 2022
This reverts commit c8813cb, reversing
changes made to b36c12b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants