RE: How to write fast into a file in python?

2013-05-18 Thread Fábio Santos
On 17 May 2013 19:38, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Think the following update will make the code more portable: x += len(line)+len(os.linesep)-1 Not sure if it's the fastest way to achieve that. :/ Putting len(os.linesep)'s value into a local variable will make

Please help with Threading

2013-05-18 Thread Jurgens de Bruin
This is my first script where I want to use the python threading module. I have a large dataset which is a list of dict this can be as much as 200 dictionaries in the list. The final goal is a histogram for each dict 16 histograms on a page ( 4x4 ) - this already works. What I currently do is

Re: Please help with Threading

2013-05-18 Thread Peter Otten
Jurgens de Bruin wrote: This is my first script where I want to use the python threading module. I have a large dataset which is a list of dict this can be as much as 200 dictionaries in the list. The final goal is a histogram for each dict 16 histograms on a page ( 4x4 ) - this already

python script is not running

2013-05-18 Thread Avnesh Shakya
hi, i want to run python script which generating data into json fromat, I am using crontab, but it's not executing... my python code-- try.py -- import json import simplejson as json import sys def tryJson(): saved = sys.stdout correctFile = file('data.json', 'a+') sys.stdout =

Re: how to run another file inside current file?

2013-05-18 Thread fjct...@gmail.com
subprocess? 发自我的小米手机 Avnesh Shakya avnesh.n...@gmail.com编写: hi, I want to run a another file inside a ached.add_cron_job(..). how is it possible, please help me, I have a file otherFile.py for execution inside current file. I know it is very easy question but i m unable to get

Re: How to write fast into a file in python?

2013-05-18 Thread 88888 Dihedral
Steven D'Aprano於 2013年5月18日星期六UTC+8下午12時01分13秒寫道: On Fri, 17 May 2013 21:18:15 +0300, Carlos Nepomuceno wrote: I thought there would be a call to format method by '%d\n' % i. It seems the % operator is a lot faster than format. I just stopped using it because I read it was going

Re: how to run another file inside current file?

2013-05-18 Thread Kevin Xi
Hi, It's better to specify version of python you work with. I know nothing about python 3 but in python 2 you can do this with `exec`. Example: f = file('otherFile.py') exec f For more, read the doc: http://docs.python.org/2.7/reference/simple_stmts.html#the-exec-statement HTH

Re: python script is not running

2013-05-18 Thread fjct...@gmail.com
make sure data.json is absolute path make sure you test it directly without crontab in the crontab, execute the script in such way, python scripty /tmp/log 21 check the log 发自我的小米手机 Avnesh Shakya avnesh.n...@gmail.com编写: hi, i want to run python script which generating data into json

Re: Please help with Threading

2013-05-18 Thread Jurgens de Bruin
I will post code - the entire scripts is 1000 lines of code - can I post the threading functions only? -- http://mail.python.org/mailman/listinfo/python-list

Re: Please help with Threading

2013-05-18 Thread Peter Otten
Jurgens de Bruin wrote: I will post code - the entire scripts is 1000 lines of code - can I post the threading functions only? Try to condense it to the relevant parts, but make sure that it can be run by us. As a general note, when you add new stuff to an existing longish script it is

Re: Two Dictionaries and a Sum!

