Twisted 11.1.0 Released

2011-11-18 Thread Thomas Hervé
On behalf of Twisted Matrix Laboratories, I am pleased to announce the release of Twisted 11.1. Highlights of the 185 tickets closed include: * The poll reactor as default where applicable, instead of select everywhere. * A new SSL implementation only relying on OpenSSL for cryptography,

[ANN] Data Plotting Library Dislin 10.2

2011-11-18 Thread Helmut Michels
Dear Python programmers, I am pleased to announce version 10.2 of the data plotting software Dislin. Dislin is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Several output formats are supported

useless python - term rewriter

2011-11-18 Thread Sean McIlroy
## term rewriter (python 3.1.1) def gettokens(string): spaced = string.replace('(',' ( ').replace(')',' ) ') return spaced.split() def getterm(tokens): if tokens[0] in '()': term = [] assert tokens[0] == '(' tokens.pop(0) while not tokens[0] == ')':

Re: Passing DLL handle as an argument (in Windows)

2011-11-18 Thread Ulrich Eckhardt
Am 18.11.2011 08:51, schrieb Pekka Kytölä: Is it possible to pass my own dll's (already loaded) handle as an argument to load/attach to the very same instance of dll? Thing is that I've done plugin (dll) to a host app and the SDK's function pointers are assigned once the dll is loaded in the

Re: What exactly is pass? What should it be?

2011-11-18 Thread Thomas Rachel
Am 18.11.2011 05:34 schrieb Dennis Lee Bieber: def _pass(*args): pass def long_running_process(arg1, arg2, arg_etc, report = _pass): result1 = do_stuff() report(result1) So this is a call to a function that just returns a None, which is dropped by the interpreter... I'm

Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Junfeng Hu
Hi All, I'm trying to leverage my core i5 to send more UDP packets with multiprocssing, but I found a interesting thing is that the socket.bind is always reporting 10048 error even the process didn't do anything about the socket. Here is the script import threading,socket,random,pp,os import

Re: Passing DLL handle as an argument (in Windows)

2011-11-18 Thread Pekka Kytölä
On Nov 18, 10:27 am, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Am 18.11.2011 08:51, schrieb Pekka Kytölä: Is it possible to pass my own dll's (already loaded) handle as an argument to load/attach to the very same instance of dll? Thing is that I've done plugin (dll) to a host

Re: How to insert my own module in front of site eggs?

2011-11-18 Thread Hans Mulder
On 18/11/11 03:58:46, alex23 wrote: On Nov 18, 11:36 am, Roy Smithr...@panix.com wrote: What if the first import of a module is happening inside some code you don't have access to? No import will happen until you import something. That would be the case if you use the '-S' command line

[ANN] Data Plotting Library Dislin 10.2

2011-11-18 Thread Helmut Michels
Dear Python programmers, I am pleased to announce version 10.2 of the data plotting software Dislin. Dislin is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Several output formats are supported

Re: Passing DLL handle as an argument (in Windows)

2011-11-18 Thread Pekka Kytölä
Hmm. Let me describe what is going a bit more carefully: What I build is a dll file that has exported function that gets called when the host application/dll loads my dll. In this function the function pointers to the actual SDK functions are fetched. After this my dll's registers some plugins

Re: What exactly is pass? What should it be?

2011-11-18 Thread MRAB
On 18/11/2011 04:34, Dennis Lee Bieber wrote: On Thu, 17 Nov 2011 18:18:11 -0800 (PST), John Ladasky lada...@my-deja.com declaimed the following in gmane.comp.python.general: I'm trying to write tidy, modular code which includes a long-running process. From time to time I MIGHT like to

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread Neil Cerutti
On 2011-11-18, W. eWatson wolftra...@invalid.com wrote: On 11/17/2011 4:24 PM, Steven D'Aprano wrote: On Thu, 17 Nov 2011 16:03:14 -0800, W. eWatson wrote: I have not found any successful way to get to IDLE. It's on on the right-click of a py menu, and, if I go the ...lib/idle.pyw, it fails

Re: Passing DLL handle as an argument (in Windows)

2011-11-18 Thread Ulrich Eckhardt
Am 18.11.2011 12:49, schrieb Pekka Kytölä: What I'd like to do is that after fetching those SDK function pointers I'd like to fire up .py/.pyc that snoops for possible plugins written in python and registers those plugins and callbacks and let them react to events. Obviously this python code

