Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Gregory Ewing
Steven D'Aprano wrote: If it were a class method, you would call it by MyBaseClass.__new__() rather than explicitly providing the cls argument. But that wouldn't be any good, because the base __new__ needs to receive the actual class being instantiated, not the class that the __new__ method

Re: Bug in Decimal??

2014-05-04 Thread Mark Dickinson
On Tue, 29 Apr 2014 19:37:17 -0700, pleasedontspam wrote: Hello, I believe I found a bug in the Decimal library. The natural logarithm results seem to be off in a certain range, as compared with Wolfram Alpha. I had a quick look: this isn't a bug - it's just the result of propagation of the

Re: tkinter: invisible PanedWindow sashes on OS X

2014-05-04 Thread draganov93
Hi to all, I have a similar problem. I have a PanedWindow with a lot of checkboxes in it and i want to make the checkboxes non-resizable.How can i achieve this? -- https://mail.python.org/mailman/listinfo/python-list

Re:Python Image Registration and Cropping?

2014-05-04 Thread Dave Angel
mikejohnrya...@gmail.com Wrote in message: Hello, Is there a Python tool or function that can register two images together (line them up visually), and then crop them to the common overlap area? I'm assuming this can probably be done with Python Imaging Library but I'm not very familiar

Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Steven D'Aprano
On Sun, 04 May 2014 20:03:35 +1200, Gregory Ewing wrote: Steven D'Aprano wrote: If it were a class method, you would call it by MyBaseClass.__new__() rather than explicitly providing the cls argument. But that wouldn't be any good, because the base __new__ needs to receive the actual class

Re: Python Image Registration and Cropping?

2014-05-04 Thread Ian Kelly
On Sun, May 4, 2014 at 7:24 AM, Dave Angel da...@davea.name wrote: mikejohnrya...@gmail.com Wrote in message: Hello, Is there a Python tool or function that can register two images together (line them up visually), and then crop them to the common overlap area? I'm assuming this can

Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Rotwang
On 04/05/2014 15:16, Steven D'Aprano wrote: On Sun, 04 May 2014 20:03:35 +1200, Gregory Ewing wrote: Steven D'Aprano wrote: If it were a class method, you would call it by MyBaseClass.__new__() rather than explicitly providing the cls argument. But that wouldn't be any good, because the

Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Ian Kelly
On Sun, May 4, 2014 at 8:16 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 04 May 2014 20:03:35 +1200, Gregory Ewing wrote: Steven D'Aprano wrote: If it were a class method, you would call it by MyBaseClass.__new__() rather than explicitly providing the cls argument.

Re: Glade on Windows using Python

2014-05-04 Thread mbg1708
On Tuesday, April 22, 2014 7:08:29 PM UTC-4, mbg...@planetmail.com wrote: Using Windows 8.1 Update. I've loaded ActiveState python (version 2.7) --- installed OK. I don't need Glade, but I do want to use some Glade XML and run the python application. To run a Glade application this

Re: Glade on Windows using Python

2014-05-04 Thread Michael Torrie
On 05/04/2014 01:51 PM, mbg1...@planetmail.com wrote: So...it turns out that Glade support for Python 2.7 is pretty difficult. I ended up rewriting the whole thing using Tkinter and ttk.Treeview. It would have been good to reuse the Glade XML...less code, better looking, etc. etc. Both Gtk2

Re: Python Image Registration and Cropping?

2014-05-04 Thread mikejohnryan08
On Sunday, May 4, 2014 11:51:00 AM UTC-4, Ian wrote: On Sun, May 4, 2014 at 7:24 AM, Dave Angel da...@davea.name wrote: mikejohnrya...@gmail.com Wrote in message: Hello, Is there a Python tool or function that can register two images together (line them up visually), and then

[issue19576] Non-Python created threads documentation doesn't mention PyEval_InitThreads()

2014-05-04 Thread Jiong Du
Jiong Du added the comment: this patch made a new issue20891 -- nosy: +lolynx ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19576 ___ ___

[issue21425] Python 3 pipe handling breaks python mode in emacs on Windows

