[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: > 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. Yes, it's

[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

[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 do

[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 su

[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 the

[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 ___ Pytho

[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 sho

[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 ___ __

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

2014-04-02 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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: no

[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())" -- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file34710/issue21137.diff __

[issue20375] ElementTree: Document handling processing instructions

2014-04-02 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file34709/issue20375.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[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 ___

[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

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2014-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +patch Added file: http://bugs.python.org/file34707/fraction_pow.diff ___ Python tracker ___ _

[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: I would like to have the same for locks: This would be nice in logs and tracebacks for example. -- components: Library (Lib) keywords: easy messages:

[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 ___ ___

[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 than

[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, ha

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2014-04-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, mark.dickinson, rhettinger stage: -> needs patch versions: +Python 3.5 -Python 2.7, Python 3.2 ___ Python tracker ___ _

[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 numerator/d

[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 fill

[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 e

[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

[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 ___ ___

[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: 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. -

[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) parti

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg215397 ___ Python tracker ___ ___ Python-bugs-list mailin

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

2014-04-02 Thread bagrat lazaryan
Changes by bagrat lazaryan : -- versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[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 El

[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

[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?) -- Adde

[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 cas

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

2014-04-02 Thread Sreepriya Chalakkal
Changes by Sreepriya Chalakkal : Added file: http://bugs.python.org/file34704/switch_while_decode2.patch ___ Python tracker ___ ___ Python-bug

[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

[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 s

[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

[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 ___ ___ Py

[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 abou

[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 ___

[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 : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue21027] difflib new cli interface

2014-04-02 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2014-04-02 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[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 ___ _

[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 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

[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 sep

[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 c

[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 : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 ___

[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 ___

[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 seve

[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 secon

[issue21128] testing stdlib and compatibility with pypy

2014-04-02 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 t

[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 _

[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 " 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 discover, impo

[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 compilin

[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 C:\Python34\Lib\site-packages\pywi

[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 -- no

[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 ___

[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 the

[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 --

[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 __

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

2014-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[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

[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 repro

[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

[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 ___

[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? Ca

[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 : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 (clang-50

[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

[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: 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 c

[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 >>> -- co

[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 who

[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 ite

[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