[issue18320] idle, pydoc search python on wrong path at make altinstall with different exec- and prefix e.g. $HOME

2013-06-28 Thread cosmicduck
New submission from cosmicduck: Using Solaris 10 x86 Compiling actual 3.3.2 or 2.7.5 looks like work. Installing as non-root with make altinstall prefix='${HOME}/scripts/tools/python/python-3.3.2' exec-prefix='${HOME}/scripts/tools/python/python-3.3.2' installs looks like correctly to the

[issue9938] Documentation for argparse interactive use

2013-06-28 Thread Ethan Furman
Ethan Furman added the comment: It doesn't look like xuanji has signed a CLA. Should we create a new issue, and have someone else create a new patch, and let this issue just be about the docs? -- nosy: +ethan.furman ___ Python tracker

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Eduardo Robles Elvira
New submission from Eduardo Robles Elvira: The patch attached provides implementation for multivolume support for tarfile module. It contains both the changes in the module and a battery of unit tests. It contains support for multivolume for both GNU and PAX formats. The main idea behind this

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would rather ask: why do we eval() MO files? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18317 ___ ___

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: We don't eval() the whole MO file. It's just the pluralization formula, http://www.gnu.org/software/gettext/manual/gettext.html#index-nplurals_0040r_007b_002c-in-a-PO-file-header_007d-1093 The patch uses ast.NodeVisitor to look for dangerous code.

[issue18042] Provide enum.unique class decorator

2013-06-28 Thread Ethan Furman
Ethan Furman added the comment: unique() added to enum.py; tests added; docs updated. If no complaints within a few days I'll push them through. -- keywords: +patch Added file: http://bugs.python.org/file30722/unique.stoneleaf.01.patch ___ Python

[issue18042] Provide enum.unique class decorator

2013-06-28 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18042 ___ ___ Python-bugs-list

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +lars.gustaebel stage: - patch review type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Jakub Wilk
Jakub Wilk added the comment: Making token filtering more thorough may be simpler that going through AST. I think Python should accept all the operators that GNU gettext accepts: http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/intl/plural.y?id=v0.18.2.1#n132 --

[issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures)

2013-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18308 ___ ___ Python-bugs-list mailing

[issue16251] pickle special methods are looked up on the instance rather than the type

2013-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: At the very least the pickle docs deserve some mention of the behavior. That way people won't need to spend as much time trying to figure out why things aren't working the way they expect. I think you are overreacting. The rule you are talking about

[issue18322] test_stat nits

2013-06-28 Thread Antoine Pitrou
New submission from Antoine Pitrou: Patch with small fixes and improvements to test_stat. -- assignee: christian.heimes components: Tests files: test_stat.patch keywords: patch messages: 191985 nosy: christian.heimes, pitrou priority: normal severity: normal stage: patch review status:

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +amaury.forgeotdarc, benjamin.peterson stage: - patch review versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18287

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch is not complete: PyType_Ready() returns -1 but no no exception is set. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18287 ___

[issue18224] pyvenv pydoc.py script causing AttributeErrors on Windows

2013-06-28 Thread Vinay Sajip
Vinay Sajip added the comment: On further reflection: the pydoc script adds no value over and above python -m pydoc args, so I think I will remove it. -- assignee: - vinay.sajip versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue14455] plistlib unable to read json and binary plist files

2013-06-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: I intend to commit my latest version of the patch during the europython sprints, with a minor change: don't include dump(s) and load(s), that change (and the other items on open issues in my last post) can be addressed later. --

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread Laurent Gautier
New submission from Laurent Gautier: When creating a `gzip.GzipFile` using the named parameter `fileobj` rather than filename, iterating over it is broken: ``` AttributeError: 'GzipFile' object has no attribute 'extrastart' ``` The short example below is demonstrating the problem: ## ---

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Niklas Koep
Niklas Koep added the comment: Oh, you're right, of course. I completely forgot that any other case which jumps to the error label assumes an appropriate exception has already been set. I attached a new patch which raises a TypeError. Is there a better way to identify the type which is

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Since this error can occur only during the development of a C extension, I would not worry too much. The traceback will already indicate the imported module, this is much better than a segfault later in pydoc. --

[issue18042] Provide enum.unique class decorator

2013-06-28 Thread Eli Bendersky
Eli Bendersky added the comment: Sent some review comments. I'll be on a short vacation this weekend, so please wait at least until next week so I can review the changes. Also, Nick should definitely review this too :) -- ___ Python tracker

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18323 ___ ___ Python-bugs-list

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: Eduardo, can you please fill out the contributor form? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___

[issue18309] Make python slightly more relocatable

2013-06-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that the OSX port already does this for framework builds. I don't know why we don't use the same code for shared library builds. Issue #15498 contains a patch that switches this code from a deprecated nextstep-era API to dladdr. Two comments on the

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: Thanks for the link plural.y! I was looking for a C file, not a YACC file. The AST approach has advantages over tokenizing. The tokenizer returns just symbols but the AST has also context information. It makes it much easier to distinguish between unary -

[issue18322] test_stat nits

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: I wish the loader would ignore all test classes with a leading underscore or would gain another way to mark a test class as abstract. The mixin approach looks ugly and prohibits tab completion in my IDE. -- ___

[issue9938] Documentation for argparse interactive use

2013-06-28 Thread R. David Murray
R. David Murray added the comment: Yes, I think opening a new issue at this point might be a good idea. The reason is that there are a changes either in place or pending in other issues that involve the parse_know_args code, so a new patch is probably required regardless. I wish I had time

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread R. David Murray
R. David Murray added the comment: Based on a quick glance at the code, the problem isn't that you are passing fileobj, it is that fileobj has been opened for writing, not reading, and you are attempting to read from it. extrastart (and other attibutes) are only set if mode starts with 'r'.

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___ ___

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread R. David Murray
R. David Murray added the comment: On the other hand, it seems reasonable to be able to read if you've done a seek(0), so a more complicated fix may also be appropriate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18323

[issue14455] plistlib unable to read json and binary plist files

2013-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Let me review your patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14455 ___ ___ Python-bugs-list

[issue18322] test_stat nits

2013-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wish the loader would ignore all test classes with a leading underscore or would gain another way to mark a test class as abstract. The mixin approach looks ugly and prohibits tab completion in my IDE. I don't really understand what makes mixins ugly. I'm

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2013-06-28 Thread Sylvain Corlay
Sylvain Corlay added the comment: Hello, It would be great if this modification was also done for Python 2.7. A reason is that IPython redirects stderr. When running unit tests in the IPython console without specifying the stream argument, the errors are printed in the shell. See

[issue18111] Add a default argument to min max

2013-06-28 Thread R. David Murray
R. David Murray added the comment: Julian, could you please submit a contributor agreement? (http://www.python.org/psf/contrib) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18111 ___

[issue18322] test_stat nits

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: Ask your Java buddies about mixins. :) Go ahead and submit the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___

[issue17914] add os.cpu_count()

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6a0437adafbd by Charles-François Natali in branch 'default': Issue #17914: Use os.cpu_count() instead of multiprocessing.cpu_count() where http://hg.python.org/cpython/rev/6a0437adafbd -- ___ Python

[issue18111] Add a default argument to min max

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34ff27b431d0 by R David Murray in branch 'default': #18111: Add What's New entry for max/min default. http://hg.python.org/cpython/rev/34ff27b431d0 -- ___ Python tracker rep...@bugs.python.org

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Re-close? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18135 ___ ___ Python-bugs-list

[issue18280] Documentation is too personalized

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I find some anonymous I references (Guido? 20 years ago?) off-putting when reading the doc as formal reference. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18280

[issue18292] IDLE Improvements: Unit test for AutoExpand.py

2013-06-28 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18292 ___ ___ Python-bugs-list

[issue17914] add os.cpu_count()

2013-06-28 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18135 ___ ___

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 2.7 doc says 'Roughly equivalent to' rather than 'Equivalent to'. The undecorated Python version of from_iterable actually works as an attribute of the Python version of chain: chain.from_iterable = from_iterable. I would just remove the decorator. The

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2013-06-28 Thread R. David Murray
R. David Murray added the comment: For the record, encode_quopri was fixed in #14360. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4768 ___

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c807bc15fa8 by R David Murray in branch '3.3': #14360: Add news item. http://hg.python.org/cpython/rev/7c807bc15fa8 New changeset 36cc8b0446b3 by R David Murray in branch 'default': Merge #14360: Add news item.

[issue18324] set_payload does not handle binary payloads correctly

2013-06-28 Thread R. David Murray
New submission from R. David Murray: In order to maintain model consistency without exposing the need for 'surrogateescape' to library users, it should be possible to pass binary data to set_payload and have it do the correct conversion to the expected storage format for the model.

[issue18322] test_stat nits

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___ ___

[issue18322] test_stat nits

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___ ___ Python-bugs-list

[issue18305] [patch] Fast sum() for non-numbers

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Performance enhancements do not normally go in bugfix releases. The issue of quadratic performance of sum(sequences, null_seq) is known, which is why the doc says that sum() is for numbers and recommends .join for strings and itertools.chain for other

[issue18305] [patch] Fast sum() for non-numbers

2013-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with Terry. CPython deliberately disallow use sum() with lists of strings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18305 ___

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps it should be staticmethod, not classmethod. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18301 ___

[issue17767] Fix test discovery for test_locale.py

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17767 ___ ___

[issue18266] Fix test discovery for test_largefile.py

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18266 ___ ___

[issue18322] test_stat nits

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: While you are at it, should you just replace test_main with unittest.main? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___

