[issue10437] ThreadPoolExecutor should accept max_workers=None

2010-11-20 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: In my case, each thread launches a CPU-intensive process via subprocess, then waits for it to report output and exit. Also, keep in mind that PyPy and IronPython don't have a GIL (although I'm not a PyPy or IronPython u

[issue10437] ThreadPoolExecutor should accept max_workers=None

2010-11-16 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : ProcessPoolExecutor allows the max_workers parameter to the constructor to be omitted or None, in which case it will set the max_workers based on the number of CPUs. It would be nice if ThreadPoolExecutor's constructor worked the same way; havin

[issue9730] base64 docs refers to strings instead of bytes

2010-10-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: That fixes the example code, but what about the numerous text that reads "strings" that should read "byte sequences", "bytes", or similar? -- ___ Python tracker <

[issue10099] socket.fromfd() documentation problem

2010-10-14 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue10099> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10100] fromfd is now available on all platforms

2010-10-14 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : fromfd is marked as Availability: Unix, but in Python 3 it is also available on Windows: C:\>c:\python31\python.exe Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", &qu

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Hirokazu, could you run Python in a debugger and figure out exactly which line crashes and what the error is? I'm curious. If we make this change, the same change should be applied to RegEnumKey, etc., since the RegEnumKey docs contain similar lan

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-09 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Daniel, we need to sync-up on the meaning of marking a report as > "accepted". Traditionally it denotes an approved patch, not a agreement > > that the bug is valid. Woops! Thanks for the correction. For what it's worth, a q

[issue10059] add the method `index` to collections.deque

2010-10-09 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Hello Simon, Accessing an arbitrary element of a deque takes O(n) time, making your .index implementation O(n**2). If you describe the kinds of operations that you need to perform efficiently, we may be able to suggest a better data structure for you to

[issue10044] small int optimization

2010-10-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > I don't think arbitrary comparisons of pointers give well-defined > results, unless those pointers both happen to point into the same > array. (Might be wrong; I don't have a copy of the C standard to > hand.) Technically arbitrary

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > I suggest removing the "equivalent to" code from the zip section and > replacing it with an example showing how to use zip with a for loop > similar to the example illustrating enumerate. +1 -- ___

[issue10044] small int optimization

2010-10-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: How does performance change if you adjust NSMALLPOSINTS and NSMALLNEGINTS, but make no other changes? -- ___ Python tracker <http://bugs.python.org/issue10

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-05 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: The code was taken from the itertools.izip documentation for Python 2, where it did work. In Python 2, next() raises StopIteration which is propagated up and causes the izip() to stop. In Python 3, map is itself a generator and the StopIteration

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-05 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I did some spelunking. Guido committed the similar optimization in r8306. The diff is at: http://svn.python.org/view/python/trunk/Python/ceval.c?r1=8087&r2=8306 His commit message was: Huge speedup by inlining some common integer operat

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: For what it's worth, a similar fast path existed in Python 2 for lists (but not tuples). It was removed for Python 3. I'm not sure why it was removed, but it may have been part of removing the PyInt type. -- nosy:

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Since I noticed the bug through source code inspection and no one has reported it occurring in practice, that sounds reasonable to me. -- versions: -Python 2.7 ___ Python tracker <http://bugs.python.

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks for working on this! Since this was a bugfix, it should be merged back into 2.7, yes? -- stage: unit test needed -> committed/rejected ___ Python tracker <http://bugs.python.org/iss

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > You can tweak the Windows pyconfig.h to use UCS4, AFAIK, if you want to > test drive this case. I seem to recall seeing some other code that assumed Windows implied UCS2. Proceed with caution. ;-) > But it's probably easier to confi

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I, too, can't think of any platforms where Py_UNICODE_SIZE == 4 && SIZEOF_WCHAR_T == 2 and I'm not sure what the previous policy has been. Have you noticed any other code that would set a precedent? If no one else chimes in, perhaps as

[issue9989] ctypes bitfield problem

2010-09-29 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Could be. FWIW, I had tested and observed the problem on a 32-bit Intel Windows box and 64-bit Intel Linux box. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9989] ctypes bitfield problem

