diff --git a/pipenv/patched/pip/utils/packaging.py b/pipenv/patched/pip/utils/packaging.py index 90cfd30f..4718b52c 100644 --- a/pipenv/patched/pip/utils/packaging.py +++ b/pipenv/patched/pip/utils/packaging.py @@ -49,13 +49,14 @@ def check_dist_requires_python(dist): requires_python = pkg_info_dict.get('Requires-Python') try: if not check_requires_python(requires_python): - raise exceptions.UnsupportedPythonVersion( - "%s requires Python '%s' but the running Python is %s" % ( - dist.project_name, - requires_python, - '{0}.{1}.{2}'.format(*sys.version_info[:3]) - ) - ) + # raise exceptions.UnsupportedPythonVersion( + # "%s requires Python '%s' but the running Python is %s" % ( + # dist.project_name, + # requires_python, + # '{0}.{1}.{2}'.format(*sys.version_info[:3]) + # ) + # ) + return except specifiers.InvalidSpecifier as e: logger.warning( "Package %s has an invalid Requires-Python entry %s - %s" % ( diff --git a/tests/pytest-pypi/pytest_pypi/app.py b/tests/pytest-pypi/pytest_pypi/app.py index 18f35102..fcbc8259 100644 --- a/tests/pytest-pypi/pytest_pypi/app.py +++ b/tests/pytest-pypi/pytest_pypi/app.py @@ -1,10 +1,12 @@ import os -from flask import Flask, redirect, abort, render_template, send_file +import requests +from flask import Flask, redirect, abort, render_template, send_file, jsonify PYPI_VENDOR_DIR = os.environ.get('PYPI_VENDOR_DIR', './pypi') PYPI_VENDOR_DIR = os.path.abspath(PYPI_VENDOR_DIR) app = Flask(__name__) +session = requests.Session() packages = {} @@ -76,6 +78,10 @@ def serve_package(package, release): abort(404) +@app.route('/pypi//json') +def json_for_package(package): + r = session.get('https://pypi.org/pypi/{0}/json'.format(package)) + return jsonify(r.json()) if __name__ == '__main__': app.run() diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 52843681..34113bc0 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -238,6 +238,17 @@ class TestPipenv: assert 'urllib3' in p.lockfile['default'] assert 'certifi' in p.lockfile['default'] + @pytest.mark.complex_lock + def test_complex_lock(self, pypi): + with PipenvInstance(pypi=pypi) as p: + c = p.pipenv('install apscheduler') + assert c.return_code == 0 + assert 'apscheduler' in p.pipfile['packages'] + import pprint + pprint.pprint(p.lockfile) + assert 'futures' in p.lockfile[u'default'] + assert 'funcsigs' in p.lockfile[u'default'] + @pytest.mark.dev @pytest.mark.run @pytest.mark.install