2013-05-18 Thread Roy Smith
In article 6012d69f-b65e-4d65-90c4-f04876853...@googlegroups.com, Bradley Wright bradley.wright@gmail.com wrote: Confusing subject for a confusing problem (to a novice like me of course!) Thx for the help in advance folks I have (2) dictionaries: prices = { banana: 4,

Re: python script is not running

2013-05-18 Thread Chris Angelico
On Sat, May 18, 2013 at 8:12 PM, Avnesh Shakya avnesh.n...@gmail.com wrote: avin@hp:~$ crontab -e then type - */2 * * * * python /home/avin/data/try.py You may need to put an explicit path to your Python interpreter. Type: $ which python and put that into your crontab. ChrisA --

Re: python script is not running

2013-05-18 Thread Roy Smith
In article mailman.1801.1368883685.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Sat, May 18, 2013 at 8:12 PM, Avnesh Shakya avnesh.n...@gmail.com wrote: avin@hp:~$ crontab -e then type - */2 * * * * python /home/avin/data/try.py You may need to put an

Re: Please help with Threading

2013-05-18 Thread Dave Angel
On 05/18/2013 04:58 AM, Jurgens de Bruin wrote: This is my first script where I want to use the python threading module. I have a large dataset which is a list of dict this can be as much as 200 dictionaries in the list. The final goal is a histogram for each dict 16 histograms on a page (

Future standard GUI library

2013-05-18 Thread Beinan Li
Not sure if this is the right place to talk about this. Even less sure if I can move this discussion to tkinter list, so here I am... I know this may sound a silly question because no one can see the future. But ... Do you think tkinter is going to be the standard python built-in gui solution as

Fwd: Re: python script is not running

2013-05-18 Thread Vincent Vande Vyvre
Message original Sujet: Re: python script is not running Date : Sat, 18 May 2013 12:36:55 +0200 De :Vincent Vande Vyvre vincent.vandevy...@swing.be Pour : Avnesh Shakya avnesh.n...@gmail.com Le 18/05/2013 12:12, Avnesh Shakya a écrit : hi, i want to run python

Re: How to write fast into a file in python?

2013-05-18 Thread Chris Angelico
On Sat, May 18, 2013 at 5:49 PM, Fábio Santos fabiosantos...@gmail.com wrote: Putting len(os.linesep)'s value into a local variable will make accessing it quite a bit faster. But why would you want to do that? You mentioned \n translating to two lines, but this won't happen. Windows will not

Re: Future standard GUI library

2013-05-18 Thread Kevin Walzer
Hello, On 5/18/13 10:03 AM, Beinan Li wrote: I know this may sound a silly question because no one can see the future. But ... Do you think tkinter is going to be the standard python built-in gui solution as long as python exists? I don't see any significant clamoring among the Python core

Re: python script is not running

2013-05-18 Thread Terry Jan Reedy
On 5/18/2013 6:12 AM, Avnesh Shakya wrote: hi, i want to run python script which generating data into json fromat, I am using crontab, but it's not executing... my python code-- try.py -- import json import simplejson as json import sys def tryJson(): saved = sys.stdout

Re: how to run another file inside current file?

2013-05-18 Thread Terry Jan Reedy
On 5/18/2013 7:15 AM, Kevin Xi wrote: Hi, It's better to specify version of python you work with. Absolutely. I know nothing about python 3 but in python 2 you can do this with `exec`. Example: f = file('otherFile.py') exec f Py 2 has execfile that does the above. Py 3 do as above

RE: How to write fast into a file in python?

2013-05-18 Thread Carlos Nepomuceno
Python really writes '\n\r' on Windows. Just check the files. Internal representations only keep '\n' for simplicity, but if you wanna keep track of the file length you have to take that into account. ;) Date: Sat, 18 May 2013 08:49:55 +0100 Subject: RE: How

Re: python script is not running

2013-05-18 Thread woooee
The obvious question, do you have the shebang on the first line so the OS knows it's to be run as a Python program? Also I would change tryJson() to if __name__ == __main__': tryJson() This probably won't make any difference but you will have the bases covered. --

Re: python script is not running

2013-05-18 Thread Chris Angelico
On Sun, May 19, 2013 at 3:35 AM, woooee woo...@gmail.com wrote: The obvious question, do you have the shebang on the first line so the OS knows it's to be run as a Python program? That won't make any difference; the cron job specifically stipulates the interpreter. It just needs to be done with

SQLObject 1.4.0

2013-05-18 Thread Oleg Broytman
Hello! I'm pleased to announce version 1.4.0, the first stable release of branch 1.4 of SQLObject. What's new in SQLObject === Features Interface * Support for PostgreSQL 8.1 is dropped. The minimal supported version of PostgreSQL is 8.2 now. *

Re: python script is not running

2013-05-18 Thread Vincent Vande Vyvre
Le 18/05/2013 19:59, Chris Angelico a écrit : On Sun, May 19, 2013 at 3:35 AM, woooee woo...@gmail.com wrote: The obvious question, do you have the shebang on the first line so the OS knows it's to be run as a Python program? That won't make any difference; the cron job specifically stipulates

TypeError: unbound method add() must be called with BinaryTree instance as first argument (got nothing instead)

2013-05-18 Thread Dan Stromberg
I'm getting the error in the subject, from the following code: def add(self, key): Adds a node containing I{key} to the subtree rooted at I{self}, returning the added node. node = self.find(key) if not node: node.key = key

Re: TypeError: unbound method add() must be called with BinaryTree instance as first argument (got nothing instead)

2013-05-18 Thread Peter Otten
Dan Stromberg wrote: I'm getting the error in the subject, from the following code: def add(self, key): Adds a node containing I{key} to the subtree rooted at I{self}, returning the added node. node = self.find(key) if not node:

Re: How to write fast into a file in python?

2013-05-18 Thread Dan Stromberg
With CPython 2.7.3: ./t time taken to write a file of size 52428800 is 15.86 seconds time taken to write a file of size 52428800 is 7.91 seconds time taken to write a file of size 52428800 is 9.64 seconds With pypy-1.9: ./t time taken to write a file of size 52428800 is 3.708232

Re: How to write fast into a file in python?

2013-05-18 Thread Roy Smith
In article mailman.1813.1368904489.3114.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: tOn Sat, 18 May 2013 08:49:55 +0100, Fábio Santos fabiosantos...@gmail.com declaimed the following in gmane.comp.python.general: You mentioned \n translating to two lines, but

Re: TypeError: unbound method add() must be called with BinaryTree instance as first argument (got nothing instead)

2013-05-18 Thread Peter Otten
Dan Stromberg wrote: python 2.x, python 3.x and pypy all give this same error, though jython errors out at a different point in the same method. By the way, 3.x doesn't have unbound methods, so that should work. -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-18 Thread Terry Jan Reedy
On 5/18/2013 10:03 AM, Beinan Li wrote: Not sure if this is the right place to talk about this. It is. Even less sure if I can move this discussion to tkinter list, The idea of replacing tkinter is not about improving tkinter ;-). Do you think tkinter is going to be the standard python

