Replace deprecated IntervalTree.search with .overlap#13
Conversation
| def byte_intersection(tree, lower, upper): | ||
| ret = 0 | ||
| for i in tree.search(lower, upper): | ||
| for i in tree.overlap(lower, upper): |
There was a problem hiding this comment.
Interval.tree has been deprecated in favor of .envelop and .overlap
|
|
||
| all_sources = [ | ||
| '', | ||
| pytest.param(s) for s in [ |
There was a problem hiding this comment.
all_sources is a mix of params and conditions like skipif, so I couldn't apply pytest.params(...) to all of them at the end
| '', | ||
|
|
||
| """ | ||
| """ |
There was a problem hiding this comment.
Lots of retabbing because the change is from:
all_sources = [
'....'
]
to
all_sources = [
pytest.param(s) for s in [
'...',
]
]
|
|
||
| foo(**{'one': 1}, two=2) | ||
| '''), | ||
| ''', marks=pre_py35skip)]) |
There was a problem hiding this comment.
A lot of changes like
pre_py35skip(s)
to
pytest.param(s, marks=pre_py35skip)
| def scan_for_checkers(request): | ||
| parser, options_hooks = get_parser() | ||
| args_marker = request.node.get_marker('flake8_args') | ||
| args_marker = request.node.get_closest_marker('flake8_args') |
There was a problem hiding this comment.
To avoid a warning:
MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly. Please use node.get_closest_marker(name) or node.iter_markers(name).
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
- Coverage 99.76% 99.76% -0.01%
==========================================
Files 8 7 -1
Lines 423 418 -5
Branches 87 87
==========================================
- Hits 422 417 -5
Partials 1 1
Continue to review full report at Codecov.
|
Some guidelines for contributors
* AndrewLvov/master: Drop support for Python 3.3 Revert temporary code Update tests to comply with pytest4 Update `intervaltree` version to >=3.0.0 Replace deprecated `IntervalTree.search` with `.overlap`
|
Nice! Thanks Andrey. |
Python3.3 usage leads to an error:
Python 3.4 or later is required(see https://travis-ci.org/pyga/ebb-lint/jobs/471657391)So I'm suggesting to drop 3.3 support.
Core devs decided to drop it after September 2017: https://www.python.org/dev/peps/pep-0398/#lifespan
What do you think ?