pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang update to 2.3.3



details:   https://anonhg.NetBSD.org/pkgsrc/rev/af9e8a6004e8
branches:  trunk
changeset: 465191:af9e8a6004e8
user:      recht <recht%pkgsrc.org@localhost>
date:      Tue Dec 23 17:24:42 2003 +0000

description:
update to 2.3.3
This is a bug-fix release for Python 2.3 that fixes a number of bugs,
including a couple of serious errors with weakrefs and the cyclic garbage
collector. There are also a number of fixes to the standard library
- see the release notes ( http://www.python.org/2.3.3/NEWS.html )for details.

diffstat:

 lang/python/srcdist.mk             |    8 +-
 lang/python23-pth/Makefile         |    8 +-
 lang/python23-pth/distinfo         |   17 +-
 lang/python23-pth/patches/patch-aa |    6 +-
 lang/python23-pth/patches/patch-ac |   13 --
 lang/python23-pth/patches/patch-ag |  216 -------------------------------------
 lang/python23-pth/patches/patch-ai |   21 ---
 lang/python23-pth/patches/patch-aj |  198 ---------------------------------
 lang/python23-pth/patches/patch-ak |   68 -----------
 lang/python23-pth/patches/patch-al |   16 +-
 lang/python23-pth/patches/patch-am |   22 +-
 lang/python23/Makefile             |    8 +-
 lang/python23/distinfo             |   15 +-
 lang/python23/patches/patch-ac     |   13 --
 lang/python23/patches/patch-ag     |  216 -------------------------------------
 lang/python23/patches/patch-ai     |   21 ---
 lang/python23/patches/patch-aj     |  198 ---------------------------------
 lang/python23/patches/patch-ak     |   68 -----------
 lang/python23/patches/patch-al     |   12 +-
 lang/python23/patches/patch-am     |   10 +-
 20 files changed, 56 insertions(+), 1098 deletions(-)

diffs (truncated from 1379 to 300 lines):

diff -r 6c14ce6ff788 -r af9e8a6004e8 lang/python/srcdist.mk
--- a/lang/python/srcdist.mk    Tue Dec 23 16:46:39 2003 +0000
+++ b/lang/python/srcdist.mk    Tue Dec 23 17:24:42 2003 +0000
@@ -1,16 +1,16 @@
-# $NetBSD: srcdist.mk,v 1.9 2003/12/08 21:13:56 recht Exp $
+# $NetBSD: srcdist.mk,v 1.10 2003/12/23 17:24:42 recht Exp $
 
 .include "../../lang/python/pyversion.mk"
 
 .if ${_PYTHON_VERSION} == "23" || ${_PYTHON_VERSION} == "23pth"
 
-DISTNAME=      Python-2.3.2
+DISTNAME=      Python-2.3.3
 EXTRACT_SUFX=  .tgz
 DISTINFO_FILE= ${.CURDIR}/../../lang/python23/distinfo
 PATCHDIR=      ${.CURDIR}/../../lang/python23/patches
-PYSUBDIR=      Python-2.3.2
+PYSUBDIR=      Python-2.3.3
 WRKSRC=                ${WRKDIR}/${PYSUBDIR}
-MASTER_SITES=  ftp://ftp.python.org/pub/python/2.3.2/
+MASTER_SITES=  ftp://ftp.python.org/pub/python/2.3.3/
 
 .elif ${_PYTHON_VERSION} == "22" || ${_PYTHON_VERSION} == "22pth"
 
diff -r 6c14ce6ff788 -r af9e8a6004e8 lang/python23-pth/Makefile
--- a/lang/python23-pth/Makefile        Tue Dec 23 16:46:39 2003 +0000
+++ b/lang/python23-pth/Makefile        Tue Dec 23 17:24:42 2003 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.11 2003/12/08 21:13:56 recht Exp $
+# $NetBSD: Makefile,v 1.12 2003/12/23 17:24:42 recht Exp $
 #
 
-DISTNAME=      Python-2.3.2
-PKGNAME=       python23-pth-2.3.2
+DISTNAME=      Python-2.3.3
+PKGNAME=       python23-pth-2.3.3
 CATEGORIES=    lang
-MASTER_SITES=  ftp://ftp.python.org/pub/python/2.3.2/
+MASTER_SITES=  ftp://ftp.python.org/pub/python/2.3.3/
 EXTRACT_SUFX=  .tgz
 
 MAINTAINER=    recht%NetBSD.org@localhost
diff -r 6c14ce6ff788 -r af9e8a6004e8 lang/python23-pth/distinfo
--- a/lang/python23-pth/distinfo        Tue Dec 23 16:46:39 2003 +0000
+++ b/lang/python23-pth/distinfo        Tue Dec 23 17:24:42 2003 +0000
@@ -1,17 +1,12 @@
-$NetBSD: distinfo,v 1.8 2003/12/08 21:13:56 recht Exp $
+$NetBSD: distinfo,v 1.9 2003/12/23 17:24:42 recht Exp $
 
-SHA1 (Python-2.3.2.tgz) = 2176d1c42802ea2f9d430f23f1d578e00336c6aa
-Size (Python-2.3.2.tgz) = 8459427 bytes
-SHA1 (patch-aa) = 7c27e64068185a767bd1371851c33952711de854
+SHA1 (Python-2.3.3.tgz) = 034d2e3ed011ea753d4fee7efab16e31029b1e5e
+Size (Python-2.3.3.tgz) = 8491380 bytes
+SHA1 (patch-aa) = c4aad8fae46d55df93741a0378f5b930de0a5328
 SHA1 (patch-ab) = 111d7fa8adbb7001bacad36e3bdbe23ae6ce8b9b
-SHA1 (patch-ac) = 30c16b3770fed3324a38c18426d9d7758e8db889
 SHA1 (patch-ad) = c8f6ea08e68dae3bd9ad639c38e74cf654c0b41e
 SHA1 (patch-ae) = 544af90b9b7c5eb5cbad0ba0cefa3d9496b5efe3
 SHA1 (patch-af) = 2989a1975c8ea435903eafc9add57cb7c4d7de14
-SHA1 (patch-ag) = e2bf14e5858b4273148f1feaf46d5fbb325640a9
 SHA1 (patch-ah) = 6e44407c89edcee59b1f674783544884e96cf101
-SHA1 (patch-ai) = 6299b36119927e87a9a1ea7ef1859ec5f833d0b1
-SHA1 (patch-aj) = 91c1679f8109922c30e4d25fe6f99c856dc6e3d5
-SHA1 (patch-ak) = cabeb3d84102bd8be8c109986f7afb8fc147cd5a
-SHA1 (patch-al) = 1f4353aa56de3bf426c8424bf7b24bbe35e388d4
-SHA1 (patch-am) = 066fc423e4d75ad0d62759b4af2a40f798dfaebf
+SHA1 (patch-al) = af6df0437cdc31dbc66b4590210c72023432cc2f
+SHA1 (patch-am) = 669721695a3983638218267ac59f228cd2a8e93d
diff -r 6c14ce6ff788 -r af9e8a6004e8 lang/python23-pth/patches/patch-aa
--- a/lang/python23-pth/patches/patch-aa        Tue Dec 23 16:46:39 2003 +0000
+++ b/lang/python23-pth/patches/patch-aa        Tue Dec 23 17:24:42 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.3 2003/12/08 21:13:56 recht Exp $
+$NetBSD: patch-aa,v 1.4 2003/12/23 17:24:42 recht Exp $
 
 --- Include/patchlevel.h.orig  2003-10-01 08:47:48.000000000 +0200
 +++ Include/patchlevel.h
@@ -6,8 +6,8 @@
  #define PY_RELEASE_SERIAL     0
  
  /* Version as a string */
--#define PY_VERSION            "2.3.2"
-+#define PY_VERSION            "2p3.2"
+-#define PY_VERSION            "2.3.3"
++#define PY_VERSION            "2p3.3"
  
  /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
     Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */
diff -r 6c14ce6ff788 -r af9e8a6004e8 lang/python23-pth/patches/patch-ac
--- a/lang/python23-pth/patches/patch-ac        Tue Dec 23 16:46:39 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2003/12/08 21:13:56 recht Exp $
-
---- Include/weakrefobject.h.orig       2002-08-12 09:21:58.000000000 +0200
-+++ Include/weakrefobject.h
-@@ -39,6 +39,8 @@ PyAPI_FUNC(PyObject *) PyWeakref_GetObje
- 
- PyAPI_FUNC(long) _PyWeakref_GetWeakrefCount(PyWeakReference *head);
- 
-+PyAPI_FUNC(void) _PyWeakref_ClearRef(PyWeakReference *self);
-+
- #define PyWeakref_GET_OBJECT(ref) (((PyWeakReference *)(ref))->wr_object)
- 
- 
diff -r 6c14ce6ff788 -r af9e8a6004e8 lang/python23-pth/patches/patch-ag
--- a/lang/python23-pth/patches/patch-ag        Tue Dec 23 16:46:39 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-$NetBSD: patch-ag,v 1.2 2003/12/08 21:13:56 recht Exp $
-
---- Lib/test/test_weakref.py.orig      2003-07-14 23:37:17.000000000 +0200
-+++ Lib/test/test_weakref.py
-@@ -299,6 +299,211 @@ class ReferencesTestCase(TestBase):
-             self.fail("exception not properly restored")
- 
- 
-+    def test_callback_in_cycle_1(self):
-+        import gc
-+
-+        class J(object):
-+            pass
-+
-+        class II(object):
-+            def acallback(self, ignore):
-+                self.J
-+
-+        I = II()
-+        I.J = J
-+        I.wr = weakref.ref(J, I.acallback)
-+
-+        # Now J and II are each in a self-cycle (as all new-style class
-+        # objects are, since their __mro__ points back to them).  I holds
-+        # both a weak reference (I.wr) and a strong reference (I.J) to class
-+        # J.  I is also in a cycle (I.wr points to a weakref that references
-+        # I.acallback).  When we del these three, they all become trash, but
-+        # the cycles prevent any of them from getting cleaned up immediately.
-+        # Instead they have to wait for cyclic gc to deduce that they're
-+        # trash.
-+        #
-+        # gc used to call tp_clear on all of them, and the order in which
-+        # it does that is pretty accidental.  The exact order in which we
-+        # built up these things manages to provoke gc into running tp_clear
-+        # in just the right order (I last).  Calling tp_clear on II leaves
-+        # behind an insane class object (its __mro__ becomes NULL).  Calling
-+        # tp_clear on J breaks its self-cycle, but J doesn't get deleted
-+        # just then because of the strong reference from I.J.  Calling
-+        # tp_clear on I starts to clear I's __dict__, and just happens to
-+        # clear I.J first -- I.wr is still intact.  That removes the last
-+        # reference to J, which triggers the weakref callback.  The callback
-+        # tries to do "self.J", and instances of new-style classes look up
-+        # attributes ("J") in the class dict first.  The class (II) wants to
-+        # search II.__mro__, but that's NULL.   The result was a segfault in
-+        # a release build, and an assert failure in a debug build.
-+        del I, J, II
-+        gc.collect()
-+
-+    def test_callback_in_cycle_2(self):
-+        import gc
-+
-+        # This is just like test_callback_in_cycle_1, except that II is an
-+        # old-style class.  The symptom is different then:  an instance of an
-+        # old-style class looks in its own __dict__ first.  'J' happens to
-+        # get cleared from I.__dict__ before 'wr', and 'J' was never in II's
-+        # __dict__, so the attribute isn't found.  The difference is that
-+        # the old-style II doesn't have a NULL __mro__ (it doesn't have any
-+        # __mro__), so no segfault occurs.  Instead it got:
-+        #    test_callback_in_cycle_2 (__main__.ReferencesTestCase) ...
-+        #    Exception exceptions.AttributeError:
-+        #   "II instance has no attribute 'J'" in <bound method II.acallback
-+        #       of <?.II instance at 0x00B9B4B8>> ignored
-+
-+        class J(object):
-+            pass
-+
-+        class II:
-+            def acallback(self, ignore):
-+                self.J
-+
-+        I = II()
-+        I.J = J
-+        I.wr = weakref.ref(J, I.acallback)
-+
-+        del I, J, II
-+        gc.collect()
-+
-+    def test_callback_in_cycle_3(self):
-+        import gc
-+
-+        # This one broke the first patch that fixed the last two.  In this
-+        # case, the objects reachable from the callback aren't also reachable
-+        # from the object (c1) *triggering* the callback:  you can get to
-+        # c1 from c2, but not vice-versa.  The result was that c2's __dict__
-+        # got tp_clear'ed by the time the c2.cb callback got invoked.
-+
-+        class C:
-+            def cb(self, ignore):
-+                self.me
-+                self.c1
-+                self.wr
-+
-+        c1, c2 = C(), C()
-+
-+        c2.me = c2
-+        c2.c1 = c1
-+        c2.wr = weakref.ref(c1, c2.cb)
-+
-+        del c1, c2
-+        gc.collect()
-+
-+    def test_callback_in_cycle_4(self):
-+        import gc
-+
-+        # Like test_callback_in_cycle_3, except c2 and c1 have different
-+        # classes.  c2's class (C) isn't reachable from c1 then, so protecting
-+        # objects reachable from the dying object (c1) isn't enough to stop
-+        # c2's class (C) from getting tp_clear'ed before c2.cb is invoked.
-+        # The result was a segfault (C.__mro__ was NULL when the callback
-+        # tried to look up self.me).
-+
-+        class C(object):
-+            def cb(self, ignore):
-+                self.me
-+                self.c1
-+                self.wr
-+
-+        class D:
-+            pass
-+
-+        c1, c2 = D(), C()
-+
-+        c2.me = c2
-+        c2.c1 = c1
-+        c2.wr = weakref.ref(c1, c2.cb)
-+
-+        del c1, c2, C, D
-+        gc.collect()
-+
-+    def test_callback_in_cycle_resurrection(self):
-+        import gc
-+
-+        # Do something nasty in a weakref callback:  resurrect objects
-+        # from dead cycles.  For this to be attempted, the weakref and
-+        # its callback must also be part of the cyclic trash (else the
-+        # objects reachable via the callback couldn't be in cyclic trash
-+        # to begin with -- the callback would act like an external root).
-+        # But gc clears trash weakrefs with callbacks early now, which
-+        # disables the callbacks, so the callbacks shouldn't get called
-+        # at all (and so nothing actually gets resurrected).
-+
-+        alist = []
-+        class C(object):
-+            def __init__(self, value):
-+                self.attribute = value
-+
-+            def acallback(self, ignore):
-+                alist.append(self.c)
-+
-+        c1, c2 = C(1), C(2)
-+        c1.c = c2
-+        c2.c = c1
-+        c1.wr = weakref.ref(c2, c1.acallback)
-+        c2.wr = weakref.ref(c1, c2.acallback)
-+
-+        def C_went_away(ignore):
-+            alist.append("C went away")
-+        wr = weakref.ref(C, C_went_away)
-+
-+        del c1, c2, C   # make them all trash
-+        self.assertEqual(alist, [])  # del isn't enough to reclaim anything
-+
-+        gc.collect()
-+        # c1.wr and c2.wr were part of the cyclic trash, so should have
-+        # been cleared without their callbacks executing.  OTOH, the weakref
-+        # to C is bound to a function local (wr), and wasn't trash, so that
-+        # callback should have been invoked when C went away.
-+        self.assertEqual(alist, ["C went away"])
-+        # The remaining weakref should be dead now (its callback ran).
-+        self.assertEqual(wr(), None)
-+
-+        del alist[:]
-+        gc.collect()
-+        self.assertEqual(alist, [])
-+
-+    def test_callbacks_on_callback(self):
-+        import gc
-+
-+        # Set up weakref callbacks *on* weakref callbacks.
-+        alist = []
-+        def safe_callback(ignore):
-+            alist.append("safe_callback called")
-+
-+        class C(object):
-+            def cb(self, ignore):
-+                alist.append("cb called")
-+
-+        c, d = C(), C()
-+        c.other = d
-+        d.other = c



Home | Main Index | Thread Index | Old Index