Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
Ned Batchelder n...@nedbatchelder.com: Why is variable sacrosanct and can only be used to describe C semantics, but we're OK reusing class, int, and function? The Python language specification calls them variables; the terminology discussion should end there. The complaint against variables

Re: xmlrpc: problems with socket handling, close, shutdown of server, TIME_WAIT, ...

2014-05-07 Thread dieter
thomas.lehmann.priv...@googlemail.com writes: ... taking the xml-rpc derived from standard example is working - basically - but with following scenario I do not understand the problem. Maybe you can help: - one Unittest that does create the xmlrpc server in a thread in setUp and

Re: Problems with ZODB, I can not persist and object accessed from 2 threads

2014-05-07 Thread dieter
Dennis Lee Bieber wlfr...@ix.netcom.com writes: On Tue, 06 May 2014 13:03:08 +0200, dieter die...@handshake.de declaimed the following: The database (we have called it db) is global to all threads. Each thread must open (and maybe close) its own connection to the global database. You must

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Antoon Pardon
On 05-05-14 21:51, Grant Edwards wrote: I'm working on a Python app that receives an e-mail message via SMTP, does some trivial processing on it, and forwards it to another SMTP server. I'd like to do the polite thing and add a Received: header, but I can't figure out how to get Python's

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Emre Hasegeli
Antoon Pardon antoon.par...@rece.vub.ac.be: I'm working on a Python app that receives an e-mail message via SMTP, does some trivial processing on it, and forwards it to another SMTP server. I'd like to do the polite thing and add a Received: header, but I can't figure out how to get

Re: The “does Python have variables?” debate

2014-05-07 Thread Mark Lawrence
On 07/05/2014 07:18, Marko Rauhamaa wrote: Ned Batchelder n...@nedbatchelder.com: Why is variable sacrosanct and can only be used to describe C semantics, but we're OK reusing class, int, and function? The Python language specification calls them variables; the terminology discussion should

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Antoon Pardon
On 07-05-14 10:11, Emre Hasegeli wrote: Antoon Pardon antoon.par...@rece.vub.ac.be mailto:antoon.par...@rece.vub.ac.be: I'm working on a Python app that receives an e-mail message via SMTP, does some trivial processing on it, and forwards it to another SMTP server.

data: protocol

2014-05-07 Thread Robin Becker
I have an outstanding request for ReportLab to allow images to be opened using the data: scheme. That used to be supported in python 2.7 using urllib, but in python 3.3 urllib2 -- urllib and at least the default urlopener doesn't support data: Is there a way to use the residual legacy of the

Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jason Mellone
Hello, By way of google I realize I am having what appears to be a pretty common issue install ez_setup.py on a PC (Windows XP, Python27). I receive an error message that looks like the following: Installing easy_install-2.7.exe.manifest script to C:\Python27\Scripts Installed

Re: Python under the sea and in space

2014-05-07 Thread sjmsoft
I don't suppose eight miles high in the figurative sense counts? Cheers, Steve J. Martin -- https://mail.python.org/mailman/listinfo/python-list

Good things come in small packages -Choose AWA s pay per click training programs!

2014-05-07 Thread AWA Hyd
Effective marketing lies in understanding the behavior of an average user as he uses the internet. Since most users access the internet with a purpose which is in most cases to look for information, search engines revolve around the most likely key phrases or words used by the user to launch

Re: Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jurko Gospodnetić
Hi. On 7.5.2014. 13:55, Jason Mellone wrote: By way of google I realize I am having what appears to be a pretty common issue install ez_setup.py on a PC (Windows XP, Python27). I receive an error message that looks like the following: Installing easy_install-2.7.exe.manifest script to

Re: The “does Python have variables?” debate

2014-05-07 Thread Ethan Furman
On 05/06/2014 11:18 PM, Marko Rauhamaa wrote: Actually, while Python variables are not first-class objects, one could see them as dictionary-key pairs. So you can even pass them by reference by passing the dictionary and the key. Well, you could pass them that way, but not necessarily change

