[issue13238] Add shell command helpers to shutil module

2011-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: Unfortunately, I don't think including implicit shlex.quote() calls is going to have the effect I was originally looking for: >>> subprocess.call("du -hs ../py*", shell=True) 593M../py3k 577M../py3k_pristine 479M../python27

[issue13237] subprocess docs should emphasise convenience functions

2011-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: I'm reasonably happy with the changes I just checked in, but rather than doing multiple forward ports, my plan is to let them settle for a while, update them based on any feedback I get, then incorporate the final version into the 3.x s

[issue13237] subprocess docs should emphasise convenience functions

2011-10-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: docs@python -> ncoghlan ___ Python tracker <http://bugs.python.org/issue13237> ___ ___ Python-bugs-list mailing list Un

[issue13238] Add shell command helpers to shutil module

2011-10-25 Thread Nick Coghlan
Nick Coghlan added the comment: Considering this further, I've realised that the idea of implicit quoting for this style of helper function is misguided on another level - the parameters to be interpolated may not even be strings yet, so attempting to quote them would

[issue10197] subprocess.getoutput fails on win32

2011-10-25 Thread Nick Coghlan
Nick Coghlan added the comment: Without knowing this issue existed, I recently started working on adding some convenience APIs for shell invocation to shutil: http://bugs.python.org/issue13238 I think the getstatus and getstatusoutput APIs were copied from the commands module in 3.0 without

[issue13238] Add shell command helpers to shutil module

2011-10-25 Thread Nick Coghlan
Nick Coghlan added the comment: I discovered a couple of APIs that were moved from the commands module to the subprocess module in 3.0: http://docs.python.org/dev/library/subprocess#subprocess.getstatusoutput However, they have issues, especially on Windows: http://bugs.python.org/issue10197

[issue13238] Add shell command helpers to shutil module

2011-10-25 Thread Nick Coghlan
Nick Coghlan added the comment: After a bit of thought, I realised I could use the string.Formatter API to implement a custom formatter for the shell command helpers that auto-escapes whitespace while leaving the other shell metacharacters alone (so you can still interpolate paths containing

[issue13266] Support for unwrapping __wrapped__ functions in 'inspect' module

2011-10-25 Thread Nick Coghlan
New submission from Nick Coghlan : I just got bitten by the singularly unhelpful results of doing inspect.getsource(generator_context_manager). Now that @functools.wraps adds the __wrapped__ attribute, perhaps inspect.getsource(f) should follow the wrapper chain by default? This would affect

[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2011-10-25 Thread Nick Coghlan
Nick Coghlan added the comment: After a little thought, I think the explicit "unwrap" function is the only viable approach. Doing the unwrapping implicitly just has too many nasty corner cases to track down to ensure we aren't losing existing functionality. I'd also s

[issue13267] Add an option to disable importing orphaned bytecode files

2011-10-26 Thread Nick Coghlan
Nick Coghlan added the comment: This feature is unnecessary now that PEP 3147 has been adopted. The way it works in 3.2+ is that orphaned bytecode files inside __pycache__ are always ignored, while bytecode files that live directly in the source directories are always imported. This handles

[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Nick Coghlan
Nick Coghlan added the comment: Absent any further feedback, I think I'm done with the changes to the 2.7 subprocess docs. I'll let them sit for a few days, then do the forward port to 3.2 and default. There are a couple of additional changes I'll add to the 3.x vers

[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Nick Coghlan
Nick Coghlan added the comment: That's deliberate, as I'm only showing a selected subset of the full signature at that point and using the subprocess API's with positional arguments would lead to almost incomprehensible code. I'm not in any great hurry to forward port tho

[issue13237] subprocess docs should emphasise convenience functions

2011-10-27 Thread Nick Coghlan
Nick Coghlan added the comment: We can only protect people from themselves so much - "shell=True" is invaluable when you actually want to invoke the shell, and the shell has much better tools for process invocation and pipeline processing than Python does (since shells are, in effe

[issue13237] subprocess docs should emphasise convenience functions

2011-10-27 Thread Nick Coghlan
Nick Coghlan added the comment: As the last checkin message says, I've made the documentation for the helper functions more self-contained. Each now has its own short "shell=True" warning with a pointer to the full explanation in the shared parameter description. There was

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Nick Coghlan
Nick Coghlan added the comment: I realised I could use the convert_field() option in the custom formatter to choose between several interpolation quoting options: default - str + shutil.quote_ascii_whitespace !q - str + shlex.quote !u - unquoted (i.e. no conversion, str.format default

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Nick Coghlan
Nick Coghlan added the comment: Some examples: >>> import shutil >>> shutil.shell_call("du -hs {}", "../py*") 594M../py3k 579M../py3k_pristine 480M../python27 301M../python31 382M../python32 288K../python_swallowed_whole 0 >&

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Nick Coghlan
Nick Coghlan added the comment: The first version I wrote *did* automatically invoke shlex.quote on all interpolated values, but that breaks wildcard handling. You can see that in the examples I posted above. With the default whitespace escaping (which allows spaces in filenames), wildcard

[issue13238] Add shell command helpers to shutil module

2011-10-29 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I was thinking about this a bit more and realised that I'd rejected the "quote everything by default" approach before I had the idea of providing a custom conversion specifier to disable the implicit string conversion and quoting. So p

[issue13298] Result type depends on order of operands for bytes and bytearray

2011-10-30 Thread Nick Coghlan
New submission from Nick Coghlan : In a recent python-ideas discussion of the differences between concatenation and augmented assignment on lists, I pointed out the general guiding principle behind Python's binary operation semantics was that the type of a binary operation should not d

[issue13299] namedtuple row factory for sqlite3

2011-10-30 Thread Nick Coghlan
New submission from Nick Coghlan : Currently, sqlite3 allows rows to be easily returned as ordinary tuples (default) or sqlite3.Row objects (which allow dict-style access). collections.namedtuple provides a much nicer interface than sqlite3.Row for accessing ordered data which uses valid

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-10-31 Thread Nick Coghlan
Nick Coghlan added the comment: Bitbucket repo and attached patch updated relative to current tip. -- Added file: http://bugs.python.org/file23569/issue11816_get_opinfo_branch_20111031.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-10-31 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23197/issue11816_get_opinfo_branch_20110920.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-10-31 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23095/issue11816_get_opinfo_branch_20110904.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-10-31 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23019/issue11816_get_opinfo_branch_20110824.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-10-31 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file21599/dis.patch ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bugs-list mailin

[issue11682] PEP 380 reference implementation for 3.3

2011-10-31 Thread Nick Coghlan
Nick Coghlan added the comment: Bitbucket repo and attached patch updated relative to latest get_opinfo branch (which in turn was updated to apply cleanly against current CPython tip). (I still need to incorporate the doc updates and look into adding keyword argument support

[issue11682] PEP 380 reference implementation for 3.3

2011-10-31 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file22616/pep380-missing-docs.diff ___ Python tracker <http://bugs.python.org/issue11682> ___ ___ Python-bug

[issue11682] PEP 380 reference implementation for 3.3

2011-10-31 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23096/issue11682_pep380_branch_20110904.diff ___ Python tracker <http://bugs.python.org/issue11

[issue13306] Add diagnostic tools to importlib?

2011-10-31 Thread Nick Coghlan
New submission from Nick Coghlan : In discussing the module aliasing PEP on python-ideas, it occurred to me that we could potentially add some useful "sanity check" utilities to an "importlib.diagnostics" subpackage. For example: - scan sys.path looking for entries that

[issue13329] Runs normal as console script but falls as CGI

2011-11-02 Thread Nick Rowan
New submission from Nick Rowan : There is a Python script that tries to print a message in Russian language. It's okay when script runs in console, but it causes DecodeUnicodeError if it invokes as CGI. -- components: Interpreter Core, Library (Lib), Unicode files: Test.py mes

[issue13298] Result type depends on order of operands for bytes and bytearray

2011-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: We can just use this one - it was more in the nature of a question "is there anything we want to change about the status quo?" than a request for any specific change. I'm actually OK with buffer API based interoperability, but if we're goin

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: I should probably update that posted recipe to my latest version (which adds "excluded_files" and "excluded_dirs" parameters). However, since I've been dealing with remote filesystems where os.listdir() and os.stat() calls from

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: This needs more thought - pypi package coming soon :) -- ___ Python tracker <http://bugs.python.org/issue13229> ___ ___ Python-bug

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: That's one of the nicer attempts I've seen at an object-oriented path library, but I have a core problem with OOP path APIs, and it relates to the Unicode encoding/decoding problem: the ultimate purpose of path objects is almost always to either pa

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: Initial version available at: https://bitbucket.org/ncoghlan/iterwalk/src I'll get it published to PyPI once the test suite is in a slightly better state (no filesystem based tests as yet). -- ___ Python tr

[issue13237] subprocess docs should emphasise convenience functions

2011-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: Well, that forward port was definitely more complicated than I expected. Additional reviews of both 3.2 and 3.3 (i.e. default) would be appreciated - there were quite a few adjustments needed to cope with changes between 2.7 and 3.2 and then additional changes

[issue13238] Add shell command helpers to subprocess module

2011-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: After working on the documentation updates to the subprocess module to emphasise the convenience functions, I've now changed my mind and think it makes sense to keep these additions in that module. Now that the shell helpers will default to using shlex.

[issue13238] Add shell command helpers to subprocess module

2011-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: Éric, to answer your question, with the planned version of the new API, a "*.py" value interpolated with "{!u}" should indeed pick up all of those files, since the wildcard will be passed unmodified to the underlying shell, and all shell

[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-08 Thread Nick Coghlan
New submission from Nick Coghlan : The 3-tuple values yielded by os.walk could be made easier to work with in some use cases by offering a namedtuple style interface (similar to what is done with sys.float_info). for dirinfo in os.walk(base_dir): print(dirinfo.path) print

[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-08 Thread Nick Coghlan
Changes by Nick Coghlan : -- stage: -> needs patch type: -> feature request versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue13375> ___ __

[issue13229] Improve tools for iterating over filesystem directories

2011-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: A related idea is updating os.walk tuples to be a custom object offering a namedtuple style API (similar to sys.float_info). I created a separate issue for that: #13375 I've also updated the title of this issue to describe the problem it aims to ad

[issue11682] PEP 380 reference implementation for 3.3

2011-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: In reviewing Zbyszek's doc updates and comparing them against the Grammar, I discovered a gratuitous change in the implementation: it allows a bare (i.e. no parentheses) 'yield from' as an argument to a function, even when there's mu

[issue11682] PEP 380 reference implementation for 3.3

2011-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: OK, the bitbucket repo now has a more sane version of the new Grammar ('yield from' now requires parentheses wherever 'yield' does). The updated test_grammar does a more thorough check of the expected acceptance and rejection of yield ex

[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: Like any named tuple, the benefits lie in the better repr, and the fact that if you only want some fields you don't have to unpack the whole tuple. It's also easier to write variant APIs that add additional fields accessible on

[issue13229] Improve tools for iterating over filesystem directories

2011-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: I changed the package name to walkdir: https://bitbucket.org/ncoghlan/walkdir/overview -- ___ Python tracker <http://bugs.python.org/issue13

[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: Why provide any namedtuple interface in any context? After all, you can just unpack them to individual variables. The point is that the values produced by os.walk() *aren't* just an arbitrary 3-tuple - they have a definite API for describing a directory

[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: I'm persuaded that there's no major gain to be had in building this in at the base layer - it's easy enough to add in a higher level API. -- resolution: -> rejected status: open -> closed ___

[issue13237] subprocess docs should emphasise convenience functions

2011-11-11 Thread Nick Coghlan
Nick Coghlan added the comment: Calling this one done - any further adjustments can be handled as new tracker issues. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python track

[issue13349] Uninformal error message in index() and remove() functions

2011-11-11 Thread Nick Coghlan
Nick Coghlan added the comment: doctests by their very nature tend to overspecify things - that's why actual regression tests should be written with unittest, while doctest is kept for its originally intended purpose of testing examples included in docstrings and other documentation.

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-12 Thread Nick Coghlan
Nick Coghlan added the comment: I added some review comments to the patch, but I'm not sure how usable this is going to be in practice. References generally stay fairly stable while using the interactive interpreter, but the new block accounting jumps around all over the place due t

[issue13229] Improve tools for iterating over filesystem directories

2011-11-13 Thread Nick Coghlan
Nick Coghlan added the comment: And walkdir is now a published package: http://walkdir.readthedocs.org My plan for this issue now is to maintain walkdir as a standalone package for 2.7 and 3.2, but still add the functionality to shutil for 3.3+. However, I'll gather feedback on the

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-15 Thread Nick Coghlan
Nick Coghlan added the comment: This will likely be a decent "you have a problem" indicator, but you may still need tools like Valgrind to actually track down the *cause* of that problem. -- ___ Python tracker <http://bugs.python.o

[issue13238] Add shell command helpers to subprocess module

2011-11-15 Thread Nick Coghlan
Nick Coghlan added the comment: Similar to what I did with walkdir, I plan to publish a shellcommand module on PyPI to give people a chance to look at the API and experiment with it without having to patch shutil in the standard library. The only aspect I'm 100% sold on at the moment fo

[issue12627] Implement PEP 394: The "python" Command on Unix-Like Systems

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

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Nick Coghlan
Nick Coghlan added the comment: Please don't stress too much about providing an indication that the repr has been truncated - it's an error message, not part of the normal program output. Besides, the lack of a closing ')', ']', '}' or '>&#x

[issue10562] Change 'j' for imaginary unit into an 'i'

2011-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: While this thread was amusing to read, *changing* Python from the engineering notation to mathematical notation for imaginary numbers is not going to happen. 'i' has ambiguity problems relative to '1' and 'l' in too many fonts - &

[issue13440] Explain the "status quo wins a stalemate" principle in the devguide

2011-11-20 Thread Nick Coghlan
New submission from Nick Coghlan : I've linked http://www.boredomandlaziness.org/2011/02/status-quo-wins-stalemate.html in response to enough tracker issues and python-ideas threads now, that I'm convinced it (or at least something along those lines) belongs in the devguide. It wou

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

2011-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: +1 to 'c', but it should come with an update to PEP 8 to say "don't do that". -- ___ Python tracker <http:

[issue13442] Better support for pipe I/O encoding in subprocess

2011-11-20 Thread Nick Coghlan
New submission from Nick Coghlan : Currently, pipes in the subprocess module work strictly with bytes I/O, *unless* you set "universal newlines=True". In that case, it assumes an output encoding of UTF-8 for stdout and stderr and applies universal newlines process. When stdin/o

[issue13442] Better support for pipe I/O encoding in subprocess

2011-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: Indeed, I'll add my suggestions over there. -- assignee: docs@python -> resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> subprocess seems to use local 8-bit encoding

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: I discovered this same problem recently when updating the subprocess docs, and also in working on the improved shell invocation support I am proposing for 3.3 (#13238). I initially posted an earlier variant this suggestion as a new issue (#13442), but Victor

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

2011-11-22 Thread Nick Coghlan
Nick Coghlan added the comment: Hmm, my initial reaction is that that specific wording is stronger than I had in mind - there's nothing really wrong with having a shebang line and execute bit set on a top level module and symlinking it from /usr/bin. The problem is that we're d

[issue13455] Reorganize tracker docs in the devguide

2011-11-22 Thread Nick Coghlan
Nick Coghlan added the comment: Documenting the tracker UI itself isn't the big issue - what is useful (and what I think Ezio is getting at) is having a single place where newcomers can get a better idea of how we *use* the tracker. If someone just wants to report a bug, then sure,

[issue11682] PEP 380 reference implementation for 3.3

2011-11-22 Thread Nick Coghlan
Nick Coghlan added the comment: *Any* expression can be used as a standalone statement and (since PEP 352 was implemented) that now applies to 'yield' as well. PEP 352 fundamentally changed the way yield was conceptualised within the language - thinking of it as "a statement t

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

2011-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: Hmm, interesting mailing list post - I hadn't thought about how the auto-initialisation of sys.path[0] aligns with the Windows vs Unix difference in PATH handling (i.e. whether or not the current directory is considered to be on PATH), with Python coming

[issue13465] A Jython section in the dev guide would be great

2011-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: Hosting "docs.python.org/devguide/jython" doesn't seem like an unreasonable idea at all to me, and what's the benefit to CPython in making the Jython team go to the effort of building out independent deployment and source control infrastr

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: Meador's suggested name change has grown on me, so I plan to switch the name of the new API to "get_instructions()" and the new class to "Instruction". -- assignee: rhettinger -> ncoghlan _

[issue9957] SpooledTemporayFile.truncate should take size parameter

2011-11-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- versions: -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue9957> ___ ___ Python-bugs-list mailing list Unsub

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-11-24 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file23773/9512712044a6.diff ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bugs-list m

[issue11682] PEP 380 reference implementation for 3.3

2011-11-24 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file23774/0d1d76f68750.diff ___ Python tracker <http://bugs.python.org/issue11682> ___ ___ Python-bugs-list m

[issue13448] PEP 3155 implementation

2011-11-24 Thread Nick Coghlan
Nick Coghlan added the comment: Yes, but that can be a separate patch - step 1 is to make the attribute available, then relevant modules can subsequently be updated to use it as appropriate. -- ___ Python tracker <http://bugs.python.

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2011-11-24 Thread Nick Coghlan
New submission from Nick Coghlan : PEP 395 spends a lot of time discussing ways that the current automatic initialisation of sys.path[0] can go wrong, and even the proposed improvements in that PEP don't claim to fix the default behaviour for every possible scenario (just many of the

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

2011-11-24 Thread Nick Coghlan
Nick Coghlan added the comment: I created #13475 to discuss the idea of a command line option to override sys.path[0] initialisation. -- ___ Python tracker <http://bugs.python.org/issue10

[issue13476] Simple exclusion filter for unittest autodiscovery

2011-11-24 Thread Nick Coghlan
New submission from Nick Coghlan : unittest autodiscovery is very nice, but a '-x' option to specify directory patterns *not* to search could be a nice enhancement. (In my specific case, I want to run most of my tests, but one batch are Django tests and it would be nice to have an e

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2011-11-25 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, sorry Eric (Snow), you're trying to bite off *way* more than is reasonable by proposing to removing sys.path[0] auto-initialisation. While it has its problems, it's also far too entrenched in people's expections of Python's behaviour

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-11-25 Thread Nick Coghlan
Nick Coghlan added the comment: Somewhat inevitably, the detailed disassembler tests broke when Antoine updated the code generation for function definitions (as part of PEP 3155). (At least, the tests broke, and PEP 3155 seems the most likely culprit). I subsequently realised there

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-11-26 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23773/9512712044a6.diff ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bug

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-11-26 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file23773/9512712044a6.diff ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bugs-list m

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-11-26 Thread Nick Coghlan
Nick Coghlan added the comment: I have updated my BitBucket repo with the following changes: - the main API is now dis.get_instructions() - the info class is now dis.Instruction - get_instructions() accepts a 'line_offset' argument that is added to any source code line numbers - th

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2011-11-26 Thread Nick Coghlan
Nick Coghlan added the comment: Zbigniew posted a nice summary of some of the issues sys.path[0] autoinitialisation can cause to python-dev: http://mail.python.org/pipermail/python-dev/2011-November/114668.html -- ___ Python tracker <h

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2011-11-29 Thread Nick Coghlan
Nick Coghlan added the comment: I realised "-P" is available for use as the short form of the "suppress sys.path[0] initialisation" option. So "-p" would override the calculation of sys.path[0], while "-P" would switch it off completely (similar t

[issue13504] Meta-issue for "Invent with Python" IDLE feedback

2011-11-29 Thread Nick Coghlan
New submission from Nick Coghlan : This is a meta-issue for the following blog post: http://inventwithpython.com/blog/2011/11/29/the-things-i-hate-about-idle-that-i-wish-someone-would-fix/ There are a bunch of good ideas there that should be split out into a number of separate bug reports and

[issue13504] Meta-issue for "Invent with Python" IDLE feedback

2011-11-29 Thread Nick Coghlan
Nick Coghlan added the comment: If you decide to work on one of the problems or feature requests mentioned in that post: 1. Create a separate, appropriately titled, tracker issue 2. Add that issue to the Dependencies field on this one. 3. Add a comment here to map the point number from the

[issue13504] Meta-issue for "Invent with Python" IDLE feedback

2011-11-29 Thread Nick Coghlan
Nick Coghlan added the comment: Also add dependencies and links for any already known issues. For example: #10747 covers point 16) (re. version numbers in Windows shortcuts) -- dependencies: +Include version info in Windows shortcuts ___ Python

[issue13455] Reorganize tracker docs in the devguide

2011-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: Something else such docs could cover is how to manage remote Hg repos such that the "Create Patch" button does the right thing. Basically, you need to make sure an appropriate CPython version is found in the ancestors of the tip your working branc

[issue13515] Consistent documentation practices for security concerns and considerations

2011-11-30 Thread Nick Coghlan
New submission from Nick Coghlan : This issue proposes that we adopt and apply some standard practices when documenting modules that have potential security implications and other cross-cutting errors that may affect multiple interfaces within the module. Accordingly, the main target is the

[issue13515] Consistent documentation practices for security concerns and considerations

2011-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: While I acknowledge the point (it's the reason I *didn't* remove those warnings in my recent major update to the subprocess docs), Raymond's right that scattering warnings everywhere in the docs for modules like subprocess isn't the right

[issue13515] Consistent documentation practices for security concerns and considerations

2011-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, using notes rather than simple inline links would also be fine with me. So, with "in-line text" changed to "a ReST note", what do people otherwise think about the proposed style guide addition? -- __

[issue13523] Python does not warn in module .py files does not exist if there is still a .pyc file

2011-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: In Python 3.2 and later, standalone .pyc files are no longer created as a side effect of import. Instead, cached files are stored in a __pycache__ subdirectory and ignored completely if the corresponding source file is no longer present. (Standalone .pyc files

[issue12555] PEP 3151 implementation

2011-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Indeed, this seems to be the most likely culprit for the current buildbot failures in the new urllib2 tests: http://www.python.org/dev/buildbot/all/builders/AMD64%20Gentoo%20Wide%203.x/builds/2868/steps/test/logs/stdio -- resolution: fixed -> st

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23569/issue11816_get_opinfo_branch_20111031.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Changes by Nick Coghlan : -- hgrepos: -17 ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23773/9512712044a6.diff ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bug

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Changes by Nick Coghlan : -- hgrepos: +93 ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file23848/9512712044a6.diff ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bugs-list m

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: OK, there's something crazy going on with "Create Patch" failing to pick up the latest changes. I've removed all the obsolete patches, and am doing another merge from default to see if I can get it to pick

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file23848/9512712044a6.diff ___ Python tracker <http://bugs.python.org/issue11816> ___ ___ Python-bug

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Grr, "Create Patch" insists on trying to produce a patch based on https://bitbucket.org/ncoghlan/cpython_sandbox/changesets/9512712044a6. That checkin is from *September* and ignores all my recent changes :P Relevant meta-tracker is

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: OK, manual up-to-date patch attached. -- Added file: http://bugs.python.org/file23849/issue11816_get_opinfo_branch_20111204.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: @Ron: Now that it has a reasonably clear signature, I could see my way clear to making the Instruction._disassemble() method public, which makes it easy for people to compose their own disassembly output. For all the other display methods, I prefer Ryan

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