2014-05-04 Thread Márton Marczell
New submission from Márton Marczell: When I run a Python 3.3.4 prompt inside Emacs 24.3 on Windows 7, correct commands are evaluated immediately, but incorrect ones are delayed (I have to press Enter one more time), as seen below: 1 1 nonsense Traceback (most recent

[issue21422] int 0: return the number unmodified

2014-05-04 Thread Mark Dickinson
Mark Dickinson added the comment: Can you sow the overhead of the branch in a microbenchmark? Conversely, can you show a case where this optimisation provides a benefit in real code? We should be looking for a reason *to* apply the patch, not a reason *not* to apply the patch. --

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-04 Thread Mark Dickinson
Mark Dickinson added the comment: Victor, can you demonstrate any cases of real code where this optimization makes a significant difference? There are many, many tiny optimisations we *could* be making in Objects/longobject.c; each of those potential optimisations adds to the cost of

[issue21405] Allow using symbols from Unicode block Superscripts and Subscripts in identifiers

2014-05-04 Thread Roman Inflianskas
Roman Inflianskas added the comment: See later discussion there: https://mail.python.org/pipermail/python-ideas/2014-May/027767.html Because of https://mail.python.org/pipermail/python-ideas/2014-May/027789.html I'm closing this issue. -- resolution: - rejected status: open - closed

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Stefan Krah
Stefan Krah added the comment: If you guys want this in 3.4.1, please get it checked in in the next, oh, eight hours. I can't commit today. Perhaps one of you wants to take over (I think we all agree that the third patch is the best). -- ___

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-05-04 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor rep...@bugs.python.org wrote: My final commit includes an addition to What's New in Python 3.5 doc, including a notice in the porting section. It is not enough? I'm not sure: The usual case with ABI changes is that extensions may segfault if they

[issue21088] curses addch() argument position reverses in Python3.4.0

2014-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f26430b03fd by Larry Hastings in branch '3.4': Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0. http://hg.python.org/cpython/rev/4f26430b03fd -- nosy: +python-dev ___ Python tracker

[issue21088] curses addch() argument position reverses in Python3.4.0

2014-05-04 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- assignee: - larry resolution: - fixed stage: needs patch - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21088 ___

[issue21088] curses addch() argument position reverses in Python3.4.0

2014-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3aa5fae8c313 by Larry Hastings in branch 'default': Issue #21088: Merge from 3.4. http://hg.python.org/cpython/rev/3aa5fae8c313 -- ___ Python tracker rep...@bugs.python.org

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Larry Hastings
Larry Hastings added the comment: Sorry, I should have said 3.4.1rc1. You can still get it in for 3.4.1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21121 ___

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is the same issue as Issue18211. As that issue doesn't have a patch and this one does, I'm closing Issue18211 as a duplicate. -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org

[issue18211] -Werror=statement-after-declaration problem

2014-05-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: Closing this one because Issue21121 contains a usable patch. -- resolution: - duplicate superseder: - -Werror=declaration-after-statement is added even for extension modules through setup.py ___ Python tracker

[issue18211] -Werror=statement-after-declaration problem

2014-05-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: Sigh. Actually closing doesn't work due to the dependency :-( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18211 ___

[issue21426] Invisible characters in email related souce files.

2014-05-04 Thread Milan Oberkirch
New submission from Milan Oberkirch: I found non-printable characters in the source files of the email package. Vim rendered it as '^L', pasting it on the linux console has the same effect as CTRL+L. In most places it was combined with regular newlines, sometimes as a replacement, sometimes

[issue21426] Invisible characters in email related souce files.

2014-05-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: They are page markers to assist in file nagivation. https://www.gnu.org/software/emacs/manual/html_node/emacs/Pages.html -- nosy: +benjamin.peterson resolution: - wont fix status: open - closed ___ Python

[issue2159] dbmmodule inquiry function is performance prohibitive

2014-05-04 Thread Eric Olson
Eric Olson added the comment: Hi, Thanks for finding those issues. I attached a new patch. a) Good find, I added the free() for gdbm. ndbm doesn't need free(). b) Added the error check. I don't know if a test can be made for this. If there was a common way to patch C libraries in CPython,

[issue21427] installer not working

2014-05-04 Thread Uwe
New submission from Uwe: Installer fails to install 3.4 on win7 32 bit Error: cannot register 64 bit component {BE22BD81-ECE5-45BD-83B8-84BA45846A2D} on 32 bit system. KeyPath: C:\Windows\py.exe -- messages: 217878 nosy: ellipso priority: normal severity: normal status: open title:

[issue21428] Python suddenly cares about EOLs formats on windows

