[issue15258] argparse documentation: Improve optparse section regarding allow_interspersed_args

2013-02-13 Thread Andrew McNabb
Changes by Andrew McNabb : -- nosy: +amcnabb ___ Python tracker <http://bugs.python.org/issue15258> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14191] argparse doesn't allow optionals within positionals

2013-02-13 Thread Andrew McNabb
Changes by Andrew McNabb : -- nosy: +amcnabb ___ Python tracker <http://bugs.python.org/issue14191> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2012-11-26 Thread Andrew McNabb
Andrew McNabb added the comment: The --no-user-cfg option works for me in Python 2.7, but it does not seem to be in Python 3.2 or 3.3: error: option --no-user-cfg not recognized Am I doing something wrong, or was this feature only added to Python 2.7? -- nosy: +amcnabb

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2012-08-22 Thread Andrew McNabb
Changes by Andrew McNabb : -- nosy: +amcnabb ___ Python tracker <http://bugs.python.org/issue9334> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Andrew McNabb
Andrew McNabb added the comment: > Maybe I'm confused, but the presence of "/net/prodigy" is *not* > the issue here, and what gets mounted is *not* "/net/prodigy", > but "/net/prodigy/tmp" (do "mount" to confirm or dispute). No, /net

[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Andrew McNabb
Andrew McNabb added the comment: > Which one-line fix do you propose? Doing a stat("/net/prodigy/tmp") before mkdir("/net/prodigy/tmp") is an extremely simple workaround. Of course, I would love to see clear documentation of how the kernel is defined to behave in t

[issue14702] os.makedirs breaks under autofs directories

2012-05-18 Thread Andrew McNabb
Andrew McNabb added the comment: I posted a bug report with the kernel here: https://bugzilla.kernel.org/show_bug.cgi?id=43262 -- ___ Python tracker <http://bugs.python.org/issue14

[issue14702] os.makedirs breaks under autofs directories

2012-05-18 Thread Andrew McNabb
Andrew McNabb added the comment: I see no evidence that this is a bug in Linux, and I think it's ridiculous to close it when a trivial one-line fix is available. I won't reopen it because it's obvious no one wants to address this. :( -- ___

[issue14702] os.makedirs breaks under autofs directories

2012-05-17 Thread Andrew McNabb
Andrew McNabb added the comment: By the way, if my hunch about the difference in stat of '/net/prodigy' vs. '/net/prodigy/tmp' is correct, then this would explain why makedirs on deeper directories work. Specifically, one of the shallower stat calls would force the moun

[issue14702] os.makedirs breaks under autofs directories

2012-05-17 Thread Andrew McNabb
Andrew McNabb added the comment: Hmm. Maybe there's a difference between doing stat('/net/prodigy') vs. stat('/net/prodigy/tmp'). Just a guess, but maybe the former can succeed before the mount completes, but the latter has to wait

[issue14702] os.makedirs breaks under autofs directories

2012-05-17 Thread Andrew McNabb
Andrew McNabb added the comment: This isn't fixed. All of the examples I've given were with a 3.3.0 kernel. Doing a stat would be a fix. -- status: closed -> open ___ Python tracker <http://bugs.pytho

[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb
Changes by Andrew McNabb : Added file: http://bugs.python.org/file25612/makedirs.out ___ Python tracker <http://bugs.python.org/issue14702> ___ ___ Python-bugs-list mailin

[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb
Changes by Andrew McNabb : Added file: http://bugs.python.org/file25611/mkdir-p.out ___ Python tracker <http://bugs.python.org/issue14702> ___ ___ Python-bugs-list mailin

[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb
Andrew McNabb added the comment: Some interesting information. If I do `os.mkdir('/net/prodigy/tmp')`, it gives "OSError: [Errno 13] Permission denied: '/net/prodigy/tmp'". However, if I instead do `os.mkdir('/net/prodigy/tmp/hi')`, it succeeds. (Note

[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb
Andrew McNabb added the comment: > Andrew, are you still with us? I'm here, but it's been a busy few weeks. I'll see if I can spend some time on this today. -- ___ Python tracker <http://bugs.

[issue14702] os.makedirs breaks under autofs directories

2012-04-30 Thread Andrew McNabb
New submission from Andrew McNabb : When a os.makedirs is used under an autofs directory, it crashes. For example, on my machine, `os.makedirs('/net/prodigy/tmp')` crashes with the following traceback: Traceback (most recent call last): ... File "/usr/lib64/python2.7/os.py

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2012-02-14 Thread Andrew McNabb
Andrew McNabb added the comment: It looks like encodings/zlib_codec.py defines a custom IncrementalEncoder and IncrementalDecoder, but its StreamWriter and StreamReader rely on the standard implementation of codecs.StreamWriter and codecs.StreamReader. One solution might be to have

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2012-01-26 Thread Andrew McNabb
New submission from Andrew McNabb : The stream encoder for the zlib_codec doesn't use the incremental encoder, so it has limited usefulness in practice. This is easiest to show with an example. Here is the behavior with the stream encoder: >>> filelike = io.BytesIO

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
Andrew McNabb added the comment: Thanks for your advice. I just signed up for the python-porting list, and I'll start a discussion there. I'm trying to improve the wiki page to address your concerns. There are multiple valid approaches to take, and I'm trying to make the

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
Andrew McNabb added the comment: By the way, I just noticed your notes on the wiki page and added a response/question. It seems that the advice that you consider bad is the official porting story (upgrade to 2.6 and use 2to3). I agree that it's easier and better to not drop support fo

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
Andrew McNabb added the comment: What advice in particular do you consider bad? I would be happy to submit some changes to the wiki page for anything that's wrong. I think it would be great to have a reviewed version in the documentation directly, but I think the world needs a little

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
New submission from Andrew McNabb : The What's New documentation for Python 3.0 and 3.1 have sections called "Porting to Python 3.0". It would be great to add a link to the Python wiki page about porting Python to Python 3: http://wiki.python.org/moin/PortingPythonToPy3k

[issue5315] signal handler never gets called

2010-03-02 Thread Andrew McNabb
Andrew McNabb added the comment: Sorry for the noise. It turns out that my problem was unrelated. -- ___ Python tracker <http://bugs.python.org/issue5

[issue5315] signal handler never gets called

2010-03-02 Thread Andrew McNabb
Andrew McNabb added the comment: I'm seeing something very similar to this. In my case, I have a single-threaded program, and select fails to be interrupted by SIGCHLD. I'm still tracking down more details, so I'll report back if I find more information. --

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-18 Thread Andrew McNabb
Andrew McNabb added the comment: I would imagine that this would come up in most programs that read data from a pipe or from a socket (which are binary data) and then output to stdout or stderr. I ran across the problem in my first non-trivial port to Python 3, and it seems like a common

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-18 Thread Andrew McNabb
Andrew McNabb added the comment: This seems like a common need (particularly for stdout and stderr), and setting `stdout._CHUNK_SIZE = 1` is relying on an implementation detail. 1) Can the documentation for TextIOWrapper be updated to clearly describe this extra buffering (how often

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-17 Thread Andrew McNabb
New submission from Andrew McNabb : The following snippet behaves differently in the C IO implementation than in the Python IO implementation: import sys sys.stdout.write('unicode ') sys.stdout.buffer.write(b'bytes ') To test this, I have created two scripts, test

[issue7954] detach method has no docstring

2010-02-17 Thread Andrew McNabb
Andrew McNabb added the comment: Oops. I had run "pydoc" instead of "pydoc3", so I was getting the 2.6 version of the io docstrings instead of the 3.1 version. By the way, it took about an hour to find out how to get Python 3 to treat stdin as bytes instead of unicode.

[issue7953] RawIOBase.read fails with an AttributeError

2010-02-17 Thread Andrew McNabb
New submission from Andrew McNabb : I was trying to open stdin in binary mode and ran the following: >>> RawIOBase(sys.stdin.fileno()).read() Traceback (most recent call last): File "", line 1, in AttributeError: 'RawIOBase' object has no attribute 'readi

[issue5088] optparse: inconsistent default value for append actions

2010-02-16 Thread Andrew McNabb
Andrew McNabb added the comment: I think that optparse is doing the right thing here. I think that your code example should be changed to: import optparse parser = optparse.OptionParser() parser.add_option("-o", "--option", action = "append") options, a

[issue4359] at runtime, distutils uses buildtime files

2009-10-30 Thread Andrew McNabb
Andrew McNabb added the comment: I've noticed this, too, and I agree with Toshio's observations. Tarek, do you have any opinions? -- nosy: +amcnabb ___ Python tracker <http://bugs.python.

[issue6999] TypeError in pathfix.py

2009-09-25 Thread Andrew McNabb
Changes by Andrew McNabb : -- type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue6999> ___ ___ Python-bugs-list mailing list Unsubscri

[issue6999] TypeError in pathfix.py

2009-09-25 Thread Andrew McNabb
New submission from Andrew McNabb : Tools/scripts/pathfix.py crashes with a TypeError: Traceback (most recent call last): File "Tools/scripts/pathfix.py", line 149, in main() File "Tools/scripts/pathfix.py", line 54, in main if recursedown(arg): bad = 1

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-30 Thread Andrew McNabb
Andrew McNabb added the comment: On Thu, Jul 30, 2009 at 07:14:56PM +, Thomas Heller wrote: > > Thanks for bringing my attention to this problem again, and for the review. I'm just glad to help. > The problem is that the patch changes the behaviour of the > 'P

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-29 Thread Andrew McNabb
Andrew McNabb added the comment: I ran into this problem, too. It took me a long time to track down the segfaults. It's really bad to pass in None and have the system pick some random address instead of 0. I looked at the attached patch, and it seems to me the only alternative approach