[issue9739] Output of help(...) is wider than 80 characters

2010-09-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Aren't there tools that extract only the first line of help? -- assignee: -> d...@python components: +Documentation -Extension Modules nosy: +amaury.forgeotdarc, d...@python ___ Python tracker

[issue9726] logging.handlers.RotatingFileHandler: implement "preserve log file name extension" feature

2010-09-01 Thread Vinay Sajip
Vinay Sajip added the comment: Only bug-fixes are supposed to go into 2.7, so reclassifying. -- assignee: -> vinay.sajip nosy: +vinay.sajip versions: +Python 3.2 -Python 2.7 ___ Python tracker

[issue9739] Output of help(...) is wider than 80 characters

2010-09-01 Thread Case Van Horsen
New submission from Case Van Horsen : In several modules, the output of help(some_module) is wider than 80 characters. This results in extra line wrapping and incorrect formatting of the help text. I've attached a single patch (doc_width1.diff) that corrects the issue for math, cmath, tuple,

[issue9633] pdb go stack up/down

2010-09-01 Thread Meador Inge
Meador Inge added the comment: I believe this is slightly tricky because 'bdb.format_stack_entry' makes references to '.f_locals' and 'bdb.format_stack_entry' is invoked in several places in 'pdb'. One option would be to add a extra parameter to 'bdb.format_stack_entry' to accept a dictionar

[issue8743] set() operators don't work with collections.Set instances

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > The operator methods in setobject.c should be liberalized to accept > instances of collections.Set as arguments. Under this plan, set() and collections.Set will still have slightly different behavior. collections.Set will be more liberal and accept any it

[issue7141] 2to3 should add from __future__ import print_statement

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Well, I grant you that it's a bit of scope-creep, and if you want to reject it on those grounds I can't blame you. To me it seems like a relatively small change that would greatly help people like myself who want to update older code so that it will run und

[issue7141] 2to3 should add from __future__ import print_statement

2010-09-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/9/1 Daniel Stutzbach : > > Daniel Stutzbach added the comment: > > Excluding the future fixer would only get me half of the way there.  I would > still need to add "from __future__ import print_statement" to all of my > scripts if I want them to conti

[issue1552880] Unicode Imports

2010-09-01 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: > Yes, but in Python, U+DC80..D+DCFF range is used to store undecodable bytes. > Eg. 'abc\xff'.decode('ascii', 'surrogateescape') gives 'abc\udcff'. That's an inventive way of breaking the unicode standard :) Anyway, why would you worry about that? My

[issue7141] 2to3 should add from __future__ import print_statement

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Excluding the future fixer would only get me half of the way there. I would still need to add "from __future__ import print_statement" to all of my scripts if I want them to continue to work under 2.6. (Well, for me personally, I have already done exactly

[issue7141] 2to3 should add from __future__ import print_statement

2010-09-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think this is very useful. You could just as well exclude the future fixer completely. -- ___ Python tracker ___ ___

[issue9734] ABC issubclass/isinstance leaks in Python 2

2010-09-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: Will be fixed in 2.7.1. -- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed ___ Python tracker ___ ___

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_CONST

2010-09-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: What's the point of '{}'.format() anyway given the format() builtin? -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2010-09-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> terry.reedy priority: normal -> low ___ Python tracker ___ ___ Python-bugs-li

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_CONST

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: This proposal hasn't gotten much love or support and I'm no longer interested in it. Aside from ''.join and '{}'.format, there doesn't seem to be many common cases, so there's no big win here. -- assignee: rhettinger -> resolution: -> later vers

[issue9269] Cannot pickle self-referencing sets

2010-09-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1818] Add named tuple reader to CSV module

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Unassigning, this needs fresh thought and a fresh patch from someone who can devote a little deep thinking on how to solve this problem cleanly. In the meantime, it is no problem to simply cast the CSV tuples into named tuples. -- assignee: rhetti

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Am deferring this to Py3.3. There is a workaround available just using duck-typing and I would like to wait until more more has been done on StructSeq before setting committing to an new namedtuple Abstract Base Class (one released, it would be very hard

[issue9634] Add timeout parameter to Queue.join()

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Kelly, thanks for posting the idea. I'm going to close this one for now but it can be reopened if compelling use cases arise. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue9155] Reserve COMPARE_OP for rich comparisons

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm marking this one as rejected. The timings have shown mixed results (some favorable, some not). In general, there is a bias against expanding the number of opcodes because 1) there aren't that many codes available, 2) it grows the size of the switch-c

