merge with stable

This commit is contained in:
Georg Brandl
2012-03-10 18:57:44 +01:00
4 changed files with 14 additions and 7 deletions
+4
View File
@@ -54,6 +54,10 @@ Release 1.1.3 (in development)
* #831: Provide ``--project`` flag in setup_command as advertised.
* #875: Fix reading config files under Python 3.
* #876: Fix quickstart test under Python 3.
Release 1.1.2 (Nov 1, 2011) -- 1.1.1 is a silly version number anyway!
======================================================================
+3 -2
View File
@@ -198,8 +198,9 @@ class Config(object):
# we promise to have the config dir as current dir while the
# config file is executed
os.chdir(dirname)
# get config source
f = open(config_file, 'rU')
# get config source -- 'b' is a no-op under 2.x, while 'U' is
# ignored under 3.x (but 3.x compile() accepts \r\n newlines)
f = open(config_file, 'rbU')
try:
source = f.read()
finally:
+5 -3
View File
@@ -22,9 +22,11 @@ if sys.version_info >= (3, 0):
copydir_run_2to3(testroot, newroot)
# switch to the converted dir so nose tests the right tests
chdir(newroot)
# always test the sphinx package from this directory
sys.path.insert(0, path.join(path.dirname(__file__), path.pardir))
# always test the sphinx package from build/lib/
sys.path.insert(0, path.pardir)
else:
# always test the sphinx package from this directory
sys.path.insert(0, path.join(path.dirname(__file__), path.pardir))
try:
import nose
+2 -2
View File
@@ -91,7 +91,7 @@ def test_quickstart_defaults(tempdir):
conffile = tempdir / 'conf.py'
assert conffile.isfile()
ns = {}
f = open(conffile, 'U')
f = open(conffile, 'rbU')
try:
code = compile(f.read(), conffile, 'exec')
finally:
@@ -151,7 +151,7 @@ def test_quickstart_all_answers(tempdir):
conffile = tempdir / 'source' / 'conf.py'
assert conffile.isfile()
ns = {}
f = open(conffile, 'U')
f = open(conffile, 'rbU')
try:
code = compile(f.read(), conffile, 'exec')
finally: