[issue33233] Suggest third-party cmd2 module as alternative to cmd

2018-04-06 Thread Catherine Devlin
Catherine Devlin <catherinedev...@users.sourceforge.net> added the comment: Hi, everybody! I really appreciate the kind words about cmd2. For several years now, Todd Leonhardt has been cmd2's primary maintainer, so I may be speaking out of turn. But, before I wanted to let it get

[issue30438] tarfile would fail to extract tarballs with files under R/O directories (twice)

2017-05-25 Thread Catherine Devlin
Catherine Devlin added the comment: My last commit to the PR includes a fix by delaying setting permission to all files, not just to directories, in .extractall(). It might be better to catch the problem during .add instead, preventing tarring multiple copies, but I found subtle difficulties

[issue30438] tarfile would fail to extract tarballs with files under R/O directories (twice)

2017-05-24 Thread Catherine Devlin
Catherine Devlin added the comment: Okay, the problem is a little more specific than my last message suggested, but also a little less specific than the original report. A "PermissionError: [Errno 13] Permission denied" is thrown when expanding a tarfile to which a file had been

[issue30438] tarfile would fail to extract tarballs with files under R/O directories (twice)

2017-05-24 Thread Catherine Devlin
Changes by Catherine Devlin <catherine.dev...@gmail.com>: -- pull_requests: +1892 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30438] tarfile would fail to extract tarballs with files under R/O directories

2017-05-23 Thread Catherine Devlin
Catherine Devlin added the comment: I apologize, I retract my earlier comment - I believe both Yaroslav and I were confused about the nature of the problem. I think it's not related to permissions at all, but to adding a file to the tarfile twice. To see this, use `tarfilero.py` as provided

[issue30438] tarfile would fail to extract tarballs with files under R/O directories

2017-05-23 Thread Catherine Devlin
Changes by Catherine Devlin <catherine.dev...@gmail.com>: Removed file: http://bugs.python.org/file46890/issue_30438_test.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30438] tarfile would fail to extract tarballs with files under R/O directories

2017-05-23 Thread Catherine Devlin
Catherine Devlin added the comment: I confirmed the error, and that doing the corresponding tar/untar cycle with the command-line `tar` utility succeeds. issue_30438_test.patch adds a unittest version of Yaroslav's demo file to test_tarfile.py. (It's irrelevant if the PR is merged

[issue24518] json.dumps should accept key function for ``sort_keys``

2015-06-27 Thread Catherine Devlin
Catherine Devlin added the comment: Implementation for the enhancement. Includes tests. -- keywords: +patch Added file: http://bugs.python.org/file39823/json_callable_sort_24518.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue24518] json.dumps should accept key function for ``sort_keys``

2015-06-26 Thread Catherine Devlin
New submission from Catherine Devlin: Right now, json.dumps can be called with True or False, but it would be easy to also support accepting a key function, which then could be used to control the order of keys arbitrarily in the serialized JSON output. -- components: Library (Lib

[issue1666318] shutil.copytree doesn't give control over directory permissions

2013-08-16 Thread Catherine Devlin
Catherine Devlin added the comment: Attaching new patch incorporating Vajrasky's suggestion -- Added file: http://bugs.python.org/file31316/test1666318.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1666318

[issue1666318] shutil.copytree doesn't give control over directory permissions

2013-07-31 Thread Catherine Devlin
Catherine Devlin added the comment: Thanks, Antoine - I've signed and submitted the Contributor's Agreement. -- Added file: http://bugs.python.org/file31104/Python Contributor Agreement Form - signed.pdf ___ Python tracker rep...@bugs.python.org

[issue1666318] shutil.copytree doesn't give control over directory permissions

2013-07-29 Thread Catherine Devlin
Catherine Devlin added the comment: Attaching a test that verifies that shutil.copytree is, in fact, preserving permissions (as of Python 3.4.0a0 (default:66a3dc613627, Jul 27 2013, 21:23:10) ) As far as I can tell this can be closed. -- nosy: +catherinedevlin Added file: http

[issue13214] Cmd: list available completions from the cmd.Cmd subclass and filter out EOF handler(s)

2012-07-30 Thread Catherine Devlin
Catherine Devlin added the comment: Needed to update the patch slightly for Python 3; now that filter() returns an iterator, ``do_help``'s call to names = self.get_names() followed by names.sort() was throwing an error, so I changed get_names to return a list. -- nosy

[issue13214] Cmd: list available completions from the cmd.Cmd subclass and filter out EOF handler(s)

2012-07-30 Thread Catherine Devlin
Catherine Devlin added the comment: Change to test_cmd.py to test for help displaying the name of the registered subcommand (as well as a simple test for the basic operation of the registered sub-CLI). -- Added file: http://bugs.python.org/file26594/test_cmd.patch

[issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib

2012-07-28 Thread Catherine Devlin
Catherine Devlin added the comment: It's very hard to tell what ought to be done here, since Lib/urllib/request.py throws URLErrors with a great variety of order and number of arguments, and it's not clear how URLError (in Lib/urllib/error.py) intends to handle them. However, in this case

[issue10087] HTML calendar is broken

2011-07-30 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Very simplistic patch to test_calendar.py that adds a test for this fix. This fails on the unpatched trunk b/c the unpatched output begins with bb'?xm instead of b?xml . Test needs a quick review... I'm not familiar

[issue11472] upload command fails to read auth information from .pypirc

2011-07-28 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: This blog post http://justcramer.com/2009/04/02/problems-uploading-packages-with-setuptools-on-os-x/ describes working around the same problem by replacing [pypi] in .pypirc with [server-login]. Is that the problem, a change

[issue9650] format codes in time.strptime docstrings

2010-08-30 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Did my suggestion to alter pydoc output so it always contains a link to the enclosing module's documentation not seem like a reasonable compromise? I actually don't understand how that would help. The ``pydoc time`` output doesn't

[issue9650] format codes in time.strptime docstrings

2010-08-26 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: There is the non-zero cost of keeping two copies of that bit of information in-sync with each other (and the code). That's true, but how often do the strftime format codes change? I'd be happy to personally volunteer to keep them

[issue9650] format codes in time.strptime docstrings

2010-08-20 Thread Catherine Devlin
New submission from Catherine Devlin fredv8vi...@liquidid.net: Is there any reason not to include the strftime formatting codes in the docstrings of time.strftime and time.strptime? print time.strftime.__doc__ strftime(format[, tuple]) - string Convert a time tuple to a string according

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-04 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: This patch fixes it with a fourth approach: if unrecognized arguments are found during subparser parsing, information about them is inserted into the namespace (under ._unrecognized), and the decision about whether to exit

[issue9348] Calling argparse's add_argument with the wrong number of metavars causes delayed error message

2010-08-04 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Thanks for the correction, Steven. This unit test matches your description. Use it instead of my earlier submission. -- Added file: http://bugs.python.org/file18390/wrong_metavars_test_corrected.patch

[issue9355] argparse add_mutually_exclusive_group more than once has incorrectly formatted help

2010-08-04 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Unit test for Drake's patch -- nosy: +catherine Added file: http://bugs.python.org/file18392/test_mutually_exclusive.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue9355] argparse add_mutually_exclusive_group more than once has incorrectly formatted help

2010-08-04 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: copy of Drake's argparse.diff - same patch, just has less specific diff header info (because ``patch -p0 argparse.diff`` failed on my machine) -- Added file: http://bugs.python.org/file18393/mutually_exclusive_help.patch

[issue9352] argparse eats characters when parsing multiple merged short options

2010-08-03 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Attaching a test to verify parse failure on mismatched prefix (-abc or +abc). Steven's patch makes it pass. -- nosy: +catherine versions: -Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18342

[issue9352] argparse eats characters when parsing multiple merged short options

2010-08-03 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Updated Steven's patch; no changes, but now it knows the new context so that ``patch -p0`` won't fail. -- Added file: http://bugs.python.org/file18343/multiple_short_same_prefix_new.patch

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-03 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Some basic unit tests for parse_known_args on a subparser. -- keywords: +patch nosy: +catherine Added file: http://bugs.python.org/file18344/test_subparser_parse_known_args.patch

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-03 Thread Catherine Devlin
Changes by Catherine Devlin fredv8vi...@liquidid.net: Removed file: http://bugs.python.org/file18344/test_subparser_parse_known_args.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9340

[issue9340] argparse parse_known_args does not work with subparsers

2010-08-03 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Some simple unit tests for parse_known_args on a parser with a subparser. They are indeed failing on the trunk. -- Added file: http://bugs.python.org/file18346/test_subparser_parse_known_args.patch

[issue9444] argparse does not honor prefix_chars when adding default options

2010-08-02 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Attached a unit test patch corresponding to Ted's patch. http://bugs.python.org/file18320/argparse_test.patch -- nosy: +catherine ___ Python tracker rep...@bugs.python.org http

[issue9348] Calling argparse's add_argument with the wrong number of metavars causes delayed error message

2010-08-02 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: I'm attaching a unit test patch that does something vaguely like Steven suggests. It definitely needs review. Also, I'm assuming that it's OK to specify *fewer* metavars than nargs, just not more... but I'm not sure about

[issue9338] argparse optionals with nargs='+' can't be followed by positionals

2010-08-02 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Here's a unit test for the simplest cases. -- keywords: +patch nosy: +catherine Added file: http://bugs.python.org/file18328/test_pos_after_var_args.patch ___ Python tracker rep

[issue9444] argparse does not honor prefix_chars when adding default options

2010-08-01 Thread Catherine Devlin
Changes by Catherine Devlin fredv8vi...@liquidid.net: -- nosy: -ted.turocy Added file: http://bugs.python.org/file18320/argparse_test.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9444

[issue8620] wrong truncation of last line in cmd.Cmd

2010-07-31 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: Patch created live during PyOhio 2010 Teach Me Python Bugfixing session! -- nosy: +catherine Added file: http://bugs.python.org/file18294/cmd-noeol-test.fix.patch ___ Python tracker rep

[issue8620] wrong truncation of last line in cmd.Cmd

2010-07-31 Thread Catherine Devlin
Catherine Devlin fredv8vi...@liquidid.net added the comment: same patch, stripped of trailing spaces -- Added file: http://bugs.python.org/file18297/cmd-noeol-test.fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8620