From a3a2f19c46dcb0ed5655173f559409a35af2b929 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 15:49:56 -0400 Subject: [PATCH 01/12] pip10 fix --- .coveragerc | 1 + versionfinder/tests/test_versionfinder.py | 16 ++++++------- versionfinder/versionfinder.py | 29 +++++++++++++++++------ 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.coveragerc b/.coveragerc index aa17498..79cc547 100644 --- a/.coveragerc +++ b/.coveragerc @@ -12,4 +12,5 @@ exclude_lines = if sys.version_info.+ raise NotImplementedError except ImportError: + except \(ImportError, KeyError\): .*# nocoverage.* diff --git a/versionfinder/tests/test_versionfinder.py b/versionfinder/tests/test_versionfinder.py index 588984b..38d8f92 100644 --- a/versionfinder/tests/test_versionfinder.py +++ b/versionfinder/tests/test_versionfinder.py @@ -710,9 +710,9 @@ def test_find(self): req='foo==4.5.6' ) - with patch('%s.pip.get_installed_distributions' % pbm + with patch('%s.get_installed_distributions' % pbm ) as mock_pgid: - with patch('%s.pip.FrozenRequirement.from_dist' % pbm + with patch('%s.FrozenRequirement.from_dist' % pbm ) as mock_from_dist: with patch('%s._dist_version_url' % pb) as mock_dist_vu: mock_pgid.return_value = installed_dists @@ -734,9 +734,9 @@ def test_no_dist(self): req='awslimitchecker==0.1.0' ) - with patch('%s.pip.get_installed_distributions' % pbm + with patch('%s.get_installed_distributions' % pbm ) as mock_pgid: - with patch('%s.pip.FrozenRequirement.from_dist' % pbm + with patch('%s.FrozenRequirement.from_dist' % pbm ) as mock_from_dist: with patch('%s._dist_version_url' % pb) as mock_dist_vu: mock_pgid.return_value = installed_dists @@ -760,9 +760,9 @@ def test_req_https(self): req=req_str ) - with patch('%s.pip.get_installed_distributions' % pbm + with patch('%s.get_installed_distributions' % pbm ) as mock_pgid: - with patch('%s.pip.FrozenRequirement.from_dist' % pbm + with patch('%s.FrozenRequirement.from_dist' % pbm ) as mock_from_dist: with patch('%s._dist_version_url' % pb) as mock_dist_vu: mock_pgid.return_value = installed_dists @@ -787,9 +787,9 @@ def test_req_git(self): req=req_str ) - with patch('%s.pip.get_installed_distributions' % pbm + with patch('%s.get_installed_distributions' % pbm ) as mock_pgid: - with patch('%s.pip.FrozenRequirement.from_dist' % pbm + with patch('%s.FrozenRequirement.from_dist' % pbm ) as mock_from_dist: with patch('%s._dist_version_url' % pb) as mock_dist_vu: mock_pgid.return_value = installed_dists diff --git a/versionfinder/versionfinder.py b/versionfinder/versionfinder.py index 484e073..5f10fcf 100644 --- a/versionfinder/versionfinder.py +++ b/versionfinder/versionfinder.py @@ -45,13 +45,28 @@ from .versioninfo import VersionInfo try: - import pip._internal as pip + from pip._internal.operations.freeze import FrozenRequirement except (ImportError, KeyError): try: - import pip + from pip._internal import FrozenRequirement except (ImportError, KeyError): - # this is used within try blocks; NBD if they fail - pass + try: + from pip import FrozenRequirement + except (ImportError, KeyError): + # this is used within try blocks; NBD if they fail + pass + +try: + from pip._internal.utils.misc import get_installed_distributions +except (ImportError, KeyError): + try: + from pip._internal import get_installed_distributions + except (ImportError, KeyError): + try: + from pip import get_installed_distributions + except (ImportError, KeyError): + # this is used within try blocks; NBD if they fail + pass try: import pkg_resources @@ -61,7 +76,7 @@ try: from git import Repo -except Exception: +except Exception: # nocoverage # this is used within try blocks; NBD if they fail pass @@ -234,7 +249,7 @@ def _find_pip_info(self): dist = None dist_name = self.package_name.replace('_', '-') logger.debug('Checking for pip distribution named: %s', dist_name) - for d in pip.get_installed_distributions(): + for d in get_installed_distributions(): if d.project_name == dist_name: dist = d if dist is None: @@ -246,7 +261,7 @@ def _find_pip_info(self): res['version'] = ver res['url'] = url # this is a bit of an ugly, lazy hack... - req = pip.FrozenRequirement.from_dist(dist, []) + req = FrozenRequirement.from_dist(dist, []) logger.debug('pip FrozenRequirement: %s', req) res['requirement'] = str(req.req) return res From 0445bf5f10163104692941067658ecdfaf632699 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 15:54:56 -0400 Subject: [PATCH 02/12] Deprecate support for Python 3.3; don't test it anymore, and add DeprecationWarning --- .travis.yml | 4 ---- CHANGES.rst | 7 +++++++ README.rst | 5 +++-- tox.ini | 8 +++----- versionfinder/versionfinder.py | 14 ++++++++++++++ 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16bf34a..1a11029 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,6 @@ matrix: include: - python: "2.7" env: TOXENV=py27-acceptance - - python: "3.3" - env: TOXENV=py33-acceptance - python: "3.4" env: TOXENV=py34-acceptance - python: "3.5" @@ -17,8 +15,6 @@ matrix: env: TOXENV=py36-acceptance - python: "2.7" env: TOXENV=py27-unit - - python: "3.3" - env: TOXENV=py33-unit - python: "3.4" env: TOXENV=py34-unit - python: "3.5" diff --git a/CHANGES.rst b/CHANGES.rst index a03a802..e3caf67 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,13 @@ Changelog ========= +Unreleased Changes +------------------ + +* Stop testing Python 3.3 and drop official support for it. +* Test fixes: + + * Always install latest versions of ``coverage`` and ``pytest``. 0.1.3 (2018-03-18) ------------------ diff --git a/README.rst b/README.rst index 1e9475a..fb6af59 100644 --- a/README.rst +++ b/README.rst @@ -49,8 +49,9 @@ tag or commit from a git repo, or has local changes not committed to git. Requirements ------------ -* Python 2.7, or Python 3.3+. Python 3.0-3.2 is not supported. Python 2.6 should - function, but will not return detailed git information and is not tested. +* Python 2.7, or Python 3.4+. Python 3.0-3.2 is not supported. Python 3.3 was supported + but is no longer tested. Python 2.6 might function, but will not return detailed + git information and is not tested. Usage ----- diff --git a/tox.ini b/tox.ini index 107a332..60ddbff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py27,py33,py34,py35,py36}-{unit,acceptance},docs +envlist = {py27,py34,py35,py36}-{unit,acceptance},docs [testenv] deps = @@ -7,8 +7,7 @@ deps = execnet pep8 py - py33: pytest<3.3.0 - {py27,py34,py35,py36}-{unit,acceptance}: pytest>=3.3.0 + pytest pytest-cache pytest-cov pytest-pep8 @@ -19,8 +18,7 @@ deps = requests virtualenv backoff - py36: coverage - {py27,py33,py34,py35}-{unit,acceptance}: coverage==3.7.1 + coverage passenv=TRAVIS* setenv = diff --git a/versionfinder/versionfinder.py b/versionfinder/versionfinder.py index 5f10fcf..5196097 100644 --- a/versionfinder/versionfinder.py +++ b/versionfinder/versionfinder.py @@ -37,10 +37,12 @@ ################################################################################ """ +import sys import os import logging import inspect from contextlib import contextmanager +import warnings from .versioninfo import VersionInfo @@ -82,6 +84,10 @@ logger = logging.getLogger(__name__) +warnings.filterwarnings( + action="always", category=DeprecationWarning, module=__name__ +) + class VersionFinder(object): @@ -135,6 +141,14 @@ def __init__(self, package_name, package_file=None, log=False, logger.debug('package_dir: %s' % self.package_dir) self._pip_locations = [] self._pkg_resources_locations = [] + if sys.version_info[0] == 3 and sys.version_info[1] == 3: # nocoverage + warnings.warn( + 'The versionfinder package no longer supports Python %d.%d; ' + 'please switch to Python 2.7 or Python >= 3.4.' % ( + sys.version_info[0], sys.version_info[1] + ), + DeprecationWarning + ) def find_package_version(self): """ From 7781fbc53310582d45f4d52e7de557d79664988f Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 15:59:36 -0400 Subject: [PATCH 03/12] pep8 fix --- versionfinder/tests/test_acceptance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionfinder/tests/test_acceptance.py b/versionfinder/tests/test_acceptance.py index 0a1e8b5..079d2ee 100644 --- a/versionfinder/tests/test_acceptance.py +++ b/versionfinder/tests/test_acceptance.py @@ -221,7 +221,7 @@ def _set_git_config(self, set_in_travis=False): 'config', 'user.email' ]).strip() - except subprocess.CalledProcessError as ex: + except subprocess.CalledProcessError: res = None if res != '' and res is not None: print("Got git config user.email as %s" % res) From aff81fce1ee0867a7a3658ec4a25c95019d010d7 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:25:11 -0400 Subject: [PATCH 04/12] more pip10 fixes --- versionfinder/versionfinder.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/versionfinder/versionfinder.py b/versionfinder/versionfinder.py index 5196097..c84625a 100644 --- a/versionfinder/versionfinder.py +++ b/versionfinder/versionfinder.py @@ -189,7 +189,10 @@ def find_package_version(self): pip_info = self._find_pip_info() except Exception: # we NEVER want this to crash the program - logger.debug('Caught exception running _find_pip_info()') + logger.debug( + 'Caught exception running _find_pip_info()', + exc_info=True + ) pip_info = {} logger.debug("pip info: %s", pip_info) for k, v in pip_info.items(): @@ -275,7 +278,10 @@ def _find_pip_info(self): res['version'] = ver res['url'] = url # this is a bit of an ugly, lazy hack... - req = FrozenRequirement.from_dist(dist, []) + try: + req = FrozenRequirement.from_dist(dist, []) + except TypeError: # nocoverage + req = FrozenRequirement.from_dist(dist) logger.debug('pip FrozenRequirement: %s', req) res['requirement'] = str(req.req) return res From 16bec8b5a9842a501864f65bfb2f78ee7cae36ab Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:25:54 -0400 Subject: [PATCH 05/12] fix docs build --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index fb6af59..76198aa 100644 --- a/README.rst +++ b/README.rst @@ -165,7 +165,7 @@ Guidelines Testing ------- -Testing is done via `pytest `_, driven by `tox `_. +Testing is done via `pytest `_, driven by `tox `_. * testing is as simple as: From 6a3a322d7b0f2bfefee1ea1a959732b44102da37 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:34:08 -0400 Subject: [PATCH 06/12] switch docs build to py37 --- .travis.yml | 2 +- docs/source/versionfinder.rst | 7 +++---- docs/source/versionfinder.version.rst | 6 +++--- docs/source/versionfinder.versionfinder.rst | 6 +++--- docs/source/versionfinder.versioninfo.rst | 6 +++--- tox.ini | 2 +- versionfinder/versioninfo.py | 10 +++++----- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a11029..7b1ec2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: env: TOXENV=py35-unit - python: "3.6" env: TOXENV=py36-unit - - python: "2.7" + - python: "3.7" env: TOXENV=docs install: diff --git a/docs/source/versionfinder.rst b/docs/source/versionfinder.rst index da395b4..6e8a7d4 100644 --- a/docs/source/versionfinder.rst +++ b/docs/source/versionfinder.rst @@ -2,9 +2,9 @@ versionfinder package ===================== .. automodule:: versionfinder - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Submodules ---------- @@ -14,4 +14,3 @@ Submodules versionfinder.version versionfinder.versionfinder versionfinder.versioninfo - diff --git a/docs/source/versionfinder.version.rst b/docs/source/versionfinder.version.rst index 1d3bf75..049ae9e 100644 --- a/docs/source/versionfinder.version.rst +++ b/docs/source/versionfinder.version.rst @@ -2,6 +2,6 @@ versionfinder.version module ============================ .. automodule:: versionfinder.version - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/versionfinder.versionfinder.rst b/docs/source/versionfinder.versionfinder.rst index ecfa560..27a3024 100644 --- a/docs/source/versionfinder.versionfinder.rst +++ b/docs/source/versionfinder.versionfinder.rst @@ -2,6 +2,6 @@ versionfinder.versionfinder module ================================== .. automodule:: versionfinder.versionfinder - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/versionfinder.versioninfo.rst b/docs/source/versionfinder.versioninfo.rst index 8ceccdd..4ce50c6 100644 --- a/docs/source/versionfinder.versioninfo.rst +++ b/docs/source/versionfinder.versioninfo.rst @@ -2,6 +2,6 @@ versionfinder.versioninfo module ================================ .. automodule:: versionfinder.versioninfo - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/tox.ini b/tox.ini index 60ddbff..058c42a 100644 --- a/tox.ini +++ b/tox.ini @@ -50,7 +50,7 @@ deps = pygments sphinx sphinx_rtd_theme -basepython = python2.7 +basepython = python3.7 commands = python --version virtualenv --version diff --git a/versionfinder/versioninfo.py b/versionfinder/versioninfo.py index 8e3042f..8127fb8 100644 --- a/versionfinder/versioninfo.py +++ b/versionfinder/versioninfo.py @@ -243,7 +243,7 @@ def git_str(self): If the distribution is installed via git and pip recognizes the git source, return the pip requirement string specifying the git URL and - commit, with an '*' appended if :py:attr:`~.git_is_dirty` is True. + commit, with an '*' appended if :py:meth:`~.git_is_dirty` is True. Otherwise, return a string of the form: @@ -251,7 +251,7 @@ def git_str(self): Where URL is the remote URL, ref is the tag name if the repo is checked out to a commit that matches a tag or else the commit hex SHA, and '*' - is appended if :py:attr:`~.git_is_dirty` is True. + is appended if :py:meth:`~.git_is_dirty` is True. :return: description of the git repo remote and state :rtype: str @@ -283,7 +283,7 @@ def long_str(self): """ Return a long version and installation specifier string of the form: - If :py:attr:`~.git_str` == '': + If :py:meth:`~.git_str` == '': SHORT_STR @@ -291,8 +291,8 @@ def long_str(self): SHORT_STR (GIT_STR) - Where ``SHORT_STR`` is :py:attr:`~.short_str` and ``GIT_STR`` is - :py:attr:`~.git_str`. + Where ``SHORT_STR`` is :py:meth:`~.short_str` and ``GIT_STR`` is + :py:meth:`~.git_str`. :return: long version/installation specifier string :rtype: str From 47e14d84b9a013a30b8adaabf85816b4e04baac9 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:34:35 -0400 Subject: [PATCH 07/12] CHANGELOG --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e3caf67..575d0c2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,9 +5,11 @@ Unreleased Changes ------------------ * Stop testing Python 3.3 and drop official support for it. +* Multiple pip10 fixes. * Test fixes: * Always install latest versions of ``coverage`` and ``pytest``. + * Switch docs build to py37 0.1.3 (2018-03-18) ------------------ From fce0be86ae4dc52d8a52fede9185f8e920c40988 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:44:44 -0400 Subject: [PATCH 08/12] Begin testing under py37 and py38 --- .travis.yml | 8 ++++++++ CHANGES.rst | 1 + tox.ini | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7b1ec2d..47a155d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,10 @@ matrix: env: TOXENV=py35-acceptance - python: "3.6" env: TOXENV=py36-acceptance + - python: "3.7" + env: TOXENV=py37-acceptance + - python: "3.8" + env: TOXENV=py38-acceptance - python: "2.7" env: TOXENV=py27-unit - python: "3.4" @@ -21,6 +25,10 @@ matrix: env: TOXENV=py35-unit - python: "3.6" env: TOXENV=py36-unit + - python: "3.7" + env: TOXENV=py37-unit + - python: "3.8" + env: TOXENV=py38-unit - python: "3.7" env: TOXENV=docs diff --git a/CHANGES.rst b/CHANGES.rst index 575d0c2..98b1be9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,7 @@ Unreleased Changes * Always install latest versions of ``coverage`` and ``pytest``. * Switch docs build to py37 + * Begin testing under py37 and py38 0.1.3 (2018-03-18) ------------------ diff --git a/tox.ini b/tox.ini index 058c42a..b3ca0db 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py27,py34,py35,py36}-{unit,acceptance},docs +envlist = {py27,py34,py35,py36,py37,py38}-{unit,acceptance},docs [testenv] deps = From 1f42567632c3b79017ce7fd84ce4db5880d91169 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:53:50 -0400 Subject: [PATCH 09/12] Fixes #7 - ignore any exceptions raised when importing from pip --- CHANGES.rst | 3 +++ versionfinder/versionfinder.py | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 98b1be9..b74b064 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog Unreleased Changes ------------------ +**Important:** + +* Fix `Issue #7 `_ where certain new versions of pip throw an AttributeError on import if running in Lambda (or other environments where ``sys.stdin`` is ``None``). * Stop testing Python 3.3 and drop official support for it. * Multiple pip10 fixes. * Test fixes: diff --git a/versionfinder/versionfinder.py b/versionfinder/versionfinder.py index c84625a..50295f7 100644 --- a/versionfinder/versionfinder.py +++ b/versionfinder/versionfinder.py @@ -46,27 +46,33 @@ from .versioninfo import VersionInfo +# Note: we catch all exceptions here because of +# https://github.com/jantman/versionfinder/issues/7 - some pip versions +# throw an import-time AttributeError when running in Lambda, or other +# environments where sys.stdin is None. Per that issue, the right thing to +# do is never fail if pip can't be imported. +# This was fixed in https://github.com/pypa/pip/pull/7118 / pip 19.3 try: from pip._internal.operations.freeze import FrozenRequirement -except (ImportError, KeyError): +except Exception: try: from pip._internal import FrozenRequirement - except (ImportError, KeyError): + except Exception: try: from pip import FrozenRequirement - except (ImportError, KeyError): + except Exception: # this is used within try blocks; NBD if they fail pass try: from pip._internal.utils.misc import get_installed_distributions -except (ImportError, KeyError): +except Exception: try: from pip._internal import get_installed_distributions - except (ImportError, KeyError): + except Exception: try: from pip import get_installed_distributions - except (ImportError, KeyError): + except Exception: # this is used within try blocks; NBD if they fail pass From cc2ff1817cdcd0ce82f54c2496614f77486f7ece Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:57:15 -0400 Subject: [PATCH 10/12] Stop testing py27 and py34; add DeprecationWarning on any python < 3.5 --- .travis.yml | 8 -------- CHANGES.rst | 4 +++- tox.ini | 2 +- versionfinder/versionfinder.py | 7 +++++-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 47a155d..7692da9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,6 @@ cache: pip matrix: include: - - python: "2.7" - env: TOXENV=py27-acceptance - - python: "3.4" - env: TOXENV=py34-acceptance - python: "3.5" env: TOXENV=py35-acceptance - python: "3.6" @@ -17,10 +13,6 @@ matrix: env: TOXENV=py37-acceptance - python: "3.8" env: TOXENV=py38-acceptance - - python: "2.7" - env: TOXENV=py27-unit - - python: "3.4" - env: TOXENV=py34-unit - python: "3.5" env: TOXENV=py35-unit - python: "3.6" diff --git a/CHANGES.rst b/CHANGES.rst index b74b064..07915c2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,10 +4,12 @@ Changelog Unreleased Changes ------------------ -**Important:** +**Important:** in keeping with the scheduled end-of-life of various Python versions, versionfinder now only officially supports Python 3.5 or greater. A DeprecationWarning will be generated when run with versions before 3.5, and they are no longer tested. * Fix `Issue #7 `_ where certain new versions of pip throw an AttributeError on import if running in Lambda (or other environments where ``sys.stdin`` is ``None``). * Stop testing Python 3.3 and drop official support for it. +* Stop testing Python 2.7 and 3.4. +* Add DeprecationWarnings for any Python version < 3.5. * Multiple pip10 fixes. * Test fixes: diff --git a/tox.ini b/tox.ini index b3ca0db..0197ddb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py27,py34,py35,py36,py37,py38}-{unit,acceptance},docs +envlist = {py35,py36,py37,py38}-{unit,acceptance},docs [testenv] deps = diff --git a/versionfinder/versionfinder.py b/versionfinder/versionfinder.py index 50295f7..f54ba40 100644 --- a/versionfinder/versionfinder.py +++ b/versionfinder/versionfinder.py @@ -147,10 +147,13 @@ def __init__(self, package_name, package_file=None, log=False, logger.debug('package_dir: %s' % self.package_dir) self._pip_locations = [] self._pkg_resources_locations = [] - if sys.version_info[0] == 3 and sys.version_info[1] == 3: # nocoverage + if ( + sys.version_info[0] < 3 or + sys.version_info[0] == 3 and sys.version_info[1] < 5 + ): # nocoverage warnings.warn( 'The versionfinder package no longer supports Python %d.%d; ' - 'please switch to Python 2.7 or Python >= 3.4.' % ( + 'please switch to Python 3.5 or newer.' % ( sys.version_info[0], sys.version_info[1] ), DeprecationWarning From 69a0ffa7742297bd7b072b16810784a4655fad14 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 16:58:39 -0400 Subject: [PATCH 11/12] Bump version to 1.0.0 and set trove classifier to production/stable --- CHANGES.rst | 2 +- setup.py | 3 +-- versionfinder/version.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 07915c2..3aadd7f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ Changelog ========= -Unreleased Changes +1.0.0 (2019-10-27) ------------------ **Important:** in keeping with the scheduled end-of-life of various Python versions, versionfinder now only officially supports Python 3.5 or greater. A DeprecationWarning will be generated when run with versions before 3.5, and they are no longer tested. diff --git a/setup.py b/setup.py index 9def1b9..bf041bd 100644 --- a/setup.py +++ b/setup.py @@ -42,12 +42,11 @@ long_description = fh.read() classifiers = [ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries', diff --git a/versionfinder/version.py b/versionfinder/version.py index d5c5753..d112a93 100644 --- a/versionfinder/version.py +++ b/versionfinder/version.py @@ -35,5 +35,5 @@ ################################################################################## """ -VERSION = '0.1.3' +VERSION = '1.0.0' PROJECT_URL = 'https://github.com/jantman/versionfinder' From 77f9b7bd05ee20002d728deafb4105d18e37ac70 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 27 Oct 2019 17:25:33 -0400 Subject: [PATCH 12/12] coverage fix --- versionfinder/versionfinder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versionfinder/versionfinder.py b/versionfinder/versionfinder.py index f54ba40..19c40b9 100644 --- a/versionfinder/versionfinder.py +++ b/versionfinder/versionfinder.py @@ -54,7 +54,7 @@ # This was fixed in https://github.com/pypa/pip/pull/7118 / pip 19.3 try: from pip._internal.operations.freeze import FrozenRequirement -except Exception: +except Exception: # nocoverage try: from pip._internal import FrozenRequirement except Exception: @@ -66,7 +66,7 @@ try: from pip._internal.utils.misc import get_installed_distributions -except Exception: +except Exception: # nocoverage try: from pip._internal import get_installed_distributions except Exception: