summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2011-12-14 10:31:39 +0000
committerBrian Harring <ferringb@gentoo.org>2011-12-14 10:31:39 +0000
commita84b9047feabab3e8bfedc3ebe33004d1246c806 (patch)
tree6abd1f3fd4a103c8e0f097c2d7cf9322b2404a85 /dev-python/snakeoil
parentFix stable ebuild as well. (diff)
downloadhistorical-a84b9047feabab3e8bfedc3ebe33004d1246c806.tar.gz
historical-a84b9047feabab3e8bfedc3ebe33004d1246c806.tar.bz2
historical-a84b9047feabab3e8bfedc3ebe33004d1246c806.zip
pull in 0.4.6; clean out old version in the process
Package-Manager: portage-2.1.10.39/cvs/Linux x86_64
Diffstat (limited to 'dev-python/snakeoil')
-rw-r--r--dev-python/snakeoil/ChangeLog8
-rw-r--r--dev-python/snakeoil/files/snakeoil-0.4.4-atexit-weakref.patch93
-rw-r--r--dev-python/snakeoil/snakeoil-0.4.6.ebuild (renamed from dev-python/snakeoil/snakeoil-0.4.4-r1.ebuild)11
3 files changed, 9 insertions, 103 deletions
diff --git a/dev-python/snakeoil/ChangeLog b/dev-python/snakeoil/ChangeLog
index 1fda1783baf1..c6d3592e06cb 100644
--- a/dev-python/snakeoil/ChangeLog
+++ b/dev-python/snakeoil/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/snakeoil
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/ChangeLog,v 1.49 2011/11/30 22:53:11 ferringb Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/ChangeLog,v 1.50 2011/12/14 10:31:38 ferringb Exp $
+
+*snakeoil-0.4.6 (14 Dec 2011)
+
+ 14 Dec 2011; Brian Harring <ferringb@gentoo.org> -snakeoil-0.4.4-r1.ebuild,
+ -files/snakeoil-0.4.4-atexit-weakref.patch, +snakeoil-0.4.6.ebuild:
+ Pull in 0.4.6; punt old version in the process
*snakeoil-0.4.5 (30 Nov 2011)
diff --git a/dev-python/snakeoil/files/snakeoil-0.4.4-atexit-weakref.patch b/dev-python/snakeoil/files/snakeoil-0.4.4-atexit-weakref.patch
deleted file mode 100644
index 1ca7ca102c98..000000000000
--- a/dev-python/snakeoil/files/snakeoil-0.4.4-atexit-weakref.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 2ad8113511381ae502a000809700cb672c073f92 Mon Sep 17 00:00:00 2001
-From: Brian Harring <ferringb@gmail.com>
-Date: Fri, 11 Nov 2011 02:04:43 -0800
-Subject: [PATCH] WeakRefFinalizer: use atexit to cleanup any strongly
- referenced instances at sys.exit
-
----
- NEWS | 4 ++++
- snakeoil/weakrefs.py | 23 ++++++++++++++++++++---
- 2 files changed, 24 insertions(+), 3 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index 04015ee..4fbfb0e 100644
---- a/NEWS
-+++ b/NEWS
-@@ -2,6 +2,10 @@ Snakeoil Release Notes
- ======================
-
-
-+* Fix WeakRefFinalizer so that instances that are still strongly referenced
-+ at the time of sys.exit have their finalizers ran via atexit.
-+
-+
- snakeoil 0.4.4: Oct 26th, 2011
-
- * use sane permissions for directories created for tests.
-diff --git a/snakeoil/weakrefs.py b/snakeoil/weakrefs.py
-index 1a25a9c..272b4d3 100644
---- a/snakeoil/weakrefs.py
-+++ b/snakeoil/weakrefs.py
-@@ -10,13 +10,15 @@ __all__ = ("WeakValCache", "WeakRefFinalizer")
- # Unused import
- # pylint: disable-msg=W0611
-
-+import atexit
-+
- try:
- # No name in module
- # pylint: disable-msg=E0611
- from snakeoil._caching import WeakValCache
-- from weakref import ref
-+ from weakref import ref, WeakKeyDictionary
- except ImportError:
-- from weakref import WeakValueDictionary as WeakValCache, ref
-+ from weakref import WeakValueDictionary as WeakValCache, ref, WeakKeyDictionary
-
- from snakeoil.obj import make_kls, BaseDelayedObject
- from snakeoil.currying import partial
-@@ -38,7 +40,6 @@ class WeakRefProxy(BaseDelayedObject):
- obj.__enable_finalization__(weakref)
- return obj
-
--
- def __enable_finalization__(self, weakref):
- # note we directly access the class, to ensure the instance hasn't overshadowed.
- self.__class__.__finalizer_weakrefs__[id(self)] = weakref
-@@ -116,6 +117,9 @@ class WeakRefFinalizer(type):
- >>> del obj
- finalization invoked: bar
- """
-+
-+ __known_classes__ = WeakKeyDictionary()
-+
- def __new__(cls, name, bases, d):
- if '__del__' in d:
- d['__finalizer__'] = d.pop("__del__")
-@@ -137,6 +141,7 @@ class WeakRefFinalizer(type):
- new_cls = super(WeakRefFinalizer, cls).__new__(cls, name, bases, d)
- new_cls.__proxy_class__ = partial(make_kls(new_cls, WeakRefProxy), cls, lambda x:x)
- new_cls.__proxy_class__.__name__ = name
-+ cls.__known_classes__[new_cls] = True
- return new_cls
-
- def __call__(cls, *a, **kw):
-@@ -146,3 +151,15 @@ class WeakRefFinalizer(type):
- # weakref registration
- getattr(proxy, '__finalizer__')
- return proxy
-+
-+ @classmethod
-+ def _atexit_cleanup(cls):
-+ # cleanup any instances strongly referenced at the time of sys.exit
-+ target_classes = cls.__known_classes__.keys()
-+ for target_cls in target_classes:
-+ for target_ref in target_cls.__finalizer_weakrefs__.values():
-+ obj = target_ref()
-+ if obj is not None:
-+ obj.__finalizer__()
-+
-+atexit.register(WeakRefFinalizer._atexit_cleanup)
---
-1.7.8.rc1
-
diff --git a/dev-python/snakeoil/snakeoil-0.4.4-r1.ebuild b/dev-python/snakeoil/snakeoil-0.4.6.ebuild
index cabbd5622b69..67c4f161705b 100644
--- a/dev-python/snakeoil/snakeoil-0.4.4-r1.ebuild
+++ b/dev-python/snakeoil/snakeoil-0.4.6.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/snakeoil-0.4.4-r1.ebuild,v 1.1 2011/11/11 10:41:38 ferringb Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/snakeoil-0.4.6.ebuild,v 1.1 2011/12/14 10:31:38 ferringb Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
-inherit distutils eutils
+inherit distutils
DESCRIPTION="Miscellaneous python utility code."
HOMEPAGE="http://snakeoil.googlecode.com/"
@@ -16,15 +16,8 @@ SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE=""
-DEPEND="!<sys-apps/pkgcore-0.4.7.8"
-RDEPEND=${DEPEND}
-
DOCS="AUTHORS NEWS"
-src_prepare() {
- epatch "$FILESDIR/"${PN}-${PV}-atexit-weakref.patch
-}
-
pkg_setup() {
# disable snakeoil 2to3 caching
unset PY2TO3_CACHEDIR