ANN: pyCologne - next Meeting Wednesday, April 11, 2012, 6:30pm

2012-04-07 Thread Christopher Arndt
When the last Easter egg is eaten and the last chocolate Easter bunny nibbled to to bits, Pythonistas start looking for intellectual nourishment again. Luckily, the April meeting of pyCologne, the Python User Group Köln, is coming right up: When: Wednesday, April 11, 2012, 6:30pm Where:

Re: Reading Live Output from a Subprocess

2012-04-07 Thread Frank Millman
Dubslow buns...@gmail.com wrote: It's just a short test script written in python, so I have no idea how to even control the buffering (and even if I did, I still can't modify the subprocess I need to use in my script). What confuses me then is why Perl is able to get around this just fine

Re: Reading Live Output from a Subprocess

2012-04-07 Thread Nobody
On Fri, 06 Apr 2012 12:21:51 -0700, Dubslow wrote: It's just a short test script written in python, so I have no idea how to even control the buffering In Python, you can set the buffering when opening a file via the third argument to the open() function, but you can't change a stream's

Re: Learning new APIs/classes (beginner question)

2012-04-07 Thread Martin Jones
On Apr 7, 1:52 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: Sounds like this library is documented the same way most third party libraries are: as an afterthought, by somebody who is so familiar with the software that he cannot imagine why anyone might actually need

Multiprocessing Logging

2012-04-07 Thread Thibaut DIRLIK
Hi, I'm currently writing a multiprocess applications with Python 3.2 and multiprocessing module. My subprocesses will use a QueueHandler to log messages (by sending them to the main process, which uses a QueueListener). However, if logging is already configured when I create the subprocesses,

Python Training

2012-04-07 Thread Mohan kumar
Hi, We are an IT Training company located in Bangalore, Chennai and Coimbatore. We provide Python training with Placement Assistance. For more details, email to mo...@cgonsoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Training

2012-04-07 Thread Mohan kumar
On Apr 7, 2:21 pm, Mohan kumar mo...@cegonsoft.com wrote: Hi, We are an IT Training company located in Bangalore, Chennai and Coimbatore. We provide Python training with Placement Assistance. For more details, email to mo...@cgonsoft.com We also provide Online Training. --

Re: escaping/encoding/formatting in python

2012-04-07 Thread Chris Angelico
On Sat, Apr 7, 2012 at 3:36 PM, Nobody nob...@nowhere.com wrote: The delimiter can be chosen either by analysing the string or by choosing something a string at random and relying upon a collision being statistically improbable. The same techniques being available to MIME multi-part encoders,

Re: PEP 274

2012-04-07 Thread Rodrick Brown
This proposal was suggested in 2001 and is only now being implemented. Why the extended delay? Sent from my iPhone On Apr 7, 2012, at 3:32 AM, Alec Taylor alec.tayl...@gmail.com wrote: Has been withdrawn... and implemented http://www.python.org/dev/peps/pep-0274/ --

ordering with duck typing in 3.1

2012-04-07 Thread andrew cooke
hi, please, what am i doing wrong here? the docs say http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons in general, __lt__() and __eq__() are sufficient, if you want the conventional meanings of the comparison operators but i am seeing assert 2 three E

Re: Multiprocessing Logging

2012-04-07 Thread Thibaut
Le 07/04/2012 11:22, Thibaut DIRLIK a écrit : Hi, I'm currently writing a multiprocess applications with Python 3.2 and multiprocessing module. My subprocesses will use a QueueHandler to log messages (by sending them to the main process, which uses a QueueListener). However, if logging is

Distribute app without source?

2012-04-07 Thread Bill Felton
Thanks in advance for any insights! My partner and I have developed an application primarily intended for internal use within our company. However, we face the need to expose the app to certain non-employees. We would like to do so without exposing our source code. Our targets include users

Re: ordering with duck typing in 3.1

2012-04-07 Thread Thomas Rachel
Am 07.04.2012 14:23 schrieb andrew cooke: class IntVar(object): def __init__(self, value=None): if value is not None: value = int(value) self.value = value def setter(self): def wrapper(stream_in, thunk): self.value = thunk()

Re: Distribute app without source?