Re: Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jason Mellone
On Wednesday, May 7, 2014 9:44:14 AM UTC-4, Jurko Gospodnetić wrote: Hi. On 7.5.2014. 13:55, Jason Mellone wrote: By way of google I realize I am having what appears to be a pretty common issue install ez_setup.py on a PC (Windows XP, Python27). I receive an error message

Re: The “does Python have variables?” debate

2014-05-07 Thread Chris Angelico
On Wed, May 7, 2014 at 11:00 PM, Ethan Furman et...@stoneleaf.us wrote: On 05/06/2014 11:18 PM, Marko Rauhamaa wrote: Actually, while Python variables are not first-class objects, one could see them as dictionary-key pairs. So you can even pass them by reference by passing the dictionary and

Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
Ethan Furman et...@stoneleaf.us: On 05/06/2014 11:18 PM, Marko Rauhamaa wrote: Actually, while Python variables are not first-class objects, one could see them as dictionary-key pairs. So you can even pass them by reference by passing the dictionary and the key. Well, you could pass them

Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: That's because, while you can *think of* Python name bindings as being like dict key/value pairs, they aren't always that. Function locals, class locals, and other such namespaces aren't necessarily implemented with dicts. They're conceptually still a

Re: The “does Python have variables?” debate

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 12:17 AM, Marko Rauhamaa ma...@pacujo.net wrote: Weird. Some other tests of mine did work. But: Note: The contents of this dictionary should not be modified; changes may not affect the values of local and free variables used by the interpreter. [URL:

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Grant Edwards
On 2014-05-07, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 07-05-14 10:11, Emre Hasegeli wrote: Antoon Pardon antoon.par...@rece.vub.ac.be mailto:antoon.par...@rece.vub.ac.be: I'm working on a Python app that receives an e-mail message via SMTP, does some trivial

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Grant Edwards
On 2014-05-07, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 05-05-14 21:51, Grant Edwards wrote: I'm working on a Python app that receives an e-mail message via SMTP, does some trivial processing on it, and forwards it to another SMTP server. I'd like to do the polite thing and add a

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Burak Arslan
On 05/06/14 18:26, Grant Edwards wrote: On 2014-05-06, Burak Arslan burak.ars...@arskom.com.tr wrote: On 05/06/14 12:47, Chris Angelico wrote: On Tue, May 6, 2014 at 7:15 PM, alister alister.nospam.w...@ntlworld.com wrote: On Mon, 05 May 2014 19:51:15 +, Grant Edwards wrote: I'm

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 1:06 AM, Burak Arslan burak.ars...@arskom.com.tr wrote: Seeing how discussion is still going on about this, I'd like to state once more what I said above in other words: You just need to do this: Received: blah\r\n + message.to_string() or better:

Normal dict behavior?

2014-05-07 Thread antoine
Hi, Python 2.7.5 (default, Nov 20 2013, 14:20:58) [GCC 4.7.1] on linux2 Type help, copyright, credits or license for more information. {0.: None, 0:None} {0.0: None} The second item disappeared! Why? Is it normal? -- https://mail.python.org/mailman/listinfo/python-list

Why Islam? The Beauty and Benefits of Islam

2014-05-07 Thread bv4bv4bv4
Why Islam? The Beauty and Benefits of Islam Are all religions the same? How do I know which is correct? Why should I choose Islam? This pamphlet aims to discuss some of the beauties, benefits and unique aspects of Islam as compared to other beliefs and religions. 1. Close Relationship with

Re: Normal dict behavior?

2014-05-07 Thread Ned Batchelder
On 5/7/14 11:06 AM, antoine wrote: Hi, Python 2.7.5 (default, Nov 20 2013, 14:20:58) [GCC 4.7.1] on linux2 Type help, copyright, credits or license for more information. {0.: None, 0:None} {0.0: None} The second item disappeared! Why? Is it normal? Because 0 == 0.0 -- Ned Batchelder,

Re: Normal dict behavior?

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 1:06 AM, antoine boole...@gmail.com wrote: Hi, Python 2.7.5 (default, Nov 20 2013, 14:20:58) [GCC 4.7.1] on linux2 Type help, copyright, credits or license for more information. {0.: None, 0:None} {0.0: None} The second item disappeared! Why? Is it normal? There

Re: Normal dict behavior?

2014-05-07 Thread Christian Heimes
On 07.05.2014 17:20, Ned Batchelder wrote: Because 0 == 0.0 hash(0) == hash(0.0) and 0 == 0.0 Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Normal dict behavior?

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 1:34 AM, Christian Heimes christ...@python.org wrote: hash(0) == hash(0.0) and 0 == 0.0 In theory, the former should be implied by the latter. Any deviation from that is a bug in __hash__ for the two objects. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Grant Edwards
Let's say you have a server/daemon application written in python that accepts incoming SSL connections. You want to run that application in a chroot jail. The last thing you want in that jail is your SSL certificate private key file. But, it appears the ssl module won't accept SSL

Re: The “does Python have variables?” debate

2014-05-07 Thread Jerry Hill
On Wed, May 7, 2014 at 2:18 AM, Marko Rauhamaa ma...@pacujo.net wrote: Ned Batchelder n...@nedbatchelder.com: Why is variable sacrosanct and can only be used to describe C semantics, but we're OK reusing class, int, and function? The Python language specification calls them variables; the

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 1:42 AM, Grant Edwards invalid@invalid.invalid wrote: But, it appears the ssl module won't accept SSL certificates and keys as data strings, or as stringio file objects. It will only accept a filename, and it has to open/read that file every time a connection is

Re: Common issue but unable to find common solution (ez_setup.py on PC)

2014-05-07 Thread Jurko Gospodnetić
Hi Jason, On 7.5.2014. 15:52, Jason Mellone wrote: So, is the answer: 1 - Until the patch is applied there is no answer or 2 - I can go in and manually modify the code, and have the ez setup work? I see the patch has just been applied to the setuptools development repo, so the bug

python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use multiprocessing and a process pool under the covers. There seem to be a couple process issues: 1) The pid file created by DaemonRunner dissappears. This seems

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards invalid@invalid.invalid wrote: With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use multiprocessing and a process pool under the covers. There seem to be a couple process issues:

idle glitch while building python 3.4 from sources

2014-05-07 Thread Mark H Harris
hi folks, I got bit again trying to build python3.4 from sources (mea culpa, of course). The symptom is everything (except ensure pip) builds, installs, and runs fine with the small baby problem that IDLE will not run (-tkinter isn't even there) even though tcl/tk 8.5 is loaded and running.

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Christian Heimes
On 07.05.2014 17:42, Grant Edwards wrote: Let's say you have a server/daemon application written in python that accepts incoming SSL connections. You want to run that application in a chroot jail. The last thing you want in that jail is your SSL certificate private key file. But, it

Re: Pass variable by reference

2014-05-07 Thread Mark H Harris
On 5/6/14 6:46 PM, Chris Angelico wrote: Is there really a fundamental difference between languages in which that is equally valid syntax and does exactly the same thing? No. And from that standpoint, python has variables. I know, because I thought about python's 'variables' as variables

Re: idle glitch while building python 3.4 from sources

2014-05-07 Thread Ned Deily
In article lkds4j$khg$1...@speranza.aioe.org, Mark H Harris harrismh...@gmail.com wrote: I know its my own fault (because I should just know this) but I got to wondering about others who 'might not know' about the tcl/tk dev packages and would be scratching their heads about why _tkinter is

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Grant Edwards
On 2014-05-07, Christian Heimes christ...@python.org wrote: On 07.05.2014 17:42, Grant Edwards wrote: Let's say you have a server/daemon application written in python that accepts incoming SSL connections. You want to run that application in a chroot jail. The last thing you want in

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Ben Finney
Grant Edwards invalid@invalid.invalid writes: On 2014-05-07, Grant Edwards invalid@invalid.invalid wrote: How do you terminate a Python program that's using multiprocessing? It looks like you have to kill all the threads individually. :/ As I understand it, the ‘multiprocessing’ module

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Ben Finney b...@benfinney.id.au wrote: Grant Edwards invalid@invalid.invalid writes: On 2014-05-07, Grant Edwards invalid@invalid.invalid wrote: How do you terminate a Python program that's using multiprocessing? It looks like you have to kill all the threads

Re: The “does Python have variables?” debate

2014-05-07 Thread Mark H Harris
On 5/7/14 10:48 AM, Jerry Hill wrote: I think it's rather silly for someone to insist that python doesn't have variables. On the other hand, I think it can be useful to point out that python variable aren't like C variables, and that thinking of python variables as having two parts -- names and

Re: idle glitch while building python 3.4 from sources

2014-05-07 Thread Mark H Harris
On 5/7/14 1:19 PM, Ned Deily wrote: If the Python build (the make sharedmods build step) can't successfully build the _tkinter extension module (because, for example, it couldn't find the Tk headers or libraries), the build step already reports that it could not build _tkinter. hi Ned, where

Re: The “does Python have variables?” debate

2014-05-07 Thread Ben Finney
Mark H Harris harrismh...@gmail.com writes: So, when anyone points out that Python does not have variables, but rather Python has names bound to objects... they are being most helpful. As I pointed out earlier, I think the better approach would be to find positive language for helping new

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards invalid@invalid.invalid wrote: With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use multiprocessing and a process pool under the covers. There seem to be a couple process issues:

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Antoon Pardon
op 07-05-14 21:11, Grant Edwards schreef: Mainly, I'm just trying to figure out the right way to terminate the server from an /etc/init script. As far as I understand you have to make sure that your daemon is a proces group leader. All the children it will fork will then belong to its proces

Re: The “does Python have variables?” debate

2014-05-07 Thread Marko Rauhamaa
Ben Finney b...@benfinney.id.au: That's why I always try to say “Python doesn't have variables the way you might know from many other languages”, Please elaborate. To me, Python variables are like variables in all programming languages I know. Python currently does not allow me to obtain the

Re: Pass variable by reference

2014-05-07 Thread Marko Rauhamaa
Mark H Harris harrismh...@gmail.com: A == B True A is B False [...] This is just one of a dozen 'different' kinds of examples. And the answer is the same, Python does not have variables, Python has names bound to objects. That is a different topic and isn't related to variables at

right click cut copy past context menu in IDLE in 3.4

2014-05-07 Thread Mark H Harris
Greetings, thanks to the folks who worked on the right click context menu in IDLE for python 3.4! Nice job. marcus -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-07 Thread Mark H Harris
On 5/7/14 4:15 PM, Marko Rauhamaa wrote: That's why I always try to say “Python doesn't have variables the way you might know from many other languages”, Please elaborate. To me, Python variables are like variables in all programming languages I know. Python currently does not allow me to

Re: How to tell Script to use pythonw.exe ?

2014-05-07 Thread cube345
On Tuesday, July 2, 2013 9:20:12 PM UTC-4, goldtech wrote: Hi, I want to run a .py file script using pythonw.exe so the DOS box will not open. Is there a way from inside the script to say run me with pythonw.exe and not python.exe? Thanks --

Re: Add Received: header to email msg in correct position?

2014-05-07 Thread Ian Kelly
On May 7, 2014 9:13 AM, Chris Angelico ros...@gmail.com wrote: On Thu, May 8, 2014 at 1:06 AM, Burak Arslan burak.ars...@arskom.com.tr wrote: Seeing how discussion is still going on about this, I'd like to state once more what I said above in other words: You just need to do this:

Re: right click cut copy past context menu in IDLE in 3.4

2014-05-07 Thread Terry Reedy
On 5/7/2014 5:37 PM, Mark H Harris wrote: Greetings, thanks to the folks who worked on the right click context menu in IDLE for python 3.4! I am not one of those who directly worked on that, but on their behalf, you'r wellcome'. -- Terry Jan Reedy --

Re: Python under the sea and in space

2014-05-07 Thread Steven D'Aprano
On Wed, 07 May 2014 05:17:14 -0700, sjmsoft wrote: I don't suppose eight miles high in the figurative sense counts? I'm afraid I don't know what eight miles high in the figurative sense means. There's at least two songs by that name, and a German movie, and I wonder whether you're thinking of

Re: The “does Python have variables?” debate

2014-05-07 Thread Ben Finney
Marko Rauhamaa ma...@pacujo.net writes: Ben Finney b...@benfinney.id.au: That's why I always try to say “Python doesn't have variables the way you might know from many other languages”, Please elaborate. To me, Python variables are like variables in all programming languages I know.

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Wed, 07 May 2014 11:48:15 -0400, Jerry Hill wrote: On Wed, May 7, 2014 at 2:18 AM, Marko Rauhamaa ma...@pacujo.net wrote: Ned Batchelder n...@nedbatchelder.com: Why is variable sacrosanct and can only be used to describe C semantics, but we're OK reusing class, int, and function? The

Values and objects [was Re: Pass variable by reference]

2014-05-07 Thread Steven D'Aprano
On Thu, 08 May 2014 00:22:55 +0300, Marko Rauhamaa wrote: But hey, we can open another thread for whether Python has values or objects! In Python, all values *are* objects. It isn't a matter of choosing one or the other. The value 1 is an object, not a native (low-level, unboxed) 32 or 64

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Wed, 07 May 2014 16:35:00 -0500, Mark H Harris wrote: On 5/7/14 4:15 PM, Marko Rauhamaa wrote: That's why I always try to say “Python doesn't have variables the way you might know from many other languages”, Please elaborate. To me, Python variables are like variables in all programming

Re: Pass variable by reference

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 4:11 AM, Mark H Harris harrismh...@gmail.com wrote: And we must never forget that CPython's underpinnings, uhm C, uses variables, C ones... (never mind) Be careful of this one. It's utterly irrelevant to your point, and may be distracting. I could implement Ook in

Re: The “does Python have variables?” debate

2014-05-07 Thread Ned Batchelder
On 5/7/14 8:35 PM, Ben Finney wrote: Marko Rauhamaa ma...@pacujo.net writes: Ben Finney b...@benfinney.id.au: That's why I always try to say “Python doesn't have variables the way you might know from many other languages”, Please elaborate. To me, Python variables are like variables in all

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Thu, 08 May 2014 10:35:46 +1000, Ben Finney wrote: Marko Rauhamaa ma...@pacujo.net writes: Ben Finney b...@benfinney.id.au: That's why I always try to say “Python doesn't have variables the way you might know from many other languages”, Please elaborate. To me, Python variables are

Value vs Identity (was Re: Pass variable by reference)

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 7:22 AM, Marko Rauhamaa ma...@pacujo.net wrote: Mark H Harris harrismh...@gmail.com: A == B True A is B False [...] This is just one of a dozen 'different' kinds of examples. And the answer is the same, Python does not have variables, Python has names bound to

Re: The “does Python have variables?” debate

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 11:27 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: If I have understood correctly, and I welcome confirmation or correction, one can have any combination of: * dynamic typing and name binding (e.g. Python and Ruby); * static typing and name binding

Re: Using ssl.wrap_socket() in chroot jail

2014-05-07 Thread Chris Angelico
On Thu, May 8, 2014 at 4:51 AM, Grant Edwards invalid@invalid.invalid wrote: Unfortunately, the actual SSL wrapping stuff isn't being done in my code. It's being done by the secure-smtpd module, which will pass whatever cert/key params I give it to ssl.wrap_socket(). That still leaves the

Re: idle glitch while building python 3.4 from sources

2014-05-07 Thread Ned Deily
In article 536a8c95.6050...@gmail.com, Mark H Harris harrismh...@gmail.com wrote: On 5/7/14 1:19 PM, Ned Deily wrote: If the Python build (the make sharedmods build step) can't successfully build the _tkinter extension module (because, for example, it couldn't find the Tk headers or

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Thu, 08 May 2014 12:09:21 +1000, Chris Angelico wrote: On Thu, May 8, 2014 at 11:27 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: If I have understood correctly, and I welcome confirmation or correction, one can have any combination of: * dynamic typing and name binding