Re: TypeError: unbound method add() must be called with BinaryTree instance as first argument (got nothing instead)

2013-05-18 Thread Terry Jan Reedy
On 5/18/2013 3:46 PM, Peter Otten wrote: Dan Stromberg wrote: python 2.x, python 3.x and pypy all give this same error, though jython errors out at a different point in the same method. By the way, 3.x doesn't have unbound methods, so that should work. It does for this example (3.3.1) c =

Re: How to write fast into a file in python?

2013-05-18 Thread Fábio Santos
On 18 May 2013 20:19, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: tOn Sat, 18 May 2013 08:49:55 +0100, Fábio Santos fabiosantos...@gmail.com declaimed the following in gmane.comp.python.general: You mentioned \n translating to two lines, but this won't happen. Windows will not mess

Re: Future standard GUI library

2013-05-18 Thread Steven D'Aprano
On Sat, 18 May 2013 10:03:02 -0400, Beinan Li wrote: Do you think tkinter is going to be the standard python built-in gui solution as long as python exists? Probably. I couldn't help but wonder if wx or PySide receives better py2 and py3 support, or anything else that prevent them from

Re: Future standard GUI library

2013-05-18 Thread Beinan Li
Thanks for the clarification, Kevin. It's nice to have a tk dev standing out :-) This more or less convinced me about the trend. I also agree that it would be probably a simpler and more maintainable way to write my own tk(inter) code than using any existing 3rd-party designers. Beinan On Sat,

Re: How to write fast into a file in python?

2013-05-18 Thread Steven D'Aprano
On Sat, 18 May 2013 15:14:31 -0400, Dennis Lee Bieber wrote: tOn Sat, 18 May 2013 08:49:55 +0100, Fábio Santos fabiosantos...@gmail.com declaimed the following in gmane.comp.python.general: You mentioned \n translating to two lines, but this won't happen. Windows will not mess with what

