[issue11610] Improved support for abstract base classes with descriptors

2011-12-06 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Added some review comments in Reitveld - core functionality changes look good, but there are some other aspects that need addressing before the patch will be good to go (primarily relating to only doing a minimal documented deprecation of the

[issue13524] critical error with import tempfile

2011-12-06 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13524 ___

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Instead of requiring bit_length(), couldn't you simply compare self to 2**(bits-1) (for to_unsigned) and 2**bits (for to_signed)? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue13536] ast.literal_eval fails on sets

2011-12-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Alex: IMO the operator support is only required for complex literals. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13536 ___

[issue13505] Bytes objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-06 Thread sbt
sbt shibt...@gmail.com added the comment: One *dirty* trick I am thinking about would be to use something like array.tostring() to construct the byte string. array('B', ...) objects are pickled using two bytes per character, so there would be no advantage: pickle.dumps(array.array('B',

[issue13537] Namedtuple instances can't be pickled in a daemonized process

2011-12-06 Thread Popa Claudiu
New submission from Popa Claudiu pcmantic...@gmail.com: On Unix world, in a daemonized process, any namedtuple instance can't be pickled, failing with error: _pickle.PicklingError: Can't pickle class X: attribute lookup __main__.t failed. This can't be reproduced with the attached code. If I

[issue13537] Namedtuple instances can't be pickled in a daemonized process

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As far as I can tell, this has nothing to do with daemon processes and all to do with the fact that user-defined classes have to be globally visible for their instances to be pickled. It is because pickles reference classes by name, and local

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread Guillaume Bouchard
New submission from Guillaume Bouchard guillaum.bouch...@gmail.com: The docstring associated with str() says: str(string[, encoding[, errors]]) - str Create a new string object from the given encoded string. encoding defaults to the current default string encoding. errors can be

[issue13539] A return is missing in TimeEncoding of calendar.py

2011-12-06 Thread psam
New submission from psam pk.sam...@gmail.com: The v2.6 of __enter__() of TimeEncoding has been fixed in v2.7 in relation with the return of setlocale(), but for no apparent reason, its necessary returned value is no more there. Patch: def __enter__(self): self.oldlocale =

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I agree with you that this is inconsistent. However, having str raise an error is pretty much a non-starter as a suggestion. str always falls back to the repr; in general str(obj) should always return some value, otherwise the

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Personally I'm not at all sure why str takes encoding and errors arguments (I never use them). Probably because the unicode type also did in 2.x. And also because it makes it compatible with arbitrary buffer objects: str(memoryview(bfoo),

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread Guillaume Bouchard
Guillaume Bouchard guillaum.bouch...@gmail.com added the comment: str always falls back to the repr; in general str(obj) should always return some value, otherwise the assumptions of a *lot* of Python code would be broken. Perhaps it may raises a warning ? ie, the only reason encoding

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: A diff would be great. We try to use warnings sparingly, and I don't think this is a case that warrants it. Possibly a .. note is worthwhile, perhaps with an example for the bytes case, but even that may be too much. I also wouldn't

[issue13520] Patch to make pickle aware of __qualname__

2011-12-06 Thread sbt
sbt shibt...@gmail.com added the comment: It looks like Issue 3657 is really about builtin methods (i.e. builtin_function_or_method objects where __self__ is not a module). It causes no problem for normal python instance methods. If we tried the getattr approach for builtin methods too then

[issue13540] Document the Action API

2011-12-06 Thread Jason R. Coombs
New submission from Jason R. Coombs jar...@jaraco.com: In http://docs.python.org/dev/library/argparse.html#action, when describing an arbitrary action, the documentation states, You can also specify an arbitrary action by passing an object that implements the Action API. This statement does

[issue13540] Document the Action API in argparse

2011-12-06 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: -- title: Document the Action API - Document the Action API in argparse ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___

[issue13538] Docstring of str() and/or behavior

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, I forgot to mention it in my previous message, but there is already a warning that you can activate with the -b option: $ ./python -b Python 3.3.0a0 (default:6b6c79eba944, Dec 6 2011, 11:11:32) [GCC 4.5.2] on linux Type help, copyright,

[issue2057] difflib: add patch capability

2011-12-06 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hi Marco, thanks for your interest in improving Python. Do you want to propose a patch for this request? If so, guidelines and help are found in the devguide. (For the other bug, please read the discussion there to see why 2.7 is not

[issue13408] Rename packaging.resources back to datafiles

2011-12-06 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: MvL also thought the “resources” term to be non-obvious: http://mail.python.org/pipermail/python-dev/2006-April/063966.html Other people mentioned its prior use within the Mac, the X system or Web frameworks. Someone mentioned “assets” in the

[issue13408] Rename packaging.resources back to datafiles

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sounds reasonable to me. (is it normal that there's no online help for it: $ ./python -m pydoc packaging.resources no Python documentation found for 'packaging.resources' ) -- nosy: +pitrou ___

[issue13408] Rename the packaging “resources” concept back to “data files”

2011-12-06 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The resources subsystem has code in the install_data command, the p7g.database module and internal classes. There used to be a p7g.resources module but it was merged into database because it contained only a few lines. -- title: Rename

[issue13408] Rename the packaging “resources” concept back to “data files”

2011-12-06 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Regarding reST docs, there’s a good bit in packaging/setupcfg and I have plans to explain it more (what it does, how it works with sysconfig.cfg, how it obsoletes package_data, how to use it and keep compat with distutils). --

[issue13541] HTTPResponse (urllib) has no attribute read1 needed for TextIOWrapper

2011-12-06 Thread Peter
New submission from Peter p.j.a.c...@googlemail.com: Use case: I want to open an HTTP URL, and treat the handle as though it were opened in text mode (i.e. unicode strings not bytes). $ python3 Python 3.2 (r32:88445, Feb 28 2011, 17:04:33) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13535 ___ ___

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The 'self.bit_length() = bits' condition for to_unsigned doesn't look right to me. E.g., if bits == 32, I'd expect the acceptable range of values to be range(-2**31, 2**31)---i.e., including -2**31, but excluding 2**31. But the ValueError

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: On the feature request itself, I have to say that I'm unconvinced. Doing x % (2**32) seems good enough to me, in situations where you don't need the bounds checking. (And it's not clear to me that needing the bounds checks is the more

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: On the feature request itself, I have to say that I'm unconvinced. Doing x % (2**32) seems good enough to me, in situations where you don't need the bounds checking. Ah, I didn't know that modulo worked for that. Nice trick. --

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to optimized architecture-specific hypot

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13534 ___ ___

[issue13500] Hitting EOF gets cmd.py into a infinite EOF on return loop

2011-12-06 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- assignee: - jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13500 ___ ___ Python-bugs-list mailing

[issue13500] Hitting EOF gets cmd.py into a infinite EOF on return loop

2011-12-06 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5910c385fab6 by Jesus Cea in branch '2.7': Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop http://hg.python.org/cpython/rev/5910c385fab6 New changeset b6b4d74b8d42 by Jesus Cea in branch

[issue13500] Hitting EOF gets cmd.py into a infinite EOF on return loop

2011-12-06 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Garrett, please verify the fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13500 ___ ___

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to optimized architecture-specific hypot

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13534 ___ ___

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to buggy architecture-specific hypot

2011-12-06 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: The glibc bug has been fixed in that project's git repo: http://repo.or.cz/w/glibc.git/commit/850fb039cec802072f70ed9763927881bbbf639c -- title: test_cmath fails on ppc with glibc-2.14.90 due to optimized architecture-specific hypot -

[issue13541] HTTPResponse (urllib) has no attribute read1 needed for TextIOWrapper

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: For the record, readinto is handled in issue 13464. -- components: +Library (Lib) nosy: +pitrou stage: - needs patch type: - behavior versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13535 ___ ___

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to buggy architecture-specific hypot

2011-12-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the report, and all the sleuthing. It's always good to see Python's test suite expose C library (or C compiler) bugs. :-) I propose closing this as 'won't fix': I certainly wouldn't want to add workarounds in the cmath source

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to buggy architecture-specific hypot

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13534 ___ ___

[issue13542] Memory leak in multiprocessing.pool

2011-12-06 Thread Yang Zhang
New submission from Yang Zhang yang.pythonb...@mailnull.com: Calling Pool.map (and friends) on empty lists [] causes Pool._cache to hang on to the MapResults forever: tp = ThreadPool(5) xs = tp.map(lambda x: 'a' * int(10e6), range(100)) # now using 1GB mem = 100 * 10MB strs del xs gc.collect()

[issue13542] Memory leak in multiprocessing.pool

2011-12-06 Thread Yang Zhang
Yang Zhang yang.pythonb...@mailnull.com added the comment: Oops, sorry - pasted a wrong example. In [38]: tp = ThreadPool(5) In [39]: xs = tp.map(lambda x: x, []) In [40]: xs Out[40]: [] In [41]: tp._cache Out[41]: {3: multiprocessing.pool.MapResult at 0x244ab50} --

[issue13464] HTTPResponse is missing an implementation of readinto

2011-12-06 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 806cfe39f729 by Antoine Pitrou in branch 'default': Issue #13464: Add a readinto() method to http.client.HTTPResponse. http://hg.python.org/cpython/rev/806cfe39f729 -- nosy: +python-dev

[issue13464] HTTPResponse is missing an implementation of readinto

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, thank you. I've now committed the patch in the default branch. Congratulations! (since the documentation doesn't claim that HTTPResponse implements RawIOBase, I tend to consider this a feature request rather than a bugfix, hence no 3.2

[issue13543] shlex with string ending in space gives ValueError: No closing quotation

2011-12-06 Thread ekorn
New submission from ekorn jono...@gmail.com: It seems shlex fails on processing strings ending in space, causing this bug that I reported for IPython: https://github.com/ipython/ipython/issues/1109 Fernando Perez made a minimal example of the problem, quoted below. As he points out, it would

[issue13543] shlex with string ending in space gives ValueError: No closing quotation

2011-12-06 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13543 ___ ___

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-06 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: functools.update_wrapper() and functools.wraps() should copy the new property by default. -- keywords: easy messages: 148943 nosy: ncoghlan priority: release blocker severity: normal stage: needs patch status: open title: Add

[issue12555] PEP 3151 implementation

2011-12-06 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12555 ___ ___

[issue13390] Hunt memory allocations in addition to reference leaks

2011-12-06 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: I looked at the 'ctypes' leak a bit. I haven't determined exactly what is going on, but the leak has something to do with a change in the patch that runs 'dash_R_cleanup' twice instead of once. The new behavior can be reduced to something like:

[issue13390] Hunt memory allocations in addition to reference leaks

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So, I am not sure whether there really is a leak, if this is just a very senstive area of 'regrtest.py', or something else I am missing. Well, test_ctypes seems to be the only test exhibiting that behaviour. And since your script reproduces it,

[issue8641] IDLE 3 doesn't highlights b, but u

2011-12-06 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: I applied the patch against the latest version in the repository and it works correctly. -- nosy: +serwy type: - behavior versions: +Python 3.2, Python 3.3 ___ Python tracker

[issue11838] IDLE: make interactive code savable as a runnable script

2011-12-06 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: This issue relates to #1178 A traceback does not necessarily mean that the last statement had the error. For example: a = lambda: 1/0 a() Traceback (most recent call last): File pyshell#1, line 1, in module a()

[issue11051] system calls per import

2011-12-06 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11051 ___

[issue13511] ./configure --includedir, --libdir accept multiple

2011-12-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: You should request this new feature on autoc...@gnu.org or bug-autoc...@gnu.org mailing list. -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org

[issue11838] IDLE: make interactive code savable as a runnable script

2011-12-06 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Interesting example. This issue is a bit more complicated than I thought. Clearly, the call that reveals an error in previous lines should not be simply deleted. -- ___ Python tracker

[issue11682] PEP 380 reference implementation for 3.3

2011-12-06 Thread Ron Adam
Ron Adam ron3...@gmail.com added the comment: There is a test for 'yield from' as a function argument without the extra parentheses. f(yield from x) You do need them in the case of a regular yield. f((yield)) or f((yield value)) Shouldn't the same rule apply in both cases? *