2012-04-07 Thread Andrew Berg
On 4/7/2012 8:07 AM, Bill Felton wrote: We are using Python 3.2 and tkinter. It appears, and limited testing bears out, that py2app, and presumably py2exe, are not options given lack of 3.x support. cx_Freeze supports Python 3.2. It works fine for my purposes, but I have not done any serious

Re: 'string_escape' in python 3

2012-04-07 Thread Nicholas Cole
On Sat, Apr 7, 2012 at 12:10 AM, Ian Kelly ian.g.ke...@gmail.com wrote: import codecs codecs.getdecoder('unicode_escape')(s)[0] 'Hello: this is a test' Cheers, Ian Thanks, Ian. I had assumed that if a unicode string didn't have a .decode method, then I couldn't use a decoder on it, so it

how i loved lisp cons and UML and Agile and Design Patterns and Pythonic and KISS and YMMV and stopped worrying

2012-04-07 Thread Xah Lee
OMG, how i loved lisp cons and macros and UML and Agile eXtreme Programing and Design Patterns and Anti-Patterns and Pythonic and KISS and YMMV and stopped worrying. 〈World Multiconference on Systemics, Cybernetics and Informatics???〉 http://xahlee.org/comp/WMSCI.html highly advanced plain text

Re: ordering with duck typing in 3.1

2012-04-07 Thread Rob Williscroft
andrew cooke wrote in news:33019705.1873.1333801405463.JavaMail.geo-discussion-forums@ynmm9 in gmane.comp.python.general: hi, please, what am i doing wrong here? the docs say http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons in general, __lt__() and __eq__() are

multithreading

2012-04-07 Thread Kiuhnm
I'm about to write my first module and I don't know how I should handle multithreading/-processing. I'm not doing multi-threading inside my module. I'm just trying to make it thread-safe so that users *can* do multi-threading. For instance, let's say I want to make this code thread-safe: ---

Re: ordering with duck typing in 3.1

2012-04-07 Thread John O'Hagan
On Sat, 7 Apr 2012 05:23:25 -0700 (PDT) andrew cooke and...@acooke.org wrote: hi, please, what am i doing wrong here? the docs say http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons in general, __lt__() and __eq__() are sufficient, if you want the conventional

Re: ordering with duck typing in 3.1

2012-04-07 Thread mwilson
Thomas Rachel wrote: Am 07.04.2012 14:23 schrieb andrew cooke: class IntVar(object): def __init__(self, value=None): if value is not None: value = int(value) self.value = value def setter(self): def wrapper(stream_in, thunk):

Re: Multiprocessing Logging

2012-04-07 Thread Vinay Sajip
Thibaut merwin.irc at gmail.com writes: Ok, I understand what happenned. In fact, configuring the logging before forking works fine. Subprocess inherits the configuration, as I thought. The problem was that I didn't passed any handler to the QueueListener constructor. The when the

Re: Multiprocessing Logging

2012-04-07 Thread Thibaut
Le 07/04/2012 16:47, Vinay Sajip a écrit : Thibautmerwin.ircat gmail.com writes: Ok, I understand what happenned. In fact, configuring the logging before forking works fine. Subprocess inherits the configuration, as I thought. The problem was that I didn't passed any handler to the

Let's have hex

2012-04-07 Thread cotpi
A hexual game: http://cotpi.com/letushavehex/1/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing Logging

2012-04-07 Thread Vinay Sajip
Thibaut merwin.irc at gmail.com writes: This is exactly what I wanted, it seems perfect. However I still have a question, from what I understood, I have to configure logging AFTER creating the process, to avoid children process to inherits the logging config. Unless there is a way to

Re: 'string_escape' in python 3

2012-04-07 Thread Ian Kelly
On Sat, Apr 7, 2012 at 8:30 AM, Nicholas Cole nicholas.c...@gmail.com wrote: On Sat, Apr 7, 2012 at 12:10 AM, Ian Kelly ian.g.ke...@gmail.com wrote: import codecs codecs.getdecoder('unicode_escape')(s)[0] 'Hello: this is a test' Cheers, Ian Thanks, Ian.  I had assumed that if a unicode

Re: PEP 274

