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:
Michael D. Hoyle 2018-11-12 16:20:15 -05:00
parent 93a9836962
commit 1568e38997
3 changed files with 4 additions and 2 deletions

View File

@ -158,6 +158,7 @@ Michael Droettboom
Michael Seifert
Michal Wajszczuk
Mihai Capotă
Mike Hoyle (hoylemd)
Mike Lundy
Miro Hrončok
Nathaniel Waisbrot

View File

@ -0,0 +1 @@
Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check.

View File

@ -11,10 +11,10 @@ import shlex
import sys
import types
import warnings
from distutils.version import LooseVersion
import py
import six
from pkg_resources import parse_version
from pluggy import HookimplMarker
from pluggy import HookspecMarker
from pluggy import PluginManager
@ -822,7 +822,7 @@ class Config(object):
minver = self.inicfg.get("minversion", None)
if minver:
if LooseVersion(minver) > LooseVersion(pytest.__version__):
if parse_version(minver) > parse_version(pytest.__version__):
raise pytest.UsageError(
"%s:%d: requires pytest-%s, actual pytest-%s'"
% (