Dynamically Generate Methods

2011-11-18 Thread GZ
Hi, I have a class Record and a list key_attrs that specifies the names of all attributes that correspond to a primary key. I can write a function like this to get the primary key: def get_key(instance_of_record): return tuple(instance_of_record.__dict__[k] for k in key_attrs) However,

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Junfeng Hu
I did a test on linux, it works well, so the issue is related to os. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Chris Angelico
On Fri, Nov 18, 2011 at 9:23 PM, Junfeng Hu hujunf...@gmail.com wrote: Hi All, I'm trying to leverage my core i5 to send more UDP packets with multiprocssing, but I found a interesting thing is that the socket.bind is always reporting 10048 error even the process didn't do anything about the

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread W. eWatson
On 11/18/2011 5:11 AM, Neil Cerutti wrote: On 2011-11-18, W. eWatsonwolftra...@invalid.com wrote: On 11/17/2011 4:24 PM, Steven D'Aprano wrote: On Thu, 17 Nov 2011 16:03:14 -0800, W. eWatson wrote: I have not found any successful way to get to IDLE. It's on on the right-click of a py menu,

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Junfeng Hu
Thanks Yes, I had tried this before, so you could find that I comment the line sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) Here is the results. D:\Python testmythread2.py Traceback (most recent call last): File string, line 1, in module File

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Junfeng Hu
And actually ,the socket hadn't been used in this script. -- http://mail.python.org/mailman/listinfo/python-list

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread W. eWatson
On 11/17/2011 8:34 PM, Dennis Lee Bieber wrote: On Thu, 17 Nov 2011 08:55:36 -0800, W. eWatson wolftra...@invalid.com declaimed the following in gmane.comp.python.general: Months ago 2.5.2 stopped functioning on my Win7 PC, so a few days ago I uninstalled and installed. Same problem. If one

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread W. eWatson
On 11/17/2011 8:34 PM, Dennis Lee Bieber wrote: On Thu, 17 Nov 2011 08:55:36 -0800, W. eWatson wolftra...@invalid.com declaimed the following in gmane.comp.python.general: Months ago 2.5.2 stopped functioning on my Win7 PC, so a few days ago I uninstalled and installed. Same problem. If one

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Chris Angelico
On Sat, Nov 19, 2011 at 2:51 AM, Junfeng Hu hujunf...@gmail.com wrote: And actually ,the socket hadn't been used in this script. Doesn't matter that you haven't used it; you're binding to the port, that's what causes the 10048. I think the main problem is that you're trying to share sockets

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Junfeng Hu
Hi Chris. The socket only binded once. That's the problem I'm puzzleing, I think it may a bug of multiprocessing in windows, or something I missed. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Chris Angelico
On Sat, Nov 19, 2011 at 3:11 AM, Junfeng Hu hujunf...@gmail.com wrote: Hi Chris. The socket only binded once. That's the problem I'm puzzleing, I think it may a bug of multiprocessing in windows, or something I missed. I don't know how multiprocessing goes about initializing those

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread MRAB
On 18/11/2011 15:48, Junfeng Hu wrote: Thanks Yes, I had tried this before, so you could find that I comment the line sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) Here is the results. D:\Python testmythread2.py Traceback (most recent call last): File string, line 1, inmodule

Re: Dynamically Generate Methods

