[issue13992] Segfault in PyTrash_destroy_chain

2012-09-08 Thread Georg Brandl
Georg Brandl added the comment: Picked as 5aa1bc2f00ad. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Stefan Krah
Stefan Krah added the comment: Infinities do not have payloads. It's a bug in decimal.py that it accepts non-empty coefficients when constructing infinities. Since there was a corresponding unit test for as_tuple(), I've kept the wrong representation for _decimal: # XXX non-compliant

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Mark Dickinson
Mark Dickinson added the comment: It's a bug in decimal.py that it accepts non-empty coefficients when constructing infinities. On what grounds is it a bug? I might call it a poor design decision, but it's clearly intentional. There's even a unit test for it. --

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson rep...@bugs.python.org wrote: On what grounds is it a bug? I might call it a poor design decision, but it's clearly intentional. There's even a unit test for it. Maybe bug is not the right word. I'd call it a deviation from the specification

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Mark Dickinson
Mark Dickinson added the comment: I'd call it a deviation from the specification then. Do you happen to know what the intention was? Well, we're kinda outside the specification here. Rightly or wrongly, Decimal('infinity').as_tuple() was originally implemented to return (0, (0,), 'F'); I'm

[issue15629] Add to regrtest the ability to run Lib and Doc doctests

2012-09-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attached is a patch that adds to regrtest the ability to run doctests in both library modules and documentation files (specifically, in the non-test modules in Lib/ and in the *.rst files in Doc/). The syntax to run all doctests is-- python -m test

[issue15868] leak in bytesio.c

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset df663603e67a by Stefan Krah in branch '3.2': Issue #15868: Fix refleak in bytesio.c (Coverity #715365). http://hg.python.org/cpython/rev/df663603e67a -- nosy: +python-dev ___ Python tracker

[issue15868] leak in bytesio.c

2012-09-08 Thread Stefan Krah
Stefan Krah added the comment: Thanks for taking a look! -- resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15868

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15882 ___ ___ Python-bugs-list

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's actually up to Barry (and Benjamin) to decide whether to apply this to 2.6 (and 3.1). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15340 ___

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Stefan Krah
Stefan Krah added the comment: It's an implementation detail of decimal.py to represent infinity with a coefficient of '0' instead of the empty string: Decimal(inf)._int '0' So IMO the tuple representation exposes that implementation detail. I'm still not sure why that was done or what the

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Mark Dickinson
Mark Dickinson added the comment: So, I'd really like to deprecate the whole interface in favor of either a read-only interface: x.sign - 0 or 1 (perhaps even 1 or -1) x.coeff - Python integer x.exp- Python integer If x is special, raise InvalidOperation. People

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Mark Dickinson
Mark Dickinson added the comment: read-only interface: x.sign - 0 or 1 (perhaps even 1 or -1) x.coeff - Python integer x.exp- Python integer The only slightly awkward thing with this (for high-precision decimals) is the quadratic conversion (well, okay, perhaps

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson rep...@bugs.python.org wrote: So, I'd really like to deprecate the whole interface in favor of either a read-only interface: But I think that's a different issue. Yep. I was using all this as a rationale that the current tuple interface does

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think PYTHON_FOR_BUILD includes -E to make sure that if PYTHONPATH (or PYTHONHOME) is set that it then won't affect the build. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15822

[issue15871] Online docs: make index search always available.

2012-09-08 Thread Ezio Melotti
Ezio Melotti added the comment: If I search for random, at the top of the result lists I want to see at least the random module and the random.random function. Currently the random module is the 4th result, and random.random is buried down in the list (17th place) among all the other random.*

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Stefan Krah
Stefan Krah added the comment: Aaron, did you encounter this problem in a real world application? I'm asking because it would be interesting to know if people use this. Google is pretty silent on Decimal((0, (0,), 'F')), but perhaps that is not an ideal search term. Mark, I'm uploading a

[issue15883] Add Py_errno to work around multiple CRT issue

2012-09-08 Thread Christian Heimes
New submission from Christian Heimes: errno is usually implemented as thread local variable, more precisely as a macro that calls a function which returns the memory address of a thread local variable. Each C runtime library has its own function and TLS which introduces an issue when a Python

[issue15814] memoryview: equality-hash invariant

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca81b9a3a015 by Stefan Krah in branch 'default': Issue #15814: Update whatsnew to the current state of hashing memoryviews. http://hg.python.org/cpython/rev/ca81b9a3a015 -- ___ Python tracker

[issue15814] memoryview: equality-hash invariant

2012-09-08 Thread Stefan Krah
Stefan Krah added the comment: Georg, thanks for including all changes that I've asked for! If you still have the patience for the constant stream of memoryview doc changes, there are three new ones that might be worth including: 3b2597c1fe35 c9c9d890400c ca81b9a3a015 --

[issue15883] Add Py_errno to work around multiple CRT issue

2012-09-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: Since this is a new feature, it needs to go into 3.4. -- versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15883 ___

[issue15871] Online docs: make index search always available.

2012-09-08 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15871 ___ ___

[issue15844] weird import errors

2012-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15844 ___

[issue15845] Fixing some byte-to-string conversion warnings

2012-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15845 ___

[issue15852] typos in curses argument error messages

2012-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15852 ___ ___

[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2012-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15851 ___ ___

[issue15875] tarfile may not make @LongLink for non-ascii character

2012-09-08 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel nosy: +lars.gustaebel versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15875 ___

[issue10224] Build 3.x documentation using python3.x

2012-09-08 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___ Python-bugs-list

[issue13922] argparse handling multiple -- in args improperly

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5d8454fcc629 by R David Murray in branch '3.2': #15847: allow args to be a tuple in parse_args http://hg.python.org/cpython/rev/5d8454fcc629 New changeset 76655483c5c8 by R David Murray in branch 'default': merge #15847: allow args to be a tuple in

[issue15847] parse_args stopped accepting tuples

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5d8454fcc629 by R David Murray in branch '3.2': #15847: allow args to be a tuple in parse_args http://hg.python.org/cpython/rev/5d8454fcc629 New changeset 76655483c5c8 by R David Murray in branch 'default': merge #15847: allow args to be a tuple in

[issue15847] parse_args stopped accepting tuples

2012-09-08 Thread R. David Murray
R. David Murray added the comment: Thanks, Zbyszek. I'm glad you caught this. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15847

[issue15842] Some SocketIO methods can succeed after close()

2012-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, I've found a couple of issues with the patch: - it doesn't address seekable(); seekable() should also raise ValueError - the test should be done with makefile(..., buffering=0), so that SocketIO is actually tested, rather than the buffered object

[issue15510] textwrap.wrap('') returns empty list

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 65e5f28801e1 by R David Murray in branch '3.2': #15510: clarify textwrap's handling of whitespace, and add confirming tests. http://hg.python.org/cpython/rev/65e5f28801e1 New changeset 0e9ad455355b by R David Murray in branch 'default': Merge

[issue15510] textwrap.wrap('') returns empty list

2012-09-08 Thread R. David Murray
R. David Murray added the comment: Thanks, Chris. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15510

[issue15865] reflect bare star * in function signature documentation

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset a30b3915228b by Ezio Melotti in branch '3.2': #15865: add * in the signature to document keyword-only args in the docs. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/a30b3915228b New changeset 694c725f241a by Ezio Melotti in branch

[issue15865] reflect bare star * in function signature documentation

2012-09-08 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: docs@python - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue15884] PEP 3121, 384 Refactoring applied to ctypes module

2012-09-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- assignee: belopolsky nosy: belopolsky priority: normal severity: normal status: open title: PEP 3121, 384 Refactoring applied to ctypes module type: resource usage versions: Python 3.4

[issue15787] PEP 3121 Refactoring

2012-09-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- dependencies: +PEP 3121, 384 Refactoring applied to ctypes module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15787 ___

[issue15882] _decimal.Decimal constructed from tuple

2012-09-08 Thread Aaron
Aaron added the comment: I did not encounter this in a regular application. I do use the decimal module, and was excited to see the adoption of a faster C version, so I was just reading through the code to see how it worked. I can't think of a situation where I would need to construct a

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-08 Thread R. David Murray
R. David Murray added the comment: Looks like reitveld doesn't recognize your patch format, Petri. Instead of having the write_line flag, how about doing the newline write in the if body? A 'lastline=line' at the end of the loop in the buffer loop case is probably less expensive than doing

[issue5088] optparse: inconsistent default value for append actions

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8c60bb098eff by R David Murray in branch '3.2': #5088: document behavior of optparse defaults with 'append' action. http://hg.python.org/cpython/rev/8c60bb098eff New changeset 0c2bdd2c2032 by R David Murray in branch 'default': Merge #5088:

[issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines

2012-09-08 Thread Kyle Roberts
Changes by Kyle Roberts roberts...@gmail.com: -- nosy: +kyle.roberts ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15744 ___ ___ Python-bugs-list

[issue15820] Add additional info to Resources area on Dev Guide

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 18e31605b161 by R David Murray in branch 'default': #15820: Improve the Helping with the Devguide section http://hg.python.org/devguide/rev/18e31605b161 -- nosy: +python-dev ___ Python tracker

[issue15820] Add additional info to Resources area on Dev Guide

2012-09-08 Thread R. David Murray
R. David Murray added the comment: I incorporated your ideas into the update I made, including at least one that Ezio may have rejected...he can blame me :) Thanks, Mike. -- resolution: - fixed stage: - committed/rejected status: open - closed

[issue15871] Online docs: make index search always available.

2012-09-08 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15871 ___ ___

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-09-08 Thread Kevin Chen
Kevin Chen added the comment: Hi Eric, I am happy to install Python 3.3 on Windows and help you test this. Can you please give me some ideas on what I need to do? Do I sync to the latest Python 3.3 branch and compile? Then run some unit-test code? Which test files should I run? What should

[issue15842] Some SocketIO methods can succeed after close()

2012-09-08 Thread Alessandro Moura
Alessandro Moura added the comment: Fixed seekable(), and amended tests; see patch. -- Added file: http://bugs.python.org/file27149/socket.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15842

[issue15844] weird import errors

2012-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15844 ___ ___

[issue15848] PEP 3121, 384 Refactoring applied to xxsubtype module

2012-09-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like your patch will result in reference leaks if type creation fails. I think you should add Py_DECREF(m) before error returns. -- ___ Python tracker rep...@bugs.python.org

[issue15885] @staticmethod __getattr__ doesn't work

2012-09-08 Thread Albert Zeyer
New submission from Albert Zeyer: Code: ``` class Wrapper: @staticmethod def __getattr__(item): return repr(item) # dummy a = Wrapper() print(a.foo) ``` Expected output: 'foo' Actual output with Python 2.7: Traceback (most recent call last): File

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2def9ef683da by Ned Deily in branch '2.7': Issue #15822: Fix installation of lib2to3 grammar pickles to ensure http://hg.python.org/cpython/rev/2def9ef683da New changeset adc5e6aca251 by Ned Deily in branch '3.2': Issue #15822: Fix installation of

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-08 Thread Ned Deily
Ned Deily added the comment: I like Martin's suggested approach. It is explicit and much cleaner than the changes we introduced for Issue15645 as well as the original. The applied changes revert the previous changes and instead implement an explicit build of the two pickles directly in the

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-08 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- status: pending - open Removed file: http://bugs.python.org/file27084/issue15822_33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15822 ___

[issue15838] make install tries to create lib2to3 grammar pickles in source directory

2012-09-08 Thread Ned Deily
Ned Deily added the comment: This problem is resolved by the fixes for Issue15822 which implements a more explicit way of installing the grammar pickles. -- resolution: - duplicate stage: needs patch - committed/rejected status: open - closed superseder: - installed python may fail

[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-09-08 Thread Ned Deily
Ned Deily added the comment: Is it really possible that the pickle is created after calculation of the wildcard expansion? With the current GNUmake, it seems it is not possible. GNUmake appears to serializes the individual steps in a target's recipe although I did not find an explicit

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-09-08 Thread Nick Coghlan
Nick Coghlan added the comment: It's still on my list to follow up (along with the other contributions from the PyCon AU sprints). However, if Eric gets a Windows environment up and running before I get to it, I'm happy to hand the issue over (I rely on the buildbots to sanity check Windows

[issue15885] @staticmethod __getattr__ doesn't work

2012-09-08 Thread Eric Snow
Eric Snow added the comment: In Python 2 the code example generates an old-style class. When I tried it with a new style class, it worked fine: class Wrapper(object): @staticmethod def __getattr__(item): return repr(item) # dummy a = Wrapper() print(a.foo) #

[issue15873] datetime cannot parse ISO 8601 dates and times

2012-09-08 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15873 ___ ___ Python-bugs-list

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-09-08 Thread R. David Murray
R. David Murray added the comment: OK, 3.2 passes now, but when I merge to 3.3 I get failures. test_zipimport_support doesn't work on 2.7 either, but there we could just not backport the tests. -- ___ Python tracker rep...@bugs.python.org

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-09-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: I prepared the patch against 3.3 (default), so I wouldn't have expected it to work against 3.2 without further changes. The behavior in 3.3 after merging is also surprising given that it worked in 3.2 (and for me with direct application). I will look into