2012-04-07 Thread Terry Reedy
On 4/7/2012 7:20 AM, Rodrick Brown wrote: This proposal was suggested in 2001 and is only now being implemented. Why the extended delay? It was implemented in revised form 3 years ago in 3.0. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-07 Thread goldtech
Thank you for the help. I guess I didn't understand what's really going on. I thought if I SSH even from a Linux to a Windows machine whatever I say on the SSH client command line would be the same as me doing a command on the DOS command-line in Windows. I incorrectly thought SSH is just a

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-07 Thread Andrew Berg
On 4/7/2012 11:59 AM, goldtech wrote: I thought if I SSH even from a Linux to a Windows machine whatever I say on the SSH client command line would be the same as me doing a command on the DOS command-line in Windows. I incorrectly thought SSH is just a tunnel for text... It gives you

Re: Distribute app without source?

2012-04-07 Thread Terry Reedy
On 4/7/2012 9:07 AM, Bill Felton wrote: Thanks in advance for any insights! My partner and I have developed an application primarily intended for internal use within our company. However, we face the need to expose the app to certain non-employees. We would like to do so without exposing

documentation for asyncmongo?

2012-04-07 Thread Laszlo Nagy
Is there any kind of API documentation for asyncmongo? On GITHub they say asyncmongo syntax strives to be similar to pymongo http://api.mongodb.org/python/current/api/pymongo/collection.html.. However, many basic things do not work or they are not similar.

ordering with duck typing in 3.1

2012-04-07 Thread Jon Clements
Any reason you can't derive from int instead of object? You may also want to check out functions.total_ordering on 2.7+ -- http://mail.python.org/mailman/listinfo/python-list

Re: multithreading

2012-04-07 Thread Bryan
Kiuhnm wrote: I'm about to write my first module and I don't know how I should handle multithreading/-processing. I'm not doing multi-threading inside my module. I'm just trying to make it thread-safe so that users *can* do multi-threading. There are a couple conventions to follow. Trying to

Re: Distribute app without source?

2012-04-07 Thread Bill Felton
On Apr 7, 2012, at 1:22 PM, Terry Reedy wrote: On 4/7/2012 9:07 AM, Bill Felton wrote: Thanks in advance for any insights! My partner and I have developed an application primarily intended for internal use within our company. However, we face the need to expose the app to certain

Re: multithreading

2012-04-07 Thread Kiuhnm
On 4/7/2012 22:09, Bryan wrote: For instance, let's say I want to make this code thread-safe: --- myDict = {} def f(name, val): if name not in myDict: myDict[name] = val return myDict[name] --- First, don't re-code Python's built-ins. The example is a job for

Re: multithreading

2012-04-07 Thread Adam Skutt
On Apr 7, 5:06 pm, Kiuhnm kiuhnm03.4t.yahoo.it wrote: On 4/7/2012 22:09, Bryan wrote: For instance, let's say I want to make this code thread-safe: --- myDict = {} def f(name, val):       if name not in myDict:           myDict[name] = val       return myDict[name] --- First,

Pass a list of variables to a procedure

2012-04-07 Thread KRB
Hi there, I would like to be able to pass a list of variables to a procedure, and have the output assigned to them. For instance: x=0 y=0 z=0 vars =[x,y,z] parameters=[1,2,3] for i in range(1,len(vars)): *** somefunction that takes the parameter 1, does a computation and assigns the output

Re: Pass a list of variables to a procedure

2012-04-07 Thread Chris Rebert
On Sat, Apr 7, 2012 at 2:15 PM, KRB alaga...@gmail.com wrote: Hi there, I would like to be able to pass a list of variables to a procedure, and have the output assigned to them. You cannot pass a variable itself to a function; you can only pass a variable's value. Which is to say that Python

Re: Pass a list of variables to a procedure

2012-04-07 Thread Nobody
On Sat, 07 Apr 2012 14:15:09 -0700, KRB wrote: I would like to be able to pass a list of variables to a procedure, and have the output assigned to them. Use a dictionary or an object. If the variables are globals (i.e. attributes of the current module), you can pass the result of globals()

Re: Why does this hang sometimes?

2012-04-07 Thread Jason Friedman
I am just playing around with threading and subprocess and found that the following program will hang up and never terminate every now and again. import threading import subprocess import time def targ():    p = subprocess.Popen([/bin/sleep, 2])    while p.poll() is None:        

Re: Pass a list of variables to a procedure

2012-04-07 Thread Keith Burns
Thank you, Chris! Sent from my iPhone On Apr 7, 2012, at 3:24 PM, Chris Rebert c...@rebertia.com wrote: On Sat, Apr 7, 2012 at 2:15 PM, KRB alaga...@gmail.com wrote: Hi there, I would like to be able to pass a list of variables to a procedure, and have the output assigned to them. You

