Eventlet 0.10 - bugfix release

2012-12-28 Thread Sergey Shepelev
Good news everyone! Eventlet 0.10 is officially released. http://pypi.python.org/pypi/eventlet/0.10.0 What is it? Eventlet is a concurrent networking library for Python that allows you to change how you run your code, not how you write it. Same robust, simple threaded code with powerful

ANN: Python Meeting Düsseldorf - 22.01.2013

2012-12-28 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Treffen

Re: learning curve

2012-12-28 Thread Terry Reedy
On 12/27/2012 8:20 PM, Verde Denim wrote: Just getting into Py coding and not understanding why this code doesn't seem to do anything - Part of your 'learning curve' should be learning to write informative subjects lines. The above says almost nothing. For this I suggest Problem with classes

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Yuvraj Sharma
Use IDLE -- http://mail.python.org/mailman/listinfo/python-list

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Andrew Berg
On 2012.12.28 00:51, Jamie Paul Griffin wrote: The benefit of the tmux client (terminal multiplexer) is that I can see all the screens at the same time and quickly switch between them. I believe Linux has screen(1) which does the same thing. tmux is generally easily available for Linux, and

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Chris Angelico
On Fri, Dec 28, 2012 at 8:52 PM, Andrew Berg bahamutzero8...@gmail.com wrote: On 2012.12.28 00:51, Jamie Paul Griffin wrote: The benefit of the tmux client (terminal multiplexer) is that I can see all the screens at the same time and quickly switch between them. I believe Linux has screen(1)

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Kwpolska
On Thu, Dec 27, 2012 at 9:01 PM, mogul morten.gulda...@gmail.com wrote: 'Aloha! Hello! I'm new to python, got 10-20 years perl and C experience, all gained on unix alike machines hacking happily in vi, and later on in vim. You are already awesome, Now it's python, and currently mainly on my

Re: Custom alphabetical sort

2012-12-28 Thread wxjmfauth
Le vendredi 28 décembre 2012 00:17:53 UTC+1, Ian a écrit : On Thu, Dec 27, 2012 at 3:17 PM, Terry Reedy tjre...@udel.edu wrote: PS Py 3.3 warranty: ~30% slower than Py 3.2 Do you have any actual timing data to back up that claim? If so, please give specifics, including build,

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread gst
Le jeudi 27 décembre 2012 21:01:16 UTC+1, mogul a écrit : 'Aloha! holà ! I'm new to python, got 10-20 years perl and C experience, all gained on unix alike machines hacking happily in vi, and later on in vim. About same than me, though I had not to use/work with perl for new projects,

email.message.Message - as_string fails

2012-12-28 Thread Helmut Jarausch
Hi, I'm trying to filter an mbox file by removing some messages. For that I use Parser= FeedParser(policy=policy.SMTP) and 'feed' any lines to it. If the mbox file contains a white line followed by '^From ', I do Msg= Parser.close() (lateron I delete the Parser and create a new one by Parser=

Python lists

2012-12-28 Thread Manatee
I read in this: ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', '490-1521-1-ND', ''] Then I need to convert it to this: [['C100', 'C117'], 'X7R 0.033uF 10% 25V 0603', '0603-C_L', '0603-C_N', '10',

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread python培训
too much ide for python PyCharm PyDev(Eclipse) Pyscripter Sublime Text TextMate UliPad Vim for beginner best choiceidle -- http://mail.python.org/mailman/listinfo/python-list

Facing issue with Python loggin logger for printing object value

2012-12-28 Thread Morten Engvoldsen
Hi Team, i am new to python and i am using python loggin for log the value of the object. Below is my code : class field: field_name = length = 0 type = 0 value = def __init__(self, field_name, length, type, value): self.field_name = field_name self.length =

Re: Python lists

2012-12-28 Thread Roy Smith
In article 8f5cfb99-d1d7-42d7-858a-89dd23cd5...@googlegroups.com, Manatee markri...@gsoftcon.com wrote: I read in this: ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', '490-1521-1-ND', '']

Re: Python lists

2012-12-28 Thread Manatee
On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: I read in this: ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', '490-1521-1-ND', ''] Then I need to convert it to this:

Re: how to detect the character encoding in a web page ?

2012-12-28 Thread python培训
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: how to detect the character encoding in a web page ? such as this page http://python.org/ first setup chardet import chardet #抓取网页html html_1 = urllib2.urlopen(line,timeout=120).read() #print html_1 mychar=chardet.detect(html_1) #print