Re: python script is not running

2013-05-18 Thread Chris Angelico
On Sun, May 19, 2013 at 4:43 AM, Vincent Vande Vyvre vincent.vandevy...@swing.be wrote: Le 18/05/2013 19:59, Chris Angelico a écrit : On Sun, May 19, 2013 at 3:35 AM, woooee woo...@gmail.com wrote: The obvious question, do you have the shebang on the first line so the OS knows it's to be run

Re: Python for philosophers

2013-05-18 Thread 88888 Dihedral
Chris Angelico於 2013年5月14日星期二UTC+8上午12時24分44秒寫道: On Tue, May 14, 2013 at 12:53 AM, rusi rustompm...@gmail.com wrote: int fact(int n, int acc) { return !n? acc : fact(n-1,acc*n); } - When I run these, the C happily keeps giving answers

RE: Please help with Threading

2013-05-18 Thread Carlos Nepomuceno
To: python-list@python.org From: wlfr...@ix.netcom.com Subject: Re: Please help with Threading Date: Sat, 18 May 2013 15:28:56 -0400 On Sat, 18 May 2013 01:58:13 -0700 (PDT), Jurgens de Bruin debrui...@gmail.com declaimed the following in

Re: Python for philosophers

2013-05-18 Thread Chris Angelico
On Sun, May 19, 2013 at 9:56 AM, 8 Dihedral dihedral88...@googlemail.com wrote: Hey, ChisA, are you delibrately to write a recursive version to demonstrate the stack depth problem in Python? def fact(n): ret=1 if n1: # integer checking is not used but can be added for x in

Re: Please help with Threading

2013-05-18 Thread Chris Angelico
On Sun, May 19, 2013 at 10:02 AM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: I didn't know Python threads aren't preemptive. Seems to be something really old considering the state of the art on parallel execution on multi-cores. What's the catch on making Python threads preemptive?

mutable ints: I think I have painted myself into a corner

2013-05-18 Thread Cameron Simpson
TL;DR: I think I want to modify an int value in place. Yesterday I was thinking about various flag set objects I have floating around which are essentially bare objects whose attributes I access, for example: flags = object() flags.this = True flags.that = False and then elsewhere: if

Re: mutable ints: I think I have painted myself into a corner

