Update build_http_handlers.read_file to avoid usage of jsonschema.compact.urlopen #319
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The objective of this PR is to remove bravado-core dependency on
jsonschema.compact.urlopen
as it is breaking python 2.7 tests.The breaking change has been introduced by
jsonschema>=3.0.0
, specifically on https://github.com/Julian/jsonschema/pull/472/files which alters the behaviour ofjsonschema.compact.urlopen
on python2.The alteration consist of wrapping the result of
urlopen
into aclosing
which leads to closing an object that does not haveclose
attribute and consequently making the tests failures.Starting from
bravado-core>=5.10.0
we should be supportingjsonschema>=3.0.0
but this specific change was not announced on the CHANGELOG even if it was changing a public interfaceOnce this PR is approved we should be releasing a new version making explicit the fact that this is the first version that properly works with
jsonschema>=3.0.0