Qdb: a small simple remote client/server debugger, released

2012-01-14 Thread Mariano Reingart
FYI Just released Qdb, a small simple remote client/server debugger based on Bdb (Pdb style), wich could be used from a remote terminal to any server (and in the near future, with a nice visual IDE): http://code.google.com/p/rad2py/wiki/QdbRemotePythonDebugger It uses

Re: SMTPHandler and Unicode

2012-01-14 Thread Chris Withers
Hi Norbert, On 05/07/2010 13:22, norbert wrote: On 5 juil, 13:17, Chris Withersch...@simplistix.co.uk wrote: try MailingLogger: If you have unicode problems with that, I'd be interested in fixing them! Your package has the same unicode problem : import logging,logging.handlers from

Re: understanding a program project

2012-01-14 Thread Richard Shea
On Jan 14, 9:29 am, Tracubik affdfsdfds...@b.com wrote: Hi all, i hope not to be too much OT with this request. I'ld like to modify/contribute some open source in python, but first i've to read and understand the code. So, is there some guide lines / procedure to follow to help me in this

Re: SMTPHandler and Unicode

2012-01-14 Thread Chris Withers
On 13/01/2012 20:17, Chris Withers wrote: Your package has the same unicode problem : import logging,logging.handlers from mailinglogger.MailingLogger import MailingLogger mailingLogger = MailingLogger(mailhost=('smtp.example.com', 25),fromaddr='t...@example.com',toaddrs=('t...@example.com',))

Re: logging and httphandler

2012-01-14 Thread Peter Otten
Jason Friedman wrote: I am logging to my Apache web server, using this Apache format: LogFormat %{%Y-%m-%d %H:%M:%S}t %U %q scriptlog CustomLog /var/log/apache2/script.log scriptlog My code is as follows: #!/usr/bin/env python3 import logging, logging.handlers, sys logger =

Re: Hash stability

2012-01-14 Thread Peter Otten
Steven D'Aprano wrote: On the Python Dev mailing list, there is a discussion going on about the stability of the hash function for strings. How many people rely on hash(some_string) being stable across Python versions? Does anyone have code that will be broken if the string hashing

Re: ERROR:root:code for hash md5 was not found

2012-01-14 Thread Marc Christiansen
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 13 Jan 2012 06:14:50 -0800, mike wrote: pysibelius is a lib that we use. I am not sure that is the problem since the python program works on SuSE but not on RH server. And AFAIK the only difference ( well that I can see) is

Re: Zealotry [was Re: how to install lxml in window xp?]

2012-01-14 Thread Noah Hall
On Sat, Jan 14, 2012 at 2:39 AM, Terry Reedy tjre...@udel.edu wrote: On 1/13/2012 3:42 PM, Noah Hall wrote: On Fri, Jan 13, 2012 at 8:07 PM, Tamer Higazith9...@googlemail.com  wrote: dear people! I have just opened my MTU client, and figured out that through my comment, i caused a complete

scientific notation in legend (pylab)

2012-01-14 Thread simona bellavista
Hi, I I would like to have numbers expressed in scientific notation in legend annotations. Does anybody know how to do that? Cheers, S. -- http://mail.python.org/mailman/listinfo/python-list

Can someone explain 2to3?

2012-01-14 Thread Joshua Miller
Ok i'm trying to convert https://github.com/rdeaton/spyral to python3 but i'm at a loss on how to actually use 2to3. Can someone explain it's proper use to me so i can do the conversion? prefereably where i can take C:\Python32\Lib\site-packages\spyral\ and put it in a new directory that i will

Re: Can someone explain 2to3?

2012-01-14 Thread Noah Hall
On Sat, Jan 14, 2012 at 5:06 PM, Joshua Miller millej...@gmail.com wrote: Ok i'm trying to convert https://github.com/rdeaton/spyral to python3 but i'm at a loss on how to actually use 2to3. Can someone explain it's proper use to me so i can do the conversion? prefereably where i can take

Re: open office in another language?

2012-01-14 Thread Dotan Cohen
Enjoy this relevant article: http://developers.slashdot.org/story/12/01/14/008236/code-cleanup-culls-libreoffice-cruft Dotan Cohen http://what-is-what.com/what_is/open_office.html -- http://mail.python.org/mailman/listinfo/python-list

PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
The interface for these modules is not intuitive. Instead of creating true OOP objects we have lists and strings. Any calendar object should expose string names of both: days of the week and months of the year. It seems one (or possibly more) of the three expose this important info however i

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Devin Jeanpierre
On Sat, Jan 14, 2012 at 1:54 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: The interface for these modules is not intuitive. Instead of creating true OOP objects we have lists and strings. Any calendar object should expose string names of both: days of the week and months of the year.

Re: Can someone explain 2to3?

2012-01-14 Thread Noah Hall
On Sat, Jan 14, 2012 at 7:08 PM, Joshua Miller millej...@gmail.com wrote: I've looked there and it didn't worki may've made all the nesscary changes manually anyways though i'm not sure... What about it didn't work? Have a read of this too - http://wiki.python.org/moin/PortingPythonToPy3k

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 1:01 pm, Devin Jeanpierre jeanpierr...@gmail.com wrote: What's horrendous about the datetime module interface? Your listed complaints (OOP etc.) don't seem to have anything to do with it. Well my immediate complaint about date-time is actually a problem with the syntactic quandaries

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Devin Jeanpierre
On Sat, Jan 14, 2012 at 2:23 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: THAT PISSES ME OFF!!! :( We should never be forced to guess if a name is a callable or a variable! So how do we solve this dilemma you ask??? Well, we need to mark method OR variable names (OR both!) with

defining class and subclass in C

2012-01-14 Thread Daniel Franke
Hi all. I spent some days and nights on this already and my google-fu is running out. I'd like to implement the equivalent of this Python code in a C-extension: class A(object): ... pass class B(A): ... pass A class '__main__.A' B class '__main__.B' B.__bases__ (class '__main__.A',)

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 1:23 pm, Rick Johnson rantingrickjohn...@gmail.com wrote:   def $method(self):pass   self.@instanceveriable   self.@@classvariable Actually, class level methods can be accessed through ClassIdentifier.method, and instance methods through instanceidentifier.instancemethod. So

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Chris Angelico
On Sun, Jan 15, 2012 at 6:23 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: Observe:  def $method(self):pass  self.@instanceveriable  self.@@classvariable Are you deliberately inverting what PHP does, with $variablename? (Incidentally, that's one of the things that irks me about PHP -

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Evan Driscoll
On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: On Sat, Jan 14, 2012 at 2:23 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: THAT PISSES ME OFF!!!:( We should never be forced to guess if a name is a callable or a variable! So how do we solve this dilemma you ask??? Well, we need to mark

Re: Hash stability

2012-01-14 Thread Heiko Wundram
Am 14.01.2012 10:46, schrieb Peter Otten: Steven D'Aprano wrote: How many people rely on hash(some_string) being stable across Python versions? Does anyone have code that will be broken if the string hashing algorithm changes? Nobody who understands the question ;) Erm, not exactly true.

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 2:58 pm, Evan Driscoll edrisc...@wisc.edu wrote: On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: It also has some problems. For instance, if an object has a member which is a type that implements __call__ but is also useful to access on its own, is that a field or a function? Can

Re: defining class and subclass in C

2012-01-14 Thread Daniel Franke
On Saturday 14 January 2012 22:15:36 Daniel Franke wrote: Here I'd expect class 'ca.ca' instead?! And I never managed a proper subclass :| Found an explanation on type/class at [1]: he difference between the two is whether the C-level type instance structure is flagged as having been

Re: Hash stability

2012-01-14 Thread Chris Angelico
On Sat, Jan 14, 2012 at 3:42 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On the Python Dev mailing list, there is a discussion going on about the stability of the hash function for strings. How many people rely on hash(some_string) being stable across Python versions? Does

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Chris Angelico
On Sun, Jan 15, 2012 at 10:19 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Jan 14, 2:58 pm, Evan Driscoll edrisc...@wisc.edu wrote: On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: It also has some problems. For instance, if an object has a member which is a type that implements

Re: defining class and subclass in C

2012-01-14 Thread Tim Roberts
Daniel Franke franke.dan...@gmail.com wrote: I'd like to implement the equivalent of this Python code in a C-extension: class A(object): ... pass class B(A): ... pass A class '__main__.A' B class '__main__.B' B.__bases__ (class '__main__.A',) However, loading my C-code (quoted below) I

Re: Two questions about logging

2012-01-14 Thread Matthew Pounsett
On Jan 12, 8:03 pm, K Richard Pixley r...@noir.com wrote: Here's the confusion.  Each log named __name__ is under the root logger.   If you want them all, then catch them all with the root logger. Thanks! I knew I was missing something obvious. Between you and Jean- Michael Pichavant I've

Re: Hash stability

2012-01-14 Thread Roy Smith
In article 4f1107b7$0$29988$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On the Python Dev mailing list, there is a discussion going on about the stability of the hash function for strings. How many people rely on hash(some_string) being

mechanize can't get address

2012-01-14 Thread contro opinion
here is my code # -*- coding: gbk -*- import mechanize import cookielib target=http://v.163.com/movie/2008/10/O/Q/M7F57SUCS_M7F5R3DOQ.html; # Browser br = mechanize.Browser() # Cookie Jar cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) # Browser options br.set_handle_equiv(True)

Re: scientific notation in legend (pylab)

2012-01-14 Thread Jason Friedman
I I would like to have numbers expressed in scientific notation in legend annotations. Does anybody know how to do that? Not sure why legend annotations makes the problem different, but perhaps this is a start: $ python3 Python 3.2 (r32:88445, Jun 11 2011, 10:38:04) [GCC 4.4.3] on linux2 Type

why i can get nothing?

2012-01-14 Thread contro opinion
here is my code : import urllib import lxml.html down='http://download.v.163.com/dl/open/00DL0QDR0QDS0QHH.html' file=urllib.urlopen(down). read() root=lxml.html.document_fromstring(file) tnodes = root.xpath(//a/@href[contains(string(),'mp4')]) for i,add in enumerate(tnodes): print i,add why

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 10:54:57 -0800, Rick Johnson wrote: The interface for these modules is not intuitive. Instead of creating true OOP objects we have lists and strings. Lists and strings are true OOP objects. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Hash stability

2012-01-14 Thread Terry Reedy
On 1/14/2012 9:26 PM, Roy Smith wrote: Steven D'Apranosteve+comp.lang.pyt...@pearwood.info wrote: How many people rely on hash(some_string) being stable across Python versions? Does anyone have code that will be broken if the string hashing algorithm changes? I would never rely on

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 11:23:29 -0800, Rick Johnson wrote: On Jan 14, 1:01 pm, Devin Jeanpierre jeanpierr...@gmail.com wrote: What's horrendous about the datetime module interface? Your listed complaints (OOP etc.) don't seem to have anything to do with it. Well my immediate complaint about

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 14:58:26 -0600, Evan Driscoll wrote: On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: On Sat, Jan 14, 2012 at 2:23 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: THAT PISSES ME OFF!!!:( We should never be forced to guess if a name is a callable or a variable! So

Learn Chinese (Mandarin) faster by using flashcards with pictures

2012-01-14 Thread ichineseflashcards 3
http://www.ichineseflashcards.com will help you learn Chinese (Mandarin) faster by using flashcards with pictures, thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 10:23 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: This is not Java, and we prefer Python terminology. A variable holding an int is an int variable. A variable holding a string is a string variable. A variable holding a list is a list variable. A variable

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 21:27:32 -0800, Rick Johnson wrote: On Jan 14, 10:23 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: This is not Java, and we prefer Python terminology. A variable holding an int is an int variable. A variable holding a string is a string variable. A

Extension module question

2012-01-14 Thread Evan Driscoll
As I hinted at in an earlier email, I'm working on a module which will allow calling readdir() (and FindFirstFile on Windows, hopefully pretty uniformly) from Python. The responses I got convinced me that it was a good idea to write a C-to-Python bridge as an extension module. What I'm not sure

[issue13642] urllib incorrectly quotes username and password in https basic auth

2012-01-14 Thread Joonas Kuorilehto
Joonas Kuorilehto jones...@derbian.fi added the comment: Also adding a patch that may be enough to fix the problem in python3.2. Review needed, did not test more than passing the previously failed unit test. -- Added file:

[issue6774] socket.shutdown documentation: on some platforms, closing one half closes the other half

2012-01-14 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: This is questionable, unexpected, and should be documented. There's already this note at the top of the socket module documentation: Note Some behavior may be platform dependent, since calls are made to the operating system socket

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4fc5dfad766a by Senthil Kumaran in branch '3.2': Issue13726 - Fix the ambiguous -S flag in regrtest. It is -o/--slow for printing the 10 slowest test. http://hg.python.org/cpython/rev/4fc5dfad766a New changeset

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: I add -o as a short form for --slow. regrtest was using getopt and this conflicting option was not caught. I see it is a bug than a feature so the change is made in 3.2 and 3.3 default: b84f61fdcb4c and 6797e7458ad0 Thanks for catching

[issue12760] Add create mode to open()

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8bcbe2dc3835 by Charles-François Natali in branch 'default': Issue #12760: Refer to the new 'x' open mode as exclusive creation mode. http://hg.python.org/cpython/rev/8bcbe2dc3835 --

[issue13642] urllib incorrectly quotes username and password in https basic auth

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 80e3b8de4edd by Senthil Kumaran in branch '3.2': Fix Issue #13642: Unquote before b64encoding user:password during Basic Authentication. http://hg.python.org/cpython/rev/80e3b8de4edd New changeset 4b4029fc8cf2 by

[issue13642] urllib incorrectly quotes username and password in https basic auth

2012-01-14 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Here we go! I thought the problem did not exist in py3k, but good that the tests caught them and we have a fix now. Thanks for the complete patch, Joonas. I hope it was easy to port the patch to 3k. The encoding part may perhaps be the

[issue13766] explain the relationship between Lib/lib2to3/Grammar.txt and Grammar/Grammar

2012-01-14 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13766 ___ ___ Python-bugs-list

[issue13784] Documentation of xml.sax.xmlreader: Locator.getLineNumber() and Locator.getColumnNumber()

2012-01-14 Thread patrick vrijlandt
New submission from patrick vrijlandt patrick.vrijla...@gmail.com: Problem: Locator methods return the location where the event starts, not where it ends. Locator line numbers start at 1, Locator column numbers can be 0. Proposal: Adapt documentation. From the docs: Instances of Locator

[issue13642] urllib incorrectly quotes username and password in https basic auth

2012-01-14 Thread Joonas Kuorilehto
Joonas Kuorilehto jones...@derbian.fi added the comment: Updating the issue with version 3.2 tag since it was fixed there as well. Still fixed, of course. You are correct that the encodings can be tricky. Luckily I only added coding to tests. But you're right, I would consider very carefully

[issue12760] Add create mode to open()

2012-01-14 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Thanks, I've committed your version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12760 ___

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Erno Tukia
Erno Tukia erno.tu...@iki.fi added the comment: --start requires an argument but short opt -S does not. in Lib/test/regrtest.py opts, args = getopt.getopt(sys.argv[1:], '...S...', [..., 'start=', ...]) Patch included. -- keywords: +patch Added file:

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Erno Tukia
Changes by Erno Tukia erno.tu...@iki.fi: -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13726 ___ ___

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c4919642fd25 by Senthil Kumaran in branch '3.2': Fix issue13726: -S accepts an argument just as --start. http://hg.python.org/cpython/rev/c4919642fd25 New changeset 347f6305bd26 by Senthil Kumaran in branch

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Fixed now. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13726 ___

[issue13780] make YieldFrom its own node

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e1177b9167ce by Benjamin Peterson in branch 'default': make YieldFrom its own distinct from Yield (closes #13780) http://hg.python.org/cpython/rev/e1177b9167ce -- nosy: +python-dev resolution: - fixed

[issue13783] Clean up PEP 380 C API additions

2012-01-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Also check any GetAttr and CallMethod operations to see if they should be moved over to the new *Id variants. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13783

[issue13725] regrtest does not recognize -d flag

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f80f9eb5df02 by Meador Inge in branch '3.2': Issue #13725: regrtest does not recognize -d flag. http://hg.python.org/cpython/rev/f80f9eb5df02 New changeset f2b764dd0851 by Meador Inge in branch 'default': Issue

[issue13725] regrtest does not recognize -d flag

2012-01-14 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Éric, I got it. Erno, thanks for the patch. -- nosy: +meador.inge resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue13725] regrtest does not recognize -d flag

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3e9b107fb5da by Meador Inge in branch '3.2': Issue #13725: Add a NEWS entry. http://hg.python.org/cpython/rev/3e9b107fb5da New changeset 7332e97587da by Meador Inge in branch 'default': Issue #13725: Add a NEWS

[issue13785] Make concurrent.futures.Future state public

2012-01-14 Thread Juan Javier
New submission from Juan Javier jjdomingu...@gmail.com: Hello, This is a proposal to make the state of Future objects public. The idea is to have access to the current state of the Future using a property instead of calling several methods (done, cancelled, etc.). Also, a history property

[issue13786] regrtest.py does not handle --trace

2012-01-14 Thread Meador Inge
New submission from Meador Inge mead...@gmail.com: While fixing issue13725 I noticed that there is a long option for 'trace', but it is not actually handled: [meadori@motherbrain cpython]$ ./python -m test --trace No handler for option --trace. Please report this as a bug at

[issue6721] Locks in python standard library should be sanitized on fork

2012-01-14 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list

[issue13786] regrtest.py does not handle --trace

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a32bc62b8772 by Meador Inge in branch '3.2': Issue #13786: Remove unimplemented 'trace' long option from regrtest.py. http://hg.python.org/cpython/rev/a32bc62b8772 New changeset 9b14b04a0cdd by Meador Inge in branch

[issue13786] regrtest.py does not handle --trace

2012-01-14 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Fixed. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13786

[issue13725] regrtest does not recognize -d flag

2012-01-14 Thread Erno Tukia
Erno Tukia erno.tu...@iki.fi added the comment: Meador, thanks for the acknowledgement. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13725 ___

[issue12409] Moving Documenting Python to Devguide

2012-01-14 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: On Sat, Jan 14, 2012 at 04:36, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: I just replied to your python-dev email.  I think you can update 2.7 to use Sphinx 1.0 as soon as you’re down to a

[issue13752] add a str.casefold() method

2012-01-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d4669f43d05f by Benjamin Peterson in branch 'default': add str.casefold() (closes #13752) http://hg.python.org/cpython/rev/d4669f43d05f -- nosy: +python-dev resolution: - fixed stage: patch review -

[issue6721] Locks in python standard library should be sanitized on fork

2012-01-14 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: However, extending RLock to provide ForkClearedRLock (this would be used by logging, i.e.) is quite straighforward. The extended class would simply need to record the process ID, in which the lock was created, and the process ID,

[issue6721] Locks in python standard library should be sanitized on fork

2012-01-14 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: A new lock type will NOT solve this. It is ALWAYS okay to clear all thread/threading module locks after a fork. They are and always have been process-local by definition so they are also by definition 100% invalid to any child process.

[issue13785] Make concurrent.futures.Future state public

2012-01-14 Thread Brian Quinlan
Brian Quinlan br...@sweetapp.com added the comment: Thanks for the patch! 1. The fetching the state feature seems reasonable but I think that explaining the difference between CANCELLED and CANCELLED_AND_NOTIFIED is going to be hard. Maybe you could look at how

[issue12409] Moving Documenting Python to Devguide

2012-01-14 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Documenting Python has been: - moved to devguide; http://hg.python.org/devguide/rev/5d4a90e568ed - removed from 2.7, 3.2 and default; http://hg.python.org/cpython/rev/8975f7d0fbf7 http://hg.python.org/cpython/rev/70c46599fb0e

[issue12949] Documentation of PyCode_New() lacks kwonlyargcount argument

2012-01-14 Thread Mahmoud Hashemi
Changes by Mahmoud Hashemi mak...@gmail.com: -- nosy: +mahmoud ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12949 ___ ___ Python-bugs-list

[issue13787] PyCode_New not round-trippable (TypeError)

2012-01-14 Thread Mahmoud Hashemi
New submission from Mahmoud Hashemi mak...@gmail.com: On Python 3.1.4, attempting to create a code object will apparently result in a TypeError (must be str, not tuple), even when you're creating a code object from another, working code object: # co_what.py def foo(): return 'bar' co =

[issue13787] PyCode_New not round-trippable (TypeError)

2012-01-14 Thread Mahmoud Hashemi
Mahmoud Hashemi mak...@gmail.com added the comment: And here's the working Python 2 version (works fine on Python 2.7, and likely a few versions prior). -- Added file: http://bugs.python.org/file24240/co_what2.py ___ Python tracker

[issue13770] python3 json: add ensure_ascii documentation

2012-01-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: All right. I’ll do like other parameters (see check_circular for an example) and just duplicate the two-line doc. -- assignee: docs@python - eric.araujo versions: +Python 2.7 ___ Python tracker

[issue13788] os.closerange optimization

2012-01-14 Thread Ferringb
New submission from Ferringb ferri...@gmail.com: The current implementation of closerange essentially is a bruteforce invocation of close for every integer in the range. While this works, it's rather noisy for stracing, and for most invocations, is near a thousand close invocations more than

[issue13788] os.closerange optimization

2012-01-14 Thread Ferringb
Ferringb ferri...@gmail.com added the comment: Fixed tabs/spaces... -- Added file: http://bugs.python.org/file24242/closerange-optimization.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13788

[issue13788] os.closerange optimization

2012-01-14 Thread Ferringb
Changes by Ferringb ferri...@gmail.com: Removed file: http://bugs.python.org/file24241/closerange-optimization.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13788 ___

[issue13788] os.closerange optimization

2012-01-14 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Thanks for the patch. However, this cannot as far as I understand be used for the subprocess implementation due to the limitation of what can be called after a fork() and before an exec(). Take a look at #8052 for some more discussion

[issue13789] _tkinter does not build on Windows 7

2012-01-14 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: Modules/_tkinter.py #includes Modules/tkinter.h, tcl.h, and tk.h. The latter two #include tclDecls.h, tclPlatDecls.h, and tkDecls.h. I obtained 8.5.9 versions of all 5 and added them to Include/. Although they came from Ubuntu, they appear

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-14 Thread py.user
New submission from py.user port...@yandex.ru: '{0:d}'.format('a') Traceback (most recent call last): File stdin, line 1, in module ValueError: Unknown format code 'd' for object of type 'str' '{0:d}'.format(1+1j) Traceback (most recent call last): File stdin, line 1, in module ValueError:

[issue13495] IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files.

2012-01-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: There was another regression introduced by (a4bd8a4805a8). IDLE 3 no longer allows for editing of new files from the command line. For example: idle -e /tmp/newfile.py will momentarily flash an editor window before it is closed. This

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-14 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I agree it's not the best error message. What's happening is that these types (list, tuple, etc.) do not implement __format__, so object.__format__ is used. It returns str(self). Then the resulting string is formatted with the given

[issue13495] IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files.

2012-01-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: If you are saying that it is better to open a blank window than to not open a filled window, I agree. -- stage: - patch review ___ Python tracker rep...@bugs.python.org