[issue1706039] Added clearerr() to clear EOF state

2010-11-30 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: The patch includes unittests; the issue is that the tests pass without the changes. That is an entirely different state to be in. The tests should be committed unless somebody wants to object to the behavior that they are testing (although I

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-19 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: FYI, in v10, +#define NFAULT_SIGNALS (sizeof(fault_signals) / sizeof(fault_signals[0])) +static fault_handler_t fault_handlers[4]; , should use NFAULT_SIGNALS instead of 4. However, this bit of code bothers me a lot: +const int fd = 2

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-20 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: On 12/20/2010 8:30 AM, STINNER Victor wrote: Write into a closed file descriptor just does nothing. Closed file descriptors are not a problem. My issue not with a closed file descriptor, it is with an open file descriptor that is not what

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 8:52 PM, STINNER Victor wrote: Amaury asked for a sys.setsegfaultenabled() option: I think that the command line option and the environment variable are enough. I really think you should think of it as a choice the developer

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 10:35 PM, STINNER Victor wrote: Why do you think so? Can you give me an use case of sys.setsegfaultenabled()? To feed back your own argument on python-dev: How do you know that you application will crash? The idea is to give

[issue10899] No function type annotations in the standard library

2011-01-13 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Raymond Hettinger wrote: I think those annotations should be replaced with comments. In your revisions, you didn't do anything but blow away the annotations despite what you said here, which is an unfortunate loss of information

[issue1826] operator.attrgetter() should accept dotted attribute paths

2008-01-14 Thread Scott Dial
Scott Dial added the comment: I want to clarify that the proposed change would break: operator.attrgetter(foo)(bar) == getattr(bar, foo) Which is the documented intent of the operator module: This module exports a set of functions implemented in C corresponding to the intrinsic operators

[issue1826] operator.attrgetter() should accept dotted attribute paths

2008-01-14 Thread Scott Dial
Scott Dial added the comment: The attached patch provides for the functionality requested. I've updated the docstring of attrgetter related to this new feature and have updated test_operator accordingly. Added file: http://bugs.python.org/file9169/getattrchaser.diff

[issue1826] operator.attrgetter() should accept dotted attribute paths

2008-01-15 Thread Scott Dial
Scott Dial added the comment: Mea culpa, the original patch I attached here has an obvious duplication of code in test_operator.py. I've attached an updated patch to make life easier on the commiter. Added file: http://bugs.python.org/file9175/getattrchaser.diff

[issue6507] Enhance dis.dis to autocompile codestrings

2010-07-02 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: disassemble_str should be private with an underscore. disassemble_string should've been private as well, while we are editing this module. -- nosy: +scott.dial ___ Python tracker rep

[issue10432] concurrent.futures.as_completed() spins waiting for futures to complete

2010-11-16 Thread Scott Dial
New submission from Scott Dial sc...@scottdial.com: The code in as_completed() waits on a FIRST_COMPLETED event, which means that after the first future completes, it will no longer wait at all. The proposed patch adds a _AsCompletedWaiter and uses a lock to swap out the finished list

[issue10432] concurrent.futures.as_completed() spins waiting for futures to complete

2010-11-17 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Good catch. I suppose it was inevitable when I transferred my changes into a SVN checkout that I missed something. Nevertheless, your changeset in r86491 matches my own. Thanks! -- ___ Python

[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()

2010-11-19 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Got a test case that demonstrates a failure? Looks like it works to me... $ uname -ip sparc SUNW,Sun-Fire-280R $ python -c 'import sys; print sys.byteorder' big $ python -c 'import sha; print sha.new(open(test, rb).read()).hexdigest

[issue4711] Wide literals in the table of contents overflow in documentation

2008-12-21 Thread Scott Dial
New submission from Scott Dial sc...@scottdial.com: There is a problem with the table contents with respect to literals that cannot be word-wrapped. I see this issue here: http://docs.python.org/dev/2.6/library/multiprocessing.html The line in the table of contents that reads

[issue1706039] Added clearerr() to clear EOF state

2008-12-22 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I believe the original patch is overreaching. I believe the changes to fileobject.c should've been much simpler, just as the title describes (adding clearerr() just before performing reads on the FILE handles). I've attached a much simpler patch

[issue1706039] Added clearerr() to clear EOF state

2008-12-23 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: They differ because in Py_UniversalNewlineFgets() there is a call to FLOCKFILE(), and it seemed appropriate to ensure that clearerr() was called after locking the FILE stream. I certainly pondered over whether it made a difference to do it before

[issue8636] enumerate() test cases do not cover optional start argument

2010-05-06 Thread Scott Dial
New submission from Scott Dial sc...@scottdial.com: The issue2831 patch test cases are not actually being run by test_enumerate and they were broken tests anyways. This patch fixes the brokenness. -- components: Interpreter Core, Tests files: test_enumerate.patch keywords: patch

[issue2831] Adding start to enumerate()

2010-05-06 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Created issue8636 for the broken test cases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2831

[issue2831] Adding start to enumerate()

2008-05-11 Thread Scott Dial
New submission from Scott Dial [EMAIL PROTECTED]: Georg Brandel suggested enumerate() should have the ability to start on an arbitrary number (instead of always starting at 0). I suggest such a parameter should be keyword-only. Attached is a patch to add such a feature along with added test

[issue2831] Adding start to enumerate()

2008-05-11 Thread Scott Dial
Changes by Scott Dial [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10300/enumerate.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2831 __ ___ Python-bugs-list

[issue2831] Adding start to enumerate()

2008-05-11 Thread Scott Dial
Changes by Scott Dial [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10299/enumerate.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2831 __ ___ Python-bugs

[issue2831] Adding start to enumerate()

2008-05-11 Thread Scott Dial
Changes by Scott Dial [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10300/enumerate.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2831 __ ___ Python-bugs

[issue2831] Adding start to enumerate()

2008-05-11 Thread Scott Dial
Changes by Scott Dial [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10301/enumerate.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2831 __ ___ Python-bugs-list

[issue2831] Adding start to enumerate()

2008-05-12 Thread Scott Dial
Scott Dial [EMAIL PROTECTED] added the comment: As it stands, enumerate() already takes a sequence keyword as an alternative to the first positional argument (although this seems to be completely undocumented). So, as you say, METH_O is a no go. I agree with you in that my original complaint

[issue1775025] zipfile: Allow reading duplicate filenames

2008-05-19 Thread Scott Dial
Scott Dial [EMAIL PROTECTED] added the comment: In the patch you commented why is 'filepos' computed next? It's never referenced. The answer is that back at r54152 (#1121142) the method was rewrote removing any reference to 'filepos', but the patch author failed to remove that line. Please

[issue2975] VS8 include dirs grow without bound

2008-05-28 Thread Scott Dial
Scott Dial [EMAIL PROTECTED] added the comment: I don't believe this is a valid bug. Can you provide a case where it does in fact grow? This issue has previously been addressed in #1685563, and was carried over to the new code as well. Some lines after the path is appended to, there is a call

[issue2975] VS8 include dirs grow without bound

2008-05-29 Thread Scott Dial
Scott Dial [EMAIL PROTECTED] added the comment: The path gets changed everytime a MSVCCompiler is instantiated. I've seen the same problem with PATH before with PyPy. I agree this is a bug, but I don't see how it can be fixed. The problem exists inside of vcvarsall.bat if I understand

[issue2975] VS8 include dirs grow without bound

2008-09-02 Thread Scott Dial
Scott Dial [EMAIL PROTECTED] added the comment: This patch shouldn't have been applied as it is. The definition of removeDuplicates is both poorly-named, not exactly correct, and redundant (as there is already a normalize_and_reduce_paths) for performing this fix on PATH. Jim, you acknowledged

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: It would seem the logical patch would be to return the line when the empty string is returned. This would fall in line with the behavior of other objects with a readline() in python. In following with that, the patch I have attached returns

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15012/imaplib-r75166.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Added file: http://bugs.python.org/file15013/imaplib-r75166.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue7084] printing a list releases the GIL carelessly

2009-10-10 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I've attached a patch that fixes this issue by grabbing a reference to the item to be printed just before releasing the GIL. -- keywords: +patch nosy: +scott.dial Added file: http://bugs.python.org/file15099/list_print-r75317.patch

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Alright, I am attaching a new patch to correct the brain-fart inefficiency of slicing versus endswith(). I don't understand why this is so difficult to review. I don't think Janssen is the right person to have been assigned to this. While

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15013/imaplib-r75166.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Ben, I understand that we are all volunteers here. My frustration in the lack of a de facto owner of the imaplib module and not with you personally or any other committer for that matter. As it is, there is no unittests for the imaplib module

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I found myself in the mood to code, so in the spirit of every step counts, I have attached a patch that updates test_imaplib accordingly. The construction of the test framework is based loosely on test_ssl and test_socketserver. If someone felt

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Added file: http://bugs.python.org/file15459/test_imaplib-r76683.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15458/test_imaplib-r76683.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Added file: http://bugs.python.org/file15460/test_imaplib-r76683.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15459/test_imaplib-r76683.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: The test requires regrtest.py be run with network support and the python instance be built with threads. $ ./python Lib/test/regrtest.py -u network test_imaplib Without network support, it just skips those test (which is the same way test_ssl

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Thanks for giving it a try. I believe the issue is that I am raising an exception in the middle of run_server, which was not a pattern tested in the other modules I looked at. Thus, the threads for those do not get reaped correctly. I have

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: The design of your patch makes a lot of sense. I found that your patch uncovered a problem with using the ThreadingMixin (which is ultimately not necessary as long as the whole SocketServer is in its own thread). I rewrote the SimpleIMAPHandler

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I actually thought I was complying with PEP8.. yikes. I guess my personal rules are slightly different. I think the latest attached patch is PEP8 compliant now. And, I moved the import_module() to the top as you suggested. -- Added file

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15460/test_imaplib-r76683.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15466/test_imaplib-r76683-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15472/test_imaplib_issue5949-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15457/imaplib-eof-test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Added file: http://bugs.python.org/file15508/test_imaplib_issue5949-py26.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Added file: http://bugs.python.org/file15509/test_imaplib_issue5949-py26.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15508/test_imaplib_issue5949-py26.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15509/test_imaplib_issue5949-py26.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I tracked the necessary change to r73638 and issue6267. However, I am not sure it is in scope to backport all of that. The only changed actually needed from this set to make SocketServer behave correctly with a SSLSocket is: def

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I've revised my opinion. If you extract out only the changes to SocketServer and ignore the others, then I would consider it a good backport (fixes bugs only). I have attached such a patch. BTW, with this patch, you can remove the shutdown

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: It seems that on the py3k branch, the EOF situation is handled roughly in the same manner (the broken line is returned) and ultimately the IMAP4.abort exception is raised because b'* ' is an invalid response (the 'OK' having been dropped). IOW

[issue1706039] Added clearerr() to clear EOF state

2009-12-10 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I've attached a patch that applies cleanly against py3k. I do not have an in-depth understanding of the new io module, but at a cursory glance, it seems to not use FILE streams, and would not be subject to this bug. However

[issue1706039] Added clearerr() to clear EOF state

2009-12-10 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Added file: http://bugs.python.org/file15517/issue1706039-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1706039

[issue1706039] Added clearerr() to clear EOF state

2009-12-10 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15516/issue1706039-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1706039

[issue1706039] Added clearerr() to clear EOF state

2011-03-08 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I've updated the patch to apply to the current tip. (This patch was an opportunity for me to update to an Hg workflow.) Alexander, I disagree with you about the tests. The unittests use the exact same pattern/model that testIteration uses. I

[issue11450] Py_GetBuildInfo() truncates when there are many hg tags

2011-03-09 Thread Scott Dial
New submission from Scott Dial sc...@scottdial.com: I'm not sure if it's intended to be a supported workflow, but I personally have come to like using mq for projects where I am an outsider submitting small changes as patches. However, this appears to be a broken workflow due to way

[issue1706039] Added clearerr() to clear EOF state

2011-03-09 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I'm well aware of the limited use of Py_UniversalNewlineFgets() in py3k, but it remains the case that it is a public API that fails to work correctly under the conditions specified by the reporter, and Alexander confirmed the original patch

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-24 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Antoine Pitrou wrote: It would be nice if it were enabled by default for fatal errors (and asserts perhaps?). I feel like a broken record. This code hardcodes fd=2 as a write target on crash, which is not safe thing to do at all. You can

[issue10639] reindent.py should not convert newlines

2011-08-02 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I haven't seen anyone use a side-effect-less statement (a string) as a comment before, but I doubt that is an approved style for the CPython codebase. Please change the string preceeding the spec_line definition into a proper comment

[issue2975] VS8 include dirs grow without bound

2012-05-20 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I was looking through old issues I had commented on and saw that my patch was never applied. The current tip of the codebase still has the redundant removeDuplicates function. Not a big deal, just a little extra noise in the code. Probably

[issue23605] Use the new os.scandir() function in os.walk()

2015-03-09 Thread Scott Dial
Scott Dial added the comment: I cloned https://github.com/benhoyt/scandir @ 494f34d784 and ran benchmark.py on a couple systems that are Linux backed by a couple different NFS servers of various quality. First, a Linux VM backed by a Mac OS X NFS server backed by a SSD: $ python benchmark.py