[issue5665] Add more pickling tests

2009-04-11 Thread Collin Winter
Collin Winter added the comment: Yes, I'm porting them. I got started, but got distracted by other things since there were a lot of conflicts in the merge -- ___ Python tracker _

[issue5730] setdefault speedup

2009-04-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would support fixing the double call to PyObject_Hash(). For user defined classes with their own __hash__ methods, this is by far the slowest part of the operation. > from my perspective creating an internal SetItem adds another > function handling the da

[issue5739] Language reference is ambiguous regarding next() method lookup

2009-04-11 Thread Nick Coghlan
New submission from Nick Coghlan : The language reference is currently silent as to whether or not an iterator's next() method is looked up on every pass around a for loop, or whether it is OK for an implementation to look the method up once at the start of the loop, cache the result and call it

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

2009-04-11 Thread Naoki INADA
Naoki INADA added the comment: This patch is for iplib/PyShell.py#ModifiedInterpreter.runsource. if isinstance(source, types.UnicodeType): import IOBinding try: source = source.encode(IOBinding.encoding) +source = "# coding: %s

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

2009-04-11 Thread Naoki INADA
Naoki INADA added the comment: This issue is caused by compile() behavior. Following sample is in codepage 932. >>> 'あ' '\x82\xa0' # OK - 'あ' is '\x82\xa0' in cp932 >>> u'あ' u'\u3042' # OK - u'あ' is '\u3042' in UCS-2 compile as byte string. >>> c = compile("'あ'", 'test', 'single') >>> exec

[issue5354] Add test.support.import_python_only

2009-04-11 Thread Nick Coghlan
Nick Coghlan added the comment: The None->tuple check is a legacy of the original API where "None" actually meant to block "_name". I'll change it as you suggest. Your explanation as to why the test was failing in py3k makes sense. I think I will tidy that use case up a bit by adding a "fresh=(

[issue5738] multiprocessing example wrong

2009-04-11 Thread Garrett Cooper
Garrett Cooper added the comment: How about this? I'll do both :). I'm avoiding sync + semaphore stuff because it's still non-portable (Issue 3770 fun), even though I have a functioning copy of FreeBSD... but I do have a Mac, VMware fusion, etc, and I'll toss in a working example with Fedora 10

[issue5736] Add the iterator protocol to dbm modules

2009-04-11 Thread Martin v. Löwis
Martin v. Löwis added the comment: Would you like to fix gdbm as well? -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list ma

[issue5735] Segfault when loading not recompiled module

2009-04-11 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue754016] urlparse goes wrong with IP:port without scheme

2009-04-11 Thread Senthil
Senthil added the comment: Facundo, I re-looked at this issue (after a long time; sorry for that) and I think that the patch is good to be applied as it is for this issue. The Web-SIG discussion, which you pointed to in the comment (http://mail.python.org/pipermail/web-sig/2008-June/003458.html

[issue5738] multiprocessing example wrong

2009-04-11 Thread Jesse Noller
Jesse Noller added the comment: Ugh, I thought that was cleaned up. Don't bother with FreeBSD, or any other BSDes. If you're willing to do it, just make it work on linux. MP support on BSD is severely broken right now. -- ___ Python tracker

[issue5665] Add more pickling tests

2009-04-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Collin, can you port these new tests to Py3k? -- nosy: +benjamin.peterson ___ Python tracker ___

[issue5738] multiprocessing example wrong

2009-04-11 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: georg.brandl -> jnoller nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5738] multiprocessing example wrong

2009-04-11 Thread Garrett Cooper
New submission from Garrett Cooper : The last example on the multiprocessing documentation page is clearly wrong. It references a lot of renamed / deprecated API's from processing that are no longer in multiprocessing. I'll try and come up with a comparable working example on all platforms (I us

[issue5623] test_fdopen fails with vs2005, release build on Windows 2000

2009-04-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Could someone port this to 3.1, please? I'm not Windows savy enough to do it. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue5354] Add test.support.import_python_only

2009-04-11 Thread Brett Cannon
Brett Cannon added the comment: On Sat, Apr 11, 2009 at 07:28, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Implemented for 2.7 in r71465 > Implemented for 3.1 in r7146 > Style nit: why the extra check for block_names being None to later set it to an empty tuple? Why not make

[issue5733] ignore py3_test_grammar.py syntax error

2009-04-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Should be fixed in r71494. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue1751245] Popen pipe file descriptor leak on OSError in init

2009-04-11 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list maili

[issue4753] Faster opcode dispatch on gcc

2009-04-11 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: -alexandre.vassalotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5734] BufferedRWPair broken