2011-11-18 Thread Jean-Michel Pichavant
GZ wrote: Hi, I have a class Record and a list key_attrs that specifies the names of all attributes that correspond to a primary key. I can write a function like this to get the primary key: def get_key(instance_of_record): return tuple(instance_of_record.__dict__[k] for k in key_attrs)

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread MRAB
On 18/11/2011 15:29, W. eWatson wrote: On 11/18/2011 5:11 AM, Neil Cerutti wrote: On 2011-11-18, W. eWatsonwolftra...@invalid.com wrote: On 11/17/2011 4:24 PM, Steven D'Aprano wrote: On Thu, 17 Nov 2011 16:03:14 -0800, W. eWatson wrote: I have not found any successful way to get to IDLE.

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread rusi
On Nov 18, 10:12 pm, MRAB pyt...@mrabarnett.plus.com wrote: On 18/11/2011 15:29, W. eWatson wrote: On 11/18/2011 5:11 AM, Neil Cerutti wrote: On 2011-11-18, W. eWatsonwolftra...@invalid.com wrote: On 11/17/2011 4:24 PM, Steven D'Aprano wrote: On Thu, 17 Nov 2011 16:03:14 -0800, W.

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread W. eWatson
On 11/18/2011 9:12 AM, MRAB wrote: On 18/11/2011 15:29, W. eWatson wrote: On 11/18/2011 5:11 AM, Neil Cerutti wrote: On 2011-11-18, W. eWatsonwolftra...@invalid.com wrote: On 11/17/2011 4:24 PM, Steven D'Aprano wrote: On Thu, 17 Nov 2011 16:03:14 -0800, W. eWatson wrote: I have not found

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread W. eWatson
On 11/18/2011 9:19 AM, rusi wrote: On Nov 18, 10:12 pm, MRABpyt...@mrabarnett.plus.com wrote: On 18/11/2011 15:29, W. eWatson wrote: On 11/18/2011 5:11 AM, Neil Cerutti wrote: On 2011-11-18, W. eWatsonwolftra...@invalid.com wrote: On 11/17/2011 4:24 PM, Steven D'Aprano wrote: On

Re: Dynamically Generate Methods

2011-11-18 Thread Duncan Booth
GZ zyzhu2...@gmail.com wrote: For example, if key_attrs=['A','B'], I want the generated function to be equivalent to the following: def get_key(instance_of_record): return (instance_of_record['A'],instance_of_record['B'] ) I realize I can use eval or exec to do this. But is there any

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread W. eWatson
On 11/17/2011 11:35 PM, Terry Reedy wrote: On 11/17/2011 7:03 PM, W. eWatson wrote: I have not found any successful way to get to IDLE. Use the start menu to start IDLE once. Then pin it to your taskbar. If you do not have STart/ all programs / Python / IDLE, then your installation is bad.

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread W. eWatson
On 11/17/2011 9:25 PM, Benjamin Kaplan wrote: On Thu, Nov 17, 2011 at 11:21 PM, W. eWatsonwolftra...@invalid.com wrote: On 11/17/2011 7:59 PM, Dave Angel wrote: On 11/17/2011 03:31 PM, W. eWatson wrote: On 11/17/2011 9:39 AM, John Gordon wrote: SNIP Can you add IDLE manually to the

Re: Dynamically Generate Methods

2011-11-18 Thread Ian Kelly
On Fri, Nov 18, 2011 at 7:51 AM, GZ zyzhu2...@gmail.com wrote: Hi, I have a class Record and a list key_attrs that specifies the names of all attributes that correspond to a primary key. I can write a function like this to get the primary key: def get_key(instance_of_record): return

Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread W. eWatson
Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same IDLE oddity that I've described. That is, if you right-click on a py file, do you see a choice for the

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread W. eWatson
On 11/18/2011 10:06 AM, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same IDLE oddity that I've described. That is, if you right-click on

Resources consumed by parent

2011-11-18 Thread Mihai Badoiu
How do I get the resources consumed by the parent process? getrusage() in the resource module seems to work only for self or the children processes. thanks, --mihai -- http://mail.python.org/mailman/listinfo/python-list

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread Stephen Hansen
On 11/17/11 8:34 PM, W. eWatson wrote: On 11/17/2011 7:04 PM, alex23 wrote: On Nov 18, 2:55 am, W. eWatsonwolftra...@invalid.com wrote: Comments? Are you using the vanilla installer or ActiveState's ActivePython? I find the latter integrates better with Windows. Also, out of curiousity,

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread Steven D'Aprano
On Fri, 18 Nov 2011 10:06:47 -0800, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same IDLE oddity that I've described. That is, if

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread W. eWatson
On 11/18/2011 3:44 PM, Steven D'Aprano wrote: On Fri, 18 Nov 2011 10:06:47 -0800, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread W. eWatson
On 11/18/2011 4:31 PM, W. eWatson wrote: On 11/18/2011 3:44 PM, Steven D'Aprano wrote: On Fri, 18 Nov 2011 10:06:47 -0800, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread MRAB
On 19/11/2011 00:50, W. eWatson wrote: On 11/18/2011 4:31 PM, W. eWatson wrote: On 11/18/2011 3:44 PM, Steven D'Aprano wrote: On Fri, 18 Nov 2011 10:06:47 -0800, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