2010-09-29 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The following program should print "0xdead" but instead prints "0x0". This came from the following stackoverflow question: http://stackoverflow.com/questions/3824617/python-structure-always-stuck-at-0-no-matter-what-value-you-assign-

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +ezio.melotti, lemburg ___ Python tracker <http://bugs.python.org/issue9979> ___ ___ Python-bugs-list mailing list Unsub

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-09-28 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I know enough about Unicode to have reported this bug, but I don't feel knowledgeable enough about Python's Unicode implementation to comment on your suggested solution. I'm adding the other people listed in Misc/maintainers.rst as interes

[issue9971] Optimize BufferedReader.readinto

2010-09-28 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The readinto() method is intended to offer better performance than read() by allowing the caller to read into a preallocated buffer rather than constantly allocate and deallocate buffers. However, bufferediobase_readinto() calls read(), so the extra

[issue9949] os.path.realpath on Windows does not follow symbolic links

2010-09-25 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : In Lib/ntpath.py: # realpath is a no-op on systems without islink support realpath = abspath However, Windows Vista and newer support symbolic links and other Python methods support them. (noticed this through source code inspection; haven't act

[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > what about adding a simple "random.seed(12345)" That's an excellent suggestion! In fact, I'm embarrassed that it never occurred to me (especially since I have used it in other projects). I will have a revised speed_test al

[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Does this help any? No :-) The problem is that the random data you run in interpreter 1 won't be the same data you run in interpreter 2, so the results are not directly comparable. One of the sets of random data may be more easily sortable

[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Since the patch is intended to speed up 3.2 and your posted > experiments were run on that, I am puzzled that you would post a > test script to run under late 2.x instead of 3.1+. I had originally written the test script was originally wr

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > I thought it might be useful for third-party libraries, or even > non-testing situations That might be true, but I prefer that we give code a more vigorous exercise before putting it in the standard library proper. When we try to use it for som

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Another option would be to have the read-end act like a non-blocking socket (i.e., raise EAGAIN). Since it would mostly be for testing, would it make more sense to add it to test.support or someplace similar instead of io

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Simply buffer everything. That works for when a write operation would block. What would it do when a read operation would block? -- ___ Python tracker <http://bugs.python.org/iss

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > It would be a non-seekable in-memory bytes buffer with distinct > read and write pointers, so as to act like a system FIFO or a > socket.makefile() object. What would it do when the equivalent system FIFO object would block? > (you may poin

[issue9915] speeding up sorting with a key

2010-09-22 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Attached is my script for running a more comprehensive battery of speed tests. The script itself requires Python 2.6 with argparse installed or Python 2.7 (which includes argparse). For obvious reasons, please make sure that your unpatched and patched

[issue9915] speeding up sorting with a key

2010-09-21 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Antoine said: > I don't think there's any point in micro-optimizations such as > stack_keys. Good point. I'll try taking that out and see how it impacts the timing. Raymond said: > The memmove, memcpy functions are tricky to

[issue9131] test_set_reprs in test_pprint is fragile

2010-09-21 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Committed in r84961 -- stage: patch review -> committed/rejected status: open -> closed type: -> behavior versions: -Python 3.3 ___ Python tracker <http://bugs.python.o

[issue9915] speeding up sorting with a key

2010-09-21 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : (I've made an educated guess about who to add to the Nosy list) The attached patch substantially speeds up sorting using the "key" parameter. It is purely a performance patch; the language and libraries are not changed in any other way

[issue9886] Make operator.itemgetter/attrgetter/methodcaller easier to discover

2010-09-17 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue9886> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9858] Python and C implementations of io are out of sync

2010-09-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Hmm, none the less other code expects it. Does that imply that there's some code that will break on FileIO objects that are created using a file descriptor instead of a filename? If so, where? -- __

[issue9858] Python and C implementations of io are out of sync

2010-09-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Roundup does not play well with Gmail when Gmail is in Rich Format mode ;-) That example should have read: >>> f = io.FileIO(1) >>> f.name 1 -- ___ Python tracker <http://bugs

[issue9858] Python and C implementations of io are out of sync

2010-09-15 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file18890/unnamed ___ Python tracker <http://bugs.python.org/issue9858> ___ ___ Python-bugs-list mailin

[issue9858] Python and C implementations of io are out of sync

2010-09-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Wed, Sep 15, 2010 at 10:51 AM, Benjamin Peterson wrote: > I'm not sure if this pickling stuff matters as long as they both pickle. > I'm not sure either. Do other Python implementations try to maintain a compatible pickle format with CP

[issue9858] Python and C implementations of io are out of sync

2010-09-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > These attributes exist; they're just not properties. Yes, I see. They're added to the instance in the constructor, so they don't exist as attributes of the class. Also in that category: BlockingIOError python is missing: ['cha

[issue9859] Add tests to verify API match of modules with 2 implementations

2010-09-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Yes, exactly. :-) (see also Issue9731, which has a similar flavor) -- ___ Python tracker <http://bugs.python.org/issue9

[issue9858] Python and C implementations of io are out of sync

2010-09-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: FWIW, I just opened Issue9859: Add tests to verify API match of modules with 2 implementations. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9859] Add tests to verify API match of modules with 2 implementations

2010-09-15 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Recently it came to light that the classes in C and Python implementations of the io module have slightly different attributes (issue9858). I propose the addition of a helper function in Lib/test/support.py to verify that the classes in two different

[issue9858] Python and C implementations of io are out of sync

2010-09-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Attached is a script to find all of the mismatches between the C and Python implementations. There are several. Below is the output: RawIOBase C is missing: ['readinto', 'write'] StringIO C is missing: ['name'] StringIO pyt

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-14 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/

[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-09-14 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Sounds reasonable to me. I'll close this and the related 9212 (both fixes are already committed to the py3k branch). -- stage: patch review -> committed/rejected status: open -> closed ___ Python tra

[issue9728] Docs point to FAQ Section 3, but FAQs are not numbered

2010-09-14 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Fixed in r84810, r84811, and 84812. For anyone curious, the old FAQ entry is here: http://web.archive.org/web/20010203161100/http://www.python.org/doc/FAQ.html#3.24 -- resolution: -> accepted stage: needs patch -> committed/rejected status

[issue9728] Docs point to FAQ Section 3, but FAQs are not numbered

2010-09-14 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Nevermind... archive.org has it. :-) -- ___ Python tracker <http://bugs.python.org/issue9728> ___ ___ Python-bugs-list mailin

[issue9728] Docs point to FAQ Section 3, but FAQs are not numbered

2010-09-14 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: It looks like the FAQ used be generated using Tools/faqwiz/faqwiz.py (which no longer exists). According to that file: --- This is a CGI program that maintains a user-editable FAQ. It

[issue9728] Docs point to FAQ Section 3, but FAQs are not numbered

2010-09-14 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Where does/did the FAQ live in the version control tree? -- ___ Python tracker <http://bugs.python.org/issue9728> ___ ___

[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-09-13 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Committed as r84791. Question: should this bugfix be backported to Python 3.1 and to xrange objects in Python 2.7? Since it's a bugfix that adds new methods, it's a gray-area. (same question applies to the closely related I

[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-09-11 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks, Georg, for prodding. As a new committer, I have possibly been erring a little too far on the side of having my patches thoroughly reviewed before committing. I'll commit the patch on Monday if no one raises objections (after re-testing, of c

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-09 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Committed as r84659. Thanks for the patch! -- stage: patch review -> committed/rejected status: open -> closed type: -> compile error ___ Python tracker <http://bugs.python.o

[issue9609] make cProfile multi-stack aware

2010-09-09 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +georg.brandl stage: -> patch review ___ Python tracker <http://bugs.python.org/issue9609> ___ ___ Python-bugs-list mai

[issue9609] make cProfile multi-stack aware

2010-09-09 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue9609> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: As far as I can tell, _mkdir(name) is equivalent to CreateDirectoryA(name, NULL), except one uses errno and the other uses GetLastErrno. It is definitely possible that there's something I don't know, though, and the documentation doesn't e

[issue5553] Py_LOCAL_INLINE(type) doesn't actually inline except using MSC

2010-09-04 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Ned, thanks for bringing that to my attention. I might have missed it otherwise. I had run "autoconf" but had not known to run "autoreconf", so I had missed the failure there. *embarrassed* Benjamin, thanks for fixing my err

[issue1303434] Please include pdb with windows distribution

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Attached is a slightly improved patch. It cleans up some whitespace issues with James's patch and filters out *_d.pdb files if they exist. I tested it on my system and it correctly produces a .zip file containing the .pdb files, next to the .msi

[issue9765] tcl-8 vs tcl8

2010-09-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Tools/buildbot/external-common.bat creates tcl-8.5.2.1, but Tools/msi/msi.py looks for tcl8*. Consequently, Tools/buildbot/buildmsi.py does not work on a fresh machine. tk has the same problem. I encountered this on the py3k branch but have not checked

[issue9764] Tools/buildbot/external.bat should download and built tix

2010-09-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : external.bat and external-common.bat take care of downloading most external packages such as tcl, tk, and openssl. However, the tix package is missing, but needed to build the msi. -- components: Build, Windows messages: 115503 nosy: loewis

[issue9731] Add ABCMeta.has_methods and tests that use it

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I agree that my original name proposal is terrible. :-) method_check and verify_full_api both look fine to me. > If all collection registrations were bundled together in > collections.py, I think I would expect the tests to be in > test_collect

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks, Antoine. Those are all good suggestions. Attached is an updated patch. Marc-Andre, Martin: would you like to look this over as well? -- Added file: http://bugs.python.org/file18730/unicode-3.patch

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks! Updated as you suggested and committed as r84450 and r84451. -- keywords: -needs review stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.p

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file18724/issue9753.patch ___ Python tracker <http://bugs.python.org/issue9753> ___ ___ Python-bugs-list m

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Following the advice of DuplicateHandle's documentation, I reimplemented dup on Windows using WSADuplicateHandle. Attached is a patch. With the patch, the tests pass on my Windows machine. Would someone like to review the patch? -- ass

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Windows, socket.dup is implemented using DuplicateHandle. The documentation for DuplicateHandle reads: You should not use DuplicateHandle to duplicate handles to the following objects: * I/O completion ports. No error is returned, but the

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I run it the same way. I wonder what's different? :-( I will try to find some time to investigate further. -- ___ Python tracker <http://bugs.python.org/i

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I just noticed that the previous "new" patch I uploaded was actually my original patch. Oops. Anyway... In a discussion on the capi list, a few people objected to compiling in Unicode-agnostic mode by default (e.g., it would be annoying

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The errors below show up on my XP machine in Python 3.1 as well as a recent build from the py3k branch. I'm not sure why they *don't* show up on the XP buildbot. fromfd() ultimately calls dup(), so the underlying problem is likely the same f

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : 7>..\Python\import.c(1158) : warning C4013: 'mkdir' undefined; assuming extern returning int -- assignee: stutzbach components: Interpreter Core, Windows keywords: easy messages: 115428 nosy: stutzbach priority: low severity: normal

[issue9746] All sequence types support .index and .count

2010-09-02 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : In the list of operations supported by all sequence types, the .index and .count methods should be included. They are defined by the collections.Sequence ABC that all sequences support. (except for range objects, but that will be fixed in Issue9213

[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-09-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thank you for the patch. The patch doesn't handle the case where the object being searched for is !PyLong_CheckExact. For example, the user might pass in a sub-type of int. The existing range_contains supports that case, so it seems like we s

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Also, credited Daniel Urban for the patch in r84436 (forgot that the first time around -- sorry!). -- ___ Python tracker <http://bugs.python.org/issue9

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Meant to add: I made some relatively minor changes to Daniel Urban's patch. Mostly, I rearranged the order of a few things to avoid unnecessary work (e.g., only compute "len_other" if we've already checked that "other" is a s

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Committed to py3k in r84435. Raymond, do you want to look the commit over before I merge it into 3.1 and 2.7? -- ___ Python tracker <http://bugs.python.org/issue9

[issue8743] set() operators don't work with collections.Set instances

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > The operator methods in setobject.c should be liberalized to accept > instances of collections.Set as arguments. Under this plan, set() and collections.Set will still have slightly different behavior. collections.Set will be more liberal and acce

[issue7141] 2to3 should add from __future__ import print_statement

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Well, I grant you that it's a bit of scope-creep, and if you want to reject it on those grounds I can't blame you. To me it seems like a relatively small change that would greatly help people like myself who want to update older code so that i

[issue7141] 2to3 should add from __future__ import print_statement

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Excluding the future fixer would only get me half of the way there. I would still need to add "from __future__ import print_statement" to all of my scripts if I want them to continue to work under 2.6. (Well, for me personally, I have already do

[issue5362] Add configure option to disable Py3k warnings

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Since this issue doesn't apply in Python 3 and (as I understand it) the 2.7 branch is only open to bug fixes, can we close this performance issue? -- nosy: +stutzbach ___ Python tracker <http://bugs.py

[issue2690] Precompute range length

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue2690> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1569291] Speed-up in array_repeat()

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue1569291> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9155] Reserve COMPARE_OP for rich comparisons

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue9155> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue2459> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue8425> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8685] set(range(100000)).difference(set()) is slow

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue8685> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I will aim to spend some time with this (and the similar Issue #9213) today and/or tomorrow, so that it can be committed in time for 3.2a2. -- resolution: -> accepted stage: unit test needed -> patch

[issue9731] Add ABCMeta.has_methods and tests that use it

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Re-opening and re-titling the issue to that effect. Proposed syntax and usage: # in Lib/abc.py class ABCMeta(type): # ... def has_methods(cls, subclass): "Returns True iff subclass implements the appropriate methods" #

[issue9731] ABCMeta.register should verify that methods are present

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Would it be useful to provide a separate function to perform the check, which could be used by lint-style tools as well as automated tests? It would be great if every call to .register in the standard library had a corresponding test that verified that the

[issue9731] ABCMeta.register should verify that methods are present

2010-09-01 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : In Issue 9212, I mused: > I sort of wonder if .register() should verify that the concrete class > provides all of the methods of the ABC. Éric Araujo suggested I open that as an issue for consideration. I have found a few bugs in the standard l

[issue8743] set() operators don't work with collections.Set instances

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Raymond, do you agree with Ray's analysis? -- ___ Python tracker <http://bugs.python.org/issue8743> ___ ___ Python-bugs-l

[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: As most of the code in this patch was copied from EnumValue and EnumKey, it includes bugs from those functions that have since been fixed. I'm thinking of Issue #2810, although there might have been other changes. Instead of duplicating code, it wou

[issue9730] base64 docs refers to strings instead of bytes

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: The example can be fixed by placing a "b" before the two string literals. However, pretty much the whole document refers to "strings" and should refer to "byte sequences" or the "bytes" type. I thought there

[issue9728] Docs point to FAQ Section 3, but FAQs are not numbered

2010-08-31 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : In Doc/extending/windows.rst, there's the following text: If your module creates a new type, you may have trouble with this line:: PyVarObject_HEAD_INIT(&PyType_Type, 0

[issue7141] 2to3 should add from __future__ import print_statement

2010-08-31 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I don't think I'm familiar enough with 2to3's pattern-matching syntax to write a good patch. Here's a rough outline for how a patch would work. There are two cases: 1) When there is already a "from __future__ import". Cur

[issue808164] socket.close() doesn't play well with __del__

2010-08-31 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Fixed in r84380 and r84382. -- keywords: -needs review resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org

[issue5553] Py_LOCAL_INLINE(type) doesn't actually inline except using MSC

2010-08-31 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Committed in r84379 -- keywords: -needs review resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue8781] 32-bit wchar_t doesn't need to be unsigned to be usable (I think)

2010-08-25 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I opened a separate issue for the SIZEOF_WCHAR_T issue so I could refer to that issue number in Misc/NEWS. Fixed in r84317. -- status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue9684] PC/pyconfig.h should define SIZEOF_WCHAR_T

2010-08-25 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: After making a Windows build and running the tests, committed in r84317. -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue8781] 32-bit wchar_t doesn't need to be unsigned to be usable (I think)

2010-08-25 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- dependencies: +PC/pyconfig.h should define SIZEOF_WCHAR_T ___ Python tracker <http://bugs.python.org/issue8781> ___ ___ Python-bug

<    1   2   3   4   5   >