voxpupuli / puppet-python

Puppet module for installing and managing Python, pip, virtualenvs and Gunicorn virtual hosts.
https://forge.puppetlabs.com/puppet/python
Apache License 2.0
199 stars 371 forks source link

Upgrade pip and setuptools on venv creation #516

Closed baurmatt closed 4 years ago

baurmatt commented 4 years ago

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

bastelfreak commented 4 years ago

@baurmatt thanks for the PR. Can you take a look at the failing spec tests?

baurmatt commented 4 years ago

Hey @bastelfreak, pyvenv isn't used anywhere in the acceptance tests. The error is:

  Info: Loading facts
  Info: Loading facts
  Notice: Compiled catalog for ubuntu1404-64-1 in environment production in 0.17 seconds
  Info: Applying configuration version '1574757282'
  Notice: /Stage[main]/Main/Python::Virtualenv[venv]/File[/opt/venv4]/ensure: created
  Notice: /Stage[main]/Main/Python::Virtualenv[venv]/Exec[python_virtualenv_/opt/venv4]/returns: executed successfully
  Notice: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  Notice: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns: /opt/venv4/local/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:380: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  Notice: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns:   SNIMissingWarning,
  Notice: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns: /opt/venv4/local/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:139: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  Notice: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns:   InsecurePlatformWarning,
  Notice: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns: ERROR: Could not find a version that satisfies the requirement Randomized_Requests (from versions: none)
  Notice: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns: ERROR: No matching distribution found for Randomized_Requests
  Error: '/opt/venv4/bin/pip --log /opt/venv4/pip.log install --upgrade     Randomized_Requests' returned 1 instead of one of [0]
  Error: /Stage[main]/Main/Python::Pip[Randomized_Requests]/Exec[pip_install_Randomized_Requests]/returns: change from 'notrun' to ['0'] failed: '/opt/venv4/bin/pip --log /opt/venv4/pip.log install --upgrade     Randomized_Requests' returned 1 instead of one of [0]
  Info: Class[Main]: Unscheduling all events on Class[Main]
  Notice: Applied catalog in 4.69 seconds

Seems like the problem lays somewhere in the pip Randomized_Requests. Do you want me to swap it against e.g. int_date?

bastelfreak commented 4 years ago

sounds good, are you able to provide a patch for the acceptance test in another PR?

baurmatt commented 4 years ago

@bastelfreak Sure! :) -> https://github.com/voxpupuli/puppet-python/pull/519

bastelfreak commented 4 years ago

can you please rebase this one?

baurmatt commented 4 years ago

@bastelfreak Done! :)

vox-pupuli-tasks[bot] commented 4 years ago

Dear @baurmatt, thanks for the PR!

This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks