[issue11588] Add "necessarily inclusive" groups to argparse

2014-02-14 Thread paul j3
paul j3 added the comment: Regarding a usage line like: (-o FILE | (-O DIR & (-p PATTERN | -s SUFFIX)) The simplest option is to just a custom written 'usage' parameter. With the existing HelpFormatter, a nested grouping like this is next to impossible. It formats the arguments (e.g.'-O

[issue20547] Use specific asserts in bigmem tests

2014-02-14 Thread Ezio Melotti
Ezio Melotti added the comment: > For end users of Python, they don't have to worry much about this, but > we as developers of core types really care whether self.assertLessThan(x, y) > really does x < y, or x.__lt__(y), or "not y >= x", etc. FWIW the assert methods should guarantee that the cor

[issue16465] dict creation performance regression

2014-02-14 Thread Peter Ingebretson
Changes by Peter Ingebretson : -- nosy: +pingebretson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue4431] Distutils MSVC doesn't create manifest file

2014-02-14 Thread Stephen Hansen
Stephen Hansen added the comment: FYI. Windows 8.1, Visual Studio 2010 SP1 Pro just installed, Python 3.3.3; a random extension did this as a 'test' in its setup.py: compiler = distutils.ccompiler.new_compiler() if not compiler.has_function('rand', includes = ['stdlib.h']): ...

[issue20580] IDLE should support platform-specific default config defaults

2014-02-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From what you have said here and on the other issue, reality has outgrown the >current customization methods. If Python, Tk, and Idle were to run on Windows >RT, I presume a different configuration would be needed than for normal >desktop. Any new scheme use

[issue20547] Use specific asserts in bigmem tests

2014-02-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch2 looks correct, given that the replacement is the right thing to do. The assertTrue error message 'False is not true' is definitely not helpful. But I see Raymond's point. I think these patches should be discussed on pydev. -- nosy: +terry.reedy

[issue20544] Use specific asserts in operator tests

2014-02-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Rietveld's within-line diff highlighting really helps reviewing this sort of thing. LGTM. -- nosy: +terry.reedy ___ Python tracker ___

[issue20631] python readline module crashing on NULL access

2014-02-14 Thread koobs
Changes by koobs : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mail

[issue20622] Python3.3 venv pip fails to run if path contains spaces

2014-02-14 Thread FeralBytes
FeralBytes added the comment: Wow that is a very compelling argument that I am hesitant to raise a counter point against. But I feel I would at least like to understand better. So why does this issue not affect the interpreter in the venv itself, only pip and easy_install, or other such tools

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-02-14 Thread Nick Coghlan
Changes by Nick Coghlan : -- versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16361] HTTPS/TLS Problem in Python 3.3

2014-02-14 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue20632] Define a new __key__ protocol

2014-02-14 Thread Nick Coghlan
Nick Coghlan added the comment: Note: in conjuction with a class decorator (along the lines of functools.total_ordering), this idea is amenable to experimentation as a third party module. However, any such third party module shouldn't use a reserved name like __key__ - a public name like "calc

[issue20632] Define a new __key__ protocol

2014-02-14 Thread Nick Coghlan
New submission from Nick Coghlan: This is an idea that would require a PEP, just writing it down here as a permanent record in case someone else wants to run with it. Currently, the *simplest* way to define a non-identity total ordering on an immutable object is to define __hash__, __eq__ and

[issue20631] python readline module crashing on NULL access

2014-02-14 Thread Todd Fiala
Changes by Todd Fiala : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue20631] python readline module crashing on NULL access

2014-02-14 Thread Todd Fiala
New submission from Todd Fiala: Hi all, In working on the LLVM/LLDB project, I've been hitting a bug in the embedded interpreter that causes a NULL dereference in the Python readline module. There is a call to the history_get() function with an assumption that it returns a non-NULL value. This i

[issue20630] Add sorting helpers for collections containing None values

2014-02-14 Thread Nick Coghlan
New submission from Nick Coghlan: Currently, it's a bit annoying to sort collections containing "None" values in Python 3. While the default behaviour isn't going to change, it would be good to offer standard "none_first" and "none_last" helps (inspired by the SQL NULL FIRST and NULL LAST orde

[issue19744] test_venv and installation fail if SSL/TLS is not available

2014-02-14 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Ned - I fixed that test to only run if SSL/TLS is available, and added a new one to test that the command "succeeds" (with a warning printed to stderr) if SSL/TLS is missing. Larry - over to you to decide whether or not to cherry pick this into the relea

[issue19744] test_venv and installation fail if SSL/TLS is not available

2014-02-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f76adbac8b7 by Nick Coghlan in branch 'default': Issue #19744: Handle missing SSL/TLS in ensurepip http://hg.python.org/cpython/rev/9f76adbac8b7 -- ___ Python tracker

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: lgtm -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue20601] tracing and tests that raise an exception in a SIGALRM handler

