[issue5746] socketserver problem upon disconnection (undefined member)

2009-04-12 Thread Eric Blond
New submission from Eric Blond : Here's the traceback I got: === >>> s.serve_forever() Exception happened during processing of request from ('127.0.0.1', 54611) Traceback (most recent call last): File "C:\Python30\lib\socketserver.py", line 281, in _ha

[issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument

2009-04-12 Thread Lenard Lindstrom
Lenard Lindstrom added the comment: notepad.exe forms a side-by-side assembly with COMCTL32.DLL. So SystemRoot must be included in the environment. The following example works with Python 2.5.2 on Windows XP. === import struct, subproc

[issue5744] multiprocessing.managers.BaseManager.connect example typos

2009-04-12 Thread Garrett Cooper
Garrett Cooper added the comment: Thanks for noting that George Y. and thanks for fixing the documentation on SVN Benjamin :). -- ___ Python tracker ___ _

[issue5730] setdefault speedup

2009-04-12 Thread Dan Schult
Dan Schult added the comment: On Apr 11, 2009, at 8:15 AM, Martin v. Löwis @psf.upfronthosting.co.za @psf.upfronthosting.co.za> wrote: > Martin v. Löwis added the comment: > >> By the way, defaultdict is NOT like setdefault--it is like get(). >> Missing entries do no get set. > > Why do you

[issue5745] email document update (more links)

2009-04-12 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file13681/email_doc_link_aligned.patch ___ Python tracker ___ ___ Python-bugs

[issue5745] email document update (more links)

2009-04-12 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : I added more links to email documantation. (I changed only :class: not :meth:) -- assignee: georg.brandl components: Documentation files: email_doc_link.patch keywords: patch messages: 85932 nosy: georg.brandl, ocean-city severity: normal status: o

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Skip Montanaro
Skip Montanaro added the comment: skip> What's worse, even in a non-threaded environment you might want to skip> iterate over the gdbm file simultaneously from two different skip> places. Or iterate over two different gdbm files simultaneously. -- _

[issue5703] inside *currentmodule* some links is disabled

2009-04-12 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I noticed :meth:`~email.message.Message.add_header` renders "add_header" but maybe "Message.add_header" is better? (Maybe sphinx tracker is suitable for now) -- ___ Python tracker

[issue5703] inside *currentmodule* some links is disabled

2009-04-12 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Thanks, I'll create the patch using this. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5744] multiprocessing.managers.BaseManager.connect example typos

2009-04-12 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Skip Montanaro
Skip Montanaro added the comment: Akira> Note that dbm and gdbm C API is a little different. gdbm_nextkey Akira> requires key for its argument, dbm_nextkey don't. So I had to Akira> use for gdbm an static variable that points to the current Akira> position. I don't think this is g

[issue5744] multiprocessing.managers.BaseManager.connect example typos

2009-04-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: Ah. My apologies. I thought the second typo was that it rendered incorrectly as your example shows. Fixed in r71546. -- ___ Python tracker __

[issue5744] multiprocessing.managers.BaseManager.connect example typos

2009-04-12 Thread George Yoshida
George Yoshida added the comment: > The example ... has *2* typos I guess the reporter wants to point out - extra parenthesis(fixed in r71544) - closing quote is missing for authkey argument -- nosy: +quiver status: closed -> open ___ Python tracke

[issue5744] multiprocessing.managers.BaseManager.connect example typos

2009-04-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r71544. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue5744] multiprocessing.managers.BaseManager.connect example typos

2009-04-12 Thread Garrett Cooper
New submission from Garrett Cooper : The example under multiprocessing.managers.BaseManager.connect has 2 typos: >>> from multiprocessing.managers import BaseManager >>> m = BaseManager(address='127.0.0.1', authkey='abc))>>> m.connect() Here's a corrected example: >>> from mul

[issue5743] multiprocessing.managers not accessible even though docs say so

2009-04-12 Thread Garrett Cooper
Garrett Cooper added the comment: Ugh... nevermind. Bad case of PEBKAC. Sorry for the noise :(... -- status: open -> closed type: -> feature request ___ Python tracker ___ _

[issue5743] multiprocessing.managers not accessible even though docs say so

2009-04-12 Thread Garrett Cooper
Garrett Cooper added the comment: Sorry -- the info for my python2.6 was out of date. Here's the info (I had to set PYTHONPATH to "" to avoid a multiprocessing module conflict): bash-3.00$ PYTHONPATH=""; python2.6 `which nosetests` ~/test_managers_support.py Python version: 2.6.1 (r261:67515, M

[issue5743] multiprocessing.managers not accessible even though docs say so

2009-04-12 Thread Garrett Cooper
New submission from Garrett Cooper : I'm not sure why but my copy doesn't have a managers module. I'm really confused because multiprocessing.managers exists in Lib/multiprocessing/managers.py and it should have been installed with easy_install... Please see the attached testcase (it shows the d

[issue5706] setuptools doesn't honor standard compiler variables

2009-04-12 Thread Garrett Cooper
Garrett Cooper added the comment: I did some quick inspection and it appears to be tied purely into setuptools, not distutils. distutils does support the environment variables properly. So I take this item and submit it to PEAK I suppose? Fun times ><. Thanks for the help. -- status:

[issue5719] optparse: please provide a usage example in the module docstring

2009-04-12 Thread Georg Brandl
Georg Brandl added the comment: Added in r71540. Thanks for the suggestion! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue5703] inside *currentmodule* some links is disabled

2009-04-12 Thread Georg Brandl
Georg Brandl added the comment: You can write :class:`~email.mime.MIMENonMultipart`; this will link to the correct class but only display the thing after the last dot, in this case "MIMENonMultipart". -- ___ Python tracker

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Brian Quinlan
Brian Quinlan added the comment: Oops, I didn't finish my thought: >> No, doing this is trivial. But shouldn't it be up to the implementor of >> MyClass to decide whether MyMixin or io.FileIO methods are evaluated first? > > Is there a concrete use case, though? I don't have a good one in mi

[issue5742] inspect.findsource() should look only for sources

2009-04-12 Thread Dmitry Vasiliev
New submission from Dmitry Vasiliev : Currently help(zlib) gives the following traceback: Python 3.1a2+ (py3k:71538M, Apr 12 2009, 21:54:44) >>> import zlib >>> help(zlib) Traceback (most recent call last): File "", line 1, in File "Lib/site.py", line 429, in __call__ return pydoc.help

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Brian Quinlan
Brian Quinlan added the comment: Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> No, doing this is trivial. But shouldn't it be up to the implementor of >> MyClass to decide whether MyMixin or io.FileIO methods are evaluated first? > > Is there a concrete use case, though? I

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > No, doing this is trivial. But shouldn't it be up to the implementor of > MyClass to decide whether MyMixin or io.FileIO methods are evaluated first? Is there a concrete use case, though? By the way, what if _pyio.FileIO inherited from io.FileIO instead of

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Brian Quinlan
Brian Quinlan added the comment: Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> I think that this linearization is probably more useful: >> >> MyClass -> io.FileIO -> MyMixin -> IOBase > > But why not simply: > > MyClass -> MyMixin -> io.FileIO -> IOBase > > ? > Is there som

[issue4501] asyncore's urgent data management and connection closed events are broken when using poll()

2009-04-12 Thread R. David Murray
R. David Murray added the comment: Fixed as part of the work done on issue1161031. -- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue5741] SafeConfigParser incorrectly detects lone percent signs

2009-04-12 Thread Georg Brandl
Georg Brandl added the comment: Should be fixed in r71537. Will backport to 2.6. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue4482] 10e667.__format__('+') should return 'inf'

2009-04-12 Thread Eric Smith
Eric Smith added the comment: Agreed. That might be the strategy for 2.7. But it depends on how much of the other float and int formatting code I can re-use from 3.1. If I can hide the 2.7/3.1 differences in PyOS_double_to_string, then the 2.7 and 3.1 code should be identical, and the fix will

[issue4482] 10e667.__format__('+') should return 'inf'

2009-04-12 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: The patch I submitted adds a special-case for inf/-inf/NaN so that sprintf is avoided for those values. Should work on any platform, I believe. I'm not sure how it interacts with your 3.x plans. Seems like it would be a good patch for 2.7 at least, though.

[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

2009-04-12 Thread Eric Smith
Changes by Eric Smith : -- nosy: +marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5515] 'n' formatting for int and float handles leading zero padding poorly

2009-04-12 Thread Eric Smith
Eric Smith added the comment: This won't get fixed in 3.0 or 2.6. Still not sure about 2.7, but I'm considering how to fix it there. -- versions: -Python 2.6, Python 3.0 ___ Python tracker

[issue4482] 10e667.__format__('+') should return 'inf'

2009-04-12 Thread Eric Smith
Eric Smith added the comment: Actually this isn't quite a duplicate of 4799, but it's close. Any fix to this issue will also address 4799's original report: > On windows, with python 2.6, s = '%s' % float('inf') is 'inf', > but s ='%f' % float('inf') is equal to '1.#INF'. --

[issue4482] 10e667.__format__('+') should return 'inf'

2009-04-12 Thread Eric Smith
Eric Smith added the comment: This is a duplicate of 4799, which I've closed. I've resisted fixing this because differences in various platform sprintf's have made it difficult. Now that Mark Dickinson and I are close to removing the use of sprintf for float formatting, I'll have the tools to d

[issue4799] handling inf/nan in '%f'

2009-04-12 Thread Eric Smith
Eric Smith added the comment: I believe this is a duplicate of issue 4482. I'm closing this and will add everyone who is nosy on this to be nosy on 4482. -- resolution: -> duplicate status: open -> closed ___ Python tracker

[issue5675] string module requires bytes type for maketrans, but calling method on regular string does not

2009-04-12 Thread Georg Brandl
Georg Brandl added the comment: This is (kind of) intentional. string.maketrans operates on bytes, not string objects. However, this is quite confusing, so I added bytes.maketrans() now in py3k, and deprecated string.maketrans(). (r71521) -- resolution: -> works for me status: open -

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Brian Quinlan
Brian Quinlan added the comment: Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> It is necessary to make MI work. With out it the inheritance graph looks >> like this (using _pyio): >> >> >> io.IOBase_pyio.IOBase >> | | >> io.FileIO MyMixin >> |

[issue5740] multiprocessing.connection.Client API documentation incorrect

2009-04-12 Thread Jesse Noller
Jesse Noller added the comment: Will fix tomorrow -- assignee: georg.brandl -> jnoller ___ Python tracker ___ ___ Python-bugs-list mai

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think that this linearization is probably more useful: > > MyClass -> io.FileIO -> MyMixin -> IOBase But why not simply: MyClass -> MyMixin -> io.FileIO -> IOBase ? Is there something I'm missing that prevents you from doing this? > I'm not trying to ch

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It is necessary to make MI work. With out it the inheritance graph looks > like this (using _pyio): > > > io.IOBase_pyio.IOBase > | | > io.FileIO MyMixin > | | > \/ > \ / >\

[issue5741] SafeConfigParser incorrectly detects lone percent signs

2009-04-12 Thread Márcio Faustino
New submission from Márcio Faustino : The SafeConfigParser class incorrectly detects lone percent signs, for example, it doesn't accept "100%%" as a valid value. The cause of this is the "_badpercent_re" regular expression: - The first alternative "%[^%]" fails with the string "%%_", because it

[issue1720250] PyGILState_Ensure does not acquires GIL

2009-04-12 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: georg.brandl -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue5665] Add more pickling tests

2009-04-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: Ok. Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue5704] Command line option '-3' should imply '-t'

2009-04-12 Thread Georg Brandl
Georg Brandl added the comment: Added in r71507. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___ Python-

[issue5708] Tiny code polishing to unicode_repeat

2009-04-12 Thread Georg Brandl
Georg Brandl added the comment: Committed in r71506. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___ Pyt

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Brian Quinlan
Brian Quinlan added the comment: >> - FileIO is implemented in Python in _pyio.py so that it can have the >>same base class as the other Python-implemented files classes > Is it really necessary (e.g. to pass the tests)? It is necessary to make MI work. With out it the inheritance graph lo

[issue5706] setuptools doesn't honor standard compiler variables

2009-04-12 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> tarek nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > - FileIO is implemented in Python in _pyio.py so that it can have the >same base class as the other Python-implemented files classes Is it really necessary (e.g. to pass the tests)? -- nosy: +pitrou ___ Python

[issue2725] Handle ASDLSyntaxErrors gracefully

2009-04-12 Thread Georg Brandl
Georg Brandl added the comment: Committed a similar patch in r71505. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell

2009-04-12 Thread Naoki INADA
Naoki INADA added the comment: How to use locale.getpreferredencoding() instead of locale.nl_langinfo(locale.CODESET). --- IOBinding.py.back Sun Apr 12 19:54:52 2009 +++ IOBinding.pySun Apr 12 20:02:58 2009 @@ -35,40 +35,16 @@ # Encoding for file names filesystemencoding = sys.getf

[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell

2009-04-12 Thread Naoki INADA
Naoki INADA added the comment: utf-8 is not locale encoding. >>> f = open('á.txt') If this line compiled into utf-8 and locale encoding is not utf-8, can't open 'á.txt'. IMHO, in case of Python 2.x, correct approach is fix IOBindings.encoding and compile() with pep0263. -- __

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Brian Quinlan
Brian Quinlan added the comment: cooperation.diff: - change the close method to call .flush() and then ._close() - only IOBase implements close() (though a subclass can override close without causing problems - so long as it calls super().close()) - .flush() invokes super().flush() - ._close()

[issue5700] io.FileIO calls flush() after file closed

2009-04-12 Thread Brian Quinlan
Changes by Brian Quinlan : Added file: http://bugs.python.org/file13677/cooperation.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Akira Kitada
Akira Kitada added the comment: Of course iter should work in the same way in all dbm modules. iter in dbm/gdbm should work like dumbdbm's iter. >>> dumb = dumbdbm.open('foo', 'n') >>> dumb['k1'] = 'v1';dumb['k2'] = 'v2'; >>> for i in dumb: print i; break ... k2 >>> for i in dumb: print i for

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Akira Kitada
Akira Kitada added the comment: Here's another patch which addsd iter to dbm and gdbm. Note that dbm and gdbm C API is a little different. gdbm_nextkey requires key for its argument, dbm_nextkey don't. So I had to use for gdbm an static variable that points to the current position. Now iterator

[issue5740] multiprocessing.connection.Client API documentation incorrect

2009-04-12 Thread Garrett Cooper
New submission from Garrett Cooper : In the API for connections.Client, it says: multiprocessing.connection.Client(address[, family[, authenticate[, authkey]]]) In the final paragraph is says: `If authentication is True or authkey ' As per the API provided it should be: `If authenticate is T

[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell

2009-04-12 Thread Santiago Gala
Santiago Gala added the comment: Updating the components as the error surfaces in the compile builtin. the compile builtin works when given unicode, but fails when using a utf8 (local input encoding) string. Rather than adding a "coding" string to compile, my guess is that compile should be fix