Lessons Learned

contact@vinta.com.br

pythontestpyenvtox

Need to use tox while using pyenv? Don't forget to use the packages tox-pyenv for pyenv support and pyenv-implicit to make it find the correct python executable.

Did you like?
4
pythonenvosx

pyenv for multiple Python installations on OS X.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10
$ pyenv install 2.6.9
$ pyenv versions
* system (set by /Users/bouke/.pyenv/version)
  2.6.9
  2.7.10
  3.2.6
  3.3.6
  3.4.3
  3.5.0

Then, when you need a certain version:

pyenv local 3.5.0

This will create a file .python-version, so pyenv will remember the Python version for this directory.

https://gist.github.com/Bouke/11261620

Did you like?
2
django

On Django, be careful when doing consecutive queryset.update()s. Each one executes a new UPDATE ... WHERE SQL query. There are cases where the second update might not change anything because the first one changed the rows already. Always check the original queryset filters/excludes to see if they are affected by the updates.

Did you like?
2