2014-02-14 Thread Xavier de Gaye
Xavier de Gaye added the comment: Hum hum, and now with this last patch PyErr_CheckSignals is called for each traced line even when no signal is pending, which is worse than the previous one as far as performance is concerned. -- ___ Python tracker

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file34085/issue_20625_02.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue20628] csv.DictReader

2014-02-14 Thread Sean Rodman
Sean Rodman added the comment: I have created a patch for this documentation issue. Could you please review this for me and tell me what you think? -- keywords: +patch Added file: http://bugs.python.org/file34084/DictReader_DictWriter.patch ___ Pytho

[issue8032] Add gdb7 hooks to make it easier to debug Python

2014-02-14 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue20628] csv.DictReader

2014-02-14 Thread Sean Rodman
Sean Rodman added the comment: I am new to contributing to python, and I would like to take a shot a creating a patch for this. -- nosy: +sean.rodman ___ Python tracker ___

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: (see review on rietveld) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Yury Selivanov added the comment: > Why would we mangle the names of arguments in the first place? What possible > use case is there? The use case is multiple inheritance. You can define your methods with keyword and keyword-only params starting with '__', put in them some cached default for

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Larry Hastings
Larry Hastings added the comment: Why would we mangle the names of arguments in the first place? What possible use case is there? -- ___ Python tracker ___

[issue20629] Python ctypes BigEndianStructure bitfield assignment misbehavior in Linux

2014-02-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +amaury.forgeotdarc, belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue20629] Python ctypes BigEndianStructure bitfield assignment misbehavior in Linux

2014-02-14 Thread Alan Ning
New submission from Alan Ning: I am seeing a strange issue with bitfields and BigEndianStructure under Ubuntu 12.04 x64, Python 2.7.3. This bug only occurs if I define my bitfields using c_uint. If I switch to c_ushort, it goes away. Below is a simple code that highlights the problem. I have

[issue20626] Manager documentation unclear about lists and thread safeness

2014-02-14 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue11588] Add "necessarily inclusive" groups to argparse

2014-02-14 Thread paul j3
paul j3 added the comment: The suggestion in this issue is to add a 'mutually_inclusive_group' mechanism, one that would let users specify that certain sets of arguments must occur together. Furthermore there was mention of allowing some sort of nesting. Modeling it on the mutually_exclusive_

[issue20619] tracemalloc changes col_offset attribute for _ast.arg objects

2014-02-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is a 3.4 only issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue20619] tracemalloc changes col_offset attribute for _ast.arg objects

2014-02-14 Thread STINNER Victor
STINNER Victor added the comment: The fix should not be backported? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Yury Selivanov added the comment: Patch is attached. Please review. -- keywords: +patch nosy: +benjamin.peterson, nnorwitz Added file: http://bugs.python.org/file34083/issue_20625_01.patch ___ Python tracker __

[issue20573] "built-in repr()" function link on the repr module documentation is incorrect

2014-02-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c47529bda0e by Benjamin Peterson in branch '2.7': fix links to builtin repr function (closes #20573) http://hg.python.org/cpython/rev/7c47529bda0e -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> clos

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

2014-02-14 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue20573] "built-in repr()" function link on the repr module documentation is incorrect

2014-02-14 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue20559] urllib/http fail to sanitize a non-ascii url

2014-02-14 Thread Éric Araujo
Éric Araujo added the comment: Even if Python 3’s text model is based on Unicode, some data formats have their own rules. There’s a long debate about whether URIs should be bytes or text; it looks like unlike web browsers, urllib/httplib don’t try to be smart with the URIs they are given but

[issue20606] Operator Documentation Example doesn't work

2014-02-14 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Yury Selivanov added the comment: Furthermore: class Foo: def bar(self, *, __kw:'anno'='default'): pass >>> Foo.bar.__annotations__ {'__kw': 'anno'} >>> Foo.bar.__kwdefaults__ {'_Foo__kw': 'default'} -- ___ Python tracker

[issue20628] csv.DictReader

2014-02-14 Thread R. David Murray
R. David Murray added the comment: Fieldnames is referred to as a sequence, which does define its type. That said, defining the type earlier in that paragraph would probably be a good thing. -- nosy: +r.david.murray ___ Python tracker

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Yury Selivanov added the comment: It looks like it's a bug. Spam.eggs.__code__.co_varnames will have '_Spam__some_kwarg' as a name of the first parameter. So __annotations__ should have '_Spam__some_kwarg' instead of '__some_kwarg'. -- ___ Python t

