Don't like ads? PRO users don't see any ads ;-)
Guest

yum python problem sl 6.2

By: a guest on Jun 20th, 2012  |  syntax: Diff  |  size: 4.52 KB  |  hits: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/config/Makefile python2.6/config/Makefile
  2. --- python2.6.good/config/Makefile      2012-01-04 23:09:49.000000000 +0100
  3. +++ python2.6/config/Makefile   2012-06-18 16:58:43.000000000 +0200
  4. @@ -302,6 +302,7 @@
  5.                 Python/pymath.o \
  6.                 Python/pystate.o \
  7.                 Python/pythonrun.o \
  8. +                Python/random.o \
  9.                 Python/structmember.o \
  10.                 Python/symtable.o \
  11.                 Python/sysmodule.o \
  12. @@ -745,7 +746,7 @@
  13.                 -@if which pybuildbot.identify >/dev/null 2>&1; then \
  14.                         pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
  15.                 fi
  16. -               $(TESTPYTHON) $(TESTPROG) -uall -rw $(TESTOPTS)
  17. +               $(TESTPYTHON) -R $(TESTPROG) -uall -rw $(TESTOPTS)
  18.  
  19.  QUICKTESTOPTS= $(TESTOPTS) -x test_thread test_signal test_strftime \
  20.                 test_unicodedata test_re test_sre test_select test_poll \
  21. diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/distutils/config.py python2.6/distutils/config.py
  22. --- python2.6.good/distutils/config.py  2012-01-04 23:09:41.000000000 +0100
  23. +++ python2.6/distutils/config.py       2012-06-18 16:58:32.000000000 +0200
  24. @@ -43,16 +43,8 @@
  25.      def _store_pypirc(self, username, password):
  26.          """Creates a default .pypirc file."""
  27.          rc = self._get_rc_file()
  28. -        f = open(rc, 'w')
  29. -        try:
  30. -            f.write(DEFAULT_PYPIRC % (username, password))
  31. -        finally:
  32. -            f.close()
  33. -        try:
  34. -            os.chmod(rc, 0600)
  35. -        except OSError:
  36. -            # should do something better here
  37. -            pass
  38. +        with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0600), 'w') as fp:
  39. +            fp.write(DEFAULT_PYPIRC % (username, password))
  40.  
  41.      def _read_pypirc(self):
  42.          """Reads the .pypirc file."""
  43. diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/json/__init__.py python2.6/json/__init__.py
  44. --- python2.6.good/json/__init__.py     2012-01-04 23:09:40.000000000 +0100
  45. +++ python2.6/json/__init__.py  2012-06-18 16:58:28.000000000 +0200
  46. @@ -29,7 +29,7 @@
  47.  Compact encoding::
  48.  
  49.      >>> import json
  50. -    >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':'))
  51. +    >>> json.dumps([1,2,3,{'4': 5, '6': 7}], sort_keys=True, separators=(',',':'))
  52.      '[1,2,3,{"4":5,"6":7}]'
  53.  
  54.  Pretty printing (using repr() because of extraneous whitespace in the output)::
  55. diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/os.py python2.6/os.py
  56. --- python2.6.good/os.py        2012-01-04 23:09:38.000000000 +0100
  57. +++ python2.6/os.py     2012-06-18 16:58:24.000000000 +0200
  58. @@ -742,22 +742,3 @@
  59.                       _make_statvfs_result)
  60.  except NameError: # statvfs_result may not exist
  61.      pass
  62. -
  63. -if not _exists("urandom"):
  64. -    def urandom(n):
  65. -        """urandom(n) -> str
  66. -
  67. -        Return a string of n random bytes suitable for cryptographic use.
  68. -
  69. -        """
  70. -        try:
  71. -            _urandomfd = open("/dev/urandom", O_RDONLY)
  72. -        except (OSError, IOError):
  73. -            raise NotImplementedError("/dev/urandom (or equivalent) not found")
  74. -        try:
  75. -            bs = b""
  76. -            while n - len(bs) >= 1:
  77. -                bs += read(_urandomfd, n - len(bs))
  78. -        finally:
  79. -            close(_urandomfd)
  80. -        return bs
  81. diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/SimpleHTTPServer.py python2.6/SimpleHTTPServer.py
  82. --- python2.6.good/SimpleHTTPServer.py  2012-01-04 23:09:38.000000000 +0100
  83. +++ python2.6/SimpleHTTPServer.py       2012-06-18 16:58:24.000000000 +0200
  84. @@ -15,6 +15,7 @@
  85.  import BaseHTTPServer
  86.  import urllib
  87.  import cgi
  88. +import sys
  89.  import shutil
  90.  import mimetypes
  91.  try:
  92. @@ -131,7 +132,8 @@
  93.          length = f.tell()
  94.          f.seek(0)
  95.          self.send_response(200)
  96. -        self.send_header("Content-type", "text/html")
  97. +        encoding = sys.getfilesystemencoding()
  98. +        self.send_header("Content-type", "text/html; charset=%s" % encoding)
  99.          self.send_header("Content-Length", str(length))
  100.          self.end_headers()
  101.          return f
  102. diff -x '*.pyc' -x '*.pyo' -ru python2.6.good/SimpleXMLRPCServer.py python2.6/SimpleXMLRPCServer.py
  103. --- python2.6.good/SimpleXMLRPCServer.py        2012-01-04 23:09:38.000000000 +0100
  104. +++ python2.6/SimpleXMLRPCServer.py     2012-06-18 16:58:24.000000000 +0200
  105. @@ -459,7 +459,10 @@
  106.              L = []
  107.              while size_remaining:
  108.                  chunk_size = min(size_remaining, max_chunk_size)
  109. -                L.append(self.rfile.read(chunk_size))
  110. +                chunk = self.rfile.read(chunk_size)
  111. +                if not chunk:
  112. +                    break
  113. +                L.append(chunk)
  114.                  size_remaining -= len(L[-1])
  115.              data = ''.join(L)