Re: Multiprocessing Logging

2012-04-07 Thread Vinay Sajip
Thibaut merwin.irc at gmail.com writes: This is exactly what I wanted, it seems perfect. However I still have a question, from what I understood, I have to configure logging AFTER creating the process, to avoid children process to inherits the logging config. Unless there is a way to

Re: PEP 274

2012-04-07 Thread Alec Taylor
I have it in 2.7.3 On Sun, Apr 8, 2012 at 2:35 AM, Terry Reedy tjre...@udel.edu wrote: On 4/7/2012 7:20 AM, Rodrick Brown wrote: This proposal was suggested in 2001 and is only now being implemented. Why the extended delay? It was implemented in revised form 3 years ago in 3.0. -- Terry

Re: Python Gotcha's?

2012-04-07 Thread Tim Roberts
Roy Smith r...@panix.com wrote: There's absolutely no reason why JSON should follow Python syntax rules. No, but there certainly is a justification for expecting JAVASCRIPT Object Notation (which is, after all, what JSON stands for) to follow Javascript's syntax rules. And Javascript happens

Re: Python Gotcha's?

2012-04-07 Thread Chris Angelico
On Sun, Apr 8, 2012 at 1:47 PM, Tim Roberts t...@probo.com wrote: No, but there certainly is a justification for expecting JAVASCRIPT Object Notation (which is, after all, what JSON stands for) to follow Javascript's syntax rules.  And Javascript happens to follow the same quoting rules as

Re: Python Gotcha's?

2012-04-07 Thread John Nagle
On 4/4/2012 3:34 PM, Miki Tebeka wrote: Greetings, I'm going to give a Python Gotcha's talk at work. If you have an interesting/common Gotcha (warts/dark corners ...) please share. (Note that I want over http://wiki.python.org/moin/PythonWarts already). Thanks, -- Miki A few Python

Re: Python Gotcha's?

2012-04-07 Thread Chris Angelico
On Sun, Apr 8, 2012 at 2:01 PM, John Nagle na...@animats.com wrote: 4.  The syntax for expression-IF is just weird. Agreed. Putting an expression first feels weird; in every high level language I know of, the word if is followed by the condition, and then by what to do if true, and then what to

Re: Python Gotcha's?

2012-04-07 Thread Chris Angelico
On Sun, Apr 8, 2012 at 2:19 PM, Chris Angelico ros...@gmail.com wrote: Agreed. Putting an expression first feels weird; in every high level language I know of, the word if is followed by the condition, and then by what to do if true, and then what to do if false - not true, then condition,

Re: multithreading

2012-04-07 Thread Bryan
Kiuhnm wrote: My question is this: can I use 'threading' without interfering with the program which will import my module? Yes. The things to avoid are described at the bottom of: http://docs.python.org/library/threading.html On platforms without threads, 'import threading' will fail. There's

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-07 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'm still unclear about the rationale for this change. krisvale says in the patch and in msg109099 that this is to determine whether an object can be collected at this time. Is the intended usage that the result value may change over the

[issue14478] Decimal hashing very slow, could be cached

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I recommend that __hash__ should use functools.lru_cache for caching. Why would you do such a thing? A hash value is a single 64-bit slot, no need to add the memory consumption of a whole dictionary and the runtime cost of a LRU eviction

[issue14478] Decimal hashing very slow, could be cached

2012-04-07 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478 ___

[issue14310] Socket duplication for windows

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Any other comments? No, the patch looks ok now. Please watch the buildbots after you commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14310

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Jim: The edge case of collecting an object that is alone in a cycle is something that isn't handled. I'm also not sure that it is worth doing or even safe or possible. but that is beside the point and not the topic of this

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Btw. tangentially related to this discussion, issue 10576 aims to make the situation with uncollectable objects a little more bearable. An application can listen for garbage collection, visit gc.garbage and deal with its

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: err, is it possible to edit out those file paths? I don't know how to do that. If you want I can remove the message altogether. But I don't see anything confidential or exploitable in your message. -- nosy: +pitrou

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: jnoller - nosy: +sbt versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4892 ___

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Jerzy's latest patch looks ok to me. This is a slight behaviour change so I'm not sure it should go in 3.2/2.7. -- stage: - patch review versions: +Python 3.3 -Python 2.7, Python 3.1 ___ Python

[issue14520] Buggy Decimal.__sizeof__

2012-04-07 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: I'm not sure __sizeof__ is implemented correctly: from decimal import Decimal import sys d = Decimal(123456789123456798123456789123456798123456789123456798) d Decimal('123456789123456798123456789123456798123456789123456798')

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-04-07 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Hi David, I am sorry, I did not notice your second comment in this bug and later when you closed this, noticed the bug report. Yes, the default=None but actually pointing to a sentinel value is an odd duck and I believe the explanation

[issue14310] Socket duplication for windows

2012-04-07 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 51b4bddd0e92 by Kristján Valur Jónsson in branch 'default': Issue #14310: inter-process socket duplication for windows http://hg.python.org/cpython/rev/51b4bddd0e92 -- nosy: +python-dev

[issue14310] Socket duplication for windows

2012-04-07 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14310 ___

[issue14520] Buggy Decimal.__sizeof__

2012-04-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: It isn't implemented at all. The Python version also always returns 96, irrespective of the coefficient length. Well, arguably the coefficient is a separate object in the Python version: 96 sys.getsizeof(d._int) 212 For the C version

[issue14520] Buggy Decimal.__sizeof__

2012-04-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: In full: d = Decimal(1) sys.getsizeof(d) 96

[issue14478] Decimal hashing very slow, could be cached

2012-04-07 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: I recommend that __hash__ should use functools.lru_cache for caching. Why would you do such a thing? A hash value is a single 64-bit slot, no need to add the memory consumption of a whole dictionary and the runtime cost of a LRU

[issue14478] Decimal hashing very slow, could be cached

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I recommend that __hash__ should use functools.lru_cache for caching. Why would you do such a thing? A hash value is a single 64-bit slot, no need to add the memory consumption of a whole dictionary and the runtime cost of a LRU

[issue10576] Add a progress callback to gcmodule

2012-04-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Here is an updated patch, taking Jim's and Antoine's comments into account. Jim, I´d like to comment that I think the reason __del__ objects are uncollectable is more subtle than there being no defined order of calling the

[issue10576] Add a progress callback to gcmodule

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Uploaded another review. I also notice you didn't really address my point, since self.visit is still initialized too early. IMO it should be initialized after the first gc.collect() at the beginning of each test (not in setUp()). --

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-04-07 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Attached is issue3561.diff which adds a path option, off by default, as a feature to be installed. I've tested installation and un-installation with the feature both installed and not installed and it seems to work fine for me.

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread sbt
sbt shibt...@gmail.com added the comment: Jimbofbx wrote: def main(): from multiprocessing import Pipe, reduction i, o = Pipe() print(i); reduced = reduction.reduce_connection(i) print(reduced); newi = reduced[0](*reduced[1]) print(newi); newi.send(hi)

[issue13621] Unicode performance regression in python3.3 vs python3.2

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13621 ___ ___ Python-bugs-list

[issue13031] small speed-up for tarfile.py when unzipping tarballs

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13031 ___ ___ Python-bugs-list

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Having said all that I agree multiprocessing.reduction should be fixed. Maybe an enable_pickling_support() function could be added to register the necessary things with copyreg. Why not simply use ForkingPickler? --

[issue10408] Denser dicts and linear probing

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10408 ___ ___ Python-bugs-list

[issue14478] Decimal hashing very slow, could be cached

2012-04-07 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file25152/decimal_hash.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478

[issue14511] _static/opensearch.xml for Python 3.2 docs directs searches to 3.3 docs

2012-04-07 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7f123dec2731 by Georg Brandl in branch '3.2': Closes #14511: fix wrong opensearch link for 3.2 docs. http://hg.python.org/cpython/rev/7f123dec2731 New changeset 57a8a8f5e0bc by Georg Brandl in branch 'default':

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread sbt
sbt shibt...@gmail.com added the comment: ForkingPickler is only used when creating a child process. The multiprocessing.reduction module is only really intended for sending stuff to *pre-existing* processes. As things stand, after importing multiprocessing.reduction you can do something

[issue13126] find() slower than rfind()

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13126 ___ ___ Python-bugs-list

[issue12805] Optimizations for bytes.join() et. al

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12805 ___ ___ Python-bugs-list

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: ForkingPickler is only used when creating a child process. The multiprocessing.reduction module is only really intended for sending stuff to *pre-existing* processes. But ForkingPickler could be used in multiprocessing.connection, couldn't

[issue14478] Decimal hashing very slow, could be cached

2012-04-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le samedi 07 avril 2012 à 17:22 +, Raymond Hettinger a écrit : -- keywords: +patch Added file: http://bugs.python.org/file25152/decimal_hash.diff I think patching the C version of Decimal would be more useful :) --

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-07 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Fri, Apr 6, 2012 at 16:05, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: OK, -v/PYTHONVERBOSE is as done as it is going to be by me. Next up is (attempting) Windows registry stuff. After

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread James Hutchison
James Hutchison jamesghutchi...@gmail.com added the comment: @pitrou You can just delete my original post. I'll repost an edited version here for reference original post with paths removed: This is an issue for me (Python 3.2). I have a custom pool that sends arguments for a function call

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- Removed message: http://bugs.python.org/msg157702 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4892 ___

[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable

2012-04-07 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: uuids = set() for u in [uuid.uuid4() for i in range(1000)]: uuids.add(u) uuids = {uuid.uuid4() for i in range(1000)} However, I'm not sure of the legitimacy of replacement suitable for cryptographic

[issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11981 ___ ___ Python-bugs-list

[issue10376] ZipFile unzip is unbuffered

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10376 ___ ___ Python-bugs-list

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread sbt
sbt shibt...@gmail.com added the comment: But ForkingPickler could be used in multiprocessing.connection, couldn't it? I suppose so. Note that the way a connection handle is transferred between existing processes is unnecessarily inefficient on Windows. A background server thread (one per

[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-07 Thread mattip
New submission from mattip matti.pi...@gmail.com: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import math math.copysign(1., float('inf')) 1.0 math.copysign(1., float('-inf')) -1.0

[issue6972] zipfile.ZipFile overwrites files outside destination path

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6972 ___ ___ Python-bugs-list

[issue2824] zipfile to handle duplicate files in archive

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2824 ___ ___ Python-bugs-list

[issue14522] Avoid using DuplicateHandle() on sockets in multiprocessing.connection

2012-04-07 Thread sbt
New submission from sbt shibt...@gmail.com: In multiprocessing.connection on Windows, socket handles are indirectly duplicated using DuplicateHandle() instead the WSADuplicateSocket(). According to Microsoft's documentation this is not supported. This is easily avoided by using

[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-07 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is a near duplicate of issue7281. Most likely, copysign is behaving correctly, and it's already the float conversion that errs. For struct.pack('d', float('nan')), I get '\x00\x00\x00\x00\x00\x00\xf8\xff'; for -nan, I get

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-07 Thread sbt
sbt shibt...@gmail.com added the comment: There is a simpler way to do this on Windows. The sending process duplicates the handle, and the receiving process duplicates that second handle using DuplicateHandle() and the DUPLICATE_CLOSE_SOURCE flag. That way no server thread is necessary

[issue14522] Avoid using DuplicateHandle() on sockets in multiprocessing.connection

2012-04-07 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: What is the bug that this fixes? Can you provide a test case? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14522 ___

[issue6839] zipfile can't extract file

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6839 ___ ___ Python-bugs-list

[issue14522] Avoid using DuplicateHandle() on sockets in multiprocessing.connection

2012-04-07 Thread sbt
Changes by sbt shibt...@gmail.com: Removed file: http://bugs.python.org/file25153/mp_socket_dup.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14522 ___

[issue4844] ZipFile doesn't range check in _EndRecData()

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4844 ___ ___ Python-bugs-list

[issue10905] zipfile: fix arcname with leading '///' or '..'

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10905 ___ ___ Python-bugs-list

[issue14522] Avoid using DuplicateHandle() on sockets in multiprocessing.connection

2012-04-07 Thread sbt
sbt shibt...@gmail.com added the comment: What is the bug that this fixes? Can you provide a test case? The bug is using an API in a way that the documentation says is wrong/unreliable. There does not seem to be a classification for that. I have never seen a problem caused by using

[issue10614] ZipFile: add a filename_encoding argument

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10614 ___ ___ Python-bugs-list

  1   2   >