2014-05-04 Thread Chappuis
New submission from Chappuis: When trying to execute the Software build program waf (http://ftp.waf.io/pub/release/waf-1.7.16) with the command python waf-1.7.16 --version, this unzip a folder in the current directory while reporting the version of the program on the standard input. Waf is

[issue21429] Input.output error with multiprocessing

2014-05-04 Thread Mikaela Suomalainen
New submission from Mikaela Suomalainen: I encountered this error with Limnoria and I was told to report it here. ``` ERROR 2014-05-04T18:04:04 supybot Uncaught exception in ['title']. Traceback (most recent call last): File

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Éric Araujo
Éric Araujo added the comment: I can commit the patch but won’t be able to check the buildbots for the next twelve hours. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21121 ___

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Ned Deily
Ned Deily added the comment: There's no immediate rush now. It's too late for 3.4.1rc1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21121 ___

[issue18211] -Werror=statement-after-declaration problem

2014-05-04 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- dependencies: -CPython setup.py problems stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18211

[issue18255] CPython setup.py problems

2014-05-04 Thread Éric Araujo
Éric Araujo added the comment: Note that the distutils feature freeze has been lifted, so in 3.5 sysconfig could be reused by distutils.sysconfig, but the existing functionality (different API + ability to override with env vars) must be preserved. -- nosy: +eric.araujo

[issue21430] Document ssl.pending()

2014-05-04 Thread Bas Wijnen
New submission from Bas Wijnen: In order to use ssl sockets asynchronously, it is important to use the pending() method, otherwise the internal buffer will be ignored, and select may block for new data while it's already waiting. See bug #16976 and

[issue7850] platform.system() should be macosx instead of Darwin on OSX

2014-05-04 Thread Christian Clauss
Christian Clauss added the comment: assert sys.platform == platform.system().lower() Should that always be True? It is on Mac OS X but... On iOS (Pythonista): sys.platform == 'unknown' platform.system() == 'Darwin' https://docs.python.org/2/library/sys.html#sys.platform should be updated to

[issue21422] int 0: return the number unmodified

2014-05-04 Thread STINNER Victor
STINNER Victor added the comment: The reason to apply the patch is to reduce the memory footprint. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21422 ___

[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Ned Deily
New submission from Ned Deily: Something went wrong with the update of pydoc_data topics for 3.4.1rc1. As can be seen in http://hg.python.org/releasing/3.4.1/rev/c67a19e11a71, the values for the topics dict should be strings but were updated as bytes. This causes pydoc topics searches to

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Stefan Krah
Stefan Krah added the comment: One more question: I think it's nicer to add CFLAGS_NODIST to 'renamed_variables' in Lib/sysconfig.py:265: renamed_variables = ('CFLAGS', 'CFLAGS_NODIST', 'LDFLAGS', 'CPPFLAGS') That way it's possible to look up CFLAGS_NODIST directly. For consistency, we

[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Larry Hastings
Larry Hastings added the comment: 3.4.1rc1 is the first release I've cut where the makefile didn't auto-download Sphinx. And then the makefile used python and sphinx-build straight off the path, rather than finding the local ones. To generate pydoc-topics, I had to do the following: %

[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Ned Deily
Ned Deily added the comment: From a first quick look, it appears that the problem occurs when using a Python 3 version of sphinx-build. With Python 2, the topics appear to be generated correctly. -- ___ Python tracker rep...@bugs.python.org

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-05-04 Thread Ned Deily
Ned Deily added the comment: Is there any reason to expose CFLAGS_NODIST externally? It seems to me that it is only needed in the top-level setup.py for building standard library extension modules. Let's not add yet another configuration variable to the already confusing array we present to

[issue21429] Input.output error with multiprocessing

2014-05-04 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21429 ___ ___ Python-bugs-list mailing list

[issue21427] installer not working

2014-05-04 Thread Ned Deily
Ned Deily added the comment: Did you try using the 32-bit (x86) installer from https://www.python.org/downloads/release/python-340/ ? Unfortunately, I believe the default download button currently only downloads the 64-bit version. -- nosy: +ned.deily

[issue21430] Document ssl.pending()

2014-05-04 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21430 ___ ___ Python-bugs-list mailing list

[issue21430] Document ssl.pending()

2014-05-04 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21430 ___ ___ Python-bugs-list mailing

[issue21421] ABCs for MappingViews should declare __slots__ so subclasses aren't forced to have __dict__/__weakref__

2014-05-04 Thread Josh Rosenberg
Josh Rosenberg added the comment: Cool. Thanks for the feedback. I split it into two patches for a reason; I wasn't wedded to the simplification. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21421

[issue21427] installer not working

2014-05-04 Thread Uwe
Uwe added the comment: Of course, only official sources the file is named python-3.4.0.msi and 23,924KB the name is similar to that of earlier versions which worked fine So I am not sure, whether it is 32 or 64bit maybe it would be a good idea to use two different names such as x86 and x64?

[issue21430] Document ssl.pending()

2014-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: pending() shouldn't be necessary for this. See https://docs.python.org/dev/library/ssl.html#notes-on-non-blocking-sockets Generally, when using non-blocking sockets, you first try to read (or write) and then catch any exceptions that might be raised if the

[issue21428] Python suddenly cares about EOLs formats on windows

2014-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21428 ___ ___ Python-bugs-list

[issue21422] int 0: return the number unmodified

2014-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reduce the memory footprint in which actual workload? This looks rather gratuitous to me. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21422

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Mark, there doesn't seem to be a strong point in favour of this optimization. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21420 ___

[issue21424] Simplify and speed-up heaqp.nlargest()

2014-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21424 ___ ___ Python-bugs-list

[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Ned Deily
Ned Deily added the comment: The problem is in PydocTopicsBuilder in Doc/tools/sphinxext/pyspecific.py. It needs to be smarter so that ideally it should continue to work with any Python = 2.5 and independent of the Python being built. -- assignee: larry - georg.brandl nosy:

[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21418 ___ ___ Python-bugs-list

[issue21431] 3.4.1rc1 test_pydoc fails: pydoc_data.topics.topics values are type bytes not str

2014-05-04 Thread Larry Hastings
Larry Hastings added the comment: Well, surely working with the current python is sufficient? I'd be happy if it was only guaranteed to run with the python tree it's a part of. -- ___ Python tracker rep...@bugs.python.org

[issue21427] installer not working

2014-05-04 Thread Ned Deily
Ned Deily added the comment: There are two different names: the 64-bit installer is python-3.4.0.amd64.msi. But I see now that the error refers to py.exe, which I believe is the Python launcher. I've nosyed the Windows experts. -- nosy: +tim.golden, zach.ware

[issue9850] obsolete macpath module dangerously broken and should be removed

2014-05-04 Thread Ned Deily
Ned Deily added the comment: The patch appears fine but it really doesn't have anything to do with the gist of this issue. The problem remains that much of macpath is fundamentally broken. In the intervening years since the issue was opened, I contend that any need for OS 9 style paths (aka

[issue21427] installer not working

2014-05-04 Thread eryksun
eryksun added the comment: This is the first time I've used msilib, but it does appear that the component is marked as 64-bit: import msilib msidbComponentAttributes64bit = 256 sql = (SELECT ComponentId,Attributes FROM Component ...WHERE Component='launcher')

[issue21432] samba.git from git://git.samba.org/samba.git samba.netcmd.main not found

2014-05-04 Thread Joshua Knights
New submission from Joshua Knights: This is a Python Path Issue: /root/samba-master/bin/samba-tool domain join AAF.ECPI DC -Uadministrator --realm=AAF.ECPI I get the following Error: Traceback (most recent call last): File /root/samba-master/bin/samba-tool, line 33, in module from

[issue14019] Unify tests for str.format and string.Formatter

2014-05-04 Thread Nick Coghlan
Nick Coghlan added the comment: Note that this issue wasn't about the formatter module - it relates to the str.format() method and the string.Formatter *class*. The formatter module is completely unrelated. -- ___ Python tracker

[issue21432] samba.git from git://git.samba.org/samba.git samba.netcmd.main not found

2014-05-04 Thread Joshua Knights
Joshua Knights added the comment: Correction, this Might be a python path issue and I am not sure what version of python the samba.git is using. -- versions: -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21432

[issue21433] False = True produces segfault

2014-05-04 Thread Samuel Ainsworth
New submission from Samuel Ainsworth: Running this: False = True Segmentation fault: 11 gives me this: Process: Python [17911] Path: /Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.3.1

[issue21433] False = True produces segfault

2014-05-04 Thread Samuel Ainsworth
Changes by Samuel Ainsworth samuel_ainswo...@brown.edu: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21433 ___ ___

[issue21433] False = True produces segfault

2014-05-04 Thread Ned Deily
Ned Deily added the comment: See Issue18458. Update to the latest Python 3.3.5 or 3.4.x. -- nosy: +ned.deily resolution: - duplicate stage: - resolved status: open - closed superseder: - interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit