[issue14386] Expose dictproxy as a public type

2012-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14386 ___ ___ Python

[issue13749] socketserver can't stop

2012-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13749 ___ ___ Python

[issue5824] SocketServer.DatagramRequestHandler Broken under Linux

2012-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5824 ___ ___ Python-bugs

[issue1767511] SocketServer.DatagramRequestHandler

2012-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1767511 ___ ___ Python

[issue12184] socketserver.ForkingMixin collect_children routine needs to collect only it's children

2012-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12184 ___ ___ Python

[issue10340] asyncore doesn't properly handle EINVAL on OSX

2012-03-23 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Sorry about that. It should now be fixed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10340

[issue10340] asyncore doesn't properly handle EINVAL on OSX

2012-03-23 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: http://hg.python.org/cpython/rev/0b960e41e533 Let's see how it goes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10340

[issue13325] no address in the representation of asyncore dispatcher after connection established

2012-03-22 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Closing as duplicate of issue 13694. -- resolution: - duplicate status: open - closed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13325

[issue10340] asyncore doesn't properly handle EINVAL on OSX

2012-03-22 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola priority: high - normal resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue14302] Move python.exe to bin/

2012-03-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14302 ___ ___ Python

[issue14370] list.extend() called on an iterator of the list itself leads to an infinite loop

2012-03-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14370 ___ ___ Python

[issue13694] asynchronous connect in asyncore.dispatcher does not set addr

2012-03-20 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Done. Sorry for the delay. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13694

[issue14375] Add socketserver.running property

2012-03-20 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: Patch in attachment adds a running property to figure out whether the server is running or not. Also it raises an exception in case the server has already been started or stopped. IMO such an event should be prevented beforehand

[issue14375] Add socketserver running property

2012-03-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- title: Add socketserver.running property - Add socketserver running property ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14375

[issue14375] Add socketserver running property

2012-03-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- keywords: +needs review -patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14375

[issue11273] asyncore creates selec (or poll) on every iteration

2012-03-20 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: I agree it would be great to do this, in fact I'm using a modified version of asyncore supporting register(), unregister() and modify() methods for file descriptors, and the performance benefits are enormous. On the other hand

[issue14373] C implementation of functools.lru_cache

2012-03-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python

[issue14320] set.add can return boolean indicate newly added item

2012-03-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14320 ___ ___ Python

[issue14307] Make subclassing SocketServer simpler for non-blocking frameworks

2012-03-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14307 ___ ___ Python

[issue14309] Deprecate time.clock()

2012-03-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14309 ___ ___ Python

[issue14295] PEP 417: adding mock module

2012-03-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14295 ___ ___ Python

[issue14310] Socket duplication for windows

2012-03-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14310 ___ ___ Python

[issue14139] test_ftplib: segfault

2012-03-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14139 ___ ___ Python

[issue13248] deprecated in 3.2, should be removed in 3.3

2012-03-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python

[issue14170] print unicode string error in win8 cmd console

2012-03-02 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14170 ___ ___ Python

[issue12655] Expose sched.h functions

2012-02-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12655 ___ ___ Python