[issue20622] Python3.3 venv pip fails to run if path contains spaces

2014-02-14 Thread Éric Araujo
Éric Araujo added the comment: Due to the way the shell or kernel parses the shebang, you can’t have spaces in the path to the interpreter: http://lists.gnu.org/archive/html/bug-bash/2008-05/msg00053.html The solution is to separate your virtualenv from the directory containing your code. (v

[issue20624] Clarify recommendation to inherit from Exception

2014-02-14 Thread Éric Araujo
Éric Araujo added the comment: In my reading “at least” means that exceptions should derive from Exception if they don’t derive from a more specific subclass. IOW the same meaning as your proposed wording, but less clear. +1 to your rewording. -- nosy: +eric.araujo _

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue20627] Add context manager support to xmlrpc.client.ServerProxy

2014-02-14 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo stage: test needed -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue18943] argparse: default args in mutually exclusive groups

2014-02-14 Thread paul j3
paul j3 added the comment: This patch corrects the handling of `seen_non_default_action` in another case - a positional with '?' and `type=int` (or other conversion). if parser.add_argument('badger', type=int, nargs='?', default=2) # or '2' and the original test 'seen_non_default_actions'

[issue20621] Issue with zipimport in 3.3.4 and 3.4.0rc1

2014-02-14 Thread Paul Moore
Paul Moore added the comment: Thanks for the workaround. I'm going to try to do some serious testing of all this over the weekend, I'll let you know how it goes. -- ___ Python tracker _

[issue20601] tracing and tests that raise an exception in a SIGALRM handler

2014-02-14 Thread Xavier de Gaye
Xavier de Gaye added the comment: With the previous patch, after the signal arrives and the first call to PyErr_CheckSignals, PyErr_CheckSignals is called for each bytecode processed in the eval loop of the tracing function (and the eval loop of functions called by the tracing function, and al

[issue20628] csv.DictReader

2014-02-14 Thread Roger Erens
New submission from Roger Erens: The sections on DictReader and DictWriter do not give information on what the type is of the parameter 'fieldnames'. The source code comments that it is a 'list of keys for the dict'. -- assignee: docs@python components: Documentation messages: 211226 n

[issue20620] Update the min()/max() docs for the new default argument

2014-02-14 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch to update the min() and max() documentations. -- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file34081/issue20620.diff ___ Python tracker

[issue20626] Manager documentation unclear about lists and thread safeness

2014-02-14 Thread Zachary Ware
Changes by Zachary Ware : -- stage: -> needs patch type: -> enhancement versions: -Python 3.1, Python 3.2, Python 3.5 ___ Python tracker ___ __

[issue20621] Issue with zipimport in 3.3.4 and 3.4.0rc1

2014-02-14 Thread Steve Dower
Steve Dower added the comment: Oddly enough, this works with 3.3.4 as released: >>> import sys, zipfile >>> with zipfile.ZipFile('test.zip', 'w') as f: ... f.writestr('test/__init__.py', b'print("Success!")') ... >>> sys.path[:] = ['test.zip'] >>> import test Success! Maybe wheel is creating

[issue20621] Issue with zipimport in 3.3.4 and 3.4.0rc1

2014-02-14 Thread Steve Dower
Steve Dower added the comment: I found that using zipimporter('...whl').load_module(pip) directly works fine, so you may be able to use that as a workaround. (Forgot to mention it in my initial comment, but that's what prompted me to check against the ABC.) I also backed out that change from t

[issue19744] test_venv and installation fail if SSL/TLS is not available

2014-02-14 Thread Ned Deily
Ned Deily added the comment: issue19744_ensurepip_install_ok_without_ssl.diff looks good to me. Note, though, that with it and with ssl support missing, test_ensurepip fails somewhat obscurely: == FAIL: test_bootstrap_version

[issue20627] Add context manager support to xmlrpc.client.ServerProxy

2014-02-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20627] Add context manager support to xmlrpc.client.ServerProxy

2014-02-14 Thread Brett Cannon
New submission from Brett Cannon: Otherwise have to call client('close')() to close a server proxy and that's just ugly. -- components: Library (Lib) messages: 211221 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Add context manager support

[issue20626] Manager documentation unclear about lists and thread safeness

2014-02-14 Thread Irvin Probst
Changes by Irvin Probst : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker ___

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +larry, ncoghlan, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue20626] Manager documentation unclear about lists and thread safeness

2014-02-14 Thread Irvin Probst
New submission from Irvin Probst: In the the Manager's lists documentation one can read: """ list() list(sequence) Create a shared list object and return a proxy for it. """ IMHO it is really unclear whether these lists have something more than traditionnal lists or not. When you have a look