2011-11-18 Thread Junfeng Hu
On Nov 18, 10:55 am, MRAB pyt...@mrabarnett.plus.com wrote: On 18/11/2011 15:48, Junfeng Hu wrote: Thanks Yes, I had tried this before, so you could find that I comment the line sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) Here is the results. D:\Python

Re: Data Plotting Library Dislin 10.2

2011-11-18 Thread sturlamolden
On 18 Nov, 22:16, Tony the Tiger t...@tiger.invalid wrote: Ya, but apparently no source unless you dig deep into your pockets. Really, why would we need this when we already have gnuplot? Just wondering... Dislin is a very nice plotting library for scientific data, particularly for scientists

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread Steven D'Aprano
On Fri, 18 Nov 2011 16:31:03 -0800, W. eWatson wrote: Somehow 3.3.2 doesn't look like 2.7.2. Oops, so you're right. Sorry for the noise. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread W. eWatson
... 3.3.2? I do not see that in his single message I found. I see a 3.2.2 release on http://www.python.org/download/releases/3.2.2/. Google shows me nothing for 3.3.2. I see: * Windows x86 MSI Installer (3.2.2) (sig) and Visual Studio debug information files (sig) * Windows X86-64 MSI

Re: Python 2.7.2 on Win7 and IDLE (Try it)

2011-11-18 Thread W. eWatson
On 11/18/2011 9:03 PM, W. eWatson wrote: ... 3.3.2? I do not see that in his single message I found. I see a 3.2.2 release on http://www.python.org/download/releases/3.2.2/. Google shows me nothing for 3.3.2. I see: * Windows x86 MSI Installer (3.2.2) (sig) and Visual Studio debug information

[issue13386] Document documentation conventions for optional args

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: From Ezio's original post: ''' If a function has optional arguments but it doesn't accept keyword arguments, the func([arg1]) notation is used instead. ... The notation func([arg=default]) should never be used, and func([arg]) should

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I found safe_repr() from Lib/unittest/util.py. The functions in Lib/unittest/util.py shouldn't be used outside unittest. We would require a similar function, just implemented in C. What is a good place to define such C helpers that

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Ezio Melotti wrote: You could start by adding it in the file where you need it. If it starts becoming useful elsewhere too, it can then be moved somewhere else. I would expect such function to be private, so we are free to move it whenever we

[issue13423] Ranges cannot be meaningfully compared for equality or hashed

2011-11-18 Thread Chase Albert
New submission from Chase Albert thaoe...@gmail.com: My expectation was that range(2,5) == range(2,5), and that they should hash the same. This is not the case. -- messages: 147838 nosy: rob.anyone priority: normal severity: normal status: open title: Ranges cannot be meaningfully

[issue13423] Ranges cannot be meaningfully compared for equality or hashed

2011-11-18 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: this was implemented with ticket #13201. It will be available in version 3.3. -- nosy: +flox resolution: - out of date stage: - committed/rejected status: open - closed superseder: - Implement comparison operators for range

[issue13424] Add examples for open’s new opener argument

2011-11-18 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: The new opener argument to open and TextIOWrapper closed two bugs on this tracker: using O_CLOEXEC and replacing the unofficial 'c' mode (O_CREATE). I think it’d be nice to have these as examples (maybe not in the docs of TextIOWrapper which

[issue12760] Add create mode to open()

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: See #13424 for a doc request about this. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12760 ___

[issue13424] Add examples for open’s new opener argument

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: s/TextIOWrapper/FileIO/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13424 ___ ___

[issue12797] io.FileIO and io.open should support openat

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: See #13424 for a doc request about this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12797 ___

[issue12780] Clean up tests for pyc/pyo in __file__

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Seems reasonable to me. When did/does unicodedata ever have a __file__ attribute? No idea. Maybe it has to do with static vs. dynamic linking? Or alternate VMs? -- ___ Python tracker

[issue2979] use_builtin_types in xmlrpc.server

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2979 ___ ___ Python-bugs-list

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached patch should solve the issue. -- assignee: - ezio.melotti keywords: +patch stage: test needed - commit review versions: +Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23721/issue13358.diff

[issue13294] http.server: HEAD request should not return a body

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hi Michele, long time no see :) Well, actually SimpleHTTPRequesthandler extends BaseHTTPHandler with basic do_GET and do_HEAD methods. Unittests for http.server shows that this behavior is intended, since: [snip] Not sure what this test

