New blog from python-dev

2011-03-24 Thread Doug Hellmann
Python Insider (http://blog.python.org/) is a new blog from the Python core development team. It will provide a way for people who don't follow the mailing list to get an overview of topics discussed there, and especially to learn about changes in store for Python. We will be writing about

ANN: SfePy 2011.1

2011-03-24 Thread Robert Cimrman
I am pleased to announce release 2011.1 of SfePy. Description --- SfePy (simple finite elements in Python) is a software for solving systems of coupled partial differential equations by the finite element method. The code is based on NumPy and SciPy packages. It is distributed under

Re: in house pypi?

2011-03-24 Thread Martin v. Loewis
Am 24.03.2011 04:19, schrieb Miki Tebeka: Greetings, My company want to distribute Python packages internally. We would like something like an internal PyPi where people can upload and easy_install from packages. Is there such a ready made solution? I'd like something as simple as

Re: in house pypi?

2011-03-24 Thread John Nagle
On 3/23/2011 8:19 PM, Miki Tebeka wrote: Greetings, My company want to distribute Python packages internally. We would like something like an internal PyPi where people can upload and easy_install from packages. Is there such a ready made solution? I'd like something as simple as possible,

Re: Instant File I/O

2011-03-24 Thread Charles
jam1991 jordanmeyer1...@gmail.com wrote in message news:c0c76bc4-8923-4a46-9c36-6e1a0375f...@l11g2000yqb.googlegroups.com... [snip] they sign into the program with; however, this information doesn't appear in the file until after the program has closed. This poses a problem for retrieving the

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Paul Rubin
Dennis Lee Bieber wlfr...@ix.netcom.com writes: The first half of the problem description -- Elements are added at random seems more suited to an in-place insertion sort method. This is precisely what a priority queue is for. Insertions take O(log n) time and there's very little space

Re: Special logging module needed

2011-03-24 Thread Laszlo Nagy
2011.03.23. 19:33 keltezéssel, Dan Stromberg írta: On Wed, Mar 23, 2011 at 7:37 AM, Laszlo Nagy gand...@shopzeus.com mailto:gand...@shopzeus.com wrote: I was also thinking about storing data in a gdbm database. One file for each month storing at most 100 log messages for every key

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Antoon Pardon
On Wed, Mar 23, 2011 at 10:40:11AM -0600, Ian Kelly wrote: On Wed, Mar 23, 2011 at 9:14 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Which isn't helpfull if where you decide how they have to be sorted is not the place where they are actually sorted. I have a class that is a

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Antoon Pardon
On Wed, Mar 23, 2011 at 05:51:07PM +0100, Stefan Behnel wrote: You can use a stable sort in two steps for that. Which isn't helpfull if where you decide how they have to be sorted is not the place where they are actually sorted. I have a class that is a priority queue. Elements are added

Re: in house pypi?

2011-03-24 Thread Christian Heimes
Am 24.03.2011 04:19, schrieb Miki Tebeka: Greetings, My company want to distribute Python packages internally. We would like something like an internal PyPi where people can upload and easy_install from packages. Is there such a ready made solution? I'd like something as simple as

Re: in house pypi?

2011-03-24 Thread Billy Earney
Another possible solution, would be to use urlimport http://pypi.python.org/pypi/urlimport/ http://pypi.python.org/pypi/urlimport/if the packages are 100% python (no c, etc), you could create a single repository, serve that via a web server, and users could easy import modules without even

Re: in house pypi?

2011-03-24 Thread Christian Heimes
Am 24.03.2011 12:49, schrieb Billy Earney: Another possible solution, would be to use urlimport http://pypi.python.org/pypi/urlimport/ http://pypi.python.org/pypi/urlimport/if the packages are 100% python (no c, etc), you could create a single repository, serve that via a web server, and

Re: Threading with Socket Server

2011-03-24 Thread baloan
If you don't mind to use the coroutine library eventlet you can implement a single threaded solution. See example below. For your use case you need to change controller to load the shelve every eventlet.sleep(n) seconds. Regards, Andreas # eventlet single thread demo prc_publish.eventlet

Re: in house pypi?

2011-03-24 Thread Miki Tebeka
The easiest solution is to use a plain file system. Make a directory per project, and put all distributions of the project into the directory. Then have Apache serve the parent directory, with DirectoryIndex turned on. Great, thanks! -- http://mail.python.org/mailman/listinfo/python-list

why memoizing is faster

2011-03-24 Thread Andrea Crotti
I was showing a nice memoize decorator to a friend using the classic fibonacci problem. --8---cut here---start-8--- def memoize(f, cache={}): def g(*args, **kwargs): # first must create a key to store the arguments called # it's

Re: why memoizing is faster

2011-03-24 Thread Stefan Behnel
Andrea Crotti, 24.03.2011 14:48: I was showing a nice memoize decorator to a friend using the classic fibonacci problem. --8---cut here---start-8--- def memoize(f, cache={}): def g(*args, **kwargs): # first must create a key to store the

No more Python support in NetBeans 7.0

2011-03-24 Thread Kees Bakker
Hi, Sad news (for me, at least), in the upcoming version 7.0 of NetBeans there will be no Python plugin anymore. I have been using NetBeans for Python development for a while now and I was very happy with it. See this archive for details:

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Mel
Carl Banks wrote: On Mar 23, 1:38 pm, Paul Rubin no.em...@nospam.invalid wrote: Well, I thought it was also to get rid of 3-way cmp in general, in favor of rich comparison. Supporting both __cmp__ and rich comparison methods of a class does add a lot of complexity. The cmp argument of sort

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Ian Kelly
On Thu, Mar 24, 2011 at 3:23 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Sure I can do that. I can do lots of things like writing a CMP class that I will use as a key and where I can implement the logic for comparing the original objects, which I otherwise would have put in a cmp

Re: os.stat bug?

2011-03-24 Thread Laszlo Nagy
It's the OS kernel. If it was Python or the C library, sending SIGKILL would result in immediate termination. Is the disk interface operating in PIO mode? A slow disk shouldn't cause 100% CPU consumption; the OS would just get on with something else (or just idle) while waiting for data to

Re: Instant File I/O

2011-03-24 Thread Jordan Meyer
That did the trick! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Antoon Pardon
On Thu, Mar 24, 2011 at 09:06:44AM -0600, Ian Kelly wrote: On Thu, Mar 24, 2011 at 3:23 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Sure I can do that. I can do lots of things like writing a CMP class that I will use as a key and where I can implement the logic for comparing the

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Ian Kelly
On Thu, Mar 24, 2011 at 10:47 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: That's not what you wrote before.  You wrote I can't do the sort in multiple steps.  I was just responding to what you wrote. That is because I tend to assume some intelligence with those I communicate with,

Re: autoscale y to current xrange in view - matplotlib

2011-03-24 Thread Blockheads Oi Oi
On 23/03/2011 18:17, urban_gibbon wrote: [snip] You're likely to get answers on the matplotlib users mailing list https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- http://mail.python.org/mailman/listinfo/python-list

About gmon.out for profiling

2011-03-24 Thread Baskaran Sankaran
Hi, I have two questions regarding the profiling. My python version automatically generates gmon.out for every script that I run and so I guess that it must have been compiled with the appropriate option. Firstly, it is not clear to me how I can use this. I've used python with -cprofile switch

dynamic assigments

2011-03-24 Thread Seldon
Hi, I have a question about generating variable assignments dynamically. I have a list of 2-tuples like this ( (var1, value1), (var2, value2), .. , ) where var1, var2, ecc. are strings and value1, value2 are generic objects. Now, I would like to use data contained in this list to dynamically

Re: dynamic assigments

2011-03-24 Thread Jean-Michel Pichavant
Seldon wrote: Hi, I have a question about generating variable assignments dynamically. I have a list of 2-tuples like this ( (var1, value1), (var2, value2), .. , ) where var1, var2, ecc. are strings and value1, value2 are generic objects. Now, I would like to use data contained in this

Convert ctypes 16 bit c_short array to a 32 bit numpy array

2011-03-24 Thread Wanderer
I'm using ctypes to have a dll fill a buffer with 16 bit data. I then want to convert this data to a numpy array. The code snippet below converts the data from 16 bit to 32 bit, but two 16 bit numbers are concatenated to make a 32 bit number and half the array is zero. Buffer = (c_short

Re: Convert ctypes 16 bit c_short array to a 32 bit numpy array

2011-03-24 Thread Wanderer
On Mar 24, 3:14 pm, Wanderer wande...@dialup4less.com wrote: I'm using ctypes to have a dll fill a buffer with 16 bit data. I then want to convert this data to a numpy array. The code snippet below converts the data from 16 bit to 32 bit, but two 16 bit numbers are concatenated to make a 32

Re: dynamic assigments

2011-03-24 Thread scattered
On Mar 24, 2:39 pm, Seldon sel...@katamail.it wrote: Hi, I have a question about generating variable assignments dynamically. I have a list of 2-tuples like this ( (var1, value1), (var2, value2), .. , ) where var1, var2, ecc. are strings and value1, value2 are generic objects. Now, I

Re: dynamic assigments

2011-03-24 Thread Chris Rebert
On Thu, Mar 24, 2011 at 1:39 PM, Seldon sel...@katamail.it wrote: Hi, I have a question about generating variable assignments dynamically. This can frequently be a code smell. I have a list of 2-tuples like this ( (var1, value1), (var2, value2), .. , ) where var1, var2, ecc. are

Re: dynamic assigments

2011-03-24 Thread Steven D'Aprano
On Thu, 24 Mar 2011 19:39:21 +0100, Seldon wrote: Hi, I have a question about generating variable assignments dynamically. [...] Now, I would like to use data contained in this list to dynamically generate assignments of the form var1 = value1, ecc where var1 is an identifier equal (as a

Re: dynamic assigments

2011-03-24 Thread Steven D'Aprano
On Thu, 24 Mar 2011 14:39:34 -0700, scattered wrote: Could try: my_list = [(x, 7), (y, 8)] for pair in my_list: exec(pair[0] + = + str(pair[1])) x,y (7,8) Please don't ever do such a thing. The world has enough buggy software vulnerable to code injection attacks without you

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Steven D'Aprano
On Thu, 24 Mar 2011 17:47:05 +0100, Antoon Pardon wrote: However since that seems to be a problem for you I will be more detailed. The original poster didn't ask for cases in which cmp was necessary, he asked for cases in which not using cmp was cumbersome. I'm the original poster, and that's

Re: why memoizing is faster

2011-03-24 Thread Terry Reedy
On 3/24/2011 9:48 AM, Andrea Crotti wrote: def fib_iter(n): ls = {0: 1, 1:1} Storing a linear array in a dict is a bit bizarre for i in range(2, n+1): ls[i] = ls[i-1] + ls[i-2] return ls[max(ls)] So is using max(keys) to find the highest index, which

Callback mysteries

2011-03-24 Thread Fons Adriaensen
Hello all, I wonder if someone could explain some of the following. (Python 3.2) I have a class which has a method called 'callback()'. An instance of this class calls a C extension which then calls back into Python. In all cases below, two arguments are passed to the C code and end up in

Re: why memoizing is faster

2011-03-24 Thread Terry Reedy
On 3/24/2011 9:48 AM, Andrea Crotti wrote: I was showing a nice memoize decorator to a friend using the classic fibonacci problem. --8---cut here---start-8--- def memoize(f, cache={}): def g(*args, **kwargs): # first must create a key to

Re: why memoizing is faster

2011-03-24 Thread Fons Adriaensen
On Thu, Mar 24, 2011 at 08:12:22PM -0400, Terry Reedy wrote: The irony of this is that memoizing 'recursive' functions with a decorator depends on the fact the Python does not have truly recursive functions. A function cannot call itself directly. I wonder what exactly is meant by that

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread MRAB
On 24/03/2011 23:49, Steven D'Aprano wrote: On Thu, 24 Mar 2011 17:47:05 +0100, Antoon Pardon wrote: However since that seems to be a problem for you I will be more detailed. The original poster didn't ask for cases in which cmp was necessary, he asked for cases in which not using cmp was

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Martin v. Loewis
The cmp argument doesn't depend in any way on an object's __cmp__ method, so getting rid of __cmp__ wasn't any good readon to also get rid of the cmp argument So what do you think about the cmp() builtin? Should have stayed, or was it ok to remove it? If it should have stayed: how should it's

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Carl Banks
On Mar 24, 5:37 pm, Martin v. Loewis mar...@v.loewis.de wrote: The cmp argument doesn't depend in any way on an object's __cmp__ method, so getting rid of __cmp__ wasn't any good readon to also get rid of the cmp argument So what do you think about the cmp() builtin? Should have stayed,

Re: dynamic assigments

2011-03-24 Thread scattered
On Mar 24, 7:18 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Thu, 24 Mar 2011 14:39:34 -0700, scattered wrote: Could try: my_list = [(x, 7), (y, 8)] for pair in my_list: exec(pair[0] + = + str(pair[1])) x,y (7,8) Please don't ever do such a thing. The world

Re: dynamic assigments

2011-03-24 Thread Jason Swails
On Thu, Mar 24, 2011 at 4:05 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 24 Mar 2011 19:39:21 +0100, Seldon wrote: Hi, I have a question about generating variable assignments dynamically. [...] Now, I would like to use data contained in this list to dynamically

Re: dynamic assigments

2011-03-24 Thread scattered
On Mar 24, 10:51 pm, scattered tooscatte...@gmail.com wrote: [snip] I can easily imagine other situations in which a user might want to create a large number of bindings for interactive use. Maybe as a teacher (I'm a math teacher) you have written a student-class which contains things like

Re: dynamic assigments

2011-03-24 Thread Tim Leslie
On 25 March 2011 13:51, scattered tooscatte...@gmail.com wrote: Here is another possibility: you are using Python *interactively* in solving cryptograms (as a matter of fact - I was doing exactly this yesterday in trying to solve some Playfair ciphers). You have a ciphertext that is a stream

Understanding the Pystone measurement

2011-03-24 Thread tleeuwenb...@gmail.com
Hi there, Is there a good writeup of what the pystone measurement actually means? I'm working on benchmarking of some Python code at work, and I'm interested in how Pystone might be relevant to me. I've tried googling, but I can't find any introductory / definitional descriptions of what this

Re: why memoizing is faster

2011-03-24 Thread Terry Reedy
On 3/24/2011 8:26 PM, Fons Adriaensen wrote: On Thu, Mar 24, 2011 at 08:12:22PM -0400, Terry Reedy wrote: The irony of this is that memoizing 'recursive' functions with a decorator depends on the fact the Python does not have truly recursive functions. A function cannot call itself directly.

Re: dynamic assigments

2011-03-24 Thread Steven D'Aprano
On Thu, 24 Mar 2011 19:51:08 -0700, scattered wrote: On Mar 24, 7:18 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Thu, 24 Mar 2011 14:39:34 -0700, scattered wrote: Could try: my_list = [(x, 7), (y, 8)] for pair in my_list: exec(pair[0] + = + str(pair[1])) x,y

Re: dynamic assigments

2011-03-24 Thread Steven D'Aprano
On Thu, 24 Mar 2011 17:26:34 -0500, Chris Rebert wrote: On Thu, Mar 24, 2011 at 1:39 PM, Seldon sel...@katamail.it wrote: Hi, I have a question about generating variable assignments dynamically. This can frequently be a code smell. Is there any time when it's not a code smell? A code smell

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-03-24 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5863 ___ ___ Python-bugs-list

[issue11660] closure with too few cells segfaults

2011-03-24 Thread Eric Snow
New submission from Eric Snow ericsnowcurren...@gmail.com: While perhaps esoteric, it looks like exec'ing a code object that has freevars, using a closure that has too few cells causes a segfault. I believe the problem is around line 3276 of ceval.c at the PyTuple_GET_ITEM call: if

[issue11477] Bug in code dispatching based on internal slots

2011-03-24 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Added file: http://bugs.python.org/file21367/650549138a3d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11477 ___

[issue11477] Bug in code dispatching based on internal slots

2011-03-24 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Removed file: http://bugs.python.org/file21258/f1bd5468dae6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11477 ___

[issue11477] Bug in code dispatching based on internal slots

2011-03-24 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Removed file: http://bugs.python.org/file21367/650549138a3d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11477 ___

[issue11477] Bug in code dispatching based on internal slots

2011-03-24 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Added file: http://bugs.python.org/file21368/650549138a3d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11477 ___

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-03-24 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: By the way, in another thread i've seen a link to issue960406, where Guido van Rossum states (in msg46074): Ideally, ^C should always cause the signal handler for SIGINT to be called, and the KeyboardInterrupt should be

[issue11606] maxlinelen exceeded by email module's body_encode() function

2011-03-24 Thread Michael Henry
Michael Henry pyt...@drmikehenry.com added the comment: David, Your patch looks fine to me. I like putting the logic is a separate class as you've done. I looked in itertools for something to perform the job of the each_last() generator I'd had in my patch, but I didn't see anything. I like

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-24 Thread Davide Rizzo
Changes by Davide Rizzo sor...@gmail.com: -- nosy: +mwh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11650 ___ ___ Python-bugs-list mailing list

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-24 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: By the way, as my simple tests, wprintf() with %ls does apply the width and precision formatters on units of characters. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: There are 4 patches issue 7030 attached to this issue. Some of them have a version number in their name, some doesn't. You did the same on other issues. It is more easy to follow a patch if it has a version number, for example:

[issue11658] complex sqrt error

2011-03-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I don't see a real problem here: both cmath.sqrt(-1) and (-1)**0.5 are producing good approximations to the correct result, which is about as much as you can hope for in general with floating-point algorithms. I wouldn't want to start

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-24 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: On Thu, Mar 23, 2011 at 21:50:42PM +, Davide Rizzo wrote: Steffen, on a side note, I got readline working with brew. Say - readline not libedit which does not take care of .inputrc? Without permanently modifying GNU autoconf

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-24 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: Sorry for having done that! I will remove old patches and leave a cleaner view. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-24 Thread Ray.Allen
Changes by Ray.Allen ysj@gmail.com: Removed file: http://bugs.python.org/file20739/issue_7330.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-24 Thread Ray.Allen
Changes by Ray.Allen ysj@gmail.com: Removed file: http://bugs.python.org/file20786/issue_7330.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-24 Thread Ray.Allen
Changes by Ray.Allen ysj@gmail.com: Removed file: http://bugs.python.org/file20983/issue7330_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___

[issue9523] Improve dbm modules

2011-03-24 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: I tried to work out a doc patch for 3.2 to mention the limitation api: the missing methods compared with dict and the imperfect methods(keys(), items()) of collections.MutableMapping. Here is it. -- Added file:

[issue11661] test_collections.TestNamedTuple.test_source failing on many buildbots after f09f7ab40ce6

2011-03-24 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: Example: http://www.python.org/dev/buildbot/all/builders/x86%20FreeBSD%207.2%203.x/builds/1609/steps/test/logs/stdio == FAIL: test_source

[issue11656] Debug builds for Windows would be very helpful

2011-03-24 Thread Jack Jansen
Jack Jansen jackjan...@users.sourceforge.net added the comment: Martin, I agree about the Py_DEBUG issue. My reason for asking is really only a workaround for the VC++ problam that you can't link non-debug and debug builds together. You know what: if you think it isn't worth it just assign it

[issue11661] test_collections.TestNamedTuple.test_source failing on many buildbots after f09f7ab40ce6

2011-03-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Link to the commit: f09f7ab40ce6 -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11661 ___

[issue11655] map() must not swallow exceptions from PyObject_GetIter

2011-03-24 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: There maybe compatibility issues which prevent such behavior change. -- nosy: +ysj.ray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11655 ___

[issue11455] issue a warning when populating a CPython type dict with non-string keys

2011-03-24 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Thomas, I know you've been working on this post-Pycon. Could you please take a look at Daniel's patch and/or publish your own. -- assignee: - twouters nosy: +ncoghlan, twouters ___ Python tracker

[issue11455] issue a warning when populating a CPython type dict with non-string keys

2011-03-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11455 ___ ___

[issue11455] issue a warning when populating a CPython type dict with non-string keys

2011-03-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Cool, someone uses my PyErr_WarnFormat() function! :-) I didn't know that NULL can be used for the category: I would prefer an explicit PyExc_RuntimeWarning to not have to read the source of PyErr_WarnFormat() or its documentation.

[issue1590744] mail message parsing glitch

2011-03-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I needed an airplane-trip-sized problem to work on on the way back from PyCon and the sprints, so I tried my hand at fixing this. The attached patch is really just a proof of concept. Because it is so invasive of the email package

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-03-24 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Agree to removing of termios.ISIG so that we get a KeyBoardInterrupt exception raised when CNTL-C is pressed. Looking at discussion more carefully, it does not present any security risk. Should this be fixed in 3.3 only with NEWS

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-03-24 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset c177faafec51 by Senthil Kumaran in branch 'default': issue11236 getpass.getpass to respond ctrl-c or ctrl-z http://hg.python.org/cpython/rev/c177faafec51 -- nosy: +python-dev ___ Python

[issue11466] getpass.getpass doesn't close tty file

2011-03-24 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11466 ___

[issue975330] Inconsistent newline handling in email module

2011-03-24 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue975330 ___

[issue11466] getpass.getpass doesn't close tty file

2011-03-24 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: On Thu, Mar 24, 2011 at 02:34:34PM +, Senthil Kumaran wrote: assignee: - orsenthil Here is yet another patch which only passes valid streams into _user_input(), so that this does not need to take care about that at all.

[issue11635] concurrent.futures uses polling

2011-03-24 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 76a898433a02 by Antoine Pitrou in branch '3.2': Add tests for the atexit hook in concurrent.futures (part of #11635) http://hg.python.org/cpython/rev/76a898433a02 New changeset d6bbde982c1c by Antoine Pitrou in branch 'default': Add

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Guido van Rossum
New submission from Guido van Rossum gu...@python.org: We received the following on the security list. With the OP's permission I am now filing a public bug with a patch, with the intent to submit the patch ASAP (in time for MvL's planned April security release of Python 2.5). The OP's

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: HTTPRedirectHandler behaviour can be changed to only allow redirects to HTTP, HTTPS and FTP by checking the scheme of the location URL (this seems to be a common practise in browsers) This would be the way to go. -- nosy:

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Guido van Rossum
Changes by Guido van Rossum gu...@python.org: -- keywords: +patch Added file: http://bugs.python.org/file21372/dd852a0f92d6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11662 ___

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Repository URL is incorrect (missing http:/ prefix). The commit: http://hg.python.org/sandbox/guido/rev/dd852a0f92d6 -- nosy: +haypo ___ Python tracker rep...@bugs.python.org

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: Please review the patch that I created. (Now why doesn't it have a review link?) Note that the patch currently only allows http and https. -- ___ Python tracker rep...@bugs.python.org

[issue11653] Problems with some tests using -j2

2011-03-24 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Ned Skip, what parameters are you using with ./configure ? Pretty vanilla. Install in my directory tree, get libraries from MacPorts: --prefix=/Users/skip/local --enable-shared LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include I

[issue11635] concurrent.futures uses polling

2011-03-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Tests now committed, here is a patch without them. -- Added file: http://bugs.python.org/file21373/cfpolling4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11635

[issue11653] Problems with some tests using -j2

2011-03-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Pretty vanilla. Install in my directory tree, get libraries from MacPorts: --prefix=/Users/skip/local --enable-shared LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include I thought you had fixed the --enable-shared linkage problems,

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: why doesn't it have a review link? Perhaps, as it is not against the 'default'? Let's try my hg sandbox link which has a fix committed. Let's see if it gives the review link. -- hgrepos: +7

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: Added file: http://bugs.python.org/file21374/c6a4d267fe88.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11662 ___

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The patch has no test. You may read our new Python Developer’s Guide for new contributors: http://docs.python.org/devguide/runtests.html#writing -- ___ Python tracker

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: Oddly, I now see a review link for my own diff but not for orsenthil's. Maybe there's a delay? I could use help with the tests. I suppose orsenthil's patch is for Python 3? -- ___ Python tracker

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Which patch should be reviewed? They seem to be different. Senthil's patch allows a redirect to ftp while Guido's doesn't. Senthil's patch doesn't seem to fix urllib-inherited code, only urllib2- (see FancyURLopener.redirect_internal()).

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: c6a4d267fe88.diff: This patch doesn't explain why other scheme are not allowed. I like Guido's comment: # For security reasons we do not allow redirects to protocols # other than HTTP or HTTPS. --

[issue11662] Redirect vulnerability in urllib/urllib2

2011-03-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Yes there is a delay. The cron job that creates the link runs every two minutes. Not sure why the delay seems to be longer than that, though. -- nosy: +r.david.murray ___ Python tracker

[issue11606] maxlinelen exceeded by email module's body_encode() function

2011-03-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I turns out that issue 5803 has a patch that also fixes this bug, and the algorithm used there is even more efficient than the one you've developed here. However, it is also not compatible with the email5 version of quoprimime. It

[issue11663] concurrent.futures (or multiprocessing?) doesn't detect killed processes

2011-03-24 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: If you do: ./python -c from concurrent.futures import *; from time import *; t = ProcessPoolExecutor(1); t.submit(sleep, 60) and then kill the child process, the parent process doesn't notice and waits endlessly for the child to return the

[issue11663] concurrent.futures (or multiprocessing?) doesn't detect killed processes

2011-03-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11663 ___ ___

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-24 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: Antoine Pitrou wrote: It would be nice if it were enabled by default for fatal errors (and asserts perhaps?). I feel like a broken record. This code hardcodes fd=2 as a write target on crash, which is not safe thing to do at all. You can

  1   2   >