[issue20621] Issue with zipimport in 3.3.4 and 3.4.0rc1

2014-02-14 Thread Paul Moore
Paul Moore added the comment: Note - we're going to have to work around this bug in Virtualenv (even if it's just in code specific to 3.3.4) so a workaround for 3.3.4 and an explanation of what's going wrong would be useful, as well as a fix. -- ___

[issue20547] Use specific asserts in bigmem tests

2014-02-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I try to be very careful. It's great to be careful, but it is a smarter move to not change the test suite at all (except in cases where there is a known problem). There is almost zero benefit to the patch (i.e. the tests are currently not failing and h

[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2014-02-14 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: The version action currently writes to stderr. The _VersionAction(Action)'s __call__() method finishes off with parser.exit(message=formatter.format_help()) and parser.exit() by default writes to stderr. Here, Steven says "Help is definitely intended to

[issue20547] Use specific asserts in bigmem tests

2014-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Additionally, the "more specific tests" introduce some additional opacity > that is harmful for knowing what methods and operators are specifically > used internally in test method. For end users of Python, they don't have > to worry much about this, but we

[issue20625] Argument names in __annotations__ are not mangled for functions defined inside class scope

2014-02-14 Thread Jonas Wielicki
New submission from Jonas Wielicki: Assume I have this code: class Spam: def eggs(__some_kwarg:int=None): print(__some_kwarg) I can call Spam.bar with keyword arguments as expected from mangling: >>> Spam.eggs(10) 10 >>> Spam.eggs(_Spam__some_kwarg=10) 10 However, in the __annotat

[issue20624] Clarify recommendation to inherit from Exception

2014-02-14 Thread Mark Dickinson
New submission from Mark Dickinson: >From http://docs.python.org/3.4/library/exceptions.html: "... programmers are encouraged to at least derive new exceptions from the Exception class and not BaseException." This wording had someone I've talked to recently thinking that user-defined exceptio

[issue19744] test_venv and installation fail if SSL/TLS is not available

2014-02-14 Thread Nick Coghlan
Nick Coghlan added the comment: Note: I'm deliberately not worrying about ensurepip._uninstall here, since that only gets invoked implicitly in the Windows uninstaller, and that should always have a valid SSL to play with. Always, since I worked out how to disable ssl in my local build (just a

[issue19744] test_venv and installation fail if SSL/TLS is not available

2014-02-14 Thread Nick Coghlan
Nick Coghlan added the comment: This patch is probably a better bet - it just prints a message to stderr to say that we're ignoring the ensurepip failure during installation. pip wouldn't work anyway in a Python without ssl built, but at least this way that Python can still be installed withou

[issue19744] test_venv and installation fail if SSL/TLS is not available

2014-02-14 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch tweaks the ensurepip CLI to check immediately for ssl support, and avoid printing a traceback if it is missing. However, missing SSL support still fails the call, which fails installation. -- keywords: +patch resolution: fixed -> stage: c

[issue20550] Use specific asserts in collections tests

2014-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry. Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file34076/collections_tests_asserts.patch ___ Python tracker __

[issue20621] Issue with zipimport in 3.3.4 and 3.4.0rc1

2014-02-14 Thread Paul Moore
Paul Moore added the comment: I tried hg backout 2807a5f011e4. It gave errors in the form of dialog boxes titled "Microsoft Visual Studio" saying "File '-nosplash' not found". I've no idea where these came from and whether they matter, but I tried clicking OK. Mercurial then said merging Lib/

[issue20621] Issue with zipimport in 3.3.4 and 3.4.0rc1

2014-02-14 Thread Paul Moore
Paul Moore added the comment: OK, I have a build of 3.4 that shows the bug. How do I revert http://hg.python.org/cpython/rev/20b77ff040b6 ? hg backout -r 20b77ff040b6 says "abort: cannot backout a merge changeset". -- ___ Python tracker

[issue20568] Pass --default-install to ensurepip in the Windows installers

2014-02-14 Thread Nick Coghlan
Nick Coghlan added the comment: Martin, the addition of "--default-install" to the ensurepip args is all that should be needed (it won't trigger if pip isn't upgraded, but rc2 will contain 0.15.3 to fix a couple of glitches that remained in rc1) -- assignee: ncoghlan -> loewis keywords

[issue20621] Issue with zipimport in 3.3.4 and 3.4.0rc1

2014-02-14 Thread Paul Moore
Paul Moore added the comment: I'm afraid I don't have things set up to do a Python build right now. I *might* have time later, and if so I'll give it a try, but I can't promise. Also, I haven't yet managed to show the issue on 3.4.0rc1, but that may be because my check wasn't as complete as St