Use pkg_resources.parse_version in minver check
Use pkg_resources.parse_version in minver check Add meself to AUTHORS & changelog Format CHANGELOG
This commit is contained in:
parent
93a9836962
commit
1568e38997
1
AUTHORS
1
AUTHORS
|
@ -158,6 +158,7 @@ Michael Droettboom
|
||||||
Michael Seifert
|
Michael Seifert
|
||||||
Michal Wajszczuk
|
Michal Wajszczuk
|
||||||
Mihai Capotă
|
Mihai Capotă
|
||||||
|
Mike Hoyle (hoylemd)
|
||||||
Mike Lundy
|
Mike Lundy
|
||||||
Miro Hrončok
|
Miro Hrončok
|
||||||
Nathaniel Waisbrot
|
Nathaniel Waisbrot
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check.
|
|
@ -11,10 +11,10 @@ import shlex
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
import warnings
|
import warnings
|
||||||
from distutils.version import LooseVersion
|
|
||||||
|
|
||||||
import py
|
import py
|
||||||
import six
|
import six
|
||||||
|
from pkg_resources import parse_version
|
||||||
from pluggy import HookimplMarker
|
from pluggy import HookimplMarker
|
||||||
from pluggy import HookspecMarker
|
from pluggy import HookspecMarker
|
||||||
from pluggy import PluginManager
|
from pluggy import PluginManager
|
||||||
|
@ -822,7 +822,7 @@ class Config(object):
|
||||||
|
|
||||||
minver = self.inicfg.get("minversion", None)
|
minver = self.inicfg.get("minversion", None)
|
||||||
if minver:
|
if minver:
|
||||||
if LooseVersion(minver) > LooseVersion(pytest.__version__):
|
if parse_version(minver) > parse_version(pytest.__version__):
|
||||||
raise pytest.UsageError(
|
raise pytest.UsageError(
|
||||||
"%s:%d: requires pytest-%s, actual pytest-%s'"
|
"%s:%d: requires pytest-%s, actual pytest-%s'"
|
||||||
% (
|
% (
|
||||||
|
|
Loading…
Reference in New Issue