From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_async/
Date: Sat, 5 Jan 2013 03:41:01 +0000 (UTC) [thread overview]
Message-ID: <1357357245.730572c343879be1c96b884c39ebb47b03d7ad70.zmedico@gentoo> (raw)
commit: 730572c343879be1c96b884c39ebb47b03d7ad70
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 5 03:40:45 2013 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jan 5 03:40:45 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=730572c3
SchedulerInterface: use loop for proxied attrs
---
pym/portage/util/_async/SchedulerInterface.py | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/pym/portage/util/_async/SchedulerInterface.py b/pym/portage/util/_async/SchedulerInterface.py
index 731f521..2ab668e 100644
--- a/pym/portage/util/_async/SchedulerInterface.py
+++ b/pym/portage/util/_async/SchedulerInterface.py
@@ -1,4 +1,4 @@
-# Copyright 2012 Gentoo Foundation
+# Copyright 2012-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import gzip
@@ -11,9 +11,12 @@ from ..SlotObject import SlotObject
class SchedulerInterface(SlotObject):
- __slots__ = ("IO_ERR", "IO_HUP", "IO_IN", "IO_NVAL", "IO_OUT", "IO_PRI",
- "child_watch_add", "idle_add", "io_add_watch", "iteration",
- "source_remove", "timeout_add", "_event_loop", "_is_background")
+ _event_loop_attrs = ("IO_ERR", "IO_HUP", "IO_IN",
+ "IO_NVAL", "IO_OUT", "IO_PRI",
+ "child_watch_add", "idle_add", "io_add_watch",
+ "iteration", "source_remove", "timeout_add")
+
+ __slots__ = _event_loop_attrs + ("_event_loop", "_is_background")
def __init__(self, event_loop, is_background=None, **kwargs):
SlotObject.__init__(self, **kwargs)
@@ -21,18 +24,8 @@ class SchedulerInterface(SlotObject):
if is_background is None:
is_background = self._return_false
self._is_background = is_background
- self.IO_ERR = event_loop.IO_ERR
- self.IO_HUP = event_loop.IO_HUP
- self.IO_IN = event_loop.IO_IN
- self.IO_NVAL = event_loop.IO_NVAL
- self.IO_OUT = event_loop.IO_OUT
- self.IO_PRI = event_loop.IO_PRI
- self.child_watch_add = event_loop.child_watch_add
- self.idle_add = event_loop.idle_add
- self.io_add_watch = event_loop.io_add_watch
- self.iteration = event_loop.iteration
- self.source_remove = event_loop.source_remove
- self.timeout_add = event_loop.timeout_add
+ for k in self._event_loop_attrs:
+ setattr(self, k, getattr(event_loop, k))
@staticmethod
def _return_false():
next reply other threads:[~2013-01-05 3:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-05 3:41 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-14 15:37 [gentoo-commits] proj/portage:master commit in: pym/portage/util/_async/ Zac Medico
2018-04-30 6:29 Zac Medico
2018-04-29 22:24 Zac Medico
2018-04-29 6:09 Zac Medico
2018-04-29 4:12 Zac Medico
2018-04-28 23:29 Zac Medico
2018-04-28 23:20 Zac Medico
2018-04-28 23:08 Zac Medico
2018-04-26 9:37 Zac Medico
2018-04-26 8:06 Zac Medico
2018-04-26 5:49 Zac Medico
2018-04-23 1:03 Zac Medico
2018-04-22 17:50 Zac Medico
2018-04-19 6:28 Zac Medico
2017-02-08 9:39 Zac Medico
2013-07-07 2:17 Zac Medico
2013-01-05 15:20 Zac Medico
2012-12-29 7:45 Zac Medico
2012-10-18 1:24 Zac Medico
2012-10-16 6:51 Zac Medico
2012-10-08 13:49 Zac Medico
2012-10-06 1:54 Zac Medico
2012-10-03 18:56 Zac Medico
2012-10-03 18:39 Zac Medico
2012-10-03 17:40 Zac Medico
2012-10-03 10:19 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357357245.730572c343879be1c96b884c39ebb47b03d7ad70.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox