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

2009-04-12 Thread Santiago Gala
Santiago Gala sg...@apache.org 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

[issue5740] multiprocessing.connection.Client API documentation incorrect

2009-04-12 Thread Garrett Cooper
New submission from Garrett Cooper yaneg...@gmail.com: 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:

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Akira Kitada
Akira Kitada akit...@gmail.com 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

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Akira Kitada
Akira Kitada akit...@gmail.com 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

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

2009-04-12 Thread Naoki INADA
Naoki INADA songofaca...@gmail.com 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
Changes by Brian Quinlan br...@sweetapp.com: Added file: http://bugs.python.org/file13677/cooperation.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5700 ___

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

2009-04-12 Thread Brian Quinlan
Brian Quinlan br...@sweetapp.com 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

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

2009-04-12 Thread Naoki INADA
Naoki INADA songofaca...@gmail.com 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

[issue2725] Handle ASDLSyntaxErrors gracefully

2009-04-12 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Committed a similar patch in r71505. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2725 ___

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

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue5706] setuptools doesn't honor standard compiler variables

2009-04-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - tarek nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5706 ___ ___

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

2009-04-12 Thread Brian Quinlan
Brian Quinlan br...@sweetapp.com 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

[issue5708] Tiny code polishing to unicode_repeat

2009-04-12 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Committed in r71506. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5708 ___

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

2009-04-12 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Added in r71507. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5704 ___

[issue5665] Add more pickling tests

2009-04-12 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Ok. Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5665 ___ ___

[issue1720250] PyGILState_Ensure does not acquires GIL

2009-04-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1720250 ___ ___

[issue5741] SafeConfigParser incorrectly detects lone percent signs

2009-04-12 Thread Márcio Faustino
New submission from Márcio Faustino m.faust...@gmail.com: 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

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

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 | | \/ \ /

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

2009-04-12 Thread Brian Quinlan
Brian Quinlan br...@sweetapp.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr 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

[issue5740] multiprocessing.connection.Client API documentation incorrect

2009-04-12 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: Will fix tomorrow -- assignee: georg.brandl - jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5740 ___

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

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2009-04-12 Thread Georg Brandl
Georg Brandl ge...@python.org 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

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

2009-04-12 Thread Eric Smith
Eric Smith e...@trueblade.com 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

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

2009-04-12 Thread Eric Smith
Eric Smith e...@trueblade.com 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

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

2009-04-12 Thread Eric Smith
Eric Smith e...@trueblade.com 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'.

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

2009-04-12 Thread Eric Smith
Eric Smith e...@trueblade.com 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 rep...@bugs.python.org

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

2009-04-12 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3382 ___ ___ Python-bugs-list

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

2009-04-12 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com 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

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

2009-04-12 Thread Eric Smith
Eric Smith e...@trueblade.com 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

[issue5741] SafeConfigParser incorrectly detects lone percent signs

2009-04-12 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Should be fixed in r71537. Will backport to 2.6. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5741

[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 rdmur...@bitdance.com 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 rep...@bugs.python.org

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

2009-04-12 Thread Brian Quinlan
Brian Quinlan br...@sweetapp.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr 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 ?

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

2009-04-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2009-04-12 Thread Brian Quinlan
Brian Quinlan br...@sweetapp.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr 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

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

2009-04-12 Thread Dmitry Vasiliev
New submission from Dmitry Vasiliev d...@hlabs.spb.ru: 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 stdin, line 1, in module File Lib/site.py, line 429, in __call__

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

2009-04-12 Thread Brian Quinlan
Brian Quinlan br...@sweetapp.com 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

[issue5703] inside *currentmodule* some links is disabled

2009-04-12 Thread Georg Brandl
Georg Brandl ge...@python.org 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

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

2009-04-12 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Added in r71540. Thanks for the suggestion! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5719

[issue5706] setuptools doesn't honor standard compiler variables

2009-04-12 Thread Garrett Cooper
Garrett Cooper yaneg...@gmail.com 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.

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

2009-04-12 Thread Garrett Cooper
New submission from Garrett Cooper yaneg...@gmail.com: 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

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

2009-04-12 Thread Garrett Cooper
Garrett Cooper yaneg...@gmail.com 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

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

2009-04-12 Thread Garrett Cooper
New submission from Garrett Cooper yaneg...@gmail.com: 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:

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

2009-04-12 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r71544. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5744

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

2009-04-12 Thread George Yoshida
George Yoshida qui...@users.sourceforge.net 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

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

2009-04-12 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org 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 rep...@bugs.python.org

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Skip Montanaro
Skip Montanaro s...@pobox.com 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

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

2009-04-12 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5744 ___ ___

[issue5703] inside *currentmodule* some links is disabled

2009-04-12 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Thanks, I'll create the patch using this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5703 ___

[issue5703] inside *currentmodule* some links is disabled

2009-04-12 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

[issue5736] Add the iterator protocol to dbm modules

2009-04-12 Thread Skip Montanaro
Skip Montanaro s...@pobox.com 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. --

[issue5745] email document update (more links)

2009-04-12 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: 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

[issue5745] email document update (more links)

2009-04-12 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Added file: http://bugs.python.org/file13681/email_doc_link_aligned.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5745 ___

[issue5730] setdefault speedup

2009-04-12 Thread Dan Schult
Dan Schult dsch...@colgate.edu added the comment: On Apr 11, 2009, at 8:15 AM, Martin v. Löwis rep...@bugs.python.org@psf.upfronthosting.co.za @psf.upfronthosting.co.za wrote: Martin v. Löwis mar...@v.loewis.de added the comment: By the way, defaultdict is NOT like setdefault--it is like

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

2009-04-12 Thread Garrett Cooper
Garrett Cooper yaneg...@gmail.com added the comment: Thanks for noting that George Y. and thanks for fixing the documentation on SVN Benjamin :). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5744

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

2009-04-12 Thread Lenard Lindstrom
Lenard Lindstrom le...@telus.net 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

[issue5746] socketserver problem upon disconnection (undefined member)

2009-04-12 Thread Eric Blond
New submission from Eric Blond ebl...@tiscali.co.uk: 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,