[issue18322] test_stat nits

2013-06-28 Thread STINNER Victor
STINNER Victor added the comment: The mixin approach looks ugly and prohibits tab completion in my IDE. It is a common practice in Python, especially in tests. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org

[issue18325] test_kqueue fails in OpenBSD

2013-06-28 Thread Federico Schwindt
New submission from Federico Schwindt: test_kqueue fails in OpenBSD/amd64 -current: Traceback (most recent call last): File /usr/obj/pobj/Python-3.3.2/Python-3.3.2/Lib/test/test_kqueue.py, line 79, in test_create_event ev = select.kevent(bignum, 1, 2, 3, sys.maxsize, bignum)

[issue18325] test_kqueue fails in OpenBSD

2013-06-28 Thread Federico Schwindt
Changes by Federico Schwindt federico.schwi...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18325 ___ ___

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you think you will ever contribute another patch (and we hope you do), and you have not yet submitted a contributor agreement, please do. http://www.python.org/psf/contrib/contrib-form/ http://www.python.org/psf/contrib/ Once processed, a * will appear

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: David, with the addition, this line class FileInput([files[, inplace[, backup[, bufsize[, mode[, openhook]]) ends at position 83 instead of 80. It should stay on one line. I could reduce that by removing blanks after ,s. Is it better to be a bit too

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread R. David Murray
R. David Murray added the comment: At 83 it is a judgement call whether to leave it long or wrap it. I wouldn't compress it. (Wrapping is done by putting a '\' at the end of the line you want to wrap, if you don't already know that). -- ___

[issue18315] bufsize parameter not documented in 2.7.5

2013-06-28 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: Added file: http://bugs.python.org/file30727/18315-fileinput-27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18315 ___

[issue18315] Fix fileinput doc and docstrings (add 'buffer' in 2.7)

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I just remembered: the first list of a .py file docstring should be a one line summary of what the callable does. It should not give the signature because (unlike C function currently) help does that for us from the callable itself (using the inspect module).

[issue18315] Fix fileinput doc and docstrings (add 'buffer' in 2.7)

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 80b1c5b25ff0 by Terry Jan Reedy in branch '2.7': Issue #18315: Improve fileinput docs by adding 'bufsize' where missing and http://hg.python.org/cpython/rev/80b1c5b25ff0 New changeset 0760b58526ba by Terry Jan Reedy in branch '3.3': Issue #18315:

[issue18315] Fix fileinput doc and docstrings (add 'buffer' in 2.7)

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: There was one missing 'bufsize' in 3.x also. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18315

[issue18305] [patch] Fast sum() for non-numbers

2013-06-28 Thread Sergey
Sergey added the comment: The issue of quadratic performance of sum(sequences, null_seq) is known I hope it's never too late to fix some bugs... :) sum([[1,2,3]]*n, []) == [1,2,3]*n == list(chain.from_iterable([[1,2,3]]*n)) But if you already have a list of lists, and you need to join the

[issue17940] extra code in argparse.py

2013-06-28 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - patch review versions: +Python 3.4 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17940 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2176c1867b34 by Terry Jan Reedy in branch 'default': Issue #18081: Back out temporary changeset, 2a9e1eb3719c, to merge new patch. http://hg.python.org/cpython/rev/2176c1867b34 -- ___ Python tracker

[issue18242] IDLE should not be replacing warnings.formatwarning

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c15d0baac3d6 by Terry Jan Reedy in branch '3.3': Issue *18081, #18242: Change Idle warnings capture in PyShell and run to stop http://hg.python.org/cpython/rev/c15d0baac3d6 New changeset 89e0d33cb978 by Terry Jan Reedy in branch '2.7': Issue

[issue18242] IDLE should not be replacing warnings.formatwarning

2013-06-28 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18242 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: This was sent to #18242 but not here. I expected here also. New changeset c15d0baac3d6 by Terry Jan Reedy in branch '3.3': Issue *18081, #18242: Change Idle warnings capture in PyShell and run http://hg.python.org/cpython/rev/c15d0baac3d6 New changeset

[issue16000] test_curses should use unittest

2013-06-28 Thread Zachary Ware
Zachary Ware added the comment: I had a chance to look at this today and took a stab at writing a patch (attached). Since moving all of the test functions into a TestCase subclass necessarily means indenting everything another level, the patch is a huge ugly mix of - and + lines that don't

[issue18316] Idle 2.7: update to simplify cross-version patches

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa1350c7d196 by Terry Jan Reedy in branch '2.7': Issue #18316: Update idlelib 2.7 except clauses to ease backports. http://hg.python.org/cpython/rev/aa1350c7d196 -- nosy: +python-dev ___ Python tracker

[issue16000] test_curses should use unittest

2013-06-28 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: Added file: http://bugs.python.org/file30729/issue16000.v1-cmp.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16000 ___