[issue8743] set() operators don't work with collections.Set instances

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The operator methods in setobject.c should be liberalized to accept instances of collections.Set as arguments. For speed, they should continue to check PyAnySet_Check(other) first and then if that fails, fall back to testing PyObject_IsInstance(other, col

[issue9425] Rewrite import machinery to work with unicode paths

2010-09-01 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file18671/Py_UNICODE_strcat.patch ___ Python tracker ___ ___ Python-bugs-list

[issue9425] Rewrite import machinery to work with unicode paths

2010-09-01 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file18672/Py_UNICODE_strdup.patch ___ Python tracker ___ ___ Python-bugs-list

[issue9425] Rewrite import machinery to work with unicode paths

2010-09-01 Thread STINNER Victor
STINNER Victor added the comment: r84429 creates Py_UNICODE_strcat() (change with the patch: return the right value). r84430 creates PyUnicode_strdup() (change with the patch: rename the function from Py_UNICODE_strdup() to PyUnicode_strdup() and mangle the function name). -- __

[issue2340] Backport PEP 3132 (extended iterable unpacking)

2010-09-01 Thread Brett Cannon
Brett Cannon added the comment: No, only bugfixes can go into Python 2.7. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9042] Gettext cache and classes

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks fine. -- nosy: +rhettinger resolution: -> accepted ___ Python tracker ___ ___ Py

[issue2340] Backport PEP 3132 (extended iterable unpacking)

2010-09-01 Thread ipatrol
ipatrol added the comment: Can this be added in a minor release? I came across wanting it while parsing some html forms. -- nosy: +ipatrol ___ Python tracker ___ ___

[issue9738] Document the encoding of functions bytes arguments of the C API

2010-09-01 Thread STINNER Victor
New submission from STINNER Victor : Many C functions have bytes argument (char* type) but the encoding is not documented. If would not be a problem if the encoding was always the same, but it is not. Examples: - format of PyUnicode_FromFormat() should be encoded as ISO-8859-1 - filename of P

[issue9042] Gettext cache and classes

2010-09-01 Thread Éric Araujo
Éric Araujo added the comment: Relying on str(cls) breaks if two classes have the same name, but I guess this is not a concern outside of the interactive interpreter. Patch looks good to me. -- stage: -> patch review ___ Python tracker

[issue2690] Precompute range length

2010-09-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5362] Add configure option to disable Py3k warnings

2010-09-01 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> out of date status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue5362] Add configure option to disable Py3k warnings

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Since this issue doesn't apply in Python 3 and (as I understand it) the 2.7 branch is only open to bug fixes, can we close this performance issue? -- nosy: +stutzbach ___ Python tracker

[issue2690] Precompute range length

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue9695] Return from generators in Python 3.2

2010-09-01 Thread Georg Brandl
Georg Brandl added the comment: Uh, if I understand correctly, this is akin to what PEP 380 does with generator returns, just with a different exception. As such, if I'm not mistaken, it is a) a new language feature for after the moratorium and b) needs a competing PEP. -- nosy: +geo

[issue1569291] Speed-up in array_repeat()

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9155] Reserve COMPARE_OP for rich comparisons

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue2459] speedup for / while / if with better bytecode

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-09-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: While refactoring the code for 2.7, I discovered that the description of the heuristic for 2.6 and in the code comments is off by 1. "items that appear more than 1% of the time" should actually be "items whose duplicates (after the first) appear more than 1%

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue8685] set(range(100000)).difference(set()) is slow