ANN: Python Meeting Düsseldorf - 22.01.2013

2012-12-28 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Treffen

Source code of Windows installer for Python interactive interpreter

2012-12-28 Thread philip . a . molloy
I am writing a command-line application for Windows. I would like to review the Python source code to find out how to install my application so that it doesn't have to be called using the path and file name (i.e. being able to type `python` into the Command prompt, instead of

Re: Facing issue with Python loggin logger for printing object value

2012-12-28 Thread Dave Angel
On 12/28/2012 09:27 AM, Morten Engvoldsen wrote: Hi Team, i am new to python Welcome. and i am using python loggin for log the value of the object. Below is my code : class field: field_name = length = 0 type = 0 value = def __init__(self, field_name, length,

Meaning of `\newline` as escape sequence

2012-12-28 Thread Marco
Hi all, in the documentation: http://docs.python.org/3.3/reference/lexical_analysis.html the escape sequence `\newline` is expained as Backslash and newline ignored. What does it mean? Thanks in advance, M. -- Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Meaning of `\newline` as escape sequence

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 2:42 AM, Marco name.surn...@gmail.com wrote: Hi all, in the documentation: http://docs.python.org/3.3/reference/lexical_analysis.html the escape sequence `\newline` is expained as Backslash and newline ignored. What does it mean? It means this: foo = This is\ one

Re: Source code of Windows installer for Python interactive interpreter

2012-12-28 Thread Andrew Berg
On 2012.12.28 09:30, philip.a.mol...@gmail.com wrote: Is the Python directory (i.e. C:\Python33) assigned to the PATH variable using the Batch PATH built-in command? If so, where? As of Python 3.3, there is a py.exe in the system32 directory that launches the appropriate version of Python for

Re: Source code of Windows installer for Python interactive interpreter

2012-12-28 Thread Dave Angel
On 12/28/2012 10:30 AM, philip.a.mol...@gmail.com wrote: I am writing a command-line application for Windows. I would like to review the Python source code to find out how to install my application so that it doesn't have to be called using the path and file name (i.e. being able to type

Wrapping statements in Python in SPSS

2012-12-28 Thread alankrinsky
I am working with Python looping in SPSS. What are the limits for the for var1, var2, var3 in zip(Variable1, Variable2, Variable3): statement in the Python looping function within SPSS? I am getting an error message, I presume because of wrapping or length. Imagine the above statement, but

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 3:01 AM, alankrin...@gmail.com wrote: I am working with Python looping in SPSS. What are the limits for the for var1, var2, var3 in zip(Variable1, Variable2, Variable3): statement in the Python looping function within SPSS? I am getting an error message, I presume

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread alankrinsky
Chris, I tried placing in the format you suggested and received this error message: END PROGRAM. Traceback (most recent call last): File string, line 396, in module ValueError: incomplete format key On Friday, December 28, 2012 11:10:10 AM UTC-5, Chris Angelico wrote:

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Peter Otten
alankrin...@gmail.com wrote: I tried placing in the format you suggested and received this error message: END PROGRAM. Traceback (most recent call last): File string, line 396, in module ValueError: incomplete format key You seem to have a malformed format string. Example: Correct:

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 3:43 AM, alankrin...@gmail.com wrote: Chris, I tried placing in the format you suggested and received this error message: END PROGRAM. Traceback (most recent call last): File string, line 396, in module ValueError: incomplete format key I don't think the code I

Re: email.message.Message - as_string fails

2012-12-28 Thread Chris Rebert
On Dec 28, 2012 4:26 AM, Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote: Hi, I'm trying to filter an mbox file by removing some messages. For that I use Parser= FeedParser(policy=policy.SMTP) and 'feed' any lines to it. If the mbox file contains a white line followed by '^From ', I do

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread alankrinsky
I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue. Here is the full code from this section of the loop: for ( msr, brk, dmn, src, dspd1, dspd2, dspd3, dspd4, dspd5, dspd6, dspd7, dspd8, dspd9, dspd10, dspd11, dspd12,

Re: Python lists

2012-12-28 Thread Alex
Manatee wrote: On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: I read in this: ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', '490-1521-1-ND', ''] Then I need to

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Mitya Sirenef
On 12/28/2012 12:33 PM, alankrin...@gmail.com wrote: I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue. Here is the full code from this section of the loop: for ( msr, brk, dmn, src, dspd1, dspd2, dspd3, dspd4, dspd5, dspd6,

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Mitya Sirenef
On 12/28/2012 12:55 PM, Mitya Sirenef wrote: On 12/28/2012 12:33 PM, alankrin...@gmail.com wrote: I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue. Here is the full code from this section of the loop: for ( msr, brk, dmn,

issue with loggin

2012-12-28 Thread Morten Engvoldsen
Hi Dave, Thanks for looking into my issue. You cannot run the program since it is in Openerp where python is used as programming language. Here python 2.7 is used. Sorry i didn't mention all the detail. My program is able to write log for other message in the log file. here 'batch' is an object

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Mitya Sirenef
On 12/28/2012 01:05 PM, Mitya Sirenef wrote: On 12/28/2012 12:55 PM, Mitya Sirenef wrote: On 12/28/2012 12:33 PM, alankrin...@gmail.com wrote: I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue. Here is the full code from this

Re: learning curve

2012-12-28 Thread Verde Denim
On 12/27/2012 09:32 PM, alex23 wrote: On Dec 28, 11:20 am, Verde Denim tdl...@gmail.com wrote: Just getting into Py coding and not understanding why this code doesn't seem to do anything - Is that the sum total of your code? You're not showing any instantiation of your classes. Yes, as a

Re: issue with loggin

2012-12-28 Thread Dave Angel
On 12/28/2012 01:15 PM, Morten Engvoldsen wrote: Hi Dave, Thanks for looking into my issue. You cannot run the program since it is in Openerp where python is used as programming language. Here python 2.7 is used. Sorry i didn't mention all the detail. My program is able to write log for

Re: Facing issue with Python loggin logger for printing object value

2012-12-28 Thread Dave Angel
On 12/28/2012 09:27 AM, Morten Engvoldsen wrote: Hi Team, i am new to python and i am using python loggin for log the value of the object. Below is my code : class field: field_name = length = 0 type = 0 value = def __init__(self, field_name, length, type, value):

Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
When I use a config file things seem to work (in other projects), but for my current code I hoped to configure logging from Python. I distilled my problem down to the following test, which does not print anything. Please can someone explain why? I was expecting the module's logger to

Reverse Engineering of JFK Assassination Plan Featuring The Killer Queen

2012-12-28 Thread Betty fdffdfdsfdsfdsf
Interested in who really killed JFK? Who gave the orders? What famous movies and songs told you about it a long time ago? All details explained in 86-page pdf document available for free download at: http://jackieiskillerqueen.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
similarly, if i run the following, i see only done: from logging import DEBUG, root, getLogger if __name__ == '__main__': root.setLevel(DEBUG) getLogger(__name__).debug(hello world) print('done') -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Peter Otten
andrew cooke wrote: similarly, if i run the following, i see only done: from logging import DEBUG, root, getLogger if __name__ == '__main__': root.setLevel(DEBUG) getLogger(__name__).debug(hello world) print('done') You need a handler. The easiest way to get one

Gvim, bug or feature?

2012-12-28 Thread Pengfei Hao
When you are using gvim, the command line vim can not open a current directory os.py, do you think this is a bug or a feature? I like python and I like gvim, but the vim of gvim is now a python program , it will import module like os.py first in current directory, so any file the same name as

noob can't install python modules/scripts

2012-12-28 Thread lostguru
hi, I'm not that new to programming (java) but I'm a pathetic newbie when it comes to python. I just started learning today and I'm trying to install third-party modules/scripts (I don't know the difference at the moment) so that they'll work in python; namely, easy_install/pip/distribute and

Re: email.message.Message - as_string fails

2012-12-28 Thread Terry Reedy
On 12/28/2012 7:22 AM, Helmut Jarausch wrote: Hi, I'm trying to filter an mbox file by removing some messages. For that I use Parser= FeedParser(policy=policy.SMTP) and 'feed' any lines to it. If the mbox file contains a white line followed by '^From ', I do Msg= Parser.close() (lateron I

Re: Gvim, bug or feature?

2012-12-28 Thread Pengfei Hao
Sorry, this seems a temporary bug of gvim, and they already fix it, post closed. 2012/12/28 Pengfei Hao int...@gmail.com When you are using gvim, the command line vim can not open a current directory os.py, do you think this is a bug or a feature? I like python and I like gvim, but the vim

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Westley Martínez
On Thu, Dec 27, 2012 at 12:01:16PM -0800, mogul wrote: 'Aloha! I'm new to python, got 10-20 years perl and C experience, all gained on unix alike machines hacking happily in vi, and later on in vim. Now it's python, and currently mainly on my kubuntu desktop. Do I really need a real

Re: learning curve

2012-12-28 Thread Terry Reedy
On 12/28/2012 1:29 PM, Verde Denim wrote: On 12/27/2012 09:32 PM, alex23 wrote: On Dec 28, 11:20 am, Verde Denim tdl...@gmail.com wrote: Just getting into Py coding and not understanding why this code doesn't seem to do anything - Is that the sum total of your code? You're not showing any

Re: Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
On Friday, 28 December 2012 21:56:46 UTC-3, Peter Otten wrote: Other revolutionary ideas: read the docs http://docs.python.org/dev/howto/logging.html#logging-basic-tutorial ;) how do you think i knew about the root handler without reading the damn docs you condescending asshole? anyway,

Re: noob can't install python modules/scripts

2012-12-28 Thread lostguru
I guess I should add that the python installation is 64-bit as well thanks again! -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Dave Angel
On 12/28/2012 09:29 PM, andrew cooke wrote: On Friday, 28 December 2012 21:56:46 UTC-3, Peter Otten wrote: snip reading the damn docs you condescending *? You've made four posts this year to this forum, in two threads, to ask for help. In that same year, Peter Otten has voluntarily

cunfused why gevent block redis' socket request?

2012-12-28 Thread Tony Shao
GOAL:spawn a few greenlet worker deal with the data pop from redis (pop from redis and then put into queue) RUNNING ENV: ubuntu 12.04 PYTHON VER: 2.7 GEVENT VER: 1.0 RC2 REDIS VER:2.6.5 REDIS-PY VER:2.7.1 from gevent import monkey; monkey.patch_all() import gevent from gevent.pool import Group

Re: noob can't install python modules/scripts

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 17:45:56 -0800, lostguru wrote: using easy_install as an example, I downloaded the .py script the website told me to use for 64-bit installations, and ran it; The website? There's more than one website on the Internet. Which website are you referring to? What .py script

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 11:57:29 -0800, andrew cooke wrote: When I use a config file things seem to work (in other projects), but for my current code I hoped to configure logging from Python. I distilled my problem down to the following test, which does not print anything. Please can someone

Re: noob can't install python modules/scripts

2012-12-28 Thread lostguru
On Friday, December 28, 2012 11:12:19 PM UTC-5, Steven D'Aprano wrote: The website? There's more than one website on the Internet. Which website are you referring to? What .py script did you download? How did you run it? Details are important! sorry about that; I was using the

Re: Finding the name of a function while defining it

2012-12-28 Thread Tim Roberts
Abhas Bhattacharya abhasbhattachar...@gmail.com wrote: Now, for your questions: If i call one() and two() respectively, i would like to see one and two. I dont have much knowledge of lambda functions, neither am i going to use them, so that's something I cant answer. My point is not that these

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 16:41:20 -0800, andrew cooke wrote: similarly, if i run the following, i see only done: from logging import DEBUG, root, getLogger if __name__ == '__main__': root.setLevel(DEBUG) getLogger(__name__).debug(hello world) print('done') In Python

Re: pickle module doens't work

2012-12-28 Thread Tim Roberts
Omer Korat animus.partum.univer...@gmail.com wrote: So it means pickle doesn't ever save the object's values, only how it was created? You say that as though there were a difference between the two. There isn't. An object is just a dictionary of values. If you set an object member to a

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 1:02 PM, Westley Martínez aniko...@gmail.com wrote: I only use vim for everything. IDEs just seem to get in my way. I've just (like ten minutes ago) come across a perfect example of what makes an IDE useful. My mother maintains a collection of documents (book indexes,

[issue16793] Get rid of deprecated assertEquals etc in tests

2012-12-28 Thread Georg Brandl
Georg Brandl added the comment: And please don't commit cosmetic/cleanup changes to bugfix branches in the future. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16793

[issue16761] Fix int(base=X)

2012-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0266ba8e4c6 by Serhiy Storchaka in branch '2.7': Issue #16761: Raise TypeError when int() or long() called with base argument only. http://hg.python.org/cpython/rev/c0266ba8e4c6 New changeset e4ea38a92c4d by Serhiy Storchaka in branch '3.2':

[issue16761] Fix int(base=X)

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: When this patch is updated because of the commit for issue 16790, in 3.x can the edited test cases be moved to the top of the test class per the following comment (as appropriate)? I will do this in issue16784. In any case I am going to move a large part

[issue16761] Fix int(base=X)

2012-12-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why did you backport this change after being advised not to do it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16761 ___

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2012-12-28 Thread Ned Deily
Ned Deily added the comment: Andrew, comments to closed issues are usually ignored. I suggest you open a new issue about this. A quick glance suggests that the code for this feature is not in Python 3. It may be that it was lost when, during the 2.7 development cycle, it was decided to not

[issue16772] int() accepts float number base

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: I'd suggest leaving 3.2 and 3.3 as they are: the bug is fairly benign, but fixing it could break existing code unnecessarily. That's something that we should try hard not to do in a bugfix release. As to PyNumber_AsSsize_t() used instead

[issue16772] int() accepts float number base

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: The only difference with previous code is that now OverflowError raised for large bases instead of ValueError. Serhiy: can you clarify this remark? Where do you see the OverflowError? The current exception and message look fine to me, so maybe I'm

[issue16772] int() accepts float number base

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: I actually think this issue can be closed as fixed: Ah, whoops; I failed to understand Serhiy's comment about the still existing if (!PyLong_Check(obase)), which does indeed mean that the code *still* doesn't work for __index__-able types. Here's a fix for

[issue16772] int() accepts float number base

2012-12-28 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: serhiy.storchaka - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16772 ___

[issue16772] int() accepts float number base

2012-12-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: I actually think this issue can be closed as fixed: the current code looks fine to me, and I don't think the fix should be backported. How about backporting the tests? In addition to adding tests for the fix, Greg added more comprehensive tests for the

[issue16772] int() accepts float number base

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: Sure, I don't see any issue with backporting test_int_base_limits; that has little to do with this issue, though, so shouldn't prevent closing this one. I'll add a Misc/NEWS entry when I commit; not sure it's meaningful to add doc changes, since I the 3.2

[issue16772] int() accepts float number base

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: Patch including doc update. -- Added file: http://bugs.python.org/file28466/issue16772_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16772 ___

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-28 Thread Larry Hastings
New submission from Larry Hastings: The line declaring the function dbm.open looks like this: def open(file, flag='r', mode=0o666): The docstring for dbm.open looks like this: open(file, flag='r', mode=438) Obviously 438==0o666. But the author used the octal representation because

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-28 Thread Larry Hastings
Larry Hastings added the comment: (I was also considering proposing using annotations to tell the parser we want the original representation in the docstring, but I suspect that's a bad idea. That would instantly restrict the untamed frontier that is annotations.) --

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: It's an interesting idea. This sounds like the wrong solution to me, though: it's significant extra machinery to produce a solution that only fixes a small handful of cases; IOW, the benefit / cost ratio seems to small to make this worth it. E.g., apart

[issue16640] Less code under lock in sched.scheduler

2012-12-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: What is the point of having heapq.heappush under a lock if heapq.heappop in another method is not protected? The logic doesn't seem to make sense. -- ___ Python tracker rep...@bugs.python.org

[issue16379] SQLite error code not exposed to python

2012-12-28 Thread Daniel Shahaf
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net: -- nosy: +danielsh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16379 ___ ___

[issue16802] fileno argument to socket.socket() undocumented

2012-12-28 Thread Richard Oudkerk
New submission from Richard Oudkerk: The actual signature is socket.socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None) but the documented signature is socket.socket([family[, type[, proto]]]) Should the fileno argument be documented or is it considered an implementation

[issue16485] FD leaks in aifc module

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Of course. Thanks for point. It's my editor made wrong whitespace changes after block indent/unindent. hg diff shows this changes and I shouldn't miss this. I will review every patch before commit one more time. --

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Charles-François Natali
Charles-François Natali added the comment: A couple of years ago I conducted similar tests and it turned out that 64k was the best compromise: http://code.google.com/p/pyftpdlib/issues/detail?id=94 Twisted uses 128k. I'd be for using 64k and also change asynchat.async_chat.ac_*_buffer_size

[issue16791] itertools.chain.from_iterable doesn't stop

2012-12-28 Thread R. David Murray
R. David Murray added the comment: If it is a feature, then is it documented in the language reference and is this actually a bug in PyPy (it sounds like it is)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16791

[issue16486] Add context manager support to aifc module

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: fout.close() here is intentional no-op. This is a check that fout was closed properly (in contrary case close() should raise exception). Unfortunately there is no other way to test that fout was closed. -- ___

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-28 Thread R. David Murray
R. David Murray added the comment: I don't think you mean 'docstring'. A docstring is something a human writes in the source code. I presume you are actually talking about introspection of the signature here. Beyond that, I agree with Mark's comments. -- nosy: +r.david.murray

[issue16791] itertools.chain.from_iterable doesn't stop

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: It looks to me as though this has nothing to do with itertools In CPython 2.7: Python 2.7.3 |EPD 7.3-1 (32-bit)| (default, Apr 12 2012, 11:28:34) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type credits, demo or enthought for more information. b = [1] b

[issue16791] itertools.chain.from_iterable doesn't stop

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: And here's a non-infinite example where CPython and PyPy differ. Python 2.7.3 |EPD 7.3-1 (32-bit)| (default, Apr 12 2012, 11:28:34) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type credits, demo or enthought for more information. b = [1] b += (x+1 for x in

[issue16791] itertools.chain.from_iterable doesn't stop

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: Opened https://bugs.pypy.org/issue1355 for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16791 ___ ___

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: IMO no. asyncore.dispatcher_with_send should not exist in the first place as it basically is a castrated version of asynchat.async_chat with less capabilities. I'd say it's there only for an historical reason. Moving ac_*_buffer_size to asyncore.dispatcher

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: BTW, in case it saves anyone else some time, the current machinery is in Lib/pydoc.py, in the `TextDoc.docroutine` method. It uses inspect.getfullargspec to retrieve the information to format, though I guess using inspect.Signature would be the modern way to

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: Bah. s/inspect.Signature/inspect.signature/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16801 ___ ___

[issue16802] fileno argument to socket.socket() undocumented

2012-12-28 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16802 ___ ___

[issue13454] crash when deleting one pair from tee()

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point. Here is updated patch. -- Added file: http://bugs.python.org/file28467/itertools_tee_nonrecursive_clear_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13454

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree that 64K seems better here (on Linux). There is another problem with dispatcher_with_send: the buffering algorithm (both when appending and popping) is quadratic. You can easily observe it with your test script, when growing the DATA. async_chat looks

[issue16793] Get rid of deprecated assertEquals etc in tests

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry. I were understand that patches were approved by several core devs. This issue was created for fixing regression from issue16045, but then I saw yet some forgotten deprecated asserts. If you want, I will revert this additional changes in 2.7 and 3.3.

[issue16761] Fix int(base=X)

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I have not noticed your advice before I did commit (it took me a lot of time). Should I now revert my changes to 2.7, 3.2 and 3.3? -- ___ Python tracker rep...@bugs.python.org

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Charles-François Natali
Charles-François Natali added the comment: Alright, here's a simple patch bumping the buffers to 64K for asyncore and asynchat. There is another problem with dispatcher_with_send: the buffering algorithm (both when appending and popping) is quadratic. You can easily observe it with your

[issue16763] test_ssl with connect_ex don't handle unreachable server correctly

2012-12-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: support.transient doesn't help here since no exception is raised An exception can still be raised in do_handshake(), which is called when the connection succeeds. But, yes, it's otherwise useless. Note that I'm not sure that connect_ex returning None is

[issue16640] Less code under lock in sched.scheduler

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This heapq.heappop does applied to a copy of self._queue. Copying done under a lock. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___

[issue16772] int() accepts float number base

2012-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Serhiy: can you clarify this remark? Where do you see the OverflowError? The current exception and message look fine to me, so maybe I'm misunderstanding what you're talking about: Sorry, I have been confused (and confuse you) by the variety of PyLong_As*

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: But even in asynchat, there's a lot of copying going on, length computations performed twice in a row, etc. What/where do you mean exactly? I see little value in focusing efforts towards things such as initiate_with_send which are not supposed to be used

[issue12065] test_ssl failure when svn.python.org fails to resolve

2012-12-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3436769a7964 by Antoine Pitrou in branch '2.7': Backport Python 3.2 fix for issue #12065, and add another test for SSLSocket.connect_ex(). http://hg.python.org/cpython/rev/3436769a7964 -- ___ Python

[issue16799] switch regrtest from getopt options to argparse Namespace

2012-12-28 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16799 ___ ___

  1   2   >