[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2012-02-13 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13997 ___ ___ Python

[issue13972] set and frozenset constructors don't accept multiple iterables

2012-02-09 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13972 ___ ___ Python

[issue13968] Add a recursive function to the glob package

2012-02-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13968 ___ ___ Python

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-02-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13742 ___ ___ Python

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-06 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: No problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13928 ___ ___ Python-bugs

[issue13578] Add subprocess.iter_output() convenience function

2012-02-06 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: This biggest challenge I have noticed so far in exploring this is how to handle timeouts on Windows I haven't actually looked into it but this somewhat recalls: http://bugs.python.org/issue1191964 Since issue1191964 is supposed

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: i can't understand this, does it means that one may use self.connect() in handle_write()? Nope. When handle_write() is called you are supposed to be *already* connected, hence there's no point in calling connect() again

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-03 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: why is a not connected connection writable? A non connected socket must be writable in order to connect. if we call dispatcher.connect() immediately after .connect(), socket error 10057 may be raised, Not sure what you mean here

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903 ___ ___ Python

[issue13846] Add time.monotonic() function

2012-01-24 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13846 ___ ___ Python

[issue13609] Add os.get_terminal_size() function

2012-01-21 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: read environment varaiables [...] and raise an error if the size cannot be read (so no need of default values). The os module is written as a thin wrapper between Python and the OS. A more high level function (read environment

[issue13822] is(upper/lower/title) are not exactly correct

2012-01-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13822 ___ ___ Python

[issue13752] add a str.casefold() method

2012-01-19 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13752 ___ ___ Python

[issue13761] Add flush keyword to print()

2012-01-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13761 ___ ___ Python

[issue13724] socket.create_connection and multiple IP addresses

2012-01-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13724 ___ ___ Python

[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: It seems expected behavior to me, and the same issue should apply to all other network libs as well. What would you expect ftplib to do in such case? -- nosy: +giampaolo.rodola ___ Python

[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: What storbinary does is just using a socket to send data. There's no way for storbinary to ask the socket whether an unpredicted event such as an IP change occurred and neither it should. As a user, you just shouldn't change the IP

[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Since you say the connection hangs I think you can set a timeout: ftp = ftplib.FTP(..., timeout=30) That is applied to both control and data connection (and hence storbinary). This way you should get a socket.timeout exception after 30

[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Python can't do that. It's a socket implementation detail. Python just exposes the underlying socket implementation as-is. I'm closing this out as rejected. -- assignee: - giampaolo.rodola resolution: - rejected status: open

[issue13694] asynchronous connect in asyncore.dispatcher does not set addr

2012-01-02 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: I'm not sure how useful this is as addr will be set later, when connection is established. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13694

[issue13609] Add os.get_terminal_size() function

2012-01-02 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: What I would do: - build the namedtuple in Python rather than in C - I don't particularly like CamelCased names for nametuples (I would use size instead of TerminalSize) - on UNIX, the ioctl() stuff can be done in python rather than in C

[issue8684] improvements to sched.py

2011-12-19 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: This should now be fixed. Thanks for signaling. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684

[issue13609] Add os.get_terminal_size() function

2011-12-16 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: http://bugs.python.org/file23241/patch1.1.diff This looks like something which would fit better into shutil module rather than os. Also, the Windows implementation should not rely on ctypes. -- nosy: +giampaolo.rodola

[issue13041] argparse: terminal width is not detected properly

2011-12-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- dependencies: +Add os.get_terminal_size() function versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13041

[issue13609] Add os.get_terminal_size() function

2011-12-16 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Plus, you should provide also heigth, not only width, possibly as a namedtuple: import shutil shutil.get_terminal_size() size(width=80, heigth=170) -- ___ Python tracker rep

[issue12809] Missing new setsockopts in Linux (eg: IP_TRANSPARENT)

2011-12-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12809 ___ ___ Python

[issue13229] Improve tools for iterating over filesystem directories

2011-12-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python

[issue13609] Add os.get_terminal_size() function

2011-12-16 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: The docstring for shutil says: Utility functions for copying and archiving files and directory trees. So it doesn't seem to fit at all. Well... shutil should stand for shell utilities and it already contains stuff which is not strictly

[issue5131] pprint doesn't know how to print a defaultdict

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5131 ___ ___ Python-bugs

[issue7434] general pprint rewrite

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7434 ___ ___ Python-bugs

[issue6743] Add function compatible with print to pprint module

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6743 ___ ___ Python-bugs

[issue13004] pprint: add option to truncate sequences

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13004 ___ ___ Python

[issue10592] pprint module doesn't work well with OrderedDicts

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10592 ___ ___ Python

[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10017 ___ ___ Python

[issue8684] improvements to sched.py

2011-12-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684

[issue13449] sched - provide an async argument for run() method

2011-12-14 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: What about run(nowait=...) or run(only_ready=...)? Doing this as a separate method seems unnecessarily complicated to me in terms of implementation (move run logic into _run, add run and run_nowait, etc...). Most importantly, the user

[issue13449] sched - provide an async argument for run() method

2011-12-14 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: blocking seems the most explicit to me. With this, we can also fix issue1641 by providing a specific section into asyncore doc which explains how to use asyncore in conjunction with sched

[issue1641] asyncore delayed calls feature

2011-12-14 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: With issue13449 fixed I think we can now provide this functionnality by adding a specific section into asyncore doc which explains how to use asyncore in conjunction with sched module. As such, asyncore.py itself won't need any change

[issue13449] sched - provide an async argument for run() method

2011-12-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449

[issue13449] sched - provide an async argument for run() method

2011-12-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +josiah.carlson, josiahcarlson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449

[issue1641] asyncore delayed calls feature

2011-12-14 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Now that I think of it maybe some kind of wrapper would still be necessary. As of right now, we'd do something like this. At the core we would have: import asyncore, asynchat, sched # global scheduler = sched.scheduler() while 1

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-12-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12082 ___ ___ Python

[issue8684] improvements to sched.py

2011-12-12 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Are you suggesting to enable thread-synchronization by default and get rid of explicit synchronized argument? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684

[issue8684] improvements to sched.py

2011-12-12 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: This is what I get by using bench.py script attached to issue13451: CURRENT VERSION (NO LOCK) test_cancel: time=0.67457 : calls=1 : stdev=0.0 test_empty : time=0.00025 : calls=1 : stdev=0.0

[issue8684] improvements to sched.py

2011-12-12 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: New patch in attachment. I'll commit it later today. -- nosy: +rhettinger Added file: http://bugs.python.org/file23925/sched-thread-safe.patch ___ Python tracker rep...@bugs.python.org http

[issue13451] sched.py: speedup cancel() method

2011-12-12 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Thread locks introduced in issue8684 should make this change more robust. If this patch is reasonable, I'd like to commit it before the one in issue8684 for simplicity. Raymond? -- ___ Python

[issue13585] Add contextlib.CleanupManager

2011-12-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python

[issue11647] function decorated with a context manager can only be invoked once

2011-12-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11647 ___ ___ Python

[issue13563] Make use of with statement in ftplib

2011-12-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: That's why I nosyed you. Thanks. ;) -- assignee: - giampaolo.rodola components: +Library (Lib) keywords: +easy -patch resolution: - fixed status: open - closed ___ Python tracker rep

[issue8684] improvements to sched.py

2011-12-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Updated patch adding a synchronized argument to scheduler class and updating doc is in attachment. -- Added file: http://bugs.python.org/file23903/sched-thread-safe.patch ___ Python tracker rep

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: This is not possible for two reasons: - on most POSIX systems, sendfile() works with mmap-like (regular) files only, while HTTPConnection.send() accepts any file-like object as long as it provides a read() method - after read()ing

[issue13563] Make use of with statement in ftplib

2011-12-08 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: Patch in attachment. -- files: ftplib.patch keywords: patch messages: 149074 nosy: giampaolo.rodola, pitrou priority: normal severity: normal status: open title: Make use of with statement in ftplib versions: Python 3.3 Added

[issue13564] ftplib and sendfile()

2011-12-08 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: In attachment. This is actually just an excuse to store the patch somewhere and possibly collect opinions as I don't really think this should go in because: - it's UNIX only - as such, deciding whether using sendfile() should probably

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: ftplib's sendfile support is not tracked as issue13559. Considerations I made there should apply here as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13559

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Ops! I meant issue13564. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13559

[issue13451] sched.py: speedup cancel() method

2011-11-26 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: New patch in attachment takes care of modifying empty() and queue property according with the new implementation. With this, the API behaves the same as before (this was my main concern). Also, it's smarter when it comes to cleaning up too

[issue13451] sched.py: speedup cancel() method

2011-11-26 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file23786/bench.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13451

[issue8684] improvements to sched.py

2011-11-26 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Looking back at this patch, I think we can extract the thread-synchronization parts and the peek() method, as they're both valuable additions, especially the first one. The very sched doc says: In multi-threaded environments

[issue13451] sched.py: speedup cancel() method

2011-11-22 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: In attachment. Before the patch: 9.433167934417725 After the patch: 0.0016150474548339844 scheduler.queue and scheduler.empty should be modified in accordance (which I haven't done, it's just to give you an idea). -- Added

[issue13245] sched.py kwargs addition and default time functions

2011-11-22 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Checked in as f1a21f2e3bec and dc52db0fa2e5. Thanks. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13245

[issue13245] sched.py kwargs addition and default time functions

2011-11-21 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: I think this should go in. I'm going to provide a slighly modified version of the attached patch which includes document changes and get rid of some unit tests which are not really necessary in my opinion. -- nosy

[issue13245] sched.py kwargs addition and default time functions

2011-11-21 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Updated patch in attachment. -- Added file: http://bugs.python.org/file23745/issue13245.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13245

[issue13449] sched - provide an async argument for run() method

2011-11-21 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: If True it would run the scheduled functions due to expire soonest (if any) and then return. This would make sched module usable into asynchronous applications. -- messages: 148095 nosy: giampaolo.rodola priority: normal

[issue13449] sched - provide an async argument for run() method

2011-11-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file23746/sched-async.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449

[issue13451] sched.py: speedup cancel() method

2011-11-21 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: snippet # bench.py import sched, time events = [] scheduler = sched.scheduler(time.time, time.sleep) for x in range(4000): scheduler.enter(1, 1, lambda: None, ()) t = time.time() for x in scheduler._queue: scheduler.cancel(x

[issue3974] collections.namedtuple uses exec to create new classes

2011-11-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3974 ___ ___ Python-bugs

[issue6397] Implementing Solaris /dev/poll in the select module

2011-11-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6397 ___ ___ Python-bugs

[issue444582] Finding programs in PATH, adding shutil.which

2011-11-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue444582 ___ ___ Python

[issue1677872] Efficient reverse line iterator

2011-11-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1677872 ___ ___ Python

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-04 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: I think this thread is becoming a little messy and since asyncore/asynchat are in a situation where even the slightest change can break existent code I recommend to be really careful. I see 3 different issues here: 1

[issue13344] closed sockets don't raise EBADF anymore

2011-11-04 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13344 ___ ___ Python

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: When the remote end disconnects, handle_close is only called if recv is called (from handle_read). Actually this isn't true; handle_close() is also called in send(): http://hg.python.org/cpython/file/eb2991f7cdc8/Lib/asyncore.py#l364

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Follow my comments about half_duplex_close.diff (current latest patch). +def handle_close(self): +if not self._closing: +self._closing = True +# try to drain the output buffer +while

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-19 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: -giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13218 ___ ___ Python

<    4   5   6   7   8   9   10   11   12   13   >