2010-09-01 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2010-09-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue9737] Del on memoryview crashes CPython

2010-09-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 ___ Python tracker ___

[issue9737] Del on memoryview crashes CPython

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nice catch, thank you. I've fixed it in r84408 (py3k), r84410 (3.1) and r84411 (2.7). -- nosy: +pitrou ___ Python tracker ___ _

[issue9737] Del on memoryview crashes CPython

2010-09-01 Thread Dino Viehland
New submission from Dino Viehland : x = bytearray(b'abc') y = memoryview(x) del y[0:1] This crashes CPython 3.1.1 and 2.7. -- components: Interpreter Core messages: 115333 nosy: dino.viehland priority: normal severity: normal status: open title: Del on memoryview crashes CPython type: c

[issue9677] "Global Module Index" link dead

2010-09-01 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r84407. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue8990] array constructor and array.fromstring should accept bytearray.

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patches were committed in r84403. Thank you very much! -- resolution: -> fixed stage: unit test needed -> committed/rejected status: open -> closed versions: -Python 3.1 ___ Python tracker

[issue9729] Unconnected SSLSocket.{send, recv} raises TypeError: 'member_descriptor' object is not callable

2010-09-01 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue4111] Add Systemtap/DTrace probes

2010-09-01 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: It is certainly still a problem with 3.x, but I don't find a way to exhibit it here. -- nosy: +pitrou versions: +Python 3.1, Python 3.2 ___ Python tracker

[issue8685] set(range(100000)).difference(set()) is slow

2010-09-01 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue1552880] Unicode Imports

2010-09-01 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1552880] Unicode Imports

2010-09-01 Thread STINNER Victor
STINNER Victor added the comment: > According to the Unicode standard the high and low surrogate halves used > by UTF-16 (...) Yes, but in Python, U+DC80..D+DCFF range is used to store undecodable bytes. Eg. 'abc\xff'.decode('ascii', 'surrogateescape') gives 'abc\udcff'. > Anyway, as you rema

[issue9706] ssl errors checking

2010-09-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Committed r84400 which should fix the first test failure. I'll take a look at the buildbots to see how it goes. As for the second failure I have no idea at the moment. -- ___ Python tracker

[issue4819] Misc/cheatsheet needs updating

2010-09-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: -rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue4819] Misc/cheatsheet needs updating

2010-09-01 Thread Éric Araujo
Éric Araujo added the comment: Merging nosy from duplicate report. -- nosy: +pitrou, rhettinger ___ Python tracker ___ ___ Python-bugs

[issue9735] cheatsheet outdated

2010-09-01 Thread Éric Araujo
Changes by Éric Araujo : -- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Misc/cheatsheet needs updating ___ Python tracker ___

[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-09-01 Thread Éric Araujo
Changes by Éric Araujo : -- keywords: -patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue9733] Can't iterate over multiprocessing.managers.DictProxy

2010-09-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> jnoller nosy: +jnoller stage: -> needs patch type: -> behavior versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker ___

[issue9736] doctest.DocTestSuite doesn't handle test globs correctly

2010-09-01 Thread Jim Fulton
New submission from Jim Fulton : We often run test suites repeatedly using a debug build of python to look for memory leaks. We also got in the bad habit of using a fork of doctest. Recently, we've switched away from our fork and have noticed a problem with the standard doctest's handling of t

[issue9735] cheatsheet outdated

2010-09-01 Thread Antoine Pitrou
New submission from Antoine Pitrou : The Misc/cheatsheet file is totally outdated (the title “Python 2.3 Quick Reference” already gives you a hint). It is also not clear if it is meant for plain text viewing, or should be formatted using an external program... -- assignee: d...@python

[issue9549] Remove sys.setdefaultencoding()

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Done in r84397. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 3.3 ___ Python tracker _

[issue9734] ABC issubclass/isinstance leaks in Python 2

2010-09-01 Thread Jim Fulton
New submission from Jim Fulton : I assume ABCs use some sort of cache for issubclass checks. I also assume the cache doesn't use weakrefs, leading to leaks in classes created on the fly (as is common in tests). The attached script demonstrates the leak. The leak doesn't seem to occur in Pytho

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I will aim to spend some time with this (and the similar Issue #9213) today and/or tomorrow, so that it can be committed in time for 3.2a2. -- resolution: -> accepted stage: unit test needed -> patch review ___ P

[issue9731] Add ABCMeta.has_methods and tests that use it

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for the basic idea. It could use a better name, Sequence.has_methods(range) reads backwards to me. Perhaps something like: Sequence.implemented_by(range) or Sequence.verify_full_api(range) or some such. Also, when the tests get added, they should go

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: It would be nice to get this fixed before the next release. -- ___ Python tracker ___ ___ Python-

[issue9549] Remove sys.setdefaultencoding()

2010-09-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue8685] set(range(100000)).difference(set()) is slow

2010-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please leave this for me. Thank you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9549] Remove sys.setdefaultencoding()

2010-09-01 Thread STINNER Victor
STINNER Victor added the comment: Ok to remove it from Python 3.2. I don't think that it is necessary to update Python 2.7 code/doc. -- ___ Python tracker ___ __

[issue9042] Gettext cache and classes

2010-09-01 Thread v_peter
v_peter added the comment: Any comments on the patch for 3.2? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9731] Add ABCMeta.has_methods and tests that use it

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Re-opening and re-titling the issue to that effect. Proposed syntax and usage: # in Lib/abc.py class ABCMeta(type): # ... def has_methods(cls, subclass): "Returns True iff subclass implements the appropriate methods" # ... Usage wit

[issue8685] set(range(100000)).difference(set()) is slow

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I would consider reviewing and possibly apply this change, but I don't > want to invade anyone's territory. I don't think there would be any invasion. I think the patch is simple enough, and seems to provide a nice benefit. --

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: > Since the addition of __dir__, dir(obj) can return arbitrary values. > Typically (I guess) this will be used to add dynamically created attributes > that this function will fail to find - so it is *more* likely that we will > fail to find something in dir

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r84394 (py3k) and r84396 (3.1). Thank you Stefan! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.7 ___ Python tracker

[issue9731] ABCMeta.register should verify that methods are present

2010-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: > Would it be useful to provide a separate function to perform the check, which > could be used by lint-style tools as well as automated tests? > > It would be great if every call to .register in the standard library had a > corresponding test that verified

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: (Or vice versa - getattr_static may succeed in finding members - like descriptors that raise AttributeError when fetched - when getattr fails.) -- ___ Python tracker __

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: Since the addition of __dir__, dir(obj) can return arbitrary values. Typically (I guess) this will be used to add dynamically created attributes that this function will fail to find - so it is *more* likely that we will fail to find something in dir than the r

[issue9731] ABCMeta.register should verify that methods are present

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Would it be useful to provide a separate function to perform the check, which could be used by lint-style tools as well as automated tests? It would be great if every call to .register in the standard library had a corresponding test that verified that the

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: Just jumping in here with commentary from the side bench... I noticed you say "this does not always return the same results as dir(x)". But since dir(x) exists, perhaps it would make sense to match dir(x) as closely as possible? I.e. if dir(x) doesn't know

[issue9706] ssl errors checking

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some buildbots have started failing exactly after this commit: == ERROR: test_errors (test.test_ssl.BasicSocketTests) -- Trac

