RSFile 1.1 released

2011-04-15 Thread Pascal Chambon
I'm pleased to announce the first bugfix release of the RSFile package. Issues addressed: - rejection of unicode keys in kwargs arguments, in some versions of py2.6 - indentation bug swallowing some errors on file opening RSFile aims at providing python with a cross-platform, reliable,

Re: Egos, heartlessness, and limitations

2011-04-15 Thread Steven D'Aprano
On Fri, 15 Apr 2011 13:55:58 +1000, Ben Finney wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Save yourself a lot of time and just killfile him now. You'll thank me for it later. You never thanked *me* for it, after you eventually realised that was the right decision

Re: Pythonic infinite for loop?

2011-04-15 Thread Paul Rubin
Chris Angelico ros...@gmail.com writes: That loop will exit at the first gap in the sequence. If that's what you want, you could try (untested): from itertools import takewhile seq = takewhile(lambda n: ('Keyword%d'%n) in dct, count(1)) lst = map(dct.get, seq) This does 2 lookups per

Re: Pythonic infinite for loop?

2011-04-15 Thread Chris Angelico
On Fri, Apr 15, 2011 at 5:24 PM, Paul Rubin no.email@nospam.invalid wrote: This does 2 lookups per key, which you could avoid by making the code uglier (untested):   sentinel = object()   seq = (dct.get('Keyword%d'%i,sentinel) for i in count(1))   lst = list(takewhile(lambda x: x !=

Re: Pythonic infinite for loop?

2011-04-15 Thread Paul Rubin
Chris Angelico ros...@gmail.com writes:   sentinel = object()   seq = (dct.get('Keyword%d'%i,sentinel) for i in count(1))   lst = list(takewhile(lambda x: x != sentinel, seq)) If I understand this code correctly, that's creating generators, right? It won't evaluate past the sentinel at all?

Re: memory usage multi value hash

2011-04-15 Thread Algis Kabaila
On Friday 15 April 2011 02:13:51 christian wrote: Hello, i'm not very experienced in python. Is there a way doing below more memory efficient and maybe faster. I import a 2-column file and then concat for every unique value in the first column ( key) the value from the second columns.

Re: Pythonic infinite for loop?

2011-04-15 Thread Peter Otten
Paul Rubin wrote: Chris Angelico ros...@gmail.com writes: sentinel = object() seq = (dct.get('Keyword%d'%i,sentinel) for i in count(1)) lst = list(takewhile(lambda x: x != sentinel, seq)) If I understand this code correctly, that's creating generators, right? It won't evaluate past the

Re: memory usage multi value hash

2011-04-15 Thread Peter Otten
Terry Reedy wrote: On 4/14/2011 12:55 PM, Peter Otten wrote: I don't expect that it matters much, but you don't need to sort your data if you use a dictionary anyway: Which means that one can build the dict line by line, as each is read, instead of reading the entire file into memory. So

Re: Pythonic infinite for loop?

2011-04-15 Thread Peter Otten
Chris Angelico wrote: Apologies for interrupting the vital off-topic discussion, but I have a real Python question to ask. I'm doing something that needs to scan a dictionary for elements that have a particular beginning and a numeric tail, and turn them into a single list with some

Re: Pythonic infinite for loop?

2011-04-15 Thread Chris Angelico
On Fri, Apr 15, 2011 at 6:25 PM, Peter Otten __pete...@web.de wrote: The initial data structure seems less than ideal. You might be able to replace it with a dictionary like {Keyword: [value_for_keyword_1, value_for_keyword_2, ...]} if you try hard enough. The initial data structure comes

PYTHONPATH

2011-04-15 Thread Algis Kabaila
Hi, An elementary question that is bugging me, regarding sys.path values.sys.path can be altered easily, but the changes last for the current session only. I would like the changes to stay for several sessions. Is PYTHONPATH a system variable that sets the path for several sessions and if

Re: TextWrangler run command not working properly

2011-04-15 Thread Fabio
In article 382709dd-5e3f-4b07-a642-4ce141ef4...@18g2000prd.googlegroups.com, Jon Clements jon...@googlemail.com wrote: http://www.velocityreviews.com/forums/t570137-textwrangler-and-new-python-vers ion-mac.html Thank you for the reply Jon. I saw the post in velocityreviews. Unfortunately it

Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-15 Thread Aldo Ceccarelli
Hello All, in my specific problem I will be happy of a response where possible to: 1. distinguish different operating systems of answering nodes 2. collect responses of Wyse thin-clients with Thin OS to get node name and MAC address in particular Thanks a lot in advance for any sharing / forward

Re: PYTHONPATH

2011-04-15 Thread Chris Rebert
On Fri, Apr 15, 2011 at 1:33 AM, Algis Kabaila akaba...@pcug.org.au wrote: Hi, An elementary question that is bugging me, regarding sys.path values.sys.path can be altered easily, but the changes last for the current session only. I would like the changes to stay for several sessions.  Is

Re: [OT] Free software versus software idea patents

2011-04-15 Thread Dan Stromberg
On Thu, Apr 14, 2011 at 1:46 PM, Westley Martínez aniko...@gmail.com wrote: On Thu, 2011-04-14 at 14:02 +, Steven D'Aprano wrote: On Thu, 14 Apr 2011 19:15:05 +1000, Chris Angelico wrote: 4) Assumes people aren't deliberately fiddling the figures. Yeah, that would be correct. We're in

Re: Pythonic infinite for loop?

2011-04-15 Thread Peter Otten
Chris Angelico wrote: On Fri, Apr 15, 2011 at 6:25 PM, Peter Otten __pete...@web.de wrote: The initial data structure seems less than ideal. You might be able to replace it with a dictionary like {Keyword: [value_for_keyword_1, value_for_keyword_2, ...]} if you try hard enough. The

Re: PYTHONPATH

2011-04-15 Thread Gabriel Genellina
En Fri, 15 Apr 2011 05:33:18 -0300, Algis Kabaila akaba...@pcug.org.au escribió: An elementary question that is bugging me, regarding sys.path values.sys.path can be altered easily, but the changes last for the current session only. I would like the changes to stay for several sessions. Is

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-15 Thread frankcui
On 04/15/2011 05:00 PM, Aldo Ceccarelli wrote: Hello All, in my specific problem I will be happy of a response where possible to: 1. distinguish different operating systems of answering nodes 2. collect responses of Wyse thin-clients with Thin OS to get node name and MAC address in particular

Re: PYTHONPATH

2011-04-15 Thread Algis Kabaila
On Friday 15 April 2011 19:21:12 Chris Rebert wrote: On Fri, Apr 15, 2011 at 1:33 AM, Algis Kabaila akaba...@pcug.org.au wrote: Hi, snip.. It is an environment variable: http://en.wikipedia.org/wiki/Environment_variable Alternatively, you can use a .pth file to add directories to the

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-15 Thread Aldo Ceccarelli
On 15 Apr, 11:54, frankcui frankcu...@gmail.com wrote: On 04/15/2011 05:00 PM, Aldo Ceccarelli wrote: Hello All, in my specific problem I will be happy of a response where possible to: 1. distinguish different operating systems of answering nodes 2. collect responses of Wyse thin-clients

http://DuplicateFilesDeleter.com - This software deletes duplicate files in media collection of any type

2011-04-15 Thread Max Loger
http://DuplicateFilesDeleter.com - find duplicates http://DuplicateFilesDeleter.com is an innovative tool that can recognize duplicate audio files even if they are stored in different file formats and not marked with ID3 tags. It will find fast all similar or exact duplicate audio files in a

Re: TextWrangler run command not working properly

2011-04-15 Thread Brian Blais
Hello Fabio You have two versions of 2.6 on your system. On Apr 15, 2011, at 4:51 AM, Fabio wrote: I have the built-in Python2.5 which comes installed by mother Apple. My OSX comes with 2.3, 2.5, and 2.6. :) These are under: /System/Library/Frameworks/Python.framework/Versions/ ^

Re: Pythonic infinite for loop?

2011-04-15 Thread Steven D'Aprano
On Fri, 15 Apr 2011 18:32:23 +1000, Chris Angelico wrote: On Fri, Apr 15, 2011 at 6:25 PM, Peter Otten __pete...@web.de wrote: The initial data structure seems less than ideal. You might be able to replace it with a dictionary like {Keyword: [value_for_keyword_1, value_for_keyword_2, ...]}

Re: Pythonic infinite for loop?

2011-04-15 Thread Steven D'Aprano
On Fri, 15 Apr 2011 13:58:22 +1000, Chris Angelico wrote: The dictionary is potentially a lot larger than this particular set of values (it's a mapping of header:value for a row of a user-provided CSV file). Does this make a difference to the best option? (Currently I'm looking at likely

Re: Pythonic infinite for loop?

2011-04-15 Thread Roy Smith
In article 4da83f8f$0$29986$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: for key in dct: if key.startswith(Keyword): maxkey = max(maxkey, int(key[7:])) I would make that a little easier to read, and less prone to Did I count

Re: Pythonic infinite for loop?

2011-04-15 Thread Ethan Furman
Chris Angelico wrote: lst=[] for i in xrange(1,1000): # arbitrary top, don't like this try: lst.append(parse_kwdlist(dct[Keyword%d%i])) except KeyError: break Possibly overkill: import dbf table = dbf.from_csv(csvfile) # fields get names f0, f1, f2, ...

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-15 Thread Verde Denim
On Fri, Apr 15, 2011 at 5:00 AM, Aldo Ceccarelli ceccarelli.a...@gmail.comwrote: Hello All, in my specific problem I will be happy of a response where possible to: 1. distinguish different operating systems of answering nodes 2. collect responses of Wyse thin-clients with Thin OS to get

Re: Pythonic infinite for loop?

2011-04-15 Thread Chris Angelico
On Fri, Apr 15, 2011 at 10:52 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 15 Apr 2011 13:58:22 +1000, Chris Angelico wrote: The dictionary is potentially a lot larger than this particular set of values (it's a mapping of header:value for a row of a user-provided CSV

Re: Pythonic infinite for loop?

2011-04-15 Thread Paul Rubin
Chris Angelico ros...@gmail.com writes: This whole code is inside a loop that we took, in smoke testing, to a couple hundred million rows (I think), with the intention of having no limit at all. So this might only look at 60-100 headers, but it will be doing so in a tight loop. If you're

Questions about GIL and web services from a n00b

2011-04-15 Thread Chris H
So I'm in a startup where we are considering using python as our primary development language for all the wonderful reasons you would expect. However, I've had a couple of things come up from mentors and other developers that is causing me to rethink whether python is the right choice. I

genfromtxt and comment identifier

2011-04-15 Thread simona bellavista
Hi All, I have a problem with reading data from a file using genfromtxt of numpy module. I have prepared a minimal example similar to the ones presented in http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html#splitting-the-lines-into-columns The script is import numpy as np from

Re: Questions about GIL and web services from a n00b

2011-04-15 Thread Chris H
On 4/15/11 1:03 PM, Tim Wintle wrote: On Fri, 2011-04-15 at 12:33 -0400, Chris H wrote: 1. Are you sure you want to use python because threading is not good due to the Global Lock (GIL)? Is this really an issue for multi-threaded web services as seems to be indicated by the articles from a

Re: Questions about GIL and web services from a n00b

2011-04-15 Thread Tim Wintle
On Fri, 2011-04-15 at 12:33 -0400, Chris H wrote: 1. Are you sure you want to use python because threading is not good due to the Global Lock (GIL)? Is this really an issue for multi-threaded web services as seems to be indicated by the articles from a Google search? If not, how do you

Re: genfromtxt and comment identifier

2011-04-15 Thread Peter Otten
simona bellavista wrote: Hi All, I have a problem with reading data from a file using genfromtxt of numpy module. I have prepared a minimal example similar to the ones presented in http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html#splitting- the-lines-into-columns The

Re: Questions about GIL and web services from a n00b

2011-04-15 Thread Dan Stromberg
On Fri, Apr 15, 2011 at 9:33 AM, Chris H chris.humph...@windsorcircle.com wrote: 1. Are you sure you want to use python because threading is not good due to the Global Lock (GIL)?  Is this really an issue for multi-threaded web services as seems to be indicated by the articles from a Google

Re: [Mac OSX] TextWrangler run command not working properly

2011-04-15 Thread Jason Swails
On Thu, Apr 14, 2011 at 1:52 PM, Fabio oakw...@email.it wrote: Then, I started to use TexWrangler, and I wanted to use the shebang menu, and run command. I have the #! first line pointing to the 2.6 version. It works fine, as long as I don't import the libraries, in which case it casts an

Can Python control Thuderbird?

2011-04-15 Thread marceepoo
I want to control Mozilla Thunderbird using Python. Does anyone know if that is that possible? I would like to use Python to save email attachments to a specific directory, depending on the name of the sender, content in the email, etc.--- and to rename the attachment file -- and to save the

Is it possible to execute Python code from C++ without writing to a file?

2011-04-15 Thread Roger House
I'm a Python newbie who's been given a task requiring calls of Python code from a C++ program. I've tried various tutorials and dug into The Python/C API doc and the Extending and Embedding Python doc, but I haven't been able to answer this question: Is it possible in a C++ program to

Re: Is it possible to execute Python code from C++ without writing to a file?

2011-04-15 Thread Chris Angelico
On Sat, Apr 16, 2011 at 9:46 AM, Roger House rho...@sonic.net wrote: I'm a Python newbie who's been given a task requiring calls of Python code from a C++ program.  I've tried various tutorials and dug into The Python/C API doc and the Extending and Embedding Python doc, but I haven't been able

Re: Questions about GIL and web services from a n00b

2011-04-15 Thread Raymond Hettinger
Is the limiting factor CPU? If it isn't (i.e. you're blocking on IO to/from a web service) then the GIL won't get in your way. If it is, then run as many parallel *processes* as you have cores/CPUs (assuming you're designing an application that can have multiple instances running in

Re: Questions about GIL and web services from a n00b

2011-04-15 Thread David Cournapeau
On Sat, Apr 16, 2011 at 10:05 AM, Raymond Hettinger pyt...@rcn.com wrote: Is the limiting factor CPU? If it isn't (i.e. you're blocking on IO to/from a web service) then the GIL won't get in your way. If it is, then run as many parallel *processes* as you have cores/CPUs (assuming

Python IDE/text-editor

2011-04-15 Thread Alec Taylor
Good Afternoon, I'm looking for an IDE which offers syntax-highlighting, code-completion, tabs, an embedded interpreter and which is portable (for running from USB on Windows). Here's a mockup of the app I'm looking for: http://i52.tinypic.com/2uojswz.png Which would you recommend? Thanks in

Re: Python IDE/text-editor

2011-04-15 Thread Ben Finney
Alec Taylor alec.tayl...@gmail.com writes: I'm looking for an IDE which offers syntax-highlighting, code-completion, tabs, an embedded interpreter and which is portable (for running from USB on Windows). Either of Emacs URL:http://www.gnu.org/software/emacs/ or Vim URL:http://www.vim.org/ are

Re: Python IDE/text-editor

2011-04-15 Thread rusi
On Apr 16, 8:20 am, Alec Taylor alec.tayl...@gmail.com wrote: Good Afternoon, I'm looking for an IDE which offers syntax-highlighting, code-completion, tabs, an embedded interpreter and which is portable (for running from USB on Windows). Here's a mockup of the app I'm looking

Re: PYTHONPATH

2011-04-15 Thread harrismh777
Algis Kabaila wrote: Is PYTHONPATH a system variable that sets the path for several sessions and if so, where in the system is it? Do I need to create one for setting python path for several sessions? It can be, and there are lots of ways to accomplish what you want, some of which depends on

Re: Egos, heartlessness, and limitations

2011-04-15 Thread Littlefield, Tyler
And who pissed in Guido's punch bowl anyway? Why is he such an elitist now? Why can he not come over once and a while and rub shoulders with http://www.youtube.com/watch?v=FMEe7JqBgvg -- http://mail.python.org/mailman/listinfo/python-list

Re: Free software versus software idea patents

2011-04-15 Thread harrismh777
CM wrote: What was criticized was your approach, which seemed counter-productive, and so much so that it seemed like you are really advocating FOR software patents by discrediting the position against them. Oh, the thou protesteth too much argument... ... well, I can only say that none of us

Re: Python IDE/text-editor

2011-04-15 Thread TerrorBite Lion
On Apr 15, 11:20 pm, Alec Taylor alec.tayl...@gmail.com wrote: Good Afternoon, I'm looking for an IDE which offers syntax-highlighting, code-completion, tabs, an embedded interpreter and which is portable (for running from USB on Windows). Here's a mockup of the app I'm looking

Re: [OT] Free software versus software idea patents

2011-04-15 Thread harrismh777
geremy condra wrote: http://www.groklaw.net/articlebasic.php?story=2009151305785 This is not a proof. This is an argument. There's a very big difference. To be clear, this article makes basically the same mistake you do- you assume that a program is exactly equivalent to its

Re: Python IDE/text-editor

2011-04-15 Thread John Bokma
Ben Finney ben+pyt...@benfinney.id.au writes: Alec Taylor alec.tayl...@gmail.com writes: I'm looking for an IDE which offers syntax-highlighting, code-completion, tabs, an embedded interpreter and which is portable (for running from USB on Windows). Either of Emacs

Re: Python IDE/text-editor

2011-04-15 Thread Alec Taylor
Thanks, but non of the IDEs so far suggested have an embedded python interpreter AND tabs... a few of the editors (such as Editra) have really nice interfaces, however are missing the embedded interpreter... emacs having the opposite problem, missing tabs (also, selecting text with my mouse is

[issue11787] File handle leak in TarFile lib

2011-04-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached trivial patch to fix the issue. Needs tests. -- keywords: +easy, patch nosy: +ezio.melotti stage: - test needed Added file: http://bugs.python.org/file21668/issue11787.diff ___ Python

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Ezio Melotti wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: PEP 3147 says[0]: For backward compatibility, Python will still support pyc-only distributions, however it will only do so when the pyc file lives in the

[issue11849] ElementTree memory leak

2011-04-15 Thread Kaifeng Zhu
New submission from Kaifeng Zhu cafe...@gmail.com: I'm using xml.etree.ElementTree to parse large XML file, while the memory keep increasing consistently. You can run attached test script to reproduce it. From 'top' in Linux or 'Task Manager' in Windows, the memory usage of python is not

[issue11652] urlib{, 2} returns a pair of integers as the content-length value

2011-04-15 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: It is better to close this issue as it was a Server Error. Standard just says that when there two headers with different values, combine them comma separated as urllib2 does. Making special case exception for 'Content-Length' header when

[issue11849] ElementTree memory leak

2011-04-15 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Do you experience same issue with current versions of Python? (3.2 or 2.7) The package was upgraded in latest versions. -- nosy: +flox ___ Python tracker rep...@bugs.python.org

[issue11849] ElementTree memory leak

2011-04-15 Thread Kaifeng Zhu
Kaifeng Zhu cafe...@gmail.com added the comment: Yes. Just tested with Python 2.7 and 3.2 in Windows 7, the memory usage is still unexpected high after 'Done' is printed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11849

[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-04-15 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 7a693e283c68 by Senthil Kumaran in branch '2.7': Issue #11467: Fix urlparse behavior when handling urls which contains scheme http://hg.python.org/cpython/rev/7a693e283c68 -- nosy: +python-dev

[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-04-15 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 495d12196487 by Senthil Kumaran in branch '3.1': Issue #11467: Fix urlparse behavior when handling urls which contains scheme specific part only digits. http://hg.python.org/cpython/rev/495d12196487 --

[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-04-15 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Fixed this in all codelines. Thanks Santoso. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11467

[issue11819] '-m unittest' should not pretend it works on Python 2.5/2.6

2011-04-15 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: #6514 is to make `-m unittest` work run on 2.5/2.6. This bug is not to fix it, but to stop displaying confusing messages. It will be enough to exit with a message like: `-m unittest` call is not supported in Python 2.5/2.6 - use

[issue11819] '-m unittest' should not pretend it works on Python 2.5/2.6

2011-04-15 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: 2.5 / 2.6 are in security fix only mode. So this won't get fixed. Please don't reopen. -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread JoeKuan
New submission from JoeKuan kuan@gmail.com: a = (1970, 1, 1, 0, 59, 58, 0, 0, 0) time.mktime(a) -2.0 a = (1970, 1, 1, 0, 59, 59, 0, 0, 0) time.mktime(a) Traceback (most recent call last): File stdin, line 1, in module OverflowError: mktime argument out of range a = (1970, 1, 1, 1,

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11850 ___ ___ Python-bugs-list

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: JoeKuan wrote: New submission from JoeKuan kuan@gmail.com: a = (1970, 1, 1, 0, 59, 58, 0, 0, 0) time.mktime(a) -2.0 On Windows, you get an OverflowError for this tuple as well. a = (1970, 1, 1, 0, 59, 59, 0, 0, 0)

[issue11849] ElementTree memory leak

2011-04-15 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: I've tested a small variant of your script, on OSX. It seems to behave correctly (with 2.5, 2.6, 2.7 and 3.1). You can force Python to release memory immediately by calling gc.collect(). -- Added file:

[issue11849] ElementTree memory leak

2011-04-15 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: this is the output for 2.7.1: $ python2.7 issue11849_test.py *** Python 2.7.1 final --- PID STAT TIME SL RE PAGEIN VSZRSS LIM TSIZ %CPU %MEM COMMAND 0 2754 S+ 0:00.07 0 0 0 2441472 5372

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2011-04-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Do you think this should go in 3.1 too? -- versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5057 ___

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Ezio Melotti wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: Do you think this should go in 3.1 too? If the problem triggers there as well: Yes. Is the problem also visible on Python 2.7 ? -- title:

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2011-04-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Yes. The original report was for 2.6. I will apply the patch on all the 4 branches then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5057

[issue11849] ElementTree memory leak

2011-04-15 Thread kaifeng
kaifeng cafe...@gmail.com added the comment: Python 3.2 On Linux (CentOS 5.3) *** Python 3.2.0 final --- PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND 0 15116 pts/0S+ 0:00 1 1316 11055 6452 0.6 python3.2 issue11849_test.py 1 15116 pts/0S+ 0:02

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread JoeKuan
JoeKuan kuan@gmail.com added the comment: I don't think it is to do with the underlying C mktime. Because it works fine with 00:59:58 and 01:00:00, 1, Jan 1970. It is to do with some specific value -1 in the internal code of time.mktime Here is the C code. int main(int argc, char

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Isn't this a duplicate of issue1726687? -- nosy: +Alexander.Belopolsky title: mktime - OverflowError: mktime argument out of range - on very specific time - mktime - OverflowError: mktime argument out of range -

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: JoeKuan wrote: JoeKuan kuan@gmail.com added the comment: I don't think it is to do with the underlying C mktime. Because it works fine with 00:59:58 and 01:00:00, 1, Jan 1970. It is to do with some specific value -1 in the

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Isn't this a duplicate of issue1726687? Could be, but that patch is not yet in Python 2.7, since Python 2.7.1 was release in Nov 2010.

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: If we can rely on the versions field, OP is using python 2.6. I don't think this can be classified as a security issue, so it won't be appropriate to backport issue1726687 to 2.6. -- assignee: - belopolsky

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is a duplicate of #1726687 which is already fixed in Python 2.7 by 7a89f4a73d1a (Feb 15 2011): it will be part of 2.7.2. Only security vulnerabilities are fixed in Python 2.6, so I change the version field to 2.7 only.

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11850 ___ ___

[issue11787] File handle leak in TarFile lib

2011-04-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: LGTM. Is an automated test really needed, or just a manual run with a pydebug build? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11787

[issue11851] Flushing the standard input causes an error

2011-04-15 Thread Edzard Pasma
Changes by Edzard Pasma pasm...@concepts.nl: -- components: None nosy: pasm...@concepts.nl priority: normal severity: normal status: open title: Flushing the standard input causes an error type: behavior ___ Python tracker rep...@bugs.python.org

[issue11851] Flushing the standard input causes an error

2011-04-15 Thread Nadeem Vawda
New submission from Nadeem Vawda nadeem.va...@gmail.com: Could you provide more details on the problem? What version of Python did you encounter this error under? A short code fragment that triggers the error would also be useful. (I get no errors executing sys.stdin.flush() on 2.6.6 or 3.3)

[issue11787] File handle leak in TarFile lib

2011-04-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: An automated test would be better. It should be enough to create an invalid tar file, do something similar to the snippet in the first message, but checking that an error is raised and that all the files are closed anyway. --

[issue11819] '-m unittest' should not pretend it works on Python 2.5/2.6

2011-04-15 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: I need a why-python-suxx keyword to point people with dumb questions about why they should not use specific Python versions to a query that lists all sensitive issues for this specific version that won't be fixed due to security fix

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2011-04-15 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 3cffa2009a92 by Ezio Melotti in branch '2.7': Issue #5057: fix a bug in the peepholer that led to non-portable pyc files between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP chars (e.g. u\U00012345[0]).

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2011-04-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5057 ___

[issue11819] '-m unittest' should not pretend it works on Python 2.5/2.6

2011-04-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: At some point we have to draw the line, otherwise we would have to backport things to 2.3 and 2.4 too. We are already maintaining 4 branches (2.7, 3.1, 3.2, 3.3). -- ___ Python tracker

[issue11850] mktime - OverflowError: mktime argument out of range - on very specific time

2011-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Marc-Andre Lemburg wrote: Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Isn't this a duplicate of issue1726687? Could be,

[issue11851] Flushing the standard input causes an error

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

[issue11819] '-m unittest' should not pretend it works on Python 2.5/2.6

2011-04-15 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: I know. But stuff like this is necessary for proper release management and future planning. Using why-python-suxx per module ™ metric, it is possible to pinpoint badly designed parts that should be removed or replaced in Python4.

[issue11851] Flushing the standard input causes an error

2011-04-15 Thread Edzard Pasma
Edzard Pasma pasm...@concepts.nl added the comment: Hello, The error occured in the APSW shell, when using its .output command. Looking at the apsw source, it appears to perform a sys.stdin.flush() at that point. Trying this in the Python interpreto gives the same error: $ python Python

[issue828450] sdist generates bad MANIFEST on Windows

2011-04-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: setuptools sdist uses a wholly different machinery than distutils, so it’s a red herring. Have you tested that your patch does reproduce the bug? From the diff header, I see that you’ve patched your installed Python instead of using a

[issue10496] import site failed when Python can't find home directory (sysconfig._getuserbase)

2011-04-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It’s not just a try/except, it’s a behavior change: after the patch, paths returned by sysconfig may not be fully expanded paths. I would like Tarek to make a call on this. -- assignee: - tarek ___

[issue11843] distutils doc: duplicate line in table

2011-04-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the report; I’ll fix it when I get Internet access without port 22 blocked, or any committer interested in documentation can do it. -- ___ Python tracker rep...@bugs.python.org

[issue11844] Update json to upstream simplejson latest release

2011-04-15 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I am not sure anyone other that Bob Ippolito can contribute later versions of simplejson (or patches derived from those versions) to python. ISTM that simplejson distribution is covered by MIT license [1] which is not

[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-15 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- hgrepos: +19 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10932 ___ ___ Python-bugs-list mailing

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2011-04-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Good point about the extra parameter just pushing the problem one layer up the stack rather than completely solving the problem. However, on further reflection, I've realised that I really don't like having runpy import the threading module

[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks great, thanks. You haven’t addressed this part of my previous message: “I think the fix may be in the wrong place: You fixed sdist but not bdists. I think the root of the problem is in the manifest (distutils2) / filelist (distutils1)

[issue11843] distutils doc: duplicate line in table

2011-04-15 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 9e49f4d81f54 by Ezio Melotti in branch '2.7': #11843: remove duplicate line from table in distutil doc. http://hg.python.org/cpython/rev/9e49f4d81f54 New changeset 1d6e28df2fb7 by Ezio Melotti in branch '3.1': #11843: remove

[issue11843] distutils doc: duplicate line in table

2011-04-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Done, thanks for the report. -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker

[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-15 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: I was able to spend more time on that this afternoon. 'Got an unkillable diff(1) along the way which required me to force a cold reboot. Well. I attach a C version (11277.mmap.c) which i've used for testing. The file

  1   2   >