[issue2001] Pydoc interactive browsing enhancement

2010-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: On Wed, Nov 3, 2010 at 2:17 AM, Ron Adam wrote: > > Ron Adam added the comment: > > Nick, I can update the patch and move the server back into pydoc.py if that > will help you get this into 3.2 beta. Yep, probably the best option 3.2 - then m

[issue1500504] Alternate RFC 3986 compliant URI parsing module

2010-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: I still like the higher level API concept, although I might not do it exactly as presented here any more. Independently of introducing a new parsing API, it would be worthwhile extracting the parsing tests from the attached module to make sure the *existing

[issue10181] get_shape0 in memoryobject.c not checked for error return

2010-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: As far as I know, PEP 3118 serves its purpose of allowing extension modules like numpy and PIL to share data without needing to copy it around all the time. It's just that memoryview wasn't really part of that purpose (since all the affected t

[issue10181] get_shape0 in memoryobject.c not checked for error return

2010-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Read the "Releasing the buffer" section in PEP 3118 again. Unless I'm misunderstanding you completely, the rules you're asking for are already in place: those fields are entirely the responsibility of the exporting object, and it needs t

[issue10263] "python -m site" does not print path details

2010-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, yes, I see what you mean - because runpy ignores the sys.modules cache (by design), it won't see the precached module instance placed there by the bootstrap code. We actually *could* make this work on our end: if we find an existing module in sys.mo

[issue10181] get_shape0 in memoryobject.c not checked for error return

2010-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: Hmm, if we're ever creating a new copy of a Py_buffer without calling GetBuffer again on the original object, then *that* is a bug (exactly comparable to copying a PyObject pointer without incrementing the reference count - it's OK if you can gua

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2010-11-03 Thread Nick Coghlan
Changes by Nick Coghlan : -- title: get_shape0 in memoryobject.c not checked for error return -> Problems with Py_buffer management in memoryobject.c (and elsewhere?) ___ Python tracker <http://bugs.python.org/issu

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2010-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: It doesn't help that neither PEP 3118 nor the Py_buffer docs mention the "obj" member of the Py_buffer struct that refers back to the original object providing the buffer - that's fairly fundamental to understanding how

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2010-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: So the overall to-do list here is sounding like: 1. Document "Py_buffer->obj" appropriately in both the C API documentation and in PEP 3118 2. Ensure GetBuffer/ReleaseBuffer are used as the moral equivalent of INCREF/DECREF for Py_buffer objec

[issue1500504] Alternate RFC 3986 compliant URI parsing module

2010-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: Just to be clear, even *I* don't think adding urischemes as it stands is a particularly great idea, and I wrote it. The only reason I haven't closed the issue is because I'd like to see it mined for additional tests in test_urlparse a

[issue10318] "make altinstall" installs many files with incorrect shebangs

2010-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: Removing shebang lines from svn completely and only *adding* them during installation steps as appropriate may be an interesting approach. (I noted that my grep of my local build found only correct references to python3.2 in the built scripts directory) I&#x

[issue10318] "make altinstall" installs many files with incorrect shebangs

2010-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: For the record, my list is from an svn checkout of r86191 -- ___ Python tracker <http://bugs.python.org/issue10318> ___ ___ Pytho

[issue10318] "make altinstall" installs many files with incorrect shebangs

2010-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: A few more deeper in the py3k source tree: Doc/tools/docutils/_string_template_compat.py Doc/tools/docutils/readers/python/pynodes.py Doc/tools/sphinx/pycode/pgen2/token.py Lib/lib2to3/tests/data/different_encoding.py Adding Georg, since this affects the docs

[issue10318] "make altinstall" installs many files with incorrect shebangs

2010-11-05 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: d...@python -> ___ Python tracker <http://bugs.python.org/issue10318> ___ ___ Python-bugs-list mailing list Unsubscri

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2010-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: Reopening as a reminder to myself that I have a new PEP I want to write in this area. The idea is essentially a lighter weight alternative to PEP 377 that adds an optional __entered__ method to the context management protocol along the following lines: _v

[issue10329] trace.py and unicode in Python 3

2010-11-05 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue10329> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally

2010-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Just a note for myself when I next update the patch: the 2-tuple returned by defrag needs to be turned into a real result type of its own, and the decode/encode methods on result objects should be tested explicitly

[issue2001] Pydoc interactive browsing enhancement

2010-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: I'd actually started typing out the command to commit this before it finally clicked that the patch changes public APIs of the pydoc module in incompatible ways. Sure, they aren't documented, but the fact they aren't protected by an underscor

[issue2001] Pydoc interactive browsing enhancement

2010-11-07 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file19534/issue2001_ncoghlan_cleanup.diff ___ Python tracker <http://bugs.python.org/issue2001> ___ ___ Pytho

[issue2001] Pydoc interactive browsing enhancement

2010-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I'll ask for feedback on python-dev regarding the API breakage. If we decide not to break the existing API, I'd suggest the following: - keep both the old serve() and the old gui() (with DeprecationWarning added to both) (I'd forgotten yo

[issue2001] Pydoc interactive browsing enhancement

2010-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: As per python-dev discussion, we'll keep the old server and GUI implementations intact (but deprecated). The -g command line option will start the old implementation, -p and -b will start the new one. The APIs to activate the new implementation will start

[issue2001] Pydoc interactive browsing enhancement

2010-11-13 Thread Nick Coghlan
Nick Coghlan added the comment: Just call warnings.warn with an appropriate message, a category of DeprecationWarning and a stacklevel of 2 (so the warning will refer to the function's caller rather than to the pydoc code). It's basically the example from the warnings

[issue1553375] Add traceback.print_full_exception()

2010-11-14 Thread Nick Coghlan
Nick Coghlan added the comment: As per my response to RDM on python-dev, I think the patch is misguided as it currently stands. The traceback on an exception is built up as the stack unwinds. The stack above the frame containing the exception handler obviously hasn't been unwound yet,

[issue1553375] Add traceback.print_full_exception()

2010-11-14 Thread Nick Coghlan
Nick Coghlan added the comment: If the allframes flag is pursued further, then the stack trace should be added (with an appropriate header clause) after the entire exception chain has been printed (including the exception currently being handled

[issue1553375] Add traceback.print_full_exception()

2010-11-14 Thread Nick Coghlan
Nick Coghlan added the comment: Note that after the loop over the values is complete, the final value of tb should correctly refer to the traceback for the exception currently being handled regardless of whether or not any chaining is involved. So moving the stack printing code that is

[issue1553375] Add traceback.print_full_exception()

2010-11-16 Thread Nick Coghlan
Nick Coghlan added the comment: Note that my suggestion was to move the if statement out of the loop as-is: you would still be pulling the traceback to display from the caught exception rather than displaying the stack from the current point of execution. If you want the bottom most point to

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: Antoine's patch looks good to me. Given the assumptions in the memoryview code, disallowing NULL for the buf pointer sounds like the right thing to do, even for zero-length buffers. -- ___ Python tracker

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-24 Thread Nick Coghlan
Nick Coghlan added the comment: A SystemError indicates that an internal API was given bogus input or produces bogus output (i.e. we screwed up somewhere, or a third party is messing with interfaces they shouldn't be) If data validation fails for part of the public C API (whether

[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

2011-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: People may use SystemError for other purposes, but the docs are pretty clear it is only for internal errors that indicate an interpreter bug: http://docs.python.org/dev/library/exceptions.html#SystemError Extension modules or an embedding application passing

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: I can definitely confirm that one: ~/devel/py3k$ gcc -I/usr/local/include/python3.3m -o issue11321 issue11321.c -L/usr/local/lib/python3.3 -lpython3.3m -lm -lpthread -ldl -lutil -rdynamic ~/devel/py3k$ ./issue11321 START Try import #0 ...SUCCESS Try import #1

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: I haven't worked out where the error is happening yet, but the 13 allocated static variables and the complete lack of a module cleanup function aren't going to be helping matters. -- ___ Python trac

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: Here's a sample stack trace of it blowing up: Program received signal SIGSEGV, Segmentation fault. 0x00479404 in type_dealloc (type=0x76a82f20) at Objects/typeobject.c:2523 2523_PyObject_GC_UNTRACK(type); (gdb) bt #0 0x004794

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: I like the idea, and it seems to work as expected (i.e. an empty __slots__ doesn't conflict with inheritance from a C defined type or a type with non-empty __slots__). However, __slots__ is one of the sections of the type machinery I'm least familia

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: While Andreas's patch does indeed prevent the crash, there is something more going on here. I modified his patch to print out the reference counts immediately after the new INCREF commands. With the INCREF commands commented out, it looks like this: ~/

[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: Merging this into issue11321 since that relates to the same underlying problem and includes a simpler test case. -- nosy: +ncoghlan resolution: -> duplicate status: open -> closed superseder: -> 9th import of module _pickle alway

[issue11349] _pickle should implement the module finalisation protocol

2011-02-27 Thread Nick Coghlan
New submission from Nick Coghlan : As discussed in issue11321, _pickle allocates a number of module level objects, but doesn't use the appropriate PEP 3121 mechanisms to manage their lifecycle. It should be updated to follow the relevant development guidelines in the document

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: Looking at the example of _struct.c, I'll withdraw my objection to the patch. The segfault is due to the attempt to destroy a statically allocated type object, and the only viable solution to that is to ensure the reference count never drops to 0, even d

[issue1720250] PyGILState_Ensure does not acquires GIL

2011-02-28 Thread Nick Coghlan
Nick Coghlan added the comment: Given the deprecation of PyEval_ReleaseLock in issue10913, should this be closed as "out of date"? -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org

[issue11349] _pickle should implement the module finalisation protocol

2011-02-28 Thread Nick Coghlan
Nick Coghlan added the comment: In that case, the request should probably read "_pickle should implement the module finalisation protocol, and module finalisation should be designed so that doing so isn't a recipe for segfaults". It strikes me as being very similar to the ex

[issue11356] Include module name on ImportError

2011-02-28 Thread Nick Coghlan
New submission from Nick Coghlan : Catching ImportError in order to switch to an alternate implementation can mask real failures in imported modules. Attaching the module name as an attribute would allow this to be handled correctly by doing something like: try: import simplejson except

[issue11349] _pickle should implement the module finalisation protocol

2011-03-01 Thread Nick Coghlan
Nick Coghlan added the comment: We might be able to tapdance our way around the issue by falling back to the old mechanism when dealing with extension modules without traverse/clear/dealloc methods. -- ___ Python tracker <http://bugs.python.

[issue11383] compilation seg faults on insanely large expressions

2011-03-03 Thread Nick Coghlan
New submission from Nick Coghlan : ~/devel/py3k$ ./python -c "compile('1*'*10+'1', 'broken', 'eval')" Segmentation fault Going by the gdb stack trace we're blowing the stack due to the recursive descent in "compiler_visit_expr&qu

[issue11383] compilation seg faults on insanely large expressions

2011-03-03 Thread Nick Coghlan
Nick Coghlan added the comment: Updated Lib/test/crashers/compiler_recursion.py to refer back to this issue. (As well as making it actually crash again on my system - apparently an expression nested 59k deep wasn't enough to kill the stack here, so I bumped it to

[issue11477] Bug in code dispatching based on internal slots

2011-03-14 Thread Nick Coghlan
Nick Coghlan added the comment: Armin, I'm not sure returning NotImplemented from __iadd__ is a good idea in this case. It means "+=" on a mutable object may silently fail to mutate in-place - enabling that seems rather questionable. --

[issue11477] Bug in code dispatching based on internal slots

2011-03-14 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11506] b'' += gives SystemError instead of SyntaxError

2011-03-14 Thread Nick Coghlan
New submission from Nick Coghlan : b'' += source gives SystemError instead of SyntaxError -- messages: 130881 nosy: ncoghlan priority: normal severity: normal status: open title: b'' += gives SystemError instead of SyntaxError __

[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2011-03-14 Thread Nick Coghlan
Nick Coghlan added the comment: Aren't such use cases already covered by assertRaisesRegex? -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/is

[issue11505] string.py increased test coverage

2011-03-14 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue11505> ___ ___ Python-bugs-list mai

[issue11549] Rewrite peephole to work on AST

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +dmalcolm, ncoghlan ___ Python tracker <http://bugs.python.org/issue11549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11165] Document PyEval_Call* functions

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: There may be some legitimate use cases when embedding Python and you *know* that the checks performed by the PyObject_* versions aren't needed. It may also be historical - the PyEval versions may predate the PyObject

[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: Michael pointed out that I had completely missed the point of what the "msg" argument was about. Sorry for the noise. -- ___ Python tracker <http://bugs.python.o

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: Armin: yeah, I learned better in the course of trying to fix this misbehaviour in CPython. I've adjusted assorted sq_concat methods to return NotImplemented in the sandbox where I'm working on this, along with modifying abstract.c to correctly cope

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: My work in progress is on the respect_LHS_precedence branch in http://hg.python.org/sandbox/ncoghlan Current status is that I have tests for correct handling of sq_concat and sq_repeat, and am close to having sq_concat and sq_inplace_concat behaving correctly

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: Trying out the hg integration MvL added to Roundup. -- hgrepos: +3 ___ Python tracker <http://bugs.python.org/issue11477> ___ ___

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- keywords: +patch Added file: http://bugs.python.org/file21216/85d7c99fd31e.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file21216/85d7c99fd31e.diff ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bug

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file21217/b9b7d4c10bc4.diff ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bugs-list m

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: I generated a patch between my sandbox and the main repository using the rdiff extension immediately after syncing with the main line of development. ("hg diff --reverse cpython" where cpython is aliased to the main repository) This is the output I

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file21220/2f5db44c98f2.diff ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bugs-list m

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file21220/2f5db44c98f2.diff ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bug

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: I think the roundup/Hg integration may be getting confused by the merges of the cpython main line of development with my sandbox. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: MvL says the review creation script should be able to cope with the rdiff output within the next day or so. -- ___ Python tracker <http://bugs.python.org/issue11

[issue8754] ImportError: quote bad module name in message

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue8754> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1559549] ImportError needs attributes for module and file name

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue1559549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11559] Increase test coverage in dis module

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue11559> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: I'd suggest calling Py_FatalError rather than calling abort() directly in _PyObject_AssertFailed, but otherwise this looks like a nice improvement over standard C asserts for state invariants that may be broken by buggy C extensions. For the tests, t

[issue11549] Rewrite peephole to work on AST

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue11549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11561] "coverage" of Python regrtest cannot see initial import of libs

2011-03-15 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +brett.cannon, ncoghlan ___ Python tracker <http://bugs.python.org/issue11561> ___ ___ Python-bugs-list mailing list Unsub

[issue11477] Bug in code dispatching based on internal slots

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: We know, I left it there to help MvL debug the issues in the diff generator. The version I created with the rdiff extension is correct though, and Martin fixed the Reitveld integration to handle the extra lines at the start of the diff. I wouldn't act

[issue11549] Rewrite peephole to work on AST

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: The review links didn't come up automatically because 336137a359ae isn't a hg.python.org/cpython revision ID. -- ___ Python tracker <http://bugs.python.o

[issue11549] Rewrite peephole to work on AST

2011-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: No need, since you manually created a review on appspot. The local Reitveld links are just a convenience that can avoid the need to manually create a review instance. -- ___ Python tracker <http://bugs.python.

[issue11562] += on list inside a tuple raises TypeError but succeeds anyway

2011-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: As Daniel noted, this behaviour is in accordance with the language definition. It's obscure and surprising behaviour, but it isn't wrong. -- nosy: +ncoghlan resolution: -> invalid stage: test needed -> committed/rejected status

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: Note that this will be fixed for 3.3, as siteconfig will be updated to use static data (generated during the build process) rather than relying on build artifacts being available at runtime. However, virtualenv (et al) will still need to provide the relevant

[issue11560] Expand test coverage in shutil

2011-03-16 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue11560> ___ ___ Python-bugs-list mai

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue11572> ___ ___ Python-bugs-list mai

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: Alexander: the coverage problem in this case has to do with it incorrectly handling an "else:" clause on a loop (it doesn't adjust the expected target for an empty sequence to be the body of the else clause) Benjamin: the pragma question is

[issue11548] Passing format= to unpack_archive fails

2011-03-16 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue11548> ___ ___ Python-bugs-list mai

[issue11577] testcase for exception binhex.Error

2011-03-16 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue11577> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11577] testcase for exception binhex.Error

2011-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: unittest provides a utility to help with testing that correct exceptions are raised: http://docs.python.org/dev/library/unittest#unittest.TestCase.assertRaises -- ___ Python tracker <http://bugs.python.

[issue11549] Rewrite peephole to work on AST

2011-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: I've been focusing on softer targets during the sprints - I'll dig into this once I'm back home and using my desktop machine again. -- ___ Python tracker <http://bugs.pyt

[issue11477] Bug in code dispatching based on internal slots

2011-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: The draft code is now only on the "respect_LHS_precedence" branch of my sandbox repository. -- ___ Python tracker <http://bugs.python.o

[issue11477] Bug in code dispatching based on internal slots

2011-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: Well, there and in the named diff file on here, of course. -- ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Pytho

[issue11505] string.py increased test coverage

2011-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: Reopening to double check with Jerome's patch. -- resolution: fixed -> stage: committed/rejected -> commit review status: closed -> open ___ Python tracker <http://bugs.pyth

[issue11577] testcase for exception binhex.Error

2011-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: This is fixed on default as well, I just stuffed the merge so the history looks odd and the integration script didn't pick it up. You can see the additional changes I made in the linked changeset: - try/except with a flag to clean up implicitly created

[issue11572] bring Lib/copy.py to 100% coverage

2011-03-19 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding "__reduce__", other readers will have the same question Éric did, so that point should definitely go in a comment after the "__reduce_ex__" check. -- ___ Python tracker <http://bug

[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Nick Coghlan
Nick Coghlan added the comment: It's largely a backwards compatibility hack, but the concrete methods also have an optimised fast path that the generic methods lack. So (for example), PyList_SetItem would now mean "this is *probably* a list, so check for that and use the fast p

[issue11627] segfault raising an arbitrary object as an exception

2011-03-22 Thread Nick Coghlan
Nick Coghlan added the comment: Note that this test code: def raise_(): raise MyException self.assertRaises(TypeError, raise_) can be simplified to: with self.assertRaises(TypeError): raise MyException in all currently maintained branches

[issue11647] function decorated with a context manager can only be invoked once

2011-03-22 Thread Nick Coghlan
Nick Coghlan added the comment: On Wed, Mar 23, 2011 at 12:04 PM, Antoine Pitrou wrote: > Clearly there is a problem in the API or its implementation, as in a function > decorated with a context manager can only be invoked once! This isn't good... The problem stems from a fundam

[issue9523] Improve dbm modules

2011-03-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue9523> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11647] function decorated with a context manager can only be invoked once

2011-03-23 Thread Nick Coghlan
Nick Coghlan added the comment: > The former sounds like fixing the bug, the latter like removing > functionality. So yes, I prefer the former... The reason I'm reluctant is that it makes for a fundamental change in behaviour between the use of an @contextmanager definition a

[issue11455] issue a warning when populating a CPython type dict with non-string keys

2011-03-24 Thread Nick Coghlan
Nick Coghlan added the comment: Thomas, I know you've been working on this post-Pycon. Could you please take a look at Daniel's patch and/or publish your own. -- assignee: -> twouters nosy: +ncoghlan, twouters ___ Python t

[issue11477] Bug in code dispatching based on internal slots

2011-03-24 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file21383/8bd713a823b5.diff ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bugs-list m

[issue11477] Bug in code dispatching based on internal slots

2011-03-24 Thread Nick Coghlan
Nick Coghlan added the comment: Martin and I are still experimenting with this issue as a test case for the remote repository diff calculator, so apologies for the noise as we add and remove patch files. -- ___ Python tracker <h

[issue11682] PEP 380 reference implementation for 3.3

2011-03-25 Thread Nick Coghlan
New submission from Nick Coghlan : Creating an issue to track efforts to forward port the PEP 380 reference implementation to Python 3.3. -- hgrepos: 11 messages: 132213 nosy: ncoghlan priority: normal severity: normal status: open title: PEP 380 reference implementation for 3.3

[issue7284] argparse - display version in usage by default

2011-03-26 Thread Nick Coghlan
Nick Coghlan added the comment: On Sat, Mar 26, 2011 at 9:14 PM, anatoly techtonik wrote: > A pity that before argparse replaced optparse, there was no research > made to gather the output from various console tools to see how > argparse really saves people from reinventing their

[issue11690] Add "communication" FAQ to devguide

2011-03-26 Thread Nick Coghlan
New submission from Nick Coghlan : It would be good to supplement the "here's the list of mailing lists" (etc) section in the devguide [1] with a more task oriented communications FAQ of the form "If you are asking about topic A, then ask in forums X, Y or Z". (wher

[issue11681] -b option undocumented

2011-03-27 Thread Nick Coghlan
Nick Coghlan added the comment: Even "from __future__ import unicode_literals" doesn't make it do anything. Perhaps Christian merged it by mistake in [5341b30b1812]? -- nosy: +ncoghlan ___ Python tracker <http://bugs.pyt

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Nick Coghlan
Nick Coghlan added the comment: Finally got around to reviewing this (just a visual scan at this stage) - thanks for the effort. These are mostly "big picture" type comments, so I'm keeping them here rather than burying them amongst all the details in the code review tool.

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Nick Coghlan
Nick Coghlan added the comment: I think the biggest thing to take out of my review is that I strongly encourage deferring the changes for 5(b) and 5(c). I like the basic idea of using a template-based approach to try to get rid of a lot of the boilerplate code currently needed for AST

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I missed the fact that the new optimisation pass isn't run under PyCF_ONLY_AST. However, as Eugene picked up, my concern is actually with the collapsing of Str/Num/Bytes/Ellipsis into the new Lit node, and the changes to the way None/True/Fals

<    1   2   3   4   5   6   7   8   9   10   >