[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman dirk...@ochtman.nl: Rejecting invalid input seems better in this case. This was changed in issue1285086. Can we preface the normal fast path with something like: if s is None: raise TypeError('can only quote strings') It used to raise

[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9301 ___ ___ Python-bugs-list

[issue9284] inspect.findsource() cannot find source for doctest code

2010-07-17 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman dirk...@ochtman.nl: The fix for issue4050 broke some of my doctests. Minimal test: import doctest, inspect def test(): ''' def x(): pass inspect.getsource(x) 'def x(): pass\\n' ''' doctest.run_docstring_examples(test, globals

[issue9284] inspect.findsource() cannot find source for doctest code

2010-07-17 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Here's a test case that doesn't require doctest trickery: import inspect, linecache fn, source = 'test', 'def x(): pass\n' getlines = linecache.getlines def monkey(filename, module_globals=None): if filename == fn: return

[issue9284] inspect.findsource() cannot find source for doctest code

2010-07-17 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Because doctest also monkeypatches linecache, and without monkeypatching linecache this also fails in 2.6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9284

[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked

2010-06-04 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6312

[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked

2010-06-04 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Might be useful to have a test for this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6312

[issue8877] 2to3 fixes stdlib import wrongly

2010-06-02 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman dirk...@ochtman.nl: d...@enrai src $ ls -l test/* -rw-r--r-- 1 djc users 34 Jun 2 16:00 test/http.py -rw-r--r-- 1 djc users 0 Jun 2 16:00 test/__init__.py d...@enrai src $ cat test/http.py from httplib import BadStatusLine d...@enrai src $ 2to3 test

[issue2459] speedup for / while / if with better bytecode

2010-06-02 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Is this still relevant / will it get some love in the future? -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459

[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked

2010-05-26 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: The fix in r80583 is bad. It fails to close() the response (which previously worked as expected), meaning that the connection can't be re-used. (I ran into this because Gentoo has backported the 2.6-maint fixes to their 2.6.5 distribution

[issue8483] asyncore.dispatcher's __getattr__ method produces confusing effects

2010-04-22 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: I definitely like the patch, but ideally we would also have a patch adding a __str__ on dispatcher, right? Which would just return the repr(self) result. -- ___ Python tracker rep

[issue8483] asyncore.dispatcher.__repr__() is weird

2010-04-21 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman dirk...@ochtman.nl: This is rather confusing: Python 2.6.4 (r264:75706, Mar 8 2010, 08:41:55) [GCC 4.3.4] on linux2 Type help, copyright, credits or license for more information. import socket, asyncore class T: ... pass ... t = T() print t __main__

[issue8483] asyncore.dispatcher.__repr__() is weird

2010-04-21 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +josiah.carlson, josiahcarlson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8483

[issue8483] asyncore.dispatcher.__repr__() is weird

2010-04-21 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Current guess for this behavior: dispatcher doesn't have __str__, so __getattr__ escalates to _socket.socket.__str__, which gets redirected to _socket.socket.__repr__. -- ___ Python tracker rep

[issue8483] asyncore.dispatcher.__repr__() is weird

2010-04-21 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: David, just have a look at the interpreter transcript, in particular the results of the print statements. I'm not sure why it happens, in my previous message I just stated a hypothesis

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-26 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7946 ___ ___ Python-bugs-list mailing

[issue1537721] csv module: add header row to DictWriter

2010-03-05 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Both the solaris and windows slaves seem to have succeeded this time. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1537721

[issue1537721] csv module: add header row to DictWriter

2010-03-04 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Testing on Windows with this: Index: Lib/test/test_csv.py === --- Lib/test/test_csv.py(revision 78430) +++ Lib/test/test_csv.py(working copy) @@ -9,6 +9,7

[issue1537721] csv module: add header row to DictWriter

2010-03-04 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Committed in r78660 after positive comment from briancurtin re Windows. Hopefully this fixes Solaris, as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1537721

[issue8039] precedence rules for ternary operator

2010-03-02 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman dirk...@ochtman.nl: So http://docs.python.org/reference/expressions.html doesn't currently mention the ternary operator as far as I can see. Maybe this is trivial, but it would be nice to know where it fits into the hierarchy. (I.e., my co-worker just came

[issue8039] precedence rules for ternary operator

2010-03-02 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8039 ___ ___ Python-bugs-list

[issue1537721] csv module: add header row to DictWriter

2010-02-23 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Fixed in SVN, r78384. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1537721

[issue1537721] csv module: add header row to DictWriter

2010-02-23 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- assignee: - djc resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1537721

[issue8004] add small server to serve docs

2010-02-23 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: I do almost all of my development on servers, so while I guess I could mount the remote file system and do that, that's not very easy to do (since I access my servers from multiple boxes, some of which run Windows, etc). I guess

[issue8004] add small program to serve docs

2010-02-23 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Sure, I'm happy to fix up the little things. The point is that this works and solves (IMO) a real problem, so I wonder if we can get this in. -- ___ Python tracker rep...@bugs.python.org http

[issue7733] asyncore docs reference is unclear

2010-01-31 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Yeah, I'll get to it. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7733

<    1   2