[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Paul Moore
Paul Moore added the comment: That's correct. The problem here is that it's not possible to know what version of Python a virtualenv has (at least, not without running it, which isn't appropriate in the launcher). So the only case it's possible to

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Paul Moore
Paul Moore added the comment: Hmm, I didn't know that (although virtualenv-based environments don't have an equivalent to pyvenv.cfg). But there's some confusion here. This patch only affects command line usage (running "py.exe" to start Python). I don't really

[issue23491] PEP 441 - Improving Python Zip Application Support

2015-02-20 Thread Paul Moore
Paul Moore added the comment: Thanks. Updated patch with the new mime-type. Looks like there's disk errors on that file with the CRC check. Lovely :-) -- Added file: http://bugs.python.org/file38192/pep441.patch ___ Python tracker

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Paul Moore
Paul Moore added the comment: On 20 February 2015 at 16:31, Wolfgang Maier wrote: >> The scope of this PEP is just to make the "py" command (with no explicit >> version) use an active virtualenv before falling back to the default Python. >> This is specifically t

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2015-05-27 Thread Paul Hobbs
New submission from Paul Hobbs: Using pid namespacing it is possible to have multiple processes with the same pid. "semlock_new" creates a semaphore file with the template "/dev/shm/mp{pid}-{counter}". This can conflict if the same semaphore file already exists due to an

[issue24270] PEP 485 (math.isclose) implementation

2015-05-28 Thread Paul Moore
Paul Moore added the comment: Looks OK to me. I assume the differences between the math and cmath code and tests is because cmath uses Argument Clinic and math doesn't, and cmath uses unittest.main whereas math adds the suites manually? As far as I can see, that's what&#

[issue24357] www.python.org lost IPv6 connectivity

2015-06-01 Thread Paul Marks
New submission from Paul Marks: Python's web servers were formerly reachable from IPv6 clients, as evidenced by this example code for socket.getaddrinfo(): https://docs.python.org/3/library/socket.html#socket.getaddrinfo But today, www.python.org is IPv4-only: >>>

[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2015-06-03 Thread paul j3
paul j3 added the comment: And the corresponding bug issue http://bugs.python.org/issue9351 -- nosy: +paul.j3 ___ Python tracker <http://bugs.python.org/issue24

[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2015-06-03 Thread paul j3
paul j3 added the comment: Another example of this patch causing backward compatibility problems http://bugs.python.org/issue24251 -- ___ Python tracker <http://bugs.python.org/issue9

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-06-03 Thread paul j3
paul j3 added the comment: The code that converts '-' to '_' is independent of the code that uses 'prefix_chars'. The '-' conversion handles a long standing UNIX practice of allowing that character in the middle of option flags. It's an attempt

[issue24360] improve argparse.Namespace __repr__ for invalid identifiers.

2015-06-03 Thread paul j3
paul j3 added the comment: Off hand I don't see a problem with this patch (but I haven't tested it yet). But I have a couple of cautions: The docs say, regarding the Namespace class: > This class is deliberately simple, just an object subclass with a readable > string repre

[issue24360] improve argparse.Namespace __repr__ for invalid identifiers.

2015-06-03 Thread paul j3
paul j3 added the comment: An alternative would be to wrap a non-identifier name in 'repr()': def repr1(self): def fmt_name(name): if name.isidentifier(): return name else: return repr(name) type_name =

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-06-03 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue15125 argparse: positional arguments containing - in name not handled well Discussion on whether positionals 'dest' should translate '-' to '_'. -- ___ Python tr

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-06-03 Thread paul j3
paul j3 added the comment: Yes, the '_' makes it accessible as an attribute name. But the presence of '-' in the option name has a UNIX history. That is a flag like '--a-b-c' is typical, '--a_b_c' is not. There is less of precedent for a flag like

[issue24360] improve argparse.Namespace __repr__ for invalid identifiers.

2015-06-03 Thread paul j3
paul j3 added the comment: I mentioned in the related bug/issue that no one has to use odd characters and spaces in the Namespace. While they are allowed by 'getattr' etc, the programmer has the option of supplying rational names in the 'dest' parameter. There's

[issue24385] libpython27.a in python-2.7.10 i386 (windows msi release) contains 64-bit objects

2015-06-08 Thread Paul Moore
Paul Moore added the comment: I'm still somewhat confused as to why we're looking at this in the context of manually building an extension. It's *certainly* true that anyone attempting to build a Python extension by hand (as per Matthew Barnett's instructions) should be

[issue24449] Please add async write method to asyncio.StreamWriter

2015-06-14 Thread Paul Sokolovsky
New submission from Paul Sokolovsky: This issue was brought is somewhat sporadic manner on python-tulip mailing list, hence this ticket. The discussion on the ML: https://groups.google.com/d/msg/python-tulip/JA0-FC_pliA/knMvVGxp2WsJ (all other messages below threaded from this) https

[issue24449] Please add async write method to asyncio.StreamWriter

2015-06-14 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: No, I haven't brought this "many times before". Discussion on the mailing list last week was first time I brought up *this* issue. But it's indeed not the first time I provide feedback regarding various aspects of asyncio, so I wonde

[issue24449] Please add async write method to asyncio.StreamWriter

2015-06-15 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: Thanks for the response. > and an API with more choices is not necessarily better. I certainly agree, and that's why I try to implement MicroPython's uasyncio solely in terms of coroutines, without Futures and Transports. But I of course ca

[issue24087] Documentation doesn't explain the term "coroutine" (PEP 342)

2015-06-15 Thread Paul Moore
Paul Moore added the comment: Personally, I'm OK with the wording in the 3.5.0b2 docs, as far as basic terminology and glossary-style information goes. I think coroutines, async, and event loops are badly under-documented in the broader context, though - there is very little in the

[issue24444] In argparse empty choices cannot be printed in the help

2015-06-17 Thread paul j3
paul j3 added the comment: Does this work for help='choices: %(choices)s' Without setting up my own test case, I'm guessing that the problem is with an empty help string. `help=''` should be ok, but the test handle that probably occurs earlier. Choices, e

[issue24441] In argparse add_argument() allows the empty choices argument

2015-06-17 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker <http://bugs.python.org/issue24441> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-17 Thread paul j3
paul j3 added the comment: What are you trying to accomplish in the examples with a 'dest'? For a positional, 'dest' is derived from the 'foo' name. There is no need to supply 'dest', in fact produces the error you get. It has nothing to with

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-17 Thread paul j3
paul j3 added the comment: None of the `append` actions makes sense with positionals. The name (and hence the 'dest') must be unique. And positionals can't be repeated. There are other ways to put a pair of values in the Namespace. For example, after parsing args.x

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-18 Thread paul j3
paul j3 added the comment: You can give the positional any custom name (the first parameter). You just can't reuse it (by giving 2 positionals the same name). And if you don't like what the 'help' shows, you can set the 'metavar'. That way only you see the pos

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-18 Thread paul j3
paul j3 added the comment: (Important correction at the end of this post) The test that you are complaining about occurs at the start of the 'add_argument' method: def add_argument(self, *args, **kwargs): """ add_argument(dest, ..., name=value,

[issue24476] Statically link vcruntime140.dll

2015-06-19 Thread Paul Moore
Paul Moore added the comment: +1 from me on this. Are there any specific technical implications (in terms of ease of interoperability, ability to use a different compiler to build Python, or whatever)? Whether there are or not, I'm still in favour - I think it's a good thing anyway

[issue24476] Statically link vcruntime140.dll

2015-06-19 Thread Paul Moore
Paul Moore added the comment: Cool. Easier distribution is good. Better compatibility with GPL requirements (depending only on "system facilities") is probably helpful for the general community, too. Embedding in C++ built with a different version of the compiler is always going t

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-22 Thread paul j3
paul j3 added the comment: To wrap this up, the correct way to specify that 2 or more positionals share a 'dest' is to supply that dest as the first parameter. If the help should have something else, use the `metavar`. import argparse parser = argparse.Argu

[issue24534] disable executing code in .pth files

2015-07-02 Thread Paul Moore
Paul Moore added the comment: On 30 June 2015 at 23:30, M.-A. Lemburg wrote: > I don't remember the details of why this feature was added, > but can imagine that it was supposed to enable installation > of new importers via .pth files. I don't know for certain if this

[issue24625] py.exe executes #! in windows

2015-07-13 Thread Paul Moore
Paul Moore added the comment: As noted, this behaviour is as documented, and is deliberately designed to execute the shebang line as either an executable (which calc is) or one of a specific set of "virtual" entries (which does not include /bin/env). -- resolution: -&

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Paul Koning
Paul Koning added the comment: Sure, you can use a vfs. That's true for a lot of mock functions; the benefit of mock, including mock_open, is that it provides an easier and better packaged way. The behavior expected is "be like a file". So in that last example, if you open i

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Paul Koning
Paul Koning added the comment: So if I understand right, it seems to me the 3.5/mock 1.1.4 behavior is correct. mock_open(read_data="f") acts like a file that contains f, and m() acts like an open() of that file. So if I call open once, I should read the f, then EOF. If I open t

[issue21750] mock_open data is visible only once for the life of the class

2015-07-22 Thread Paul Koning
Paul Koning added the comment: I suppose. And it certainly is much better than the original behavior. But if this is the approach chosen, it should be clearly called out in the documentation, because the current wording suggests the 1.1.4 behavior, not the one you recommended

[issue21750] mock_open data is visible only once for the life of the class

2015-07-22 Thread Paul Koning
Paul Koning added the comment: Section 26.7.7 of the library manual describes mock_open with the words: A helper function to create a mock to replace the use of open. It works for open called directly or used as a context manager. which implies that it works just like open. Given that it

[issue24754] argparse add_argument with action="store_true", type=bool should not crash

2015-08-03 Thread paul j3
paul j3 added the comment: Right, the only arguments that a `store_true` Action class accepts are: option_strings, dest, default=False,required=False, help=None parser.add_argument() massages its parameters a bit, and then uses the 'action' parameter to construct an Actio

[issue24739] allow argparse.FileType to accept newline argument

2015-08-03 Thread paul j3
paul j3 added the comment: argparse.FileType serves 2 purposes - handling filenames for simple quick shell-like scripts - as a model for custom 'types', specifically one that uses a class to generate the desired type callable. Other bug-issues show that it hasn't aged well.

[issue24736] argparse add_mutually_exclusive_group do not print help

2015-08-03 Thread paul j3
paul j3 added the comment: These two types of groups serve different purposes and aren't designed to nest or interact. An argument group groups arguments in the help lines. It does not affect parsing at all. It can't be used to add a 'group' of arguments to another

[issue24647] Document argparse.REMAINDER as being equal to "..."

2015-08-03 Thread paul j3
paul j3 added the comment: Also, argparse.PARSER is '+...' '? * +' have closely matched analogs in regex patterns. '...' and '+...' do not. So Python users will have an intuitive idea of what "nargs='*'" means. "nargs=&#

[issue24793] Calling 'python' via subprocess.call ignoring passed %PATH%

2015-08-05 Thread Paul Moore
Paul Moore added the comment: This is standard Windows behaviour. Executables are always located first in the directory where your program (in this case the Python executable) is running from - even before searching PATH. If you want to use a different Python, you should specify the full path

[issue24851] infinite loop in faulthandler._stack_overflow

2015-08-12 Thread Paul Murphy
New submission from Paul Murphy: This is a duplicate of Issue 23654, except it occurs on GCC 5.1 with -O2 when building for a ppc64le target. GCC is optimizes this as a tail call, removing the accesses to the "unused" stack variables. -- components: Extension Mod

[issue24851] infinite loop in faulthandler._stack_overflow

2015-08-13 Thread Paul Murphy
Paul Murphy added the comment: Somehow, you need to preserve access to the stack memory. The generated code is still growing the stack, it just fails to touch any of it. I'm guessing a volatile access would just add an extra non-stack access to the infinite loop. Initially, I had

[issue24851] infinite loop in faulthandler._stack_overflow

2015-08-14 Thread Paul Murphy
Paul Murphy added the comment: ... #pragma GCC optimize ("no-optimize-sibling-calls") ... Does preserve the desired behavior under -O2 and -O3, probably a bit nicer than using O0. -- ___ Python tracker <http://bugs.python.o

[issue24998] docs: subprocess.Popen example has extra/invalid parameter

2015-09-03 Thread Paul Clarke
New submission from Paul Clarke: in "subprocess" module documentation has a section for "replacing older functions with subprocess", specifically 17.1.4.5 "replacing os.popen", which includes the example on "return code handling", specifically this li

[issue23623] Python 3.5 docs need to clarify how to set PATH, etc

2015-09-04 Thread Paul Moore
Paul Moore added the comment: Now that "Add Python to PATH" is an option on the front screen of the installer (not hidden behind the scary "customize" option) this can be closed. I recall Steve suggesting there might be issues with the way a user install results in the

[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread paul j3
paul j3 added the comment: A related issue which Sworddragon found just before starting this issue is http://bugs.python.org/issue9625 The handling of defaults in argparse is a bit complicated. In general it errs on the side of giving the user/developer freedom to set them how ever they

[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-09 Thread Paul Moore
Paul Moore added the comment: > Maybe we can special-case pip uninstalling it from the site-packages folder? > *Paul* - any thoughts? Sorry, I've been following this thread but it's been moving pretty fast, so I'm probably replying too late to be helpful now :-( One alte

[issue25042] Create an "embedding SDK" distribution?

2015-09-09 Thread Paul Moore
New submission from Paul Moore: At the moment, building an application that embeds Python requires the user to have a full install of Python on the build machine, to get access to the include and library files. Now that we provide an embeddable build of Python on Windows, would it be worth

[issue25035] Getter/setter for argparse keys

2015-09-09 Thread paul j3
paul j3 added the comment: `parser.set_defaults` lets you set a default for any `dest`. It does not have to be connected with an argument. See what the docs say about using it to set an action linked to a subparser. `arg1 = parser.add_argument(...)` returns an `Action` object. The parser

[issue25035] Getter/setter for argparse keys

2015-09-09 Thread paul j3
paul j3 added the comment: `get_default` and `set_defaults` are parser methods, and do more than set or get a particular Action attribute. 'Set' for example changes both the 'parser._defaults' attribute, and a 'action.default' attribute. Defaults are complex an

[issue25058] Right square bracket argparse metavar

2015-09-10 Thread paul j3
paul j3 added the comment: This assertion error caused by brackets (and other 'odd' characters) in the metavar is a known issue. http://bugs.python.org/issue11874 http://bugs.python.org/issue14046 The formatter that handles line wrapping of the usage line is fragile. -

[issue25061] Add native enum support for argparse

2015-09-10 Thread paul j3
paul j3 added the comment: The `type` parameter is a *function* that takes a string, and returns a valid value. If it can't convert the string it is supposed to raise an error. The default one is a do-nothing identity (take a string, return the string). `int` is the Python function

[issue25061] Add native enum support for argparse

2015-09-10 Thread paul j3
paul j3 added the comment: Here's a type function that enumerates the enum in the error message: def enumtype(astring): try: return CustomEnumType[astring.upper()] except KeyError: msg = ', '.join([t.name.lower() for t in CustomEnumType]) msg =

[issue25061] Add native enum support for argparse

2015-09-13 Thread paul j3
paul j3 added the comment: I'm not quite sure what you mean by 'the enum type to be stored directly'. With my type function, the string input is converted to an enum object and that is stored in the Namespace. You can't be any more direct than that. Or are you thinking

[issue25061] Add native enum support for argparse

2015-09-14 Thread paul j3
paul j3 added the comment: Here's a EnumType factory class, modeled on FileType. class EnumType(object): """Factory for creating enum object types """ def __init__(self, enumclass): self.enums = enumclass def __call__(self, astring):

[issue19462] Add remove_argument() method to argparse.ArgumentParser

2015-09-27 Thread paul j3
paul j3 added the comment: I realized while answering a Stackoverflow question that the resolve method has the pieces for removing an Action from the parser. It removes an existing Action so that the new, conflicting one, can replace it. It's meant to be used with flagged arguments

[issue25255] Security of CPython Builds

2015-09-28 Thread Paul Moore
Paul Moore added the comment: Also, the Windows build process is documented in PCBuild/readme.txt - see https://hg.python.org/cpython/file/tip/PCbuild/readme.txt More generally the devguide documents how to build CPython - https://docs.python.org/devguide/setup.html#compiling

[issue25270] codecs.escape_encode systemerror on empty byte string

2015-09-29 Thread Paul Kehrer
New submission from Paul Kehrer: Python 3.5.0 (default, Sep 13 2015, 10:33:07) [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import codecs >>

[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread paul j3
paul j3 added the comment: A related issue is http://bugs.python.org/issue24754 argparse add_argument with action="store_true", type=bool should not crash In this case the user specified a parameter that the 'store_true' subclass did not accept. In both cases, '

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker <http://bugs.python.org/issue25297> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3
paul j3 added the comment: My testing shows that it's a problem with the subparsers listing. When regular arguments are long, 'max_help_position' works (within limits allowed by 'width'). -- ___ Python tracker <http:

[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3
paul j3 added the comment: There's a bug in the HelpFormatter.add_argument method. It does not take into account the extra indentation of subactions (sub parsers) when calculating self._action_max_length. The corrected method and a test case is in the attached file. class MyForm

[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread paul j3
paul j3 added the comment: A fix that I am exploring would wrap the Action instantiation call in add_argument with a try/except block That is replace: def add_argument(...) action = action_class(**kwargs) ... with try: action

[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-03 Thread paul j3
paul j3 added the comment: The unittest file test_argparse.py tests add_argument parameters in class TestInvalidArgumentConstructors(TestCase) It looks at a dozen different categories of errors, mostly checking that they return the correct TypeError or ValueError. It does not check the

[issue25297] max_help_position is not works in argparse library

2015-10-03 Thread paul j3
paul j3 added the comment: The unittest test_argparse.py has one related test class TestAddSubparsers def test_alias_help has a long enough subparser invocation (with aliases) to produce wrapping with the default 24 max position: commands: COMMAND

[issue25307] Enhancing the argparse help output

2015-10-03 Thread paul j3
paul j3 added the comment: I don't recall other issues or discussions about lining up short and long option strings. Producing a more compact invocation has raised in StackOverflow questions. I don't recall if there has been bug/issue on the same. If I recall correctly it isn

[issue25307] Enhancing the argparse help output

2015-10-03 Thread paul j3
paul j3 added the comment: http://stackoverflow.com/questions/18275023/dont-show-long-options-twice-in-print-help-from-argparse http://stackoverflow.com/questions/9366369/python-argparse-lots-of-choices-results-in-ugly-help-output http://stackoverflow.com/questions/23936145/python-argparse

[issue25307] Enhancing the argparse help output

2015-10-03 Thread paul j3
paul j3 added the comment: Formatter _format_action_invocation(self, action) is the key function. Notice how it treats positionals and optionals separately. Also it calls default = self._get_default_metavar_for_optional(action) args_string = self._format_args(action, default) to get

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2015-10-06 Thread paul j3
paul j3 added the comment: I have seen questions on StackOverflow with 'store_true' and explicit `default=False` parameters. I don't recall any where this was a problem. Usually it's as harmless as users specifying other defaults like `action='store'`, or a

[issue25308] Multiple names can target the same namespace

2015-10-06 Thread paul j3
paul j3 added the comment: What you are asking about is the fact that different arguments can share a 'dest'. https://docs.python.org/3/library/argparse.html#dest The 'append_const' action has an example of shared 'dest'. It says: The 'append_con

[issue18769] argparse remove subparser

2015-10-11 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker <http://bugs.python.org/issue18769> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue18769] argparse remove subparser

2015-10-11 Thread paul j3
paul j3 added the comment: Under what circumstances would this be useful? http://bugs.python.org/issue19462 asks for a 'remove_argument' method. That seems to be most useful if the argument is inherited from a parent parser. A subparsers argument could be inherited from a paren

[issue18769] argparse remove subparser

2015-10-12 Thread paul j3
paul j3 added the comment: There's a partial overlap with this issue http://bugs.python.org/issue22848 which seeks to hide a subparser - both in the help lines and the choices lists. -- ___ Python tracker <http://bugs.python.org/is

[issue25405] User install of 3.5 removes py.exe from C:\Windows

2015-10-14 Thread Paul Moore
New submission from Paul Moore: I have had a user install of Python 3.5rc3 for some time on one of my PCs. It also had plenty of other versions on there - 3.4, 3.3, 2.7 and 2.6. The 3.5rc3 install was a user install. I have my Python 3.4 install set up on PATH, and I've configured py.i

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-10-19 Thread paul j3
paul j3 added the comment: The short `repr` is produced in Python2.7, but not 3.5. Your test case: action = argparse._StoreAction(['--file], dest='file_path') error = argparse.ArgumentError(action, 'File not found.') print(str(error)) print(repr(err

[issue11174] add argparse formatting option to display type names for metavar

2015-10-19 Thread paul j3
paul j3 added the comment: This formatter produces an error if one or more of the arguments uses the default `None` type (a string). This is because `None` does not have a `.__name__`. This HelpFormatter probably has been rarely, if ever, used. The metavar parameter works just as well

[issue25444] Py Launch Icon

2015-10-20 Thread Paul Moore
Paul Moore added the comment: It's a very personal choice, but I prefer the current icons. I'm -1 on this change. -- ___ Python tracker <http://bugs.python.o

[issue25444] Py Launch Icon

2015-10-20 Thread Paul Moore
Changes by Paul Moore : -- nosy: -paul.moore ___ Python tracker <http://bugs.python.org/issue25444> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25061] Add native enum support for argparse

2015-11-04 Thread paul j3
paul j3 added the comment: The choice of 'type' for this parameter is occasionally confusing, because the connection to the Python 'type()' function or what we think of as 'native types' is only tangential. A name like 'converter' or 'string_co

[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-16 Thread paul j3
paul j3 added the comment: In _ActionsContainer._add_container_actions there is this note: # add container's mutually exclusive groups # NOTE: if add_mutually_exclusive_group ever gains title= and # description= then this code will need to be expanded as above In other bug/i

[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-16 Thread paul j3
paul j3 added the comment: I've attached a file that monkey patches the _ActionsContainer._add_container_actions method. It corrects the `_container` attribute of the copied mutually exclusive groups. I've only tested it for the case presented in this issue (and the relate Sta

[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-17 Thread paul j3
paul j3 added the comment: Argument groups are not designed to be nested. If you print_help the parent parser, you'll see that the sub_args are missing entirely, not just displaced. They appear in the usage, but not the help lines. sub_group has no record that it was added to global_

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Paul Moore
Paul Moore added the comment: Why is it too late to install a new importer to sys.path_hooks when zipimport is installed? As far as I am aware, running the stdlib from a zipfile works fine, which seems to be equivalent to your use case. -- nosy: +paul.moore

[issue26119] Windows Installer can sometimes silently fail pip stage

2016-01-14 Thread Paul Hammant
New submission from Paul Hammant: It NEEDS to communicate more as to why it is rolling back the pip install (progress bar goes backwards, install fails). Reasons can be: 1. older/wrong versions of Python listed in the PATH - eg c:\Python27 encountered when c:\Python34 is being installed

[issue26119] Windows Installer can sometimes silently fail pip stage

2016-01-15 Thread Paul Hammant
Paul Hammant added the comment: Steve, if you want I can attempt to reproduce this. Maybe I'll take a video of the reproduction. -- ___ Python tracker <http://bugs.python.org/is

[issue26119] Windows Installer can sometimes silently fail pip stage

2016-01-18 Thread Paul Hammant
Paul Hammant added the comment: That's all the files in the %TEMP% dir beginning with Python* - right? -- ___ Python tracker <http://bugs.python.org/is

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-27 Thread paul j3
paul j3 added the comment: There are 2 issues parsing - how to reserve one or more arguments for use by following 'positionals'. Fixes have been proposed in other bug/issues, but aren't trivial. usage formatting - the stock formatter displays all optionals first, f

[issue20598] argparse docs: '7'.split() is confusing magic

2016-01-28 Thread paul j3
paul j3 added the comment: I can understand changing '7'.split() but this change is IMO ugly: - >>> print(parser.parse_args('--foo B cmd --arg1 XX ZZ'.split())) + >>> print(parser.parse_args(['--foo', 'B', 'cmd'

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-01-28 Thread paul j3
paul j3 added the comment: How about: These store the values True and False respectively (and default to False and True if absent). The reference to `store_const` is confusing, since almost no one uses that action. The `store_const` paragraph has: (Note that the const keyword

[issue26235] argparse docs: Positional * argument in mutually exclusive group requires a default parameter

2016-01-28 Thread paul j3
New submission from paul j3: The documentation for Mutual exclusion https://docs.python.org/3/library/argparse.html#mutual-exclusion needs a note that a mutually exclusive group may contain one positional argument. But that argument must be either nargs='?', or nargs='*

[issue26119] Windows Installer can sometimes silently fail pip stage

2016-01-31 Thread Paul Hammant
Paul Hammant added the comment: Chronalog for today, below. Status - can reproduce at will, can't produce %TEMP% files was for - there aren't any. 0. I deleted all Python prefixed files from %TEMP% 1. I uninstalled Python 3.4 via it's windows installer. It progressed to comp

[issue25713] Setuptools included with 64-bit Windows installer is outdated

2016-02-16 Thread Paul Moore
Paul Moore added the comment: Just to clarify, it's intended that you simply "python -m pip install --upgrade pip setuptools" to get the latest version. -- nosy: +paul.moore ___ Python tracker <http://bugs.pyt

[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-02-16 Thread Paul Moore
Changes by Paul Moore : -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue26336> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Paul Moore
New submission from Paul Moore: See the following test (in Python 3.5): >>> u'a\nb£'.encode('utf-8').splitlines() ['a', 'b\xc2\xa3'] I encode a string in UTF-8, then use the (bytes) splitlines function on it. The return value is a list of st

[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Paul Moore
Paul Moore added the comment: That's weird. I can confirm it's working for me on 3.5.1. I'll double check I wan't in 2.7 when I'm back at my work PC, but I didn't *think* I was. But regardless, there's clearly no bug

[issue26501] bytes splitlines() method returns strings without decoding

2016-03-08 Thread Paul Moore
Paul Moore added the comment: Sigh. I had installed Python 2.7 at some point, and py.exe picked it up by default :-( Isn't it about time that py.exe defaulted to the latest version installed, not the latest version of Python 2? -- ___ P

[issue26510] [argparse] Add required argument to add_subparsers

2016-03-10 Thread paul j3
paul j3 added the comment: This has been raised before. I think http://bugs.python.org/issue9253 is the correct issue. It used to be that 'subparsers' were required. But there was a change in how 'required' arguments were tested, and 'subparsers' fell throug

[issue26503] argparse with required field , not having new line separator in -help dispaly

2016-03-10 Thread paul j3
paul j3 added the comment: The usage line formatter needs a major rewrite. Currently it formats usage for all the arguments as one line (two actually, optionals and positionals are handled separately), and then breaks it into 'wrappable parts'. It then compiles the lines from t

[issue26394] Have argparse provide ability to require a fallback value be present

2016-03-10 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker <http://bugs.python.org/issue26394> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue26394] Have argparse provide ability to require a fallback value be present

2016-03-10 Thread paul j3
paul j3 added the comment: I need to study that patch more, but I don't like the fact that it operates at the core of the parsing (e.g. in 'take_action'). That's a dangerous place to add features. Unexpected behaviors and backwards compatibility problems are too likely.

<    20   21   22   23   24   25   26   27   28   29   >