-
Notifications
You must be signed in to change notification settings - Fork 6
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 compatibility with setuptools 39. #9
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
[run] | ||
branch = True | ||
source = src | ||
|
||
[report] | ||
precision = 2 | ||
exclude_lines = | ||
pragma: nocover | ||
except ImportError: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,10 @@ | |
from setuptools import package_index | ||
|
||
|
||
_final_parts = '*final-', '*final' | ||
def _final_version(parsed_version): | ||
"""Function copied from zc.buildout.easy_install._final_version | ||
""" | ||
for part in parsed_version: | ||
if (part[:1] == '*') and (part not in _final_parts): | ||
return False | ||
return True | ||
return not parsed_version.is_prerelease | ||
|
||
|
||
class Checker(object): | ||
|
@@ -104,11 +100,8 @@ def check(self, level=0): | |
#only skip non-final releases if the current release is a final one | ||
continue | ||
# trunk the version tuple to the first `level` elements | ||
# (and remove *final and pad both to the level length) | ||
trunked_current = [x for x in parsed_version[:level] | ||
if not x.startswith('*')] | ||
trunked_candidate = [x for x in dist.parsed_version[:level] | ||
if not x.startswith('*')] | ||
trunked_current = parsed_version.base_version.split('.')[:level] | ||
trunked_candidate = dist.parsed_version.base_version.split('.')[:level] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment needs some updating -- the "remove *final" bit is no longer true. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! |
||
while len(trunked_candidate) < level: | ||
trunked_candidate.append('00000000') | ||
while len(trunked_current) < level: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
[tox] | ||
envlist = | ||
py26,py27,py33,py34,pypy | ||
py27,py34,py35,py36,pypy,pypy3,coverage | ||
|
||
[testenv] | ||
use_develop = true | ||
deps = | ||
zc.buildout | ||
commands = | ||
python setup.py -q test | ||
|
||
[testenv:coverage] | ||
basepython = python3.6 | ||
deps = | ||
{[testenv]deps} | ||
coverage | ||
commands = | ||
coverage run --source=z3c.checkversions setup.py -q test | ||
coverage report -m | ||
coverage report -m --fail-under=77 |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the docstring still accurate now that you've replaced the implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is, I copied the implementation from the current version of
zc.buildout
.