Skip to content

Commit aa44825

Browse files
committed
merge in support for python 3.2
2 parents 605c785 + a5745f2 commit aa44825

14 files changed

+44
-40
lines changed

announce.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
==========================
2-
virtualenvwrapper 2.11.1
3-
==========================
1+
========================
2+
virtualenvwrapper 3.0
3+
========================
44

55
What is virtualenvwrapper
66
=========================
@@ -11,11 +11,11 @@ virtual environments and otherwise managing your development workflow,
1111
making it easier to work on more than one project at a time without
1212
introducing conflicts in their dependencies.
1313

14-
What's New in 2.11.1
15-
====================
14+
What's New in 3.0
15+
=================
1616

17-
- Fixes a bug with tab completion in sub-shell environments such as
18-
screen and tmux introduced in 2.11.
17+
- Add Python 3 support, thanks in large part to the efforts of Daniel
18+
Kraus. Tested under Python 2.6, 2.7, and 3.2.
1919

2020
Installing
2121
==========

docs/en/history.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Release History
33
===============
44

5+
3.0
6+
7+
- Add Python 3 support, thanks in large part to the efforts of
8+
Daniel Kraus (:bbuser:`dakra`). Tested under Python 2.6, 2.7, and
9+
3.2.
10+
511
2.11.1
612

713
- Remove the initialization shortcut because it breaks tab

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
PROJECT = 'virtualenvwrapper'
44

55
# Change docs/sphinx/conf.py too!
6-
VERSION = '2.11.1'
6+
VERSION = '3.0'
77

88
# Bootstrap installation of Distribute
99
import distribute_setup

tests/run_tests

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ do
4949

5050
for test_shell in bash ksh zsh
5151
do
52-
test_shell_opts=
53-
if [ $test_shell = "zsh" ]; then
52+
test_shell_opts=
53+
if [ $test_shell = "zsh" ]; then
5454
test_shell_opts="-o shwordsplit"
55-
fi
56-
export test_shell=$(which $test_shell)
55+
fi
56+
export test_shell=$(which $test_shell)
5757

5858
echo
5959
echo '********************************************************************************'

tests/test.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ test_virtualenvwrapper_verify_workon_home_missing_dir_grep_options() {
8484
unset GREP_OPTIONS
8585
}
8686

87-
test_get_python_version() {
88-
expected=$(python -V 2>&1 | cut -f2 -d' ' | cut -f-2 -d.)
89-
actual=$(virtualenvwrapper_get_python_version)
90-
assertSame "$expected" "$actual"
91-
}
92-
9387
test_python_interpreter_set_incorrectly() {
9488
return_to="$(pwd)"
9589
cd "$WORKON_HOME"

tests/test_add2virtualenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test_add2virtualenv () {
3232
assertTrue "No path insert code in $(cat $path_file)" "grep -q sys.__egginsert $path_file"
3333
# Check the path we inserted is actually at the top
3434
expected="$full_path"
35-
actual=$($WORKON_HOME/pathtest/bin/python -c "import sys; print sys.path[1]")
35+
actual=$($WORKON_HOME/pathtest/bin/python -c "import sys; sys.stdout.write(sys.path[1]+'\n')")
3636
assertSame "$expected" "$actual"
3737
# Make sure the temporary file created
3838
# during the edit was removed

tests/test_mkvirtualenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ test_no_workon_home () {
8181
export WORKON_HOME="$WORKON_HOME/not_there"
8282
mkvirtualenv should_be_created >"$old_home/output" 2>&1
8383
output=$(cat "$old_home/output")
84-
assertTrue "Did not see expected message" "echo $output | grep 'does not exist'"
84+
assertTrue "Did not see expected message in \"$output\"" "cat \"$old_home/output\" | grep 'does not exist'"
8585
assertTrue "Did not create environment" "[ -d \"$WORKON_HOME/should_be_created\" ]"
8686
WORKON_HOME="$old_home"
8787
}

tests/test_mkvirtualenv_install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ setUp () {
2323
}
2424

2525
test_single_package () {
26-
mkvirtualenv -i commandlineapp "env4" >/dev/null 2>&1
26+
mkvirtualenv -i IPy "env4"
2727
installed=$(pip freeze)
28-
assertTrue "CommandLineApp not found in $installed" "echo $installed | grep CommandLineApp"
28+
assertTrue "IPy not found in $installed" "pip freeze | grep IPy"
2929
}
3030

3131
test_multiple_packages () {
32-
mkvirtualenv -i commandlineapp -i csvcat "env4" >/dev/null 2>&1
32+
mkvirtualenv -i IPy -i WebTest "env5"
3333
installed=$(pip freeze)
34-
assertTrue "CommandLineApp not found in $installed" "echo $installed | grep CommandLineApp"
35-
assertTrue "csvcat not found in $installed" "echo $installed | grep csvcat"
34+
assertTrue "IPy not found in $installed" "pip freeze | grep IPy"
35+
assertTrue "WebTest not found in $installed" "pip freeze | grep WebTest"
3636
}
3737

3838
. "$test_dir/shunit2"

tests/test_mkvirtualenv_requirements.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ setUp () {
2323
}
2424

2525
test_requirements_file () {
26-
echo "commandlineapp" > "$test_dir/requirements.txt"
26+
echo "IPy" > "$test_dir/requirements.txt"
2727
mkvirtualenv -r "$test_dir/requirements.txt" "env3" >/dev/null 2>&1
2828
installed=$(pip freeze)
29-
assertTrue "CommandLineApp not found in $installed" "echo $installed | grep CommandLineApp"
29+
assertTrue "IPy not found in $installed" "pip freeze | grep IPy"
3030
}
3131

3232
. "$test_dir/shunit2"

tests/test_support.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ setUp () {
2222
}
2323

2424
test_get_python_version () {
25-
expected="$(python -c 'import sys; print ".".join([str(p) for p in sys.version_info[:2]])')"
25+
expected="$($VIRTUAL_ENV/bin/python -c 'import sys; sys.stdout.write("%s.%s\n" % sys.version_info[:2])')"
2626
echo "Expecting: $expected"
2727
vers=$(virtualenvwrapper_get_python_version)
2828
echo "Got : $vers"

0 commit comments

Comments
 (0)