2013-05-18 Thread Chris Angelico
On Sun, May 19, 2013 at 10:26 AM, Cameron Simpson c...@zip.com.au wrote: Before I toss this approach and retreat to my former object technique, does anyone see a way forward to modify an int subclass instance in place? (That doesn't break math, preferably; I don't do arithmetic with these

Re: mutable ints: I think I have painted myself into a corner

2013-05-18 Thread Cameron Simpson
On 19May2013 11:11, Chris Angelico ros...@gmail.com wrote: | On Sun, May 19, 2013 at 10:26 AM, Cameron Simpson c...@zip.com.au wrote: | Before I toss this approach and retreat to my former object | technique, does anyone see a way forward to modify an int subclass | instance in place? (That

Re: Python for philosophers

2013-05-18 Thread 88888 Dihedral
Chris Angelico於 2013年5月19日星期日UTC+8上午8時04分45秒寫道: On Sun, May 19, 2013 at 9:56 AM, 8 Dihedral dihedral88...@googlemail.com wrote: Hey, ChisA, are you delibrately to write a recursive version to demonstrate the stack depth problem in Python? def fact(n): ret=1 if

Re: How to write fast into a file in python?

2013-05-18 Thread Dave Angel
On 05/18/2013 01:00 PM, Carlos Nepomuceno wrote: Python really writes '\n\r' on Windows. Just check the files. That's backwards. '\r\n' on Windows, IF you omit the b in the mode when creating the file. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list

Re: Future standard GUI library

2013-05-18 Thread llanitedave
I'm curious about how commonly tkinter is actually used among Python app developers as compared to wx, Pyside, or PyQT. I get the impression that more distributed apps are built with wxPython, at least, than tkinter. My impression is far from actual knowledge, of course. --

Re: Please help with Threading

2013-05-18 Thread Cameron Simpson
On 19May2013 03:02, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: | Just been told that GIL doesn't make things slower, but as I | didn't know that such a thing even existed I went out looking for | more info and found that document: | http://www.dabeaz.com/python/UnderstandingGIL.pdf | |

RE: How to write fast into a file in python?

2013-05-18 Thread Carlos Nepomuceno
Date: Sat, 18 May 2013 22:41:32 -0400 From: da...@davea.name To: python-list@python.org Subject: Re: How to write fast into a file in python? On 05/18/2013 01:00 PM, Carlos Nepomuceno wrote: Python really writes '\n\r' on Windows. Just check the

Re: Python for philosophers

2013-05-18 Thread Michael Torrie
On 05/18/2013 08:30 PM, 8 Dihedral wrote: I am too lazy to write a factorial computations with primes here. Ahh, that's better. -- http://mail.python.org/mailman/listinfo/python-list

RE: How to write fast into a file in python?

2013-05-18 Thread Carlos Nepomuceno
Thanks Dan! I've never used CPython or PyPy. Will try them later. I think the main difference between your create_file_numbers_file_like() and the fastwrite5.py I sent earlier is that I've used cStringIO instead of StringIO. It took 12s less using cStringIO. My numbers are much greater, but

RE: How to write fast into a file in python?

2013-05-18 Thread Carlos Nepomuceno
BTW, I've downloaded from the following places: http://stromberg.dnsalias.org/svn/bufsock/trunk/bufsock.py http://stromberg.dnsalias.org/~dstromberg/backshift/documentation/html/python2x3-pysrc.html Are those the latest versions? From:

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-05-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17997 ___

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Replacement of pure-Python classes by C-accelerated classes is intentional. http://docs.python.org/3.3/library/xml.etree.elementtree.html Changed in version 3.3: This module will use a fast implementation whenever available. The

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: Removed file: http://bugs.python.org/file30301/ElementTree.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989 ___

[issue17973] '+=' on a list inside tuple both succeeds and raises an exception

2013-05-18 Thread Mark Dickinson
Mark Dickinson added the comment: Another 'fix' would be to allow assignment to a tuple item in the case that the item being assigned is the same (in the sense of 'is') as the item already in the tuple. Then the '+=' operation would succeed, but the tuple would remain immutable. --

[issue17998] internal error in regular expression engine

2013-05-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17998 ___

[issue17973] '+=' on a list inside tuple both succeeds and raises an exception

2013-05-18 Thread Mark Dickinson
Mark Dickinson added the comment: @andy.chugunov: tuples are immutable in the sense that you can't put a new object into a tuple or remove objects from a tuple. That doesn't mean that tuples can't contain mutable objects, or prevent you from mutating the objects inside a tuple. So the

[issue3489] add rotate{left,right} methods to bytearray

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think we can close. issue17100 would have been more useful actually. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3489 ___

[issue17975] libpython3.so conflicts between $VERSIONs

2013-05-18 Thread Patrick Welche
Patrick Welche added the comment: I see that this was introduced in http://www.python.org/dev/peps/pep-0384/ Would a configure option to make it easy not to install the conflicting file be acceptable? -- ___ Python tracker rep...@bugs.python.org

[issue3489] add rotate{left,right} methods to bytearray

2013-05-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think you rather need the inplace shift operation. Or even the move the tail of buffer to the start without filling the remaining. I.e. something like buffer[:size] = buffer[-size:] but without creating immediate bytes object. Now it may be written

[issue17975] libpython3.so conflicts between $VERSIONs

2013-05-18 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: See issue #11347. (Python ebuilds in Gentoo manually delete libpython3.so.) -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17975

[issue18005] faster modular exponentiation in some cases

2013-05-18 Thread Pernici Mario
New submission from Pernici Mario: A trivial optimization can be made in ``pow(a, b, c)`` if ``b`` is even and ``c - a a`` ``` In [1]: c = (1 100) + 1 In [2]: a = c - 1234567 In [3]: b = 2 In [4]: %timeit pow(a, b, c) 1 loops, best of 3: 3.03 s per loop In [5]: %timeit pow(c - a if c

[issue18005] faster modular exponentiation in some cases

2013-05-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +eric.smith, lemburg, mark.dickinson, rhettinger, serhiy.storchaka, stutzbach versions: +Python 3.4 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18005

[issue18005] faster modular exponentiation in some cases

2013-05-18 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry, I'm rejecting this. This sort of micro-optimization for a little-used operation doesn't belong in Python. For applications that need it, use gmpy2. -- resolution: - rejected status: open - closed ___

[issue18000] _md5 should be built if _ssl cannot be built

2013-05-18 Thread Volker Braun
Volker Braun added the comment: This has been fixed for Python-3.3 in #14693. Attached is a straightforward Python-2.7.5 backport of the patch. -- keywords: +patch nosy: +vbraun Added file: http://bugs.python.org/file30304/hashlibfallbacks.patch ___

[issue18006] Set thread nema in linux kernel

2013-05-18 Thread Марк Коренберг
New submission from Марк Коренберг: In linux (Since 2.6.9) we can use syscall prctl(PR_SET_NAME, Some thread name) to set thread name to the kernel. This thread is seen under this name in some process tool (like top, ps, pstree (have bug reported connected with this) and others). It will

[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit

2013-05-18 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17931 ___ ___

[issue18006] Set thread name in linux kernel

2013-05-18 Thread Марк Коренберг
Changes by Марк Коренберг socketp...@gmail.com: -- title: Set thread nema in linux kernel - Set thread name in linux kernel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18006 ___

[issue17975] libpython3.so conflicts between $VERSIONs

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Did you use make altinstall? -- nosy: +barry, dmalcolm, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17975 ___

[issue18004] test_list.test_overflow crashes Win64

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I take it you have more than 16GB of RAM? What happens if you replace sys.maxint with sys.maxsize in test_overflow? -- nosy: +arigo, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18004

[issue18004] test_list.test_overflow crashes Win64

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note: test_overflow can be found in Python2.7/Lib/test/test_list.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18004 ___

[issue17807] Generator cleanup without tp_del

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Obsoleted by PEP 442. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17807 ___

[issue18006] Set thread name in linux kernel

2013-05-18 Thread R. David Murray
R. David Murray added the comment: This is effectively a duplicate of issue 5672. Are you interested in carrying through the process outlined there by Martin? Otherwise we should close this issue as well until someone does propose to do so. -- nosy: +r.david.murray versions:

[issue18004] test_list.test_overflow crashes Win64

2013-05-18 Thread Armin Rigo
Changes by Armin Rigo ar...@users.sourceforge.net: -- nosy: -arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18004 ___ ___ Python-bugs-list

[issue18006] Set thread name in linux kernel

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd also point out that changing the kernel thread name *by default* would be pretty much a large regression. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18006

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- assignee: - eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989 ___ ___

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, I don't this is a bug: match_hostname() expects str data, and therefore IDNA-decoded domain names: bxn--gtter-jua.example.de.decode(idna) 'götter.example.de' Doing the matching on the decoded domain name should be safe. Then it very much depends on

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: Yes, overwriting the Python classes with C classes is not an error, but the original issue is legit. The error should be more immediately reported. -- ___ Python tracker rep...@bugs.python.org

[issue15758] FileIO.readall() has worst case O(n^2) complexity

2013-05-18 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15758 ___

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-05-18 Thread Christian Heimes
Christian Heimes added the comment: It's called internationalized domain name for APPLICATIONS. ;) It's up to the application to interpret the ASCII text as IDNA encoded FQDNs. As far as I know DNS, SSL's CNAME and OS interfaces etc. always use ASCII labels. It's an elegant solution. Just the

[issue17980] CVE-2013-2099 ssl.match_hostname() trips over crafted wildcard names

2013-05-18 Thread Christian Heimes
Christian Heimes added the comment: The IDNA RFC contains additional rules for wildcard matching ... very well hidden indead! http://tools.ietf.org/html/rfc6125#section-6.4.3 -- ___ Python tracker rep...@bugs.python.org

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: The problem is that element_setattro is returning a wrong value for error - NULL instead of -1. So the exception is set and is triggered on the next line instead. Will fix for 3.3 and default branches -- ___ Python

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989 ___ ___

[issue18002] AMD64 Windows7 SP1 3.x buildbot: compilation of _ssl module fails, the build fails

2013-05-18 Thread Jeremy Kloth
Jeremy Kloth added the comment: The build of OpenSSL was failing due to an incomplete external check-in of OpenSSL (missing the cached assembler files). Martin has since updated the external and I have refreshed the OpenSSL exports on the buildbot. It is no longer failing to compile, but

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9682241dc8fc by Eli Bendersky in branch '3.3': Issue #17989: element_setattro returned incorrect error value. http://hg.python.org/cpython/rev/9682241dc8fc New changeset b111ae4f83ef by Eli Bendersky in branch 'default': Issue #17989:

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: Fixed. Thanks for the report! Python 3.4.0a0 (default:1b760f926846+9682241dc8fc+, May 18 2013, 07:52:49) [GCC 4.6.3] on linux Type help, copyright, credits or license for more information. import xml.etree.ElementTree as ET; j = ET.Element('j') j.ham = 2

[issue17989] ElementTree.Element broken attribute setting

2013-05-18 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989 ___

[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-18 Thread Eli Bendersky
Eli Bendersky added the comment: These compatibility names are likely to be remnants from the out-of-tree xml etree implementation before it made it into the stdlib. I think they can simply be removed in 3.4, as they're not documented anywhere. --

[issue18007] CookieJar expects request objects with origin_req_host attribute instead of method

2013-05-18 Thread Simon Nicolussi
New submission from Simon Nicolussi: A fix for a DeprecationWarning (#17678) had the unfortunate side effect of changing the expected interface of the request object higher up in the call stack. For example, the documentation for CookieJar.add_cookie_header(request) states that the request

[issue18008] python33-3.3.2 Parser/pgen: Permission denied

2013-05-18 Thread William Moreno
New submission from William Moreno: cc -DNDEBUG -O2 -pipe -fno-strict-aliasing -pthread -pthread Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o

[issue17980] CVE-2013-2099 ssl.match_hostname() trips over crafted wildcard names

2013-05-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset b9b521efeba3 by Antoine Pitrou in branch '3.2': Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099). http://hg.python.org/cpython/rev/b9b521efeba3 New changeset

[issue17980] CVE-2013-2099 ssl.match_hostname() trips over crafted wildcard names

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, this should be fixed now. Thanks a lot for reporting! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's called internationalized domain name for APPLICATIONS. ;) It's up to the application to interpret the ASCII text as IDNA encoded FQDNs. As far as I know DNS, SSL's CNAME and OS interfaces etc. always use ASCII labels. It's an elegant solution. Just

[issue18002] AMD64 Windows7 SP1 3.x buildbot: compilation of _ssl module fails, the build fails

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the heads-up. Closing. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18002 ___

[issue3489] add rotate{left,right} methods to bytearray

2013-05-18 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3489 ___

[issue17953] sys.modules cannot be reassigned

2013-05-18 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Documentation added for sys.modules -- keywords: +patch nosy: +Yogesh.Chaudhari Added file: http://bugs.python.org/file30305/issue17953.patch ___ Python tracker rep...@bugs.python.org

[issue17998] internal error in regular expression engine

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps it would be safer to revert the original commit in bugfix branches, and just commit the better patch in default? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17998

[issue17975] libpython3.so conflicts between $VERSIONs

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: According to Martin on the bug linked to: « Having the soname be libpython3 is the whole point of the library, it serves no other reason. It is intentional that there are file collisions with that file, and either the local admin or the distributor must make

[issue17975] libpython3.so conflicts between $VERSIONs

2013-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: (on the bug Arfrever linked to, sorry) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17975 ___ ___

  1   2   >