pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang - Merge bugfixes from python 2.3 maintenance branch:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0fa1bb10fabd
branches:  trunk
changeset: 475215:0fa1bb10fabd
user:      recht <recht%pkgsrc.org@localhost>
date:      Wed May 12 15:19:49 2004 +0000

description:
- Merge bugfixes from python 2.3 maintenance branch:
  o weakref object's garbage collection problem.
  o save unnecessary startup-time memory allocation of 100KB+ from
    intobject.

via FreeBSD ports

- Enable pkgviews installation.

Bump PKGREVISION for the bugfixes.

diffstat:

 lang/python23-pth/Makefile     |   4 +-
 lang/python23-pth/distinfo     |   4 +-
 lang/python23/Makefile         |   4 +-
 lang/python23/Makefile.common  |   4 +-
 lang/python23/distinfo         |   4 +-
 lang/python23/patches/patch-an |  67 ++++++++++++++++++++++++++++++++++++++++++
 lang/python23/patches/patch-ao |  14 ++++++++
 7 files changed, 94 insertions(+), 7 deletions(-)

diffs (166 lines):

diff -r 292dfce6b5d9 -r 0fa1bb10fabd lang/python23-pth/Makefile
--- a/lang/python23-pth/Makefile        Wed May 12 15:12:51 2004 +0000
+++ b/lang/python23-pth/Makefile        Wed May 12 15:19:49 2004 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2004/04/23 01:25:09 danw Exp $
+# $NetBSD: Makefile,v 1.22 2004/05/12 15:19:49 recht Exp $
 #
 
 PKGNAME=       python23-pth-2.3.3
-PKGREVISION=   3
+PKGREVISION=   4
 
 PTHREAD_OPTS=   require
 .include "../../mk/pthread.buildlink3.mk"
diff -r 292dfce6b5d9 -r 0fa1bb10fabd lang/python23-pth/distinfo
--- a/lang/python23-pth/distinfo        Wed May 12 15:12:51 2004 +0000
+++ b/lang/python23-pth/distinfo        Wed May 12 15:19:49 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2004/04/13 22:48:42 recht Exp $
+$NetBSD: distinfo,v 1.15 2004/05/12 15:19:49 recht Exp $
 
 SHA1 (Python-2.3.3.tgz) = 034d2e3ed011ea753d4fee7efab16e31029b1e5e
 Size (Python-2.3.3.tgz) = 8491380 bytes
@@ -10,4 +10,6 @@
 SHA1 (patch-ah) = 4bc95e775a2b3f4f1997d0779c561db2e9e7b575
 SHA1 (patch-al) = 2dfed1a40493b571e3477cfb56c2d0ed1b1deddf
 SHA1 (patch-am) = eda4c6161b4237e1281cc6b82b26c5195444dcff
+SHA1 (patch-an) = 446f580b7cf2e258b08d08ad00a574d5824dee36
+SHA1 (patch-ao) = e0dc5d7055ae9d52489c0eccc585c7bb170a36f7
 SHA1 (patch-ba) = dd8f89952d7f40c9a979e362758775f093e047bc
diff -r 292dfce6b5d9 -r 0fa1bb10fabd lang/python23/Makefile
--- a/lang/python23/Makefile    Wed May 12 15:12:51 2004 +0000
+++ b/lang/python23/Makefile    Wed May 12 15:19:49 2004 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2004/03/26 02:27:42 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2004/05/12 15:19:49 recht Exp $
 #
 
 PKGNAME=       python23-2.3.3
-PKGREVISION=   2
+PKGREVISION=   3
 
 CONFIGURE_ARGS+=       --without-threads
 
diff -r 292dfce6b5d9 -r 0fa1bb10fabd lang/python23/Makefile.common
--- a/lang/python23/Makefile.common     Wed May 12 15:12:51 2004 +0000
+++ b/lang/python23/Makefile.common     Wed May 12 15:19:49 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.8 2004/04/13 22:48:41 recht Exp $
+# $NetBSD: Makefile.common,v 1.9 2004/05/12 15:19:49 recht Exp $
 #
 
 DISTNAME=      Python-2.3.3
@@ -10,6 +10,8 @@
 HOMEPAGE=      http://www.python.org/
 COMMENT=       Interpreted, interactive, object-oriented programming language
 
+PKG_INSTALLATION_TYPES=        overwrite pkgviews
+
 USE_LANGUAGES=         c c++
 USE_GCC_SHLIB=         yes
 USE_BUILDLINK3=                yes
diff -r 292dfce6b5d9 -r 0fa1bb10fabd lang/python23/distinfo
--- a/lang/python23/distinfo    Wed May 12 15:12:51 2004 +0000
+++ b/lang/python23/distinfo    Wed May 12 15:19:49 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2004/04/13 22:48:41 recht Exp $
+$NetBSD: distinfo,v 1.16 2004/05/12 15:19:49 recht Exp $
 
 SHA1 (Python-2.3.3.tgz) = 034d2e3ed011ea753d4fee7efab16e31029b1e5e
 Size (Python-2.3.3.tgz) = 8491380 bytes
@@ -10,3 +10,5 @@
 SHA1 (patch-ah) = 4bc95e775a2b3f4f1997d0779c561db2e9e7b575
 SHA1 (patch-al) = 30941bb705d216d40d1bbdbaf68d6fb2a4714bd2
 SHA1 (patch-am) = df5c858b32a9a5aa118c84f6742f9d3547c0c7f3
+SHA1 (patch-an) = 446f580b7cf2e258b08d08ad00a574d5824dee36
+SHA1 (patch-ao) = e0dc5d7055ae9d52489c0eccc585c7bb170a36f7
diff -r 292dfce6b5d9 -r 0fa1bb10fabd lang/python23/patches/patch-an
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python23/patches/patch-an    Wed May 12 15:19:49 2004 +0000
@@ -0,0 +1,67 @@
+$NetBSD: patch-an,v 1.1 2004/05/12 15:19:49 recht Exp $
+
+diff -u python/dist/src/Objects/weakrefobject.c:1.13.6.1 python/dist/src/Objects/weakrefobject.c:1.13.6.3
+--- Objects/weakrefobject.c:1.13.6.1   Thu Nov 20 14:13:51 2003
++++ Objects/weakrefobject.c    Wed Feb  4 15:13:43 2004
+@@ -624,20 +624,29 @@
+     }
+     list = GET_WEAKREFS_LISTPTR(ob);
+     get_basic_refs(*list, &ref, &proxy);
+-    if (callback == NULL || callback == Py_None)
++    if (callback == Py_None)
++        callback = NULL;
++    if (callback == NULL)
+         /* return existing weak reference if it exists */
+         result = ref;
+     if (result != NULL)
+-        Py_XINCREF(result);
++        Py_INCREF(result);
+     else {
++        /* Note: new_weakref() can trigger cyclic GC, so the weakref
++           list on ob can be mutated.  This means that the ref and
++           proxy pointers we got back earlier may have been collected,
++           so we need to compute these values again before we use
++           them. */
+         result = new_weakref(ob, callback);
+         if (result != NULL) {
+             if (callback == NULL) {
+                 insert_head(result, list);
+             }
+             else {
+-                PyWeakReference *prev = (proxy == NULL) ? ref : proxy;
++                PyWeakReference *prev;
+ 
++                get_basic_refs(*list, &ref, &proxy);
++                prev = (proxy == NULL) ? ref : proxy;
+                 if (prev == NULL)
+                     insert_head(result, list);
+                 else
+@@ -664,12 +673,19 @@
+     }
+     list = GET_WEAKREFS_LISTPTR(ob);
+     get_basic_refs(*list, &ref, &proxy);
++    if (callback == Py_None)
++        callback = NULL;
+     if (callback == NULL)
+         /* attempt to return an existing weak reference if it exists */
+         result = proxy;
+     if (result != NULL)
+-        Py_XINCREF(result);
++        Py_INCREF(result);
+     else {
++        /* Note: new_weakref() can trigger cyclic GC, so the weakref
++           list on ob can be mutated.  This means that the ref and
++           proxy pointers we got back earlier may have been collected,
++           so we need to compute these values again before we use
++           them. */
+         result = new_weakref(ob, callback);
+         if (result != NULL) {
+             PyWeakReference *prev;
+@@ -678,6 +694,7 @@
+                 result->ob_type = &_PyWeakref_CallableProxyType;
+             else
+                 result->ob_type = &_PyWeakref_ProxyType;
++            get_basic_refs(*list, &ref, &proxy);
+             if (callback == NULL)
+                 prev = ref;
+             else
diff -r 292dfce6b5d9 -r 0fa1bb10fabd lang/python23/patches/patch-ao
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python23/patches/patch-ao    Wed May 12 15:19:49 2004 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ao,v 1.1 2004/05/12 15:19:49 recht Exp $
+
+diff -u python/dist/src/Objects/intobject.c:2.105 python/dist/src/Objects/intobject.c:2.105.8.1
+--- Objects/intobject.c:2.105  Sat Jun 28 13:04:24 2003
++++ Objects/intobject.c        Sun Feb  8 10:56:07 2004
+@@ -1080,7 +1080,7 @@
+       int ival;
+ #if NSMALLNEGINTS + NSMALLPOSINTS > 0
+       for (ival = -NSMALLNEGINTS; ival < NSMALLPOSINTS; ival++) {
+-              if ((free_list = fill_free_list()) == NULL)
++              if (!free_list && (free_list = fill_free_list()) == NULL)
+                       return 0;
+               /* PyObject_New is inlined */
+               v = free_list;



Home | Main Index | Thread Index | Old Index