diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/config/Makefile python2.6/config/Makefile
--- python2.6.good/config/Makefile 2012-01-04 23:09:49.000000000 +0100
+++ python2.6/config/Makefile 2012-06-18 16:58:43.000000000 +0200
@@ -302,6 +302,7 @@
Python/pymath.o \
Python/pystate.o \
Python/pythonrun.o \
+ Python/random.o \
Python/structmember.o \
Python/symtable.o \
Python/sysmodule.o \
@@ -745,7 +746,7 @@
-@if which pybuildbot.identify >/dev/null 2>&1; then \
pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
fi
- $(TESTPYTHON) $(TESTPROG) -uall -rw $(TESTOPTS)
+ $(TESTPYTHON) -R $(TESTPROG) -uall -rw $(TESTOPTS)
QUICKTESTOPTS= $(TESTOPTS) -x test_thread test_signal test_strftime \
test_unicodedata test_re test_sre test_select test_poll \
diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/distutils/config.py python2.6/distutils/config.py
--- python2.6.good/distutils/config.py 2012-01-04 23:09:41.000000000 +0100
+++ python2.6/distutils/config.py 2012-06-18 16:58:32.000000000 +0200
@@ -43,16 +43,8 @@
def _store_pypirc(self, username, password):
"""Creates a default .pypirc file."""
rc = self._get_rc_file()
- f = open(rc, 'w')
- try:
- f.write(DEFAULT_PYPIRC % (username, password))
- finally:
- f.close()
- try:
- os.chmod(rc, 0600)
- except OSError:
- # should do something better here
- pass
+ with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0600), 'w') as fp:
+ fp.write(DEFAULT_PYPIRC % (username, password))
def _read_pypirc(self):
"""Reads the .pypirc file."""
diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/json/__init__.py python2.6/json/__init__.py
--- python2.6.good/json/__init__.py 2012-01-04 23:09:40.000000000 +0100
+++ python2.6/json/__init__.py 2012-06-18 16:58:28.000000000 +0200
@@ -29,7 +29,7 @@
Compact encoding::
>>> import json
- >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':'))
+ >>> json.dumps([1,2,3,{'4': 5, '6': 7}], sort_keys=True, separators=(',',':'))
'[1,2,3,{"4":5,"6":7}]'
Pretty printing (using repr() because of extraneous whitespace in the output)::
diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/os.py python2.6/os.py
--- python2.6.good/os.py 2012-01-04 23:09:38.000000000 +0100
+++ python2.6/os.py 2012-06-18 16:58:24.000000000 +0200
@@ -742,22 +742,3 @@
_make_statvfs_result)
except NameError: # statvfs_result may not exist
pass
-
-if not _exists("urandom"):
- def urandom(n):
- """urandom(n) -> str
-
- Return a string of n random bytes suitable for cryptographic use.
-
- """
- try:
- _urandomfd = open("/dev/urandom", O_RDONLY)
- except (OSError, IOError):
- raise NotImplementedError("/dev/urandom (or equivalent) not found")
- try:
- bs = b""
- while n - len(bs) >= 1:
- bs += read(_urandomfd, n - len(bs))
- finally:
- close(_urandomfd)
- return bs
diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/SimpleHTTPServer.py python2.6/SimpleHTTPServer.py
--- python2.6.good/SimpleHTTPServer.py 2012-01-04 23:09:38.000000000 +0100
+++ python2.6/SimpleHTTPServer.py 2012-06-18 16:58:24.000000000 +0200
@@ -15,6 +15,7 @@
import BaseHTTPServer
import urllib
import cgi
+import sys
import shutil
import mimetypes
try:
@@ -131,7 +132,8 @@
length = f.tell()
f.seek(0)
self.send_response(200)
- self.send_header("Content-type", "text/html")
+ encoding = sys.getfilesystemencoding()
+ self.send_header("Content-type", "text/html; charset=%s" % encoding)
self.send_header("Content-Length", str(length))
self.end_headers()
return f
diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/SimpleXMLRPCServer.py python2.6/SimpleXMLRPCServer.py
--- python2.6.good/SimpleXMLRPCServer.py 2012-01-04 23:09:38.000000000 +0100
+++ python2.6/SimpleXMLRPCServer.py 2012-06-18 16:58:24.000000000 +0200
@@ -459,7 +459,10 @@
L = []
while size_remaining:
chunk_size = min(size_remaining, max_chunk_size)
- L.append(self.rfile.read(chunk_size))
+ chunk = self.rfile.read(chunk_size)
+ if not chunk:
+ break
+ L.append(chunk)
size_remaining -= len(L[-1])
data = ''.join(L)