Re: The “does Python have variables?” debate

2014-05-07 Thread Dan Sommers
On Thu, 08 May 2014 01:27:08 +, Steven D'Aprano wrote: If I have understood correctly, and I welcome confirmation or correction, one can have any combination of: * dynamic typing and name binding (e.g. Python and Ruby); * static typing and name binding (e.g. Java); * dynamic typing and

Re: data: protocol

2014-05-07 Thread Steven D'Aprano
On Wed, 07 May 2014 11:42:24 +0100, Robin Becker wrote: I have an outstanding request for ReportLab to allow images to be opened using the data: scheme. That used to be supported in python 2.7 using urllib, but in python 3.3 urllib2 -- urllib and at least the default urlopener doesn't support

Re: data: protocol

2014-05-07 Thread Ian Kelly
On Wed, May 7, 2014 at 4:42 AM, Robin Becker ro...@reportlab.com wrote: I have an outstanding request for ReportLab to allow images to be opened using the data: scheme. That used to be supported in python 2.7 using urllib, but in python 3.3 urllib2 -- urllib and at least the default urlopener

Re: Python under the sea and in space

2014-05-07 Thread Ian Kelly
On Tue, May 6, 2014 at 8:31 PM, Jessica McKellar jessica.mckel...@gmail.com wrote: Hi folks, I'm trying to determine the greatest depth (in the ocean or underground) and highest altitude at which Python code has been executed. Please note that I'm interested in where the code was executed,

[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument

2014-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: BTW, I think there's a design mistake in the EnhancedThreadPoolExecutor that's worth avoiding in any std. lib. implementation: the initialiser and uninitialiser for the EnhancedThreadPoolExecutor accept no arguments. In retrospect, it would have been better

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Tim's analysis is spot on, and finalize3.patch looks good to me (there's some strange commenting style there - do the carets ^ mean something special?). Still, I hope we can find a way to write a test case. -- ___

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: The new info: its (the list object's) gc_refs also changed from GC_TENTATIVELY_UNREACHABLE to GC_UNTRACKED, That the object became untracked is wholly consistent with that its gc_next became NULL but not its gc_prev. Could that be the trashcan mecanism?

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Larry, once this patch is finalized, I think it is a good candidate for 3.4.1. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Tim Golden
Tim Golden added the comment: The attached patch adds an example to the shutil documentation showing how to use an onerror handler to reattempt the removal of a read-only file. It's deliberately low-tech and simply removes the attribute and retries. If there's some other obstacle, it will

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- keywords: +patch Added file: http://bugs.python.org/file35168/issue19643-doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread Tim Golden
Tim Golden added the comment: The attached patch uses DWORD (essentially: unsigned long) in condvar.h:PyCOND_TIMEDWAIT. Adding Kristjan as it was his code. -- keywords: +patch nosy: +kristjan.jonsson Added file: http://bugs.python.org/file35169/issue20737.condvar.patch

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list

[issue21411] Enable Treat Warning as Error on 32-bit Windows

2014-05-07 Thread Tim Golden
Tim Golden added the comment: I'm at least +0.5 on this: I rather like the idea of forcing these things out into the open. The reason I'm not +1 is the danger of relatively benign or trivial warnings-turned-errors getting in the way of real, possibly critical, development. --

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: changing long to DWORD doesn't really fix the overflow issue. The fundamental problem is that some of the apis, e.g. WaitForSingleObject have a DWORD maximum. so, we cannot support sleep times longer than some particular time. Microseconds was chosen

[issue17752] many distutils tests fail when run from the installed location

2014-05-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d1929cc08dd by doko in branch '3.3': - Issue #17752: Fix distutils tests when run from the installed location. http://hg.python.org/cpython/rev/7d1929cc08dd New changeset 01e933cb1de9 by doko in branch '3.4': - Issue #17752: Fix distutils tests

[issue13702] relative symlinks in tarfile.extract broken (windows)

2014-05-07 Thread Tim Golden
Tim Golden added the comment: eryksun: could you essay a patch? I'd be happy to review apply it. -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13702 ___

[issue21447] Intermittent asyncio.open_connection / futures.InvalidStateError

2014-05-07 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21447 ___ ___

[issue21428] Python suddenly cares about EOLs formats on windows

2014-05-07 Thread Eric V. Smith
Eric V. Smith added the comment: Can you describe what command you ran and what you saw at the executing with python-3.4.0 make the execution stop step? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21428

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Zachary Ware
Zachary Ware added the comment: Fair point, Paul. Patch looks good to me, Tim, barring a couple of nits pointed out on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Tim Golden
Tim Golden added the comment: Thanks, Zach. Updated patch. -- assignee: - tim.golden Added file: http://bugs.python.org/file35170/issue19643-doc.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Zachary Ware
Zachary Ware added the comment: LGTM! -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Tim Golden
Tim Golden added the comment: Thanks. I'll hold off pushing until I've had a chance to run it on a Unix system. I'm not 100% whether it will operate in the same way there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread Tim Golden
Tim Golden added the comment: Thanks for the feedback, Kristjan. You're obviously correct in that we can't account for timeouts greater than DWORD-size milliseconds and your proposed solution looks reasonable. However, I'd like to close off *this* particular issue which turns on the implicit

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread R. David Murray
R. David Murray added the comment: An implicit ceiling of 4000 seconds on the timeout? I routinely use timeouts of approximately 24 hours in calls to Event().wait(). What am I misunderstanding? If I'm not misunderstanding, then no, I don't think that change would be acceptable. --

[issue21450] [Issue 13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2014-05-07 Thread Francisco Gracia
New submission from Francisco Gracia: I was delighted with the behaviour of IDLE in version 3.4 until I noticed the problem of the matches with the non highlighted background in the modified (and in this sense improved) iterative text search operations. I was wondering how could this be possible

[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2014-05-07 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +fgracia ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13630 ___ ___ Python-bugs-list

[issue21450] [Issue 13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2014-05-07 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - IDLE: Find(ed) text is not highlighted while dialog box is open ___ Python tracker rep...@bugs.python.org

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Tim, how about changing the variable to unsigned long? I'd like the signature of the function to be the same for all platforms. This will change the code and allow waits for up to 4000 seconds. There is still an overflow problem present, though.+

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread R. David Murray
R. David Murray added the comment: I have production code on Windows using python2.7 that calls Event().wait() with a timeout of approximately 24 hours, and it works just fine. Having that no longer work is, IMO, an unacceptable regression. (I'm ready to move this code to python3 as soon as

[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-07 Thread Tim Golden
Tim Golden added the comment: Just to be clear: the change *I'm* proposing for this issue has nothing to do with limiting the wait, artificially or otherwise. It's simply undoing an unintended conversion from unsigned to signed and back again, whicih currently causes any wait of more than

[issue21350] bug in file.writelines accepting buffers

2014-05-07 Thread Brian Kearns
Brian Kearns added the comment: So, for example: f = open('blah', 'wb') f.write(array.array('c', 'test')) f.writelines([array.array('c', 'test')]) Traceback (most recent call last): File stdin, line 1, in module TypeError: writelines() argument must be a sequence of strings While the

[issue21451] Improve error messages for malformed JSON

2014-05-07 Thread Raymond Hettinger
New submission from Raymond Hettinger: The error message for malformed JSON just tells you that the JSON is invalid, it doesn't say why (showing you which character bombed, what text is being read, what the pending openers are, or what allowable characters would have been expected). In the

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 31d63ea5dffa by Tim Golden in branch 'default': Issue19643 Add an example of shutil.rmtree which shows how to cope with readonly files on Windows http://hg.python.org/cpython/rev/31d63ea5dffa New changeset a7560c8f38ee by Tim Golden in branch

[issue19643] shutil rmtree fails on readonly files in Windows

2014-05-07 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___

  1   2   >