[issue9711] ssl.SSLSocket's keyfile argument seems to be ignored if specified without certfile

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, it started failing exactly after r84352 (issue #9706). -- status: open -> closed ___ Python tracker ___ __

[issue9731] ABCMeta.register should verify that methods are present

2010-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: That would be too hard-headed. A complaint I often hear about Interfaces in Java is that classes have a hard time if they choose not to implement a certain method. It also would not be enough -- there are tons of ways you would be able to satisfy such a che

[issue5506] io.BytesIO doesn't support the buffer protocol

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thinking about it, I'm not sure this would be a good idea to do this by default. There is an ambiguity where it's not obvious if the buffer would contain the whole data or only the bytes after the current position. I think perhaps an explicit method (getbuffe

[issue9711] ssl.SSLSocket's keyfile argument seems to be ignored if specified without certfile

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure which commit it is, but test_ssl has started failing on some buildbots: == ERROR: test_errors (test.test_ssl.BasicSocketTests)

[issue9549] Remove sys.setdefaultencoding()

2010-09-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue9733] Can't iterate over multiprocessing.managers.DictProxy

2010-09-01 Thread Juan José Conti
New submission from Juan José Conti : I expected I could iterate over a DictProxy as I do over a regular dict. >>> from multiprocessing import Manager >>> m = Manager() >>> d = m.dict() >>> d >>> for x in d: ... print x ... Traceback (most recent call last): File "", line 1, in File ""

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-09-01 Thread Daniel Urban
Daniel Urban added the comment: Thanks for the corrections. I'm attaching the new patch as issue9212b.diff. I'm using PyAnySet_Check to determine if the other argument is really a set, but I'm not entirely sure, that this is correct. Please let me know if other corrections are needed.

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: (Reposted as text was entirely duplicated - oops.) As discussed on python-dev, a version of getattr that does static lookups - bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial implementation by Nick Coghlan, amended and tests added

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Changes by Michael Foord : -- Removed message: http://bugs.python.org/msg115296 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1 on the principle. This could help things like pydoc, especially on modern Web frameworks which do incredibly ugly things (per-thread global variables, descriptors executing tons of code etc.). -- nosy: +pitrou _

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: Tests require Python 3. Implementation works with Python 2 as well. -- Added file: http://bugs.python.org/file18701/test_static.py ___ Python tracker ___

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Changes by Michael Foord : -- Removed message: http://bugs.python.org/msg115297 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Changes by Michael Foord : Removed file: http://bugs.python.org/file18700/test_static.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: Tests require Python 3. Implementation works with Python 2 as well. -- Added file: http://bugs.python.org/file18700/test_static.py ___ Python tracker ___

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
New submission from Michael Foord : As discussed on python-dev, a version of getattr that does static lookups - bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial implementation by Nick Coghlan, amended and tests added by me. Phillip Eby objects to this code existing

[issue8685] set(range(100000)).difference(set()) is slow

2010-09-01 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > I'll be looking at it shortly. Py3.2 is still aways from release so there is > no hurry. I would consider reviewing and possibly apply this change, but I don't want to invade anyone's territory. -- nosy: +exarkun

[issue3101] global function _add_one_to_index_C

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've added a "_Py" prefix in r84391, and also made the `shape` argument const. If numpy people want this to be an official public API, they'll have to contribute. Thanks. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ve

[issue9731] ABCMeta.register should verify that methods are present

2010-09-01 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : In Issue 9212, I mused: > I sort of wonder if .register() should verify that the concrete class > provides all of the methods of the ABC. Éric Araujo suggested I open that as an issue for consideration. I have found a few bugs in the standard library wh

[issue9729] Unconnected SSLSocket.{send, recv} raises TypeError: 'member_descriptor' object is not callable

2010-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that 3.x will give you the expected error message: >>> s = socket.socket() >>> wrapped = ssl.wrap_socket(s) >>> wrapped.recv(1) Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/__svn__/Lib/ssl.py", line 292, in recv r

[issue8743] set() operators don't work with collections.Set instances

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Raymond, do you agree with Ray's analysis? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7877] Iterators over _winreg EnumKey and EnumValue results

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: As most of the code in this patch was copied from EnumValue and EnumKey, it includes bugs from those functions that have since been fixed. I'm thinking of Issue #2810, although there might have been other changes. Instead of duplicating code, it would be b

[issue9730] base64 docs refers to strings instead of bytes

2010-09-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: The example can be fixed by placing a "b" before the two string literals. However, pretty much the whole document refers to "strings" and should refer to "byte sequences" or the "bytes" type. I thought there were automated tests that exercised the documenta

  1   2   >