Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | SF patch 1631942 by Collin Winter: | Guido van Rossum | 2007-01-10 | 1 | -5/+5 | |
| | | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block | |||||
* | Get rid of dict.has_key(). Boy this has a lot of repercussions! | Guido van Rossum | 2006-08-18 | 1 | -1/+1 | |
| | | | | | | Not all code has been fixed yet; this is just a checkpoint... The C API still has PyDict_HasKey() and _HasKeyString(); not sure if I want to change those just yet. | |||||
* | No need to import exceptions, they are builtins | Neal Norwitz | 2005-09-01 | 1 | -2/+1 | |
| | ||||||
* | [Bug #1011606] Only check file descriptors for exceptional conditions if the ↵ | Andrew M. Kuchling | 2004-09-01 | 1 | -4/+10 | |
| | | | | fd is readable or writable | |||||
* | Back out patch #982681 | Andrew M. Kuchling | 2004-08-13 | 1 | -8/+2 | |
| | ||||||
* | Whitespace normalization, via reindent.py. | Tim Peters | 2004-07-18 | 1 | -2/+2 | |
| | ||||||
* | [Patch #982681] Apply this patch correctly; makes set_reuse_addr() work on ↵ | Andrew M. Kuchling | 2004-07-15 | 1 | -3/+9 | |
| | | | | Windows | |||||
* | In poll(), check connections for exceptional conditions | Andrew M. Kuchling | 2004-07-10 | 1 | -0/+15 | |
| | ||||||
* | Return value from .close(); move .set_file up | Andrew M. Kuchling | 2004-07-10 | 1 | -2/+2 | |
| | ||||||
* | Whitespace normalization. | Tim Peters | 2004-07-07 | 1 | -4/+3 | |
| | ||||||
* | For readable() objects, the previous value of 'flags' was ignored. | Andrew M. Kuchling | 2004-07-07 | 1 | -2/+2 | |
| | | | | Rearrange code for writable() case to make the parallel logic clearer | |||||
* | Check in the updated version of patch #957240, which doesn't rely | Michael W. Hudson | 2004-06-30 | 1 | -3/+10 | |
| | | | | on the marshalling characteristics of infinities. | |||||
* | Back out #957240. | Martin v. Löwis | 2004-06-14 | 1 | -3/+2 | |
| | ||||||
* | Patch #957240: Add count parameter to asyncore.loop. | Martin v. Löwis | 2004-06-03 | 1 | -2/+3 | |
| | ||||||
* | [Part of patch #909005] Added map parameter for file_dispatcher and ↵ | Andrew M. Kuchling | 2004-03-21 | 1 | -4/+4 | |
| | | | | dispatcher_with_send | |||||
* | [Part of patch #909005] Repeating exception changed from 'raise ↵ | Andrew M. Kuchling | 2004-03-21 | 1 | -5/+5 | |
| | | | | socket.error, why' to just raise. Make use of connect_ex() raise socket.error with 2-tuple instead of just error code | |||||
* | [Part of patch #909005] Remove Mac code for writable | Andrew M. Kuchling | 2004-03-21 | 1 | -8/+2 | |
| | ||||||
* | [Part of patch #909005] Set initial poll flags | Andrew M. Kuchling | 2004-03-21 | 1 | -2/+2 | |
| | ||||||
* | [Part of patch #909005] Use True/False | Andrew M. Kuchling | 2004-03-21 | 1 | -13/+13 | |
| | ||||||
* | [Part of patch #909005] Handle POLLPRI flag, and various errors cases. ↵ | Andrew M. Kuchling | 2004-03-21 | 1 | -1/+3 | |
| | | | | Fixes bug #887279 | |||||
* | SF bug #892492: Multiple close() for asyncore.dispatcher. | Raymond Hettinger | 2004-02-08 | 1 | -0/+1 | |
| | | | | | | (Contributed by Alexey Klimkin.) Don't keep the file descriptor after the channel is deleted. | |||||
* | [Part of patch #648322] Delete the poll2() function, which uses a 'poll' ↵ | Andrew M. Kuchling | 2003-10-22 | 1 | -29/+4 | |
| | | | | extension module that was once part of Medusa. Contributed by Kjetil Jacobsen | |||||
* | [Bug #758241] When you use asyncore with a non-default map, methods | Andrew M. Kuchling | 2003-10-22 | 1 | -2/+7 | |
| | | | | | | | | | | | of the dispatcher object break. e.g. if you close() the object, it tries to remove itself from the default map, not from the map the dispatcher was created with. The patch, from Stephane Ninin, records the map as an attribute of the dispatcher instance. 2.3 bugfix candidate. | |||||
* | Fix a bunch of typos in documentation, docstrings and comments. | Walter Dörwald | 2003-10-20 | 1 | -1/+1 | |
| | | | | (From SF patch #810751) | |||||
* | Fix comment typo | Andrew M. Kuchling | 2003-02-14 | 1 | -1/+1 | |
| | ||||||
* | Add XXX about Winsock error values | Guido van Rossum | 2002-12-26 | 1 | -0/+1 | |
| | ||||||
* | Fix an old bug in poll(). When a signal is handled while we're | Guido van Rossum | 2002-11-05 | 1 | -0/+2 | |
| | | | | | | | | | | | | blocked in select(), this will raise select.error with errno set to EINTR. The except clauses correctly ignores this error, but the rest of the logic will then call read() for all objects in select's *input* list of read file descriptors. Then when an object's read_handler() is naive, it will call recv() on its socket, which will raise an IOError, and then asyncore decides to close the socket. To fix this, we simply return in this case. Backport candidate. | |||||
* | Again, I did check in too many changes. Sorry. | Thomas Heller | 2002-09-26 | 1 | -1/+1 | |
| | ||||||
* | On Windows, select() does not accept empty lists. | Thomas Heller | 2002-09-24 | 1 | -5/+9 | |
| | | | | | | Patch suggested by Guido, fixes SF item 611464. Bugfix candidate, will backport to release22-maint myself. | |||||
* | Fiddle with compact_traceback(). | Guido van Rossum | 2002-09-13 | 1 | -7/+6 | |
| | | | | More whitespace cleanup. | |||||
* | I don't think it's safe to use map.iteritems() in the various poll | Guido van Rossum | 2002-09-12 | 1 | -103/+107 | |
| | | | | | | | | | | | | | | routines. I got some errors "dictionary changed size during iteration" when running ZEO tests on machine while doing heavy forground work in another window, and thinking about it, I believe that it should be okay if readable() or writable() modifies the map. I also finally made all the spacing conform to the Python style guide: no space between a function/method name and the following left parenthesis (fixed lots of occurrences), spaces around assignment operators (fixed a few, always of the form "map=..."), and a blank line between the class statement and the first method definition (a few). | |||||
* | A little refactoring. | Jeremy Hylton | 2002-09-08 | 1 | -60/+46 | |
| | | | | | | | | | | | | Add read(), write(), and readwrite() helper functions to shorten poll functions. Use get() instead of try/except KeyError for lookup. XXX How could the lookup ever fail? Remove module-level DEBUG flag. Use iteritems() instead of items() when walking the socket map. Reformat the functions I touched so that are consistently Pythonic. | |||||
* | Convert a pile of obvious "yes/no" functions to return bool. | Tim Peters | 2002-04-04 | 1 | -2/+2 | |
| | ||||||
* | Replace use of apply() with extended call syntax. | Jeremy Hylton | 2002-04-04 | 1 | -2/+3 | |
| | ||||||
* | Remove duplicate "import os" | Neal Norwitz | 2002-03-14 | 1 | -1/+0 | |
| | ||||||
* | [Bug #517554] When a signal happens during the select call in | Andrew M. Kuchling | 2002-03-08 | 1 | -0/+1 | |
| | | | | | | | | | asyncore.poll, the select fails with EINTR, which the code catches. However, the code fails to clear the r/w/e arrays (like poll3 does), which means it acts as if every descriptor had received all possible events. Bug report and patch by Cesar Eduardo Barros | |||||
* | Partial fix for problem in SF buf #487458 | Jeremy Hylton | 2001-12-14 | 1 | -1/+7 | |
| | | | | | | | | | | | | | | | | | | Rev 1.20 introduced a call to getpeername() in the dispatcher constructor. This only works for a connected socket. Apparently earlier versions of the code worked with un-connected sockets, e.g. a listening socket. It's not clear that the code is supposed to accept these sockets, because it sets self.connected = 1 when passed a socket. But it's also not clear that it should be a fatal error to pass a listening socket. The solution, for now, is to put a try/except around the getpeername() call and continue if it fails. The self.addr attribute is used primarily (only?) to produce a nice repr for the object, so it hardly matters. If there is a real error on a connected socket, it's likely that subsequent calls will fail too. | |||||
* | /F observes that we need an else: in connect() | Jeremy Hylton | 2001-10-30 | 1 | -1/+2 | |
| | ||||||
* | Use connect_ex() instead of connect(). | Jeremy Hylton | 2001-10-29 | 1 | -12/+9 | |
| | | | | Removes old XXX comment and possible source of long-delays. | |||||
* | Fix for SF bug 453099 -- select not defensive | Jeremy Hylton | 2001-10-29 | 1 | -5/+16 | |
| | | | | | | | | | | And SF patch 473223 -- infinite getattr loop Wrap select() and poll() calls with try/except for EINTR. If EINTR is raised, treat as a response where no fd is ready. In dispatcher constructor, make sure self.socket is always initialized. | |||||
* | Reindent __repr__. | Martin v. Löwis | 2001-10-18 | 1 | -11/+11 | |
| | ||||||
* | Patch #470744: Simplify __repr__ error handling. | Martin v. Löwis | 2001-10-18 | 1 | -16/+4 | |
| | ||||||
* | Correct __repr__: include module name, avoid extra space for empty status, | Martin v. Löwis | 2001-10-12 | 1 | -3/+2 | |
| | | | | use 0x format for id. Proposed by Cesar Eduardo Barros in patch #470680. | |||||
* | Patch #468647: Fix exception propagation in asyncore. | Martin v. Löwis | 2001-10-09 | 1 | -34/+38 | |
| | ||||||
* | Set .addr in a few more places (patch approved by Sam Rushing) | Andrew M. Kuchling | 2001-10-03 | 1 | -0/+2 | |
| | ||||||
* | Patch #461321: Support None as a timeout in poll2 and poll3. | Martin v. Löwis | 2001-09-19 | 1 | -4/+6 | |
| | ||||||
* | Patch #460554: Properly test for tuples. | Martin v. Löwis | 2001-09-11 | 1 | -1/+1 | |
| | ||||||
* | Whitespace normalization. | Tim Peters | 2001-08-20 | 1 | -1/+1 | |
| | ||||||
* | Remove redundant assignment l = [] from poll3() -- copy-and-paste | Guido van Rossum | 2001-08-13 | 1 | -1/+0 | |
| | | | | error. | |||||
* | Remove hard-coded NT constants that are already defined in errno on NT. | Jeremy Hylton | 2001-08-10 | 1 | -11/+5 | |
| | | | | | Wrap some long lines. Remove unnecessary tuple unpack. |