2009-04-11 Thread Brian Quinlan
Brian Quinlan added the comment: Hey Antoine, Will do - but first I'll finish up my reason for needing a working version of this class in the first place ;-) Cheers, Brian -- ___ Python tracker __

[issue1751245] Popen pipe file descriptor leak on OSError in init

2009-04-11 Thread Kuang-che Wu
Kuang-che Wu added the comment: this is duplicated to issue 5179 and is fixed in trunk -- nosy: +kcwu ___ Python tracker ___ ___ Py

[issue5737] add Solaris errnos

2009-04-11 Thread Matthew Ahrens
New submission from Matthew Ahrens : The "errno" module does not contain some error names/numbers that are used on Solaris. Please add them. from /usr/include/sys/errno.h: #define ECANCELED 47/* Operation canceled */ #define ENOTSUP 48 /* Operation not supported

[issue5736] Add the iterator protocol to dbm modules

2009-04-11 Thread Akira Kitada
Akira Kitada added the comment: Revised patch adds firstkey and nextkey to dbm. Now the internal pointer can be reset with firstkey. -- Added file: http://bugs.python.org/file13674/issue5736.diff ___ Python tracker

[issue5733] ignore py3_test_grammar.py syntax error

2009-04-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Oh, indeed. I wonder what the best way to do that is? -- assignee: collinwinter -> resolution: invalid -> status: closed -> open title: py3_test_grammar.py syntax error -> ignore py3_test_grammar.py syntax error __

[issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock

2009-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r71483. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pyth

[issue5732] add a new command called "check" into Distutils

2009-04-11 Thread Tarek Ziadé
Tarek Ziadé added the comment: 'check' added in r71473 and r71473 Now working on sdist and register so they use it. -- ___ Python tracker ___ ___

[issue5354] Add test.support.import_python_only

2009-04-11 Thread Nick Coghlan
Nick Coghlan added the comment: Implemented for 2.7 in r71465 Implemented for 3.1 in r71469 Leaving issue open for the moment - the 3.1 test_warnings fails if I don't get a fresh copy of _warnings before running the unit tests. I want to figure out why that is necessary before closing the issue

[issue5354] Add test.support.import_python_only

2009-04-11 Thread Nick Coghlan
Changes by Nick Coghlan : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/opti

[issue5354] Add test.support.import_python_only

2009-04-11 Thread Nick Coghlan
Nick Coghlan added the comment: Implemented for 2.7 in r71465 Implemented for 3.1 in r7146 Leaving issue open for the moment - the 3.1 test_warnings fails if I don't get a fresh copy of _warnings before running the unit tests. I want to figure out why that is necessary before closing the issue.

[issue5354] Add test.support.import_python_only

2009-04-11 Thread Nick Coghlan
Nick Coghlan added the comment: Ended up going for a slightly more general name "import_fresh_module". Reason being, test_warnings *also* wanted a fresh version of the accelerated module along with a pure Python version - it seemed silly to only factor out half of the problem into a support func

[issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10

2009-04-11 Thread Skip Montanaro
Skip Montanaro added the comment: FWIW, with the patch applied all tests still pass on Mac OS X 10.5.6 (Intel). S -- ___ Python tracker ___ _

[issue5736] Add the iterator protocol to dbm modules

2009-04-11 Thread Akira Kitada
Akira Kitada added the comment: Attached is a patch that adds the iterator protocol. Now it can be interated through like: >>> for k in d: print k, d[k] ... key1 vale1 key3 vale3 key0 vale0 key2 vale2 key4 vale4 The problem is there is no way to get the internal pointer back to the start. So

[issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10

2009-04-11 Thread Skip Montanaro
Skip Montanaro added the comment: Mark> Here's a patch that backports the corresponding changes from Mark> trunk. Mark> Skip, can you confirm that this fixes the issue? Indeed, your patch appears to fix the problem: % LD_LIBRARY_PATH=. ./python Lib/test/regrtest.py -v test_cmath

[issue5733] py3_test_grammar.py syntax error

2009-04-11 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: So the error during libinstall should be ignored http://docs.python.org/dev/results/make-install.out -- ___ Python tracker ___

[issue5736] Add the iterator protocol to dbm modules

2009-04-11 Thread Akira Kitada
New submission from Akira Kitada : In Python 2.6, dbm modules othar than bsddb don't support the iterator protocol. >>> import dbm >>> d = dbm.open('spam.dbm', 'c') >>> for k in range(5): d["key%d" % k] = "value%d" % k ... >>> for k in d: print k, d[k] ... Traceback (most recent call last):

[issue5733] py3_test_grammar.py syntax error

2009-04-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Quite correct. -- nosy: +benjamin.peterson resolution: wont fix -> invalid status: pending -> closed ___ Python tracker ___ _

[issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10

2009-04-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue5730] setdefault speedup

2009-04-11 Thread Martin v. Löwis
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 say that? __missing__(...) __missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise Ke

[issue5735] Segfault when loading not recompiled module

2009-04-11 Thread Leonid Vasilev
New submission from Leonid Vasilev : I compiled two versions of python(both from main trunk) Here's what I do: $cd /usr/local/src/Python-3.0.1/ $./configure $make && make install ... $cd ~/pyext/ $python3.0 setup.py install ... "run python3.0 and import ext1 -- it worked ok" ... $cd /usr/local/s

[issue5733] py3_test_grammar.py syntax error

2009-04-11 Thread Georg Brandl
Georg Brandl added the comment: I think this file is only meant as a test that 2to3 can parse both 2.x and 3.x syntax, not Python itself. -- nosy: +georg.brandl resolution: -> wont fix status: open -> pending ___ Python tracker

[issue5698] pydoc -w doesn't produce proper HTML

2009-04-11 Thread Georg Brandl
Georg Brandl added the comment: I fixed the DOCTYPE in trunk/3k r71443/71444, and the encoding issue in 3k only, because there the encoding is well-defined, in r71445. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue5734] BufferedRWPair broken

2009-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hey, thanks a lot for caring. I'll take a look at the patch and come back later. If you want to add some more tests, you are welcome too :-) -- assignee: -> pitrou nosy: +pitrou priority: -> release blocker stage: -> patch review ___

[issue5734] BufferedRWPair broken

2009-04-11 Thread Brian Quinlan
Changes by Brian Quinlan : -- components: +Library (Lib) type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue5734] BufferedRWPair broken

2009-04-11 Thread Brian Quinlan
New submission from Brian Quinlan : The C implementation: - doesn't correctly initialize its reader and writer instances - incorrectly maps its "readinto" method to another class - incorrectly delegates its "closed" property to its base class i.e. this class can't be used at all The Python impl

[issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10

2009-04-11 Thread Mark Dickinson
Mark Dickinson added the comment: Just to say, I'm a bit uncomfortable with a patch this large going into a release candidate. It's all code that's been backported from 2.7, so it *should* be okay, but I really don't want to be responsible for breaking 2.6.2. The test failure that Skip repo

[issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10

2009-04-11 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch that backports the corresponding changes from trunk. Skip, can you confirm that this fixes the issue? -- keywords: +patch Added file: http://bugs.python.org/file13670/issue5724.patch ___ Python tracke

[issue5725] process SysV-Semaphore support

2009-04-11 Thread jvdias
jvdias added the comment: Thanks for responding ! I also think that the the Solaris Python should provide support for prctl . Well, actually in modern Solaris what can be achieved with "prctl" can be achieved my mmap()-ping and manipulating the procfs(4) mounted under /proc - but yes, what I

[issue5722] settimer / gettimer functionality on FreeBSD 6.3 (not 7.x)

2009-04-11 Thread Andrew I MacIntyre
Andrew I MacIntyre added the comment: I've just built (using ./configure; make) 3.1a on FreeBSD 6.4 amd64. libpthread is used by the resulting binary, not libc_r, according to ldd. I would expect then that explicit action is required to use libc_r, and given that FreeBSD people have indicated t

[issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10

2009-04-11 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry for the late reply: I've been away for a few days. This looks like the same problem as issue 4575, so should already be fixed in the trunk and py3k. It looks as though I never got around to backporting the fix to 2.6 (or 3.0). I'll do that today. -

[issue5723] Incomplete json tests

2009-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi, > I don't think the decorator approach would work for the doctests, it looks > like it could be an interesting approach though. I have a feeling that > it's going to have to be done in some kind of ugly subclass though, I'll > dig into unittest deeper th

[issue4753] Faster opcode dispatch on gcc

2009-04-11 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: -marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue5729] Allows tabs for indenting JSON output

2009-04-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> bob.ippolito nosy: +bob.ippolito priority: -> normal stage: -> patch review versions: +Python 2.7 ___ Python tracker ___ ___

[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into "long"

2009-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing since I haven't seen any sign of such failures on a 64-bit build. -- resolution: -> works for me status: open -> closed ___ Python tracker

[issue5728] Support telling TestResult objects a test run has finished

2009-04-11 Thread Robert Collins
Robert Collins added the comment: I've written up a patch for this; it works with old result classes too. Hopefully the bugtracker will attach it in reply to this mail; if not I'll put in via the webui this evening. -Rob -- keywords: +patch Added file: http://bugs.python.org/file13669