[issue21028] ElementTree objects should support all the same methods as Element objects

2014-04-02 Thread Stefan Behnel
Stefan Behnel added the comment: Add all the element methods to the elementtree object. Ok, but why? An ElementTree object *is not* an Element. It's a representation of a document that *has* a root Element. It makes sense for a document to allow searches over its content, and the ElementTree

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2014-04-02 Thread dellair jie
dellair jie added the comment: Neil, It doesn't look like a duplicate of Issue6672. The one in Issue6672 was for Mingw, all the patches simply added __MINGW32__ to __CYGWIN__ build structure. While my issue is, the build failed with _struct.c on Cygwin. So the module is recognized, just

[issue21028] ElementTree objects should support all the same methods as Element objects

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: ElementTree class currently supports that, using the find*() or iter() methods. That would be great except that ElementTree doesn't actually have an __iter__ method. Ok, but why? The short answer is that every time I conduct Python training, people

[issue21028] ElementTree objects should support all the same methods as Element objects

2014-04-02 Thread Stefan Behnel
Stefan Behnel added the comment: I don't see any benefit from having this code fail: from xml.etree.ElementTree import parse catalog = parse('books.xml') for book in catalog: print book.get('id') Why would you expect it to work? And how? Why would it only iterate

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Jonas Wagner
Jonas Wagner added the comment: Thanks Ned, this is interesting! I don't know about Mac OS, but on Ubuntu, LTO and PGO apparently make Python around 10% faster (see #17781). However, that data point refers to GCC's LTO, not LLVM's. Personally I'm interested in LTO because I want to obtain

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Thomas Heller
New submission from Thomas Heller: I think that 'equivalent' functools.partial objects should compare equal, so the following snippet SHOULD print True: import functools f = lambda x: x a = functools.partial(f, 42) b = functools.partial(f, 42) a == b False -- components: Library

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've used -O4 for extensions in the past (which until recently implied LTO) and that worked fine. I'm pretty sure that I haven't used LTO for python itself, apart from a some tests with an early version llvm-gcc where using LTO for building python used to

[issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel = 3.10

2014-04-02 Thread Bohuslav Slavek Kabrda
New submission from Bohuslav Slavek Kabrda: test_faulthandler.test_register_chain fails on some 64bit architectures (arm8, ppc64) with kernel = 3.10: == FAIL: test_register_chain (__main__.FaultHandlerTests)

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: Have you tried the -export_dynamic option for ld(1): -export_dynamic Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: This works for me (with a separate build directory): CC=clang CXX=clang++ CFLAGS=-g -flto LDFLAGS=-flto -Wl,-export_dynamic ../configure This is on OSX 10.9.2, with Xcode 5.1, and clang --version says: $ clang --version Apple LLVM version 5.1

[issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel = 3.10

2014-04-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21131 ___ ___ Python-bugs-list

[issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel = 3.10

2014-04-02 Thread STINNER Victor
STINNER Victor added the comment: test_faulthandler.test_register_chain fails on some 64bit architectures (arm8, ppc64) with kernel = 3.10 I am a little bit surprised that the bug depends on the kernel version. Does test_register_chain_segfault_reproducer.py also crash with chain=False? Can

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Even equivalent functions don't compare as equal: (lambda x: x*x) == (lambda x: x*x) False -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21130

[issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel = 3.10

2014-04-02 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to list the kernel version (full version including the minor version) on which the test works or crash? You are talking about 3.10 without the minor version. It may be a regression in the kernel. Example of change in Linux kernel 3.10.17:

[issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel = 3.10

2014-04-02 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda added the comment: I'm also surprised that this depends on kernel version, however that's what I found out (and the opensuse guys seem to only have reproduced this on kernel = 3.10, too). - Full kernel version (uname -r output): 3.13.0-0.rc7.28.sa2.aarch64 - The

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

2014-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3e2354dde892 by Raymond Hettinger in branch '3.4': Issue #18652: Add an itertools recipe for first_true() http://hg.python.org/cpython/rev/3e2354dde892 -- nosy: +python-dev ___ Python tracker

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

2014-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___

[issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel = 3.10

2014-04-02 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda added the comment: Ok, so with #undef HAVE_SIGACTION both the reproducer and the original test (as well as all tests in test_faulthandler) pass fine. -- ___ Python tracker rep...@bugs.python.org

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Thomas Heller
Thomas Heller added the comment: Sure. I'm not sure 'equivalent' is the word I should have used. I suggest (and I would have expected) that partial instances (a, b) should compare equal when a.func == b.func \ and a.args == b.args \ and a.keywords == b.keywords --

[issue19662] smtpd.py should not decode utf-8

2014-04-02 Thread Sreepriya Chalakkal
Sreepriya Chalakkal added the comment: Hi David, The variable decode_data is included to control decoding. But I am not sure what needs to be done while calling the process_message inside found_terminator when it is binary data. How to work around with binary data? Can you tell me what are

[issue17846] Building Python on Windows - Supplementary info

2014-04-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: The limitation of build.bat (as you also reported) is that it builds a debug build. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17846 ___

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread eryksun
eryksun added the comment: Function equality is based on identity, as inherited from object. But there's a precedent for this idea in method_richcompare, which compares the method's __func__ and __self__: http://hg.python.org/cpython/file/04f714765c13/Objects/classobject.c#l208 --

[issue21132] Failure to import win32api

2014-04-02 Thread David Woakes
New submission from David Woakes: I've seen issue 21050 and tried a complete uninstall, delete c:\python34 and install of python 3.4. I can't get win32api to load unless I copy pythoncom34.dll and psywintypes34.dll to C:\Python34\Lib\site-packages\win32 from

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2014-04-02 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I wrote a patch file. In other extention module source codes, global variable PyTypeObject has initialized to using PyVarObject_HEAD_INIT(NULL, 0). And so, as with other modules, I tried to edit and compiling _struct.c in Cygwin 1.7.28. The module compiling

[issue21133] unittest discover should allow option to run each package separately

2014-04-02 Thread the mulhern
New submission from the mulhern: You can run python -m unittest discover some args and the unittests discovered by discover will be run. This is nice. However, it is actually desirable to run each unittest package individually, rather than in the same interpreter instance. When run via

[issue20375] ElementTree: Document handling processing instructions

2014-04-02 Thread Eli Bendersky
Eli Bendersky added the comment: I left some comments in Rietveld. There shouldn't be a problem getting these into 3.4 too - doc changes are usually excempt from most restrictions. -- ___ Python tracker rep...@bugs.python.org

[issue21028] ElementTree objects should support all the same methods as Element objects

2014-04-02 Thread Eli Bendersky
Eli Bendersky added the comment: Do you have concrete suggestions? Make the tree iterable? Add all element methods to the tree, implicitly forwarding to the root? Yes, that is the feature request. Add all the element methods to the elementtree object. Implicitly forwarding to the root

[issue21128] testing stdlib and compatibility with pypy

2014-04-02 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21128 ___ ___ Python-bugs-list

[issue21028] ElementTree objects should support all the same methods as Element objects

2014-04-02 Thread Stefan Behnel
Stefan Behnel added the comment: How about just making a sensibly-behaving __iter__ for ElementTree? Well, the problem is to determine what sensibly-behaving is. I can see three options. 1) tree.iter() == tree.getroot().iter() 2) iter(tree.getroot()) 3) iter([tree.getroot()]) The second

[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2014-04-02 Thread Marek Kowalski
New submission from Marek Kowalski: I'm attaching a minimal script to reproduce. I tested only with 3.2 and 2.7 versions. Its possible that it has been fixed since 3.2. -- components: Unicode files: segv.py messages: 215384 nosy: Marek.Kowalski, ezio.melotti, haypo priority: normal

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2014-04-02 Thread dellair jie
dellair jie added the comment: Yamamoto, Thanks, the patch you offered did make the _struct error disappeared. I will do a bit more testing. Dellair -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21124

[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2014-04-02 Thread STINNER Victor
STINNER Victor added the comment: Python 3.2 is not getting bugfixes anymore, only 3.4 and 3.5 (and 2.7). -- versions: +Python 3.4, Python 3.5 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21134

[issue21120] PyArena type is used in headers from the limited API

2014-04-02 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21120 ___ ___ Python-bugs-list mailing list

[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)

2014-04-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: bytes.translate() is much faster because it builds a C array of 256 items to fast table lookup, whereas str.translate() requires a Python dict lookup for each character, which is much slower. It should be easy to devise a simple hash table for the common

[issue17390] display python version on idle title bar

2014-04-02 Thread bagrat lazaryan
bagrat lazaryan added the comment: guys, the filename should be the first thing on the titlebar of idle editor window. that way, on taskbar, one can see the file that's open in editor. i suggest the format of editor's title be changed to: xxx.py - python x.y.z - path or whatever you will as

[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2014-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 140c5da3dc82 by Benjamin Peterson in branch '3.4': bail in unicode error's __str__ methods if the objects are not properly initialized (closes #21134) http://hg.python.org/cpython/rev/140c5da3dc82 New changeset afa7fb2cbe3b by Benjamin Peterson in

[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2014-04-02 Thread STINNER Victor
STINNER Victor added the comment: Benjamin: I don't like your change. You silently ignore the error. I would prefer to raise an exception on str(exc) if the Unicode exception object was not properly initialized. -- resolution: fixed - status: closed - open

[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2014-04-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't care as long as it doesn't segfault. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21134 ___

[issue21019] PyMethodDef ml_name is char* instead of const char*

2014-04-02 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21019 ___ ___

[issue21027] difflib new cli interface

2014-04-02 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___

[issue21034] Python docs reference the Distribute package which has been deprecated in favor of Setuptools

2014-04-02 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21034 ___ ___

[issue17846] Building Python on Windows - Supplementary info

2014-04-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since a debug build (F7 in VS) is the only thing I have ever built, or that a developer like me needs to build, that is not a limitation. -- ___ Python tracker rep...@bugs.python.org

[issue17390] display python version on idle title bar

2014-04-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Bagrat, are you on XP by any chance? In Win7, all windows for a program are attached to one program icon on the taskbar, which has the program name. When I hover over the program icon, mini views of each window are displayed, with each window view showing

[issue20942] _frozen_importlib should not have a __file__ attribute

2014-04-02 Thread Boštjan Mejak
Boštjan Mejak added the comment: No one interested in fixing this anymore, despite the patch and all? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20942 ___

[issue20942] _frozen_importlib should not have a __file__ attribute

2014-04-02 Thread Brett Cannon
Brett Cannon added the comment: My Python free time is on Fridays, which is when I plan to make a final call and either apply to Python 3.4 and 3.5 or just Python 3.5. -- assignee: - brett.cannon ___ Python tracker rep...@bugs.python.org

[issue21135] Remove useless _vb_pattern parameter in cgi.valid_boundary

2014-04-02 Thread Eijebong
New submission from Eijebong: The parameter _vb_pattern parameter in cgi.valid_boundary has no reason to exist since it's forced to a value later. -- components: Library (Lib) files: valid_boundary.patch keywords: patch messages: 215396 nosy: Eijebong priority: normal severity: normal

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: What is the use case? What would be the criteria for comparing functions? Would the func_name have to match? Would the func_defaults have to match? Would the f.__code__.co_names have to match (the internal variable names? Do the function attributes in

[issue19662] smtpd.py should not decode utf-8

2014-04-02 Thread Sreepriya Chalakkal
Changes by Sreepriya Chalakkal sreepriya1...@gmail.com: Added file: http://bugs.python.org/file34704/switch_while_decode2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19662 ___

[issue19640] Dynamically generate the _source attribute of namedtuple to save memory)

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Victor, I don't think the added complexity is worth 2k per named tuple class. Every time I've gone down the path of lazy evaluation, I've paid an unexpected price for it down the road. If the savings were huge, it might be worth it, but that isn't the

[issue17390] display python version on idle title bar

2014-04-02 Thread bagrat lazaryan
bagrat lazaryan added the comment: terry, i'm on 7 but i have my taskbar configured not to combine buttons. see the screenshot attached. (does anyone know why on earth i am not receiving email notifications when someone posts to an issue i have started or i have commented to?) --

[issue17862] itertools.chunks(iterable, size, fill=None)

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nothing new is happening in this thread, so I'm closing it for the reasons listed in the other posts. The main issue is that the generic concept of break data into chunks tends to occur is situations where the iterator protocol would be at odds with a

[issue20198] xml.etree.ElementTree.ElementTree.write attribute sorting

2014-04-02 Thread bagrat lazaryan
bagrat lazaryan added the comment: well... ElementTree.py imports some c accelerators as can be seen at the end of the file. i have no idea how to get to those accelerators, and even if i had, i don't think i would make anything of them. as far as the pure python code concerns in the rest of

[issue20198] xml.etree.ElementTree.ElementTree.write attribute sorting

2014-04-02 Thread bagrat lazaryan
Changes by bagrat lazaryan bagra...@live.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20198 ___ ___

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- Removed message: http://bugs.python.org/msg215397 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21130 ___

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-02 Thread Yury Selivanov
Yury Selivanov added the comment: Please review the attached patch. Here's the new partial signature semantics: foo(a, b, /, c, d, *args, e) partial(foo, 10) - (b, /, c, d, *args, e) partial(foo, 10, c=11) - (b, /, *, c=11, d, e) partial(foo, 10, 20, 30) - (d, *args, e)

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread R. David Murray
R. David Murray added the comment: But since the two partial instances are (conceptually, I don't care how they are implemented) two separate functions, then reasoning by analogy from two identical functions not comparing equal, I would expect two partial instances to not compare equal.

[issue21116] Failure to create multiprocessing shared arrays larger than 50% of memory size under linux

2014-04-02 Thread Charles-François Natali
Charles-François Natali added the comment: Zero-filling mmap's backing file isn't really optimal: why not use truncate() instead? This way, it'll avoid completely I/O on filesystems that support sparse files, and should still work on FS that don't. -- nosy: +neologix

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread R. David Murray
R. David Murray added the comment: Of course, as soon as I hit send, I had second thoughts :). I guess a partial is a binding, not a function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21130

[issue17390] display python version on idle title bar

2014-04-02 Thread Ezio Melotti
Ezio Melotti added the comment: Other editors (e.g. Kate) use the format filename - editor name. This is common for other applications as well (e.g. Firefox uses page title - Mozilla Firefox), so the request seems reasonable to me. If you want to go the extra mile you could have an option to

[issue21116] Failure to create multiprocessing shared arrays larger than 50% of memory size under linux

2014-04-02 Thread Médéric Boquien
Médéric Boquien added the comment: If I remember correctly the problem is that some OS like linux (and probably others) do not really allocate space until something is written. If that's the case then the process may get killed later on when it writes something in the array. Here is a quick

[issue21116] Failure to create multiprocessing shared arrays larger than 50% of memory size under linux

2014-04-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: Using truncate() to zero extend is not really portable: it is only guaranteed on XSI-compliant POSIX systems. Also, the FreeBSD man page for mmap() has the following warning: WARNING! Extending a file with ftruncate(2), thus creating a big hole, and then

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2014-04-02 Thread William Ehlhardt
New submission from William Ehlhardt: The following Python runs unnecessarily slowly: import fractions fractions.Fraction(6249919, 625) ** 89993 The problem here is that Fraction.__pow__ constructs a new Fraction() to return, and Fraction.__new__ tries to gcd to normalize the

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2014-04-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, mark.dickinson, rhettinger stage: - needs patch versions: +Python 3.5 -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21136

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2014-04-02 Thread paul j3
paul j3 added the comment: There are a couple of complications to using 'fileno'. We probably don't want to close 'sys.stdin' or 'sys.stdout' (not even if they are redirected to other files?). That means using: open(sys.stdin.fileno(), ..., closefd=False) 'closefd', on the other hand,

[issue1191964] asynchronous Subprocess

2014-04-02 Thread Josiah Carlson
Josiah Carlson added the comment: Had some time to work on this today. I was missing something in my earlier versions of the code, and have managed to get overlapped IOs to work, so at least I'm not quite so far behind the dozen or so core developers who know more about the Windows pieces

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks easily doable. -- assignee: - rhettinger keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21136 ___

[issue21137] Better repr for threading.Lock()

2014-04-02 Thread Raymond Hettinger
New submission from Raymond Hettinger: It is really nice to have the open/closed status in the __repr__ of file objects: open file 'data.txt', mode 'r' at 0x102c8ec90 closed file 'data.txt', mode 'r' at 0x102c8ec90 I would like to have the same for locks: unlocked thread.lock object

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2014-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file34707/fraction_pow.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21136

[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-02 Thread tanbro
New submission from tanbro: when new a mimetypes.MimeType instance in a my Windows, whose default coding is mbcs, UnicdeDecodeError occurred. Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more information. from

[issue20375] ElementTree: Document handling processing instructions

2014-04-02 Thread Nikolaus Rath
Nikolaus Rath added the comment: Thanks for your feedback! I've attached an updated patch. -- Added file: http://bugs.python.org/file34708/issue20375.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20375

[issue20375] ElementTree: Document handling processing instructions

2014-04-02 Thread Nikolaus Rath
Changes by Nikolaus Rath nikol...@rath.org: Added file: http://bugs.python.org/file34709/issue20375.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20375 ___

[issue21137] Better repr for threading.Lock()

2014-04-02 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch with a test. Example repr of threading.Lock(): $ ./python -c import threading; print(threading.Lock()) unlocked _thread.lock object -- keywords: +patch nosy: +berker.peksag Added file:

[issue21139] Idle: change default reformat width from 70 to 72

2014-04-02 Thread Terry J. Reedy
New submission from Terry J. Reedy: PEP 8 specifies a limit of 72 chars for flowing text (comments, multiline strings). The current default limit for Idle's Format / Reformat Paragraph is 70. Increase it to PEP 8's 72. -- messages: 215417 nosy: terry.reedy priority: normal severity:

[issue21139] Idle: change default reformat width from 70 to 72

2014-04-02 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- components: +IDLE ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21139 ___ ___ Python-bugs-list

[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-02 Thread tanbro
tanbro added the comment: and in line 249, changes: if isinstance(ctype, unicode): ctype = ctype.encode(default_encoding) # omit in 3.x! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21138

[issue21140] Idle: saving an OutputWindow should default to .txt

2014-04-02 Thread Terry J. Reedy
New submission from Terry J. Reedy: If possible, when saving an instance of an OutputWindow, the file type should default to .txt (or possibly even nothing) instead of .py. At present, OutputWindows are only used for Find in Files (grep) output, which is very much not Python code. The same

[issue1191964] asynchronous Subprocess

2014-04-02 Thread eryksun
eryksun added the comment: multiprocessing.connection uses the _winapi module for overlapped I/O and named pipes in case you're looking for examples: http://hg.python.org/cpython/file/3.4/Lib/multiprocessing/connection.py -- nosy: +eryksun ___

[issue21141] Don't mention Perl in Windows build output

2014-04-02 Thread Zachary Ware
New submission from Zachary Ware: Attached is a patch that prevents mentioning Perl in the Windows build output, thereby avoiding giving the indication that Perl is necessary to build Python. To make this work, the patch converts PCbuild/build_ssl.py into PCbuild/prepare_ssl.py and removes

[issue17390] display python version on idle title bar

2014-04-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The general issue of Idle title bars is definitely not finished, though I may close this issue and open others. 1. 'Python' versus Idle' versus neither in titles (assuming not both). 1a. Shell: Since the link in msg183874 is dead, I don't know what Bagrat

[issue20550] Use specific asserts in collections tests

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I don't think this makes the tests any better as all. It is code churn for no benefit. In our own code, the more specific tests risk hiding important details behind the abstraction (losing knowledge of what is actually tested). For example, I

[issue19505] OrderedDict views don't implement __reversed__

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is approved. Go ahead and apply the patch. One minor nit, please position the three new views classes before the _Link class rather than after. -- assignee: rhettinger - serhiy.storchaka versions: +Python 3.5 -Python 3.4