Ticket #12723: python-2.7.2.p5_review.patch

File python-2.7.2.p5_review.patch, 2.4 KB (added by roed, 8 years ago)
  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    6161 * socket.py.patch: Work around an SSL issue.
    6262 * Makefile.pre.in.patch: Changes the permission of installed libraries
    6363   to 0755 (like any other library) instead of 0555.
     64 * doctest.py.patch: Modify doctest to allow a custom globals() that
     65   tracks dependencies of objects defined at runtime.
    6466
    6567== Changelog ==
    6668
     69=== python-2.7.2.p5 (David Roe, 21 March 2012) ===
     70 * Trac #12723: change doctest module to support plugging in a custom
     71   globals.
     72
    6773=== python-2.7.2.p4 (John Palmieri, 23 February 2012) ===
    6874 * Trac #12574: with OS X, do not use xcodebuild to test the version of
    6975   Xcode, since xcodebuild is no longer distributed with Xcode 4.3 or
  • new file patches/Lib.doctest.patch

    diff --git a/patches/Lib.doctest.patch b/patches/Lib.doctest.patch
    new file mode 100644
    - +  
     1--- src/Lib/doctest.py  2011-12-02 06:14:21.000000000 -0800
     2+++ src/Lib/doctest.py  2012-03-21 12:44:08.000000000 -0700
     3@@ -1,3 +1,6 @@
     4+# DocTestRunner updated to be able to aquire timing information.
     5+# Lines that have been changed are marked with # modified, # added or # removed
     6+
     7 # Module doctest.
     8 # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
     9 # Major enhancements and refactoring by:
     10@@ -1250,8 +1253,9 @@
     11             # keyboard interrupts.)
     12             try:
     13                 # Don't blink!  This is where the user's code gets run.
     14-                exec compile(example.source, filename, "single",
     15-                             compileflags, 1) in test.globs
     16+                compiled = compile(example.source, filename, "single",
     17+                             compileflags, 1)
     18+                self.execute(example, compiled, test.globs)
     19                 self.debugger.set_continue() # ==== Example Finished ====
     20                 exception = None
     21             except KeyboardInterrupt:
     22@@ -1472,6 +1476,12 @@
     23                 f = f + f2
     24                 t = t + t2
     25             d[name] = f, t
     26+           
     27+    #/////////////////////////////////////////////////////////////////
     28+    # Added methods.
     29+    #/////////////////////////////////////////////////////////////////
     30+    def execute(self, example, compiled, globs):                       # added
     31+        exec compiled in globs                                         # added
     32 
     33 class OutputChecker:
     34     """