summaryrefslogtreecommitdiffstats
path: root/pym
Commit message (Collapse)AuthorAgeFilesLines
* Move _emerge.SlotObject to portage.util.Zac Medico2012-02-1711-17/+23
|
* SlotObject: validate __slots__ and keyword argsZac Medico2012-02-171-2/+11
|
* Remove redundant inherited __slots__ values.Zac Medico2012-02-172-2/+2
|
* EventLoop: fix _io_handler_class "f" attributeZac Medico2012-02-171-1/+1
|
* portage.package.ebuild.fetch.fetch(): Fix ResourceWarning with Python 3.2.Arfrever Frehtes Taifersar Arahesis2012-02-171-9/+10
|
* EventLoop.iteration: run timeouts lastZac Medico2012-02-171-12/+12
| | | | | Run timeouts last, in order to minimize latency in termination of iteration loops that they may control.
* SubProcess._waitpid_cb: fix args for glib compatZac Medico2012-02-171-1/+1
|
* EventLoop: prune obsolete codeZac Medico2012-02-171-70/+18
|
* EventLoop.iteration: poll for blocking, not sleepZac Medico2012-02-161-2/+5
| | | | | The effect is be mostly the same, but it's more conistent to use _do_poll for all blocking, plus it has EINTR handling.
* EventLoop.child_watch_add: dynamic IO watchZac Medico2012-02-161-10/+22
| | | | | | | | | The IO watch is dynamically registered and unregistered as needed, since we don't want to consider it as a valid source of events when there are no child listeners. It's important to distinguish when there are no valid sources of IO events, in order to avoid an endless poll call if there's no timeout. This fixes possbible endless poll calls since commit 1979a6cdfcd8c6bae4565982d82d862be07ba5be.
* EventLoop: wakeup poll loop to receive sigchildZac Medico2012-02-161-1/+12
| | | | | | TODO: Find out why SIGCHLD signals aren't delivered during poll calls, forcing us to wakeup in order to receive them. This fixes random hangs in poll calls since commit 1979a6cdfcd8c6bae4565982d82d862be07ba5be.
* EventLoop: fix signal race in _sigchld_initZac Medico2012-02-161-1/+1
|
* EventLoop: fix _sigchld_io_cb to return TrueZac Medico2012-02-161-0/+1
| | | | | This fixes an infinite loop since commit 1979a6cdfcd8c6bae4565982d82d862be07ba5be.
* SubProcess: use child_watch_addZac Medico2012-02-161-29/+7
| | | | | This fixes performance issues introduced by commit 9c664779a16f6cbca8a5ffe7f6b0c68572819723.
* EventLoop: implement child_watch_addZac Medico2012-02-163-1/+99
|
* portage.update.fixdbentries(): Fix ResourceWarnings with Python 3.2.Arfrever Frehtes Taifersar Arahesis2012-02-161-2/+3
|
* SubProcess: use non-blocking waitpidZac Medico2012-02-151-12/+27
| | | | | This ensures that the EventLoop will not stop due to a waitpid call blocking forever.
* EventLoop.iteration: sleep if no IO handlersZac Medico2012-02-151-1/+13
| | | | | | | Sleep so that we don't waste cpu time by looping too quickly. This makes EventLoop useful for code that needs to wait for timeout callbacks regardless of whether or not any IO handlers are currently registered.
* EventLoop.timeout_add: fix inverted min intervalZac Medico2012-02-151-1/+1
|
* Comment about _setup_pipes / PyPy GC interaction.Zac Medico2012-02-152-2/+10
|
* SpawnProcess: use os.open for /dev/null inputZac Medico2012-02-151-3/+3
|
* MergeProcess: inherit stdin for use with pdbZac Medico2012-02-151-0/+7
|
* treewalk: handle EAGAIN from listdir for PyPy 1.8Zac Medico2012-02-151-2/+15
|
* get_open_fds: handle EAGAIN for PyPy 1.8Zac Medico2012-02-151-1/+15
|
* Scheduler: PyPy WeakValueDictionary.pop KeyErrorZac Medico2012-02-141-1/+8
| | | | | | | KeyError observed from WeakValueDictionary.pop() with PyPy 1.8, despite None given as default. Note that PyPy 1.8 has the same WeakValueDictionary code as CPython 2.7, so it may be possible for CPython to raise KeyError here as well.
* SpawnProcess: for stdout use os.write, not fdopenZac Medico2012-02-141-6/+5
|
* repoman: fix ebuild.badheader for bug #403705Zac Medico2012-02-141-0/+1
|
* SubProcess._wait: add debug code for bug #403697Zac Medico2012-02-141-0/+6
|
* Assert that fork returns int for bug 403697.Zac Medico2012-02-142-0/+7
| | | | | These cases should have been included with commit 6a94a074aa0475173a51f3f726377d4c407e986b.
* AsynchronousTask: skip cancelled check in _startZac Medico2012-02-142-6/+0
| | | | | These checks should be irrelevant, since the cancel() method is never called on anything that hasn't been started already.
* EventLoop: allow IO event handler re-entranceZac Medico2012-02-141-11/+6
| | | | | | IO event handlers may be re-entrant, in case something like AbstractPollTask._wait_loop(), needs to be called inside a handler for some reason.
* After python fork, don't close fds for PyPy 1.8.Zac Medico2012-02-143-11/+22
| | | | | | | | | | | | | | | | If we close all open file descriptors after a fork, with PyPy 1.8 it triggers "[Errno 9] Bad file descriptor" later in the subprocess. Apparently it is holding references to file descriptors and closing them after they've already been closed and re-opened for other purposes. As a workaround, we don't close the file descriptors, so that they won't be re-used and therefore we won't be vulnerable to this kind of interference. The obvious caveat of not closing the fds is that the subprocess can hold locks that belonged to the parent process, even after the parent process has released the locks. Hopefully this won't be a major problem though, since the subprocess has to exit at release the lock eventually, when the EbuildFetcher or _MergeProcess task is complete.
* EventLoop._do_poll: tweak EINTR handlingZac Medico2012-02-131-13/+14
| | | | | | | Silently handle EINTR, which is normal when we have received a signal such as SIGINT. Also, raise StopIteration in order to break out of our current iteration and respond appropriately to the signal as soon as possible.
* AsynchronousTask: don't wait for exit statusZac Medico2012-02-139-15/+35
| | | | | | Synchronous waiting for status is not supported, since it would be vulnerable to hitting the recursion limit when a large number of tasks need to be terminated simultaneously, like in bug #402335.
* EventLoop: make _poll/_run_timeouts re-entrantZac Medico2012-02-131-62/+73
| | | | | | | This fixes infinite loops triggered by Ctrl-C, where timeout calls would exhaust the poll event queue because _poll was not re-entrant. Now, re-entrance is only prohibited for individual callback functions, in order to protect against infinite recursion.
* Handle missing os.setgroups for PyPy.Zac Medico2012-02-133-2/+21
| | | | See https://bugs.pypy.org/issue833 for details.
* checksum.py: remove PyPy 1.7 workaroundsZac Medico2012-02-131-30/+1
| | | | | | The corresponding hashlib issues are fixed in PyPy 1.8: https://bugs.pypy.org/issue957
* PollScheduler: use idle_add to check terminationZac Medico2012-02-122-22/+41
| | | | | | | | | This fixes a regression in termination signal handling since commit 8c1fcf5a9ba9fa4d406a4d0cc284fe73a84f5a63, which cause termination signals to be ignored until a running job had exited. This regression is not really noticeable for Ctrl-C handling, since in that case the SIGINT propagets to subprocesses, causing them to exit and trigger a _schedule() call whichtriggers a termination check.
* repoman: check for env-update, bug #402339Zac Medico2012-02-121-1/+1
|
* Scheduler: simplify _sched_iface constructionv2.2.0_alpha86Zac Medico2012-02-111-14/+3
|
* EbuildIpcDaemon: handle POLLHUP, bug #401919Zac Medico2012-02-111-0/+24
|
* AbstractPollTask: merge _wait from subclassZac Medico2012-02-112-12/+6
|
* xpak.unpackinfo: validate paths, bug #403149Zac Medico2012-02-111-24/+20
|
* QueueScheduler: tweak run loop logicZac Medico2012-02-111-5/+5
|
* EventLoop.iteration: handle _poll StopIterationZac Medico2012-02-111-1/+7
|
* MetadataRegen: use porttreesZac Medico2012-02-111-1/+4
|
* _emerge.MetadataRegen.MetadataRegen._iter_metadata_processes():Arfrever Frehtes Taifersar Arahesis2012-02-111-21/+23
| | | | Regenerate metadata for given cpv in each repository.
* EventLoop: remove obsolete timeout_add commentZac Medico2012-02-111-7/+0
|
* EventLoop.iteration: run timeouts if no fdsZac Medico2012-02-111-1/+9
|
* PollScheduler: return None from _schedule_tasksZac Medico2012-02-113-15/+12
| | | | The _keep_scheduling() template method is used instead.