[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I did some tests, creating an element ('elem') that contains two adjacent text nodes ('text'). With my latest patch the prettyprint is: ?xml version=1.0 ? elem text text /elem Here both the text nodes are printed on a

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Stanisław Jankowski
New submission from Stanisław Jankowski stach.jankow...@gmail.com: http.client.HTTPMessage.getallmatchingheaders() always returns [] Python 3.2.2: Calling the code below does not give the expected result. sjankowski@sjankowski:~$ python3 Python 3.2.2rc1 (default, Aug 14 2011, 18:43:44) [GCC

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The problem seems to be in Lib/http/client.py:227. The code adds a ':' that is not found in the list of headers returned by self.keys(). -- nosy: +ezio.melotti ___ Python tracker

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13425 ___ ___ Python-bugs-list

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Nebelhom
New submission from Nebelhom nebel...@googlemail.com: -- Python v3.3a0 documentation The Python Standard Library 11. Data Persistence Section 11.1 pickle module #1 11.1.3. Module Interface exception pickle.UnpicklingError Error raised when there a problem

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Actually the headers are already parsed, so the code should use self.items() instead of self.keys(), check if the key (without ':') matches, and append the key-value pair to the list. Having a list of key-value pairs seems more useful than

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Please don't stress too much about providing an indication that the repr has been truncated - it's an error message, not part of the normal program output. Besides, the lack of a closing ')', ']', '}' or '' will usually indicate something is

[issue13427] string comparison with ==

2011-11-18 Thread Alan Beccati
New submission from Alan Beccati alan.becc...@gmail.com: Hello, did I discover a python string comparison bug or is this behaviour expected and I am doing something wrong? This is the code I run: for line in lines[4:]: currColl=line.split(:)[1].strip() print

[issue13427] string comparison with ==

2011-11-18 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: collName is probably not what you expect. You can print repr(collName), repr(currColl) to verify this. It is not a bug on Python side. -- nosy: +flox resolution: - works for me stage: - committed/rejected status: open -

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ce34e9223450 by Ezio Melotti in branch '2.7': #13426: fix typo in pickle doc. http://hg.python.org/cpython/rev/ce34e9223450 New changeset 1f31061afdaf by Ezio Melotti in branch '3.2': #13426: fix typos in pickle

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is fixed now, thanks for the report! Regarding #4, sqlite3 is included in the official installer provided for Windows, so that shouldn't be a problem. Regarding the output, I don't think is necessary to add it. The example is fairly

[issue13428] PyUnicode_FromFormatV: support width and precision for string codes, e.g %S and %R

2011-11-18 Thread Petri Lehtinen
New submission from Petri Lehtinen pe...@digip.org: Currently, the width and precision information for string codes are accepted but ignored. They should be used to pad short strings (width) and truncate long ones (precision), just like printf() (only in terms of code points rather than

[issue13349] Uninformal error message in index() and remove() functions

2011-11-18 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Nick Coghlan wrote: Please don't stress too much about providing an indication that the repr has been truncated - it's an error message, not part of the normal program output. Besides, the lack of a closing ')', ']', '}' or '' will usually

[issue13428] PyUnicode_FromFormatV: support width and precision for string codes, e.g %S and %R

2011-11-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #7330. -- nosy: +haypo resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13428

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

2011-11-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Issue #13428 has been marked as a duplicate of this issue. -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330

[issue13427] string comparison with ==

2011-11-18 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13427 ___ ___

[issue13426] Typos in pickle docs

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo title: The Python Standard Library 11. Data Persistence - Typos in pickle docs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13426

[issue13426] The Python Standard Library 11. Data Persistence

2011-11-18 Thread Nebelhom
Nebelhom nebel...@googlemail.com added the comment: Hi Ezio, Regarding the output, I don't think is necessary to add it. I left it in because of a discussion in core-mentorship, where they mentioned that it would be beneficial to have it in. I pasted the exchange below if you are interested.

[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is a new patch. -- Added file: http://bugs.python.org/file23722/issue6570-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570

[issue13125] test_all_project_files() expected failure

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13125 ___ ___ Python-bugs-list

[issue10772] Several actions for argparse arguments missing from docs

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10772 ___ ___ Python-bugs-list

[issue10772] Several actions for argparse arguments missing from docs

2011-11-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10772 ___ ___

[issue4508] distutils compiler not handling spaces in path to output/src files

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Ok, I found a similar problem with MMTK. I don’t know what that is. I am currently altering my distutils package to add a function called nt_quote_dir that adds quotes to paths with spaces and then applies it to each path if the platform

[issue13294] http.server: HEAD request should not return a body

2011-11-18 Thread Michele Orrù
Michele Orrù maker...@gmail.com added the comment: These tests shows how SimpleHTTPRequestHandler behaves: if the class contains a do_FOO method, it is called, otherwise error501 is raised. That's what Karl said with «Or to modify the library code that for any resources not yet defined.». Since

[issue13427] string comparison with ==

2011-11-18 Thread Alan
Alan alan.becc...@gmail.com added the comment: Using repr highlights the issue which lies in the behaviour of str.strip() which does not strip away null spaces as I would have expected: ' 'utm10\x00' ' == ' 'utm10' ' not equal Changing the code to: currColl=line.split(:)[1].strip().strip(\0)

[issue13420] newer() function in dep_util.py discard changes in the same second

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hi David. Thanks for reporting the issue. I have to warn you that there is a high bar for distutils changes; due to the mass of code out there that relies on undocumented internal behavior or works around old bugs, a feature freeze is in

[issue13427] string comparison with ==

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Nope, str.strip only strips whitespace, and \x00 is not considered whitespace: '\x00'.isspace() False -- nosy: +ezio.melotti resolution: works for me - invalid ___ Python tracker

[issue13294] http.server: HEAD request should not return a body

2011-11-18 Thread Michele Orrù
Michele Orrù maker...@gmail.com added the comment: As Ezio just pointed out, strip('\r\n') is still behaves differently from the previous code. Sorry for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13294

[issue13420] newer() function in dep_util.py discard changes in the same second

2011-11-18 Thread David Amian
David Amian dam...@emergya.com added the comment: sorry, I didn't explain well. I've a project, in the setup.py file, I've a function called update_prefix, that updates the 'path_project' variable with prefix arguments from setup.py If you runs setup.py with --prefix=/usr, then the file in

[issue13426] Typos in pickle docs

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Regarding the output, I don't think is necessary to add it. I left it in because of a discussion in core-mentorship, where they mentioned that it would be beneficial to have it in. Well, people can have diverging opinions. Terry’s was that

[issue13424] Add examples for open’s new opener argument

2011-11-18 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13424 ___ ___

[issue12779] Update packaging documentation

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I worked on this a bit more and the current boring diff has more than 1000 deleted lines and more than 1000 added lines. After thinking about it, maybe I should not make a mega-patch with markup/boring changes first but rather fix markup as

[issue13420] newer() function in dep_util.py discard changes in the same second

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I've a project, in the setup.py file, I've a function called update_prefix, that updates the 'path_project' variable with prefix arguments from setup.py If you runs setup.py with --prefix=/usr, then the file in

[issue4442] document immutable type subclassing via __new__

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4442 ___ ___ Python-bugs-list

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2011-11-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4395 ___ ___ Python-bugs-list

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-18 Thread sbt
sbt shibt...@gmail.com added the comment: Thanks again. Just a nit: the tests should be in MiscIOTest, since they don't directly instantiate the individual classes. Also, perhaps it would be nice to check that the exception's errno attribute is EAGAIN. Done. -- Added file:

[issue13388] document hg commit hooks in the devguide

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The commit details (including its changeset, branch and commit message) In Mercurial terminology, a changeset *is* a commit (or if you really want to make a distinction, a commit is the action that creates a changeset). I think you meant

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It's made my day. I get to boast at school now! You could do more of that if you got a patch committed! See http://docs.python.org/devguide and http://mail.python.org/mailman/listinfo/core-mentorship for more info if you’re interested.

[issue13292] missing versionadded for bytearray

2011-11-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for cleaning up the reports. I’m not a numbers person :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13292 ___

[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7262f8f276ff by Ezio Melotti in branch '2.7': #4147: minidom's toprettyxml no longer adds whitespace around a text node when it is the only child of an element. Initial patch by Dan Kenigsberg.

  1   2   >