OSCON Call for Proposals (deadline 2/4)

2013-01-19 Thread Aahz
DEADLINE Monday February 4 OSCON (O'Reilly Open Source Convention), the premier Open Source gathering, will be held in Portland, OR July 22-26. We're looking for people to deliver tutorials and shorter presentations. http://www.oscon.com/oscon2013 http://www.oscon.com/oscon2013/public/cfp/251

Re: Safely add a key to a dict only if it does not already exist?

2013-01-19 Thread Peter Otten
Vito De Tullio wrote: Chris Rebert wrote: How can I add a key in a thread-safe manner? I'm not entirely sure, but have you investigated dict.setdefault() ? but how setdefault makes sense in this context? It's used to set a default value when you try to retrieve an element from the dict,

Re: Forcing Python to detect DocumentRoot

2013-01-19 Thread Ferrous Cranus
Τη Παρασκευή, 18 Ιανουαρίου 2013 11:34:05 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: On Sat, Jan 19, 2013 at 5:58 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Τη Παρασκευή, 18 Ιανουαρίου 2013 3:28:10 μ.μ. UTC+2, ο χρήστης Joel Goldstick έγραψε: DocumentRoot =

Re: Safely add a key to a dict only if it does not already exist?

2013-01-19 Thread Vito De Tullio
Peter Otten wrote: How can I add a key in a thread-safe manner? I'm not entirely sure, but have you investigated dict.setdefault() ? but how setdefault makes sense in this context? It's used to set a default value when you try to retrieve an element from the dict, not when you try to set a

Re: Safely add a key to a dict only if it does not already exist?

2013-01-19 Thread Mitya Sirenef
On 01/19/2013 02:35 AM, Mitya Sirenef wrote: On 01/19/2013 02:27 AM, Vito De Tullio wrote: Chris Rebert wrote: How can I add a key in a thread-safe manner? I'm not entirely sure, but have you investigated dict.setdefault() ? but how setdefault makes sense in this context? It's used to set a

Re: Safely add a key to a dict only if it does not already exist?

2013-01-19 Thread Vito De Tullio
Peter Otten wrote: uhhmm.. I think I misread the example d = {} d.setdefault(1, 2) 2 d {1: 2} d.setdefault(1, 3) 2 d {1: 2} yeah, sure it can be useful for the OP... -- ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: Safely add a key to a dict only if it does not already exist?

2013-01-19 Thread Chris Angelico
On Sat, Jan 19, 2013 at 7:16 PM, Vito De Tullio vito.detul...@gmail.com wrote: yeah, sure, but with a fixed value :) I mean: if the value is not important, why bother at all trying not to override it with an if or a lock or other tecniques? doing d['key'] = 'fixed_value' multiple times

Re: Uniquely identifying each every html template

2013-01-19 Thread Ferrous Cranus
Τη Σάββατο, 19 Ιανουαρίου 2013 12:09:28 π.μ. UTC+2, ο χρήστης Dave Angel έγραψε: I don't understand the problem. A trivial Python script could scan through all the files in the directory, checking which ones are missing the identifier, and rewriting the file with the identifier added.

Re: Any built-in ishashable method ?

2013-01-19 Thread Dave Angel
On 01/18/2013 07:06 AM, Peter Otten wrote: Jean-Michel Pichavant wrote: That brings me to another question, is there any valid test case where key1 != key2 and hash(key1) == hash(key2) ? Or is it some kind of design flaw ? I don't think there is a use case for such a behaviour other than

Re: Any built-in ishashable method ?

2013-01-19 Thread Peter Otten
Dave Angel wrote: On 01/18/2013 07:06 AM, Peter Otten wrote: Jean-Michel Pichavant wrote: That brings me to another question, is there any valid test case where key1 != key2 and hash(key1) == hash(key2) ? Or is it some kind of design flaw ? I don't think there is a use case for such a

Re: Uniquely identifying each every html template

2013-01-19 Thread Dave Angel
On 01/19/2013 03:39 AM, Ferrous Cranus wrote: Τη Σάββατο, 19 Ιανουαρίου 2013 12:09:28 π.μ. UTC+2, ο χρήστης Dave Angel έγραψε: I don't understand the problem. A trivial Python script could scan through all the files in the directory, checking which ones are missing the identifier, and

Re: ANN: Python training text movies

2013-01-19 Thread Franck Ditter
In article mailman.488.1358146579.2939.python-l...@python.org, Mitya Sirenef msire...@lightbird.net wrote: On 01/14/2013 01:34 AM, Franck Ditter wrote: In article mailman.469.1358088303.2939.python-l...@python.org, Jason Friedman ja...@powerpull.net wrote: That is right; I would also

Re: Any algorithm to preserve whitespaces?

2013-01-19 Thread Lie Ryan
On 19/01/13 21:13, Santosh Kumar wrote: I have a working script which takes argv[1] as an input, deassembles each line, and then each word. Then after it capitalizes all its word (upcases the first letter) and then prints it out on the stdout. That script does the capitalization work fine, but,

Re: Safely add a key to a dict only if it does not already exist?

2013-01-19 Thread Steven D'Aprano
On Fri, 18 Jan 2013 20:15:26 -0800, Chris Rebert wrote: On Friday, January 18, 2013, Steven D'Aprano wrote: I wish to add a key to a dict only if it doesn't already exist, but do it in a thread-safe manner. [...] I'm not entirely sure, but have you investigated dict.setdefault() ? Great!

Re: Question related to multiprocessing.Process

2013-01-19 Thread Terry Reedy
On 1/19/2013 12:05 AM, Chris Angelico wrote: On Sat, Jan 19, 2013 at 3:50 PM, Cen Wang iwarob...@gmail.com wrote: Hi, when I use multiprocessing.Process in this way: from multiprocessing import Process class MyProcess(Process): def __init__(self): Process.__init__(self)

Re: Beginner Tutorials

2013-01-19 Thread Kwpolska
Who thought that not setting the “Reply replies to the ML” option was a good idea? -- Forwarded message -- From: Rik rik.j.cr...@gmail.com Date: Fri, Jan 18, 2013 at 8:31 PM Subject: Re: Beginner Tutorials To: kwpol...@gmail.com On Friday, January 18, 2013 7:20:13 PM UTC,

Re: Vote tallying...

2013-01-19 Thread Lie Ryan
On 19/01/13 00:43, Andrew Robinson wrote: On 01/18/2013 08:47 AM, Stefan Behnel wrote: Andrew Robinson, 18.01.2013 00:59: I have a problem which may fit in a mysql database Everything fits in a MySQL database - not a reason to use it, though. Py2.5 and later ship with sqlite3 and if you go

Re: Forcing Python to detect DocumentRoot

2013-01-19 Thread Barry Scott
On 16 Jan 2013, at 13:51, Ferrous Cranus nikos.gr...@gmail.com wrote: When trying to open an html template within Python script i use a relative path to say go one folder back and open index.html f = open( '../' + page ) How to say the same thing in an absolute way by forcing Python to

Re: Safely add a key to a dict only if it does not already exist?

2013-01-19 Thread Roy Smith
In article 50fa1bf1$0$30003$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I wish to add a key to a dict only if it doesn't already exist, but do it in a thread-safe manner. The naive code is: if key not in dict: dict[key] = value

Re: test failed: test_urlwithfrag

2013-01-19 Thread Kev Dwyer
Terry Reedy wrote: On 1/7/2013 1:26 PM, Elli Lola wrote: $ ./python -m test -v test_urlwithfrag == CPython 3.3.0 (default, Jan 4 2013, 23:08:00) [GCC 4.6.3] == Linux-3.2.0-35-generic-pae-i686-with-debian-wheezy-sid little-endian ==

Messing with the GC

2013-01-19 Thread Jens Thoms Toerring
Hi, triggered by some problems I had with PySide I got a bit confused about what the GC may do in certain situations. Here's a small test program I cobbled together: import sys class X( object ) : def __init__( self, parent, cnt ) : print( In constructor for {0} {1}.format( self,

Re: Messing with the GC

2013-01-19 Thread Steven D'Aprano
On Sat, 19 Jan 2013 14:47:16 +, Jens Thoms Toerring wrote: Ok, the destrucor for the first instance of the X class is called only after printing out After, so the GC didn't delete the object before. But then there are obviously no calls of the destructors of neither the second instance of

Re: Messing with the GC

2013-01-19 Thread Steven D'Aprano
On Sat, 19 Jan 2013 16:24:37 +, Steven D'Aprano wrote: On Sat, 19 Jan 2013 14:47:16 +, Jens Thoms Toerring wrote: Ok, the destrucor for the first instance of the X class is called only after printing out After, so the GC didn't delete the object before. But then there are obviously

Re: Messing with the GC

2013-01-19 Thread Terry Reedy
On 1/19/2013 9:47 AM, Jens Thoms Toerring wrote: The code comments mostly answer your questions about what happens or does not happen and when. The comments after add more detail. import sys class X( object ) : def __init__( self, parent, cnt ) : print( In constructor for {0}

Re: Messing with the GC

2013-01-19 Thread Steven D'Aprano
And further thoughts... On Sat, 19 Jan 2013 14:47:16 +, Jens Thoms Toerring wrote: Hi, triggered by some problems I had with PySide I got a bit confused about what the GC may do in certain situations. Here's a small test program I cobbled together: import sys class X( object )

Re: Vote tallying...

2013-01-19 Thread Tim Chase
On 01/18/13 23:19, Dennis Lee Bieber wrote: On Fri, 18 Jan 2013 18:54:32 -0400, Zero Piraeus sche...@gmail.com On 18 January 2013 16:57, Tim Chase python.l...@tim.thechases.com wrote: - there are just some serious what-the-heck's in MySQL's handling of some edge cases regarding NULL values

Question on Python Conference

2013-01-19 Thread subhabangalore
Dear Group, As I know Python Foundation organizes some conferences all through the year. Most probably they are known as Pycon. But I have some different question. The question is, is it possible to attend it by Video Conferencing? Or if I request for the same will it be granted? Regards,

Re: ANN: Python training text movies

2013-01-19 Thread Mitya Sirenef
On 01/19/2013 04:32 AM, Franck Ditter wrote: In article mailman.488.1358146579.2939.python-l...@python.org, Mitya Sirenef msire...@lightbird.net wrote: On 01/14/2013 01:34 AM, Franck Ditter wrote: In article mailman.469.1358088303.2939.python-l...@python.org, Jason Friedman

Re: Any algorithm to preserve whitespaces?

2013-01-19 Thread Mitya Sirenef
On 01/19/2013 05:13 AM, Santosh Kumar wrote: I have a working script which takes argv[1] as an input, deassembles each line, and then each word. Then after it capitalizes all its word (upcases the first letter) and then prints it out on the stdout. That script does the capitalization work fine,

Re: Forcing Python to detect DocumentRoot

2013-01-19 Thread Piet van Oostrum
Ferrous Cranus nikos.gr...@gmail.com writes: This is addon domain's counter.py snippet tried to load an image mail.png and failed because it cant see past its document root # render html template and print it data = f.read() counter =

Re: Question on Python Conference

2013-01-19 Thread Ned Deily
In article 1506a9c3-7abb-4360-91f1-f65631104...@googlegroups.com, subhabangal...@gmail.com wrote: As I know Python Foundation organizes some conferences all through the year. Most probably they are known as Pycon. But I have some different question. The question is, is it possible to attend

Re: Vote tallying...

2013-01-19 Thread Chris Angelico
On Sun, Jan 20, 2013 at 4:46 AM, Tim Chase python.l...@tim.thechases.com wrote: Reading the MySQL gotchas and comparing it to the PostgreSQL gotchas, the MySQL ones scare the pants off my inner DBA, while the PostgreSQL ones are mostly if you're running at 6+yr old version of the software,

Re: Vote tallying...

2013-01-19 Thread Lie Ryan
On 20/01/13 08:22, Dennis Lee Bieber wrote: On Sat, 19 Jan 2013 22:58:17 +1100, Lie Ryan lie.1...@gmail.com Which is the same restriction as when using XML/JSON. What it means by locking the entire database is that an sqlite database can only be read/written by a single program at any moment

Re: Forcing Python to detect DocumentRoot

2013-01-19 Thread alex23
On Jan 16, 11:51 pm, Ferrous Cranus nikos.gr...@gmail.com wrote: When trying to open an html template within Python script i use a relative path to say go one folder back and open index.html f = open( '../' + page ) How to say the same thing in an absolute way by forcing Python to detect

Re: Vote tallying...

2013-01-19 Thread Walter Hurry
On Sat, 19 Jan 2013 00:12:25 -0500, Dennis Lee Bieber wrote: On Sat, 19 Jan 2013 07:24:40 +1100, Ben Finney ben+pyt...@benfinney.id.au declaimed the following in gmane.comp.python.general: * MySQL's development has suffered under Sun, and become virtually moribund under Oracle. They

How do functions get access to builtins?

2013-01-19 Thread Steven D'Aprano
I've been playing around with ChainedMap in Python 3.3, and run into something which perplexes me. Let's start with an ordinary function that accesses one global and one builtin. x = 42 def f(): print(x) If you call f(), it works as expected. But let's make a version with no access to

Re: PyWart: Exception error paths far too verbose

2013-01-19 Thread Ramchandra Apte
On Wednesday, 16 January 2013 15:23:55 UTC+5:30, Terry Reedy wrote: On 1/16/2013 12:59 AM, Rick Johnson wrote: Python needs to trim the path to the source file from which the exception was caught and only display the relative path starting from your personal library folder.

Re: PyWart: Exception error paths far too verbose

2013-01-19 Thread Steven D'Aprano
On Sat, 19 Jan 2013 19:15:55 -0800, Ramchandra Apte wrote: [snip dozens of irrelevant quoted lines] Right-click the file in the traceback and there is an Go to file/line option. Please trim your replies so that the reader doesn't have to scroll through page after page of irrelevant text

[issue16991] Add OrderedDict written in C

2013-01-19 Thread Eric Snow
Eric Snow added the comment: @Benjamin: Yeah, I've fixed that. @Ezio: Good point. I've touched that up. Once I have cleared up reference counting issues I'll put up a new patch. -- ___ Python tracker rep...@bugs.python.org

[issue16774] Additional recipes for itertools docs

2013-01-19 Thread Alexey Kachayev
Alexey Kachayev added the comment: It's hard to evaluate how popular given recipes, but: * drop is opposite to take, so it's as popular as take * the same situation with splitat, splitby - it's one case of partition that's hard to write each time with enumerator (partition is already in

[issue16994] collections.Counter.least_common

2013-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: One method of statistically optimising the computation is to remove n least common elements from the set S. May be you need not remove least common elements from the set, but *get* a set of (len(S)-n) most common elements? Does it make any sense to you?

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 974ace29ee2d by Serhiy Storchaka in branch '3.2': Issue #15989: Fix several occurrences of integer overflow http://hg.python.org/cpython/rev/974ace29ee2d New changeset 8f10c9eae183 by Serhiy Storchaka in branch '3.3': Issue #15989: Fix several

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset d544873d62e9 by Serhiy Storchaka in branch '2.7': Issue #15989: Fix several occurrences of integer overflow http://hg.python.org/cpython/rev/d544873d62e9 -- ___ Python tracker rep...@bugs.python.org

[issue16953] select module compile errors with broken poll()

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d33c79d2f6b by Charles-François Natali in branch '2.7': Issue #16953: Fix socket module compilation on platforms with HAVE_BROKEN_POLL. http://hg.python.org/cpython/rev/1d33c79d2f6b New changeset 101e821e5e70 by Charles-François Natali in branch

[issue16945] rewrite CGIHTTPRequestHandler to always use subprocess

2013-01-19 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- nosy: +v+python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16945 ___ ___

[issue16953] select module compile errors with broken poll()

2013-01-19 Thread Charles-François Natali
Charles-François Natali added the comment: Committed, thanks for the patch! -- stage: - committed/rejected status: open - closed versions: +Python 2.7, Python 3.2, Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue11729] libffi assembler relocation check is not robust, fails with clang

2013-01-19 Thread Stefan Krah
Stefan Krah added the comment: The buildbot coverage is good, but the number of (OS, shell, compiler) combinations is much higher. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11729 ___

[issue10535] Enable warnings by default in unittest

2013-01-19 Thread Ezio Melotti
Ezio Melotti added the comment: The two TODOs left are: 1) adding UnittestWarning; 2) improving the error message for deprecations; Technically these are new features, so they can go in 3.4 only, but 2) might be simple enough to be backported. Regarding 1) it might be a bit too late, given

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Stefan Krah
Stefan Krah added the comment: Several 2.7 buildbots are failing. Unfortunately I have only platforms where sizeof(int) == sizeof(long) == sizeof(size_t). You can use your cpython ssh key to login to all snakebite buildbot machines. They are tagged with [SB].

[issue16993] shutil.which() should preserve path case

2013-01-19 Thread Ramchandra Apte
Ramchandra Apte added the comment: Somehow the patch is not showing for me. -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16993 ___

[issue16997] subtests

2013-01-19 Thread Nick Coghlan
Nick Coghlan added the comment: I think we're going to have to separate out two counts in the metrics - the total number of tests (the current counts), and the total number of subtests (the executed subtest blocks). (Other parameterisation solutions can then choose whether to treat each pair

[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2013-01-19 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: -eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10590 ___ ___ Python-bugs-list

[issue16993] shutil.which() should preserve path case

2013-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry. Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file28781/shutil_which_normcase.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16993

[issue11983] Inconsistent hash and comparison for code objects

2013-01-19 Thread Eugene Toder
Eugene Toder added the comment: If you add co_firstlineno into code_hash you can say something like /* The rest isn't used in hash and comparisons, except co_name and co_firstlineno, which are preserved for tracebacks and debuggers. */ (Otherwise you'd need to explain why co_firstlineno

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset a78ebf9aed06 by Serhiy Storchaka in branch '2.7': Ensure that width and precision in string formatting test have type int, not long. http://hg.python.org/cpython/rev/a78ebf9aed06 -- ___ Python tracker

[issue16998] Lost updates with multiprocessing.Value

2013-01-19 Thread Jens Lechtenboerger
New submission from Jens Lechtenboerger: Maybe I'm misreading the documentation of multiprocessing.Value and multiprocessing.sharedctypes.Value. I thought that access to the value field of Value instances was protected by locks to avoid lost updates. Specifically, for

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for point, Stefan. And thanks Trent for his project. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue16997] subtests

2013-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: The way expectedFailure is currently implemented (it's a decorator which knows nothing about test cases and test results, it only expects an exception to be raised by its callee), it's gonna be difficult to make it participate with subtests without breaking

[issue16997] subtests

2013-01-19 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___ Python-bugs-list

[issue10535] Enable warnings by default in unittest

2013-01-19 Thread Brett Cannon
Brett Cannon added the comment: I wouldn't backport; not worth it. Anyway, since I consider this bug closed I'm taking myself off the nosy list. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10535

[issue16997] subtests

2013-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think we're going to have to separate out two counts in the metrics - the total number of tests (the current counts), and the total number of subtests (the executed subtest blocks). This is a reasonable proposal. On the other hand, it was already the case

[issue16507] Patch selectmodule.c to support WSAPoll on Windows

2013-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: This works well enough (tested in old version of Tulip), right? What's holding it up? -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16507

[issue16997] subtests

2013-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch attached: - makes _SubTest a TestCase subclass - clarifies test skipping for subtests (skipTest() only skips the subtest) - makes expected failures work as expected by resorting to a thread-local storage hack -- Added file:

[issue16997] subtests

2013-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch attached: - makes _SubTest a TestCase subclass - clarifies test skipping for subtests (skipTest() only skips the subtest) - makes expected failures work as expected by resorting to a thread-local storage hack -- Added file:

[issue16997] subtests

2013-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch attached: - makes _SubTest a TestCase subclass - clarifies test skipping for subtests (skipTest() only skips the subtest) - makes expected failures work as expected by resorting to a thread-local storage hack -- Added file:

[issue14340] Update embedded copy of expat - fix security crash issues

2013-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: If you could apply this to 2.7, that'd be great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14340 ___

[issue16998] Lost updates with multiprocessing.Value

2013-01-19 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16998 ___ ___ Python-bugs-list mailing list

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-19 Thread Sven Brauch
Sven Brauch added the comment: Here's the next version which I hope to be somewhat complete now. vararg and kwarg are now of type arg, and I did all the changes which are required to make this possible. The ast tests pass. Do you prefer to have this as one large patch all together, or would

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Individual patches would be great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16795 ___ ___

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-19 Thread Sven Brauch
Sven Brauch added the comment: Alright, I'll be back with those shortly (as soon as I found out how to do this best with hg -- I'm used to git ;). I'll also sign the contributor agreement, that's no problem of course. -- ___ Python tracker

[issue15989] Possible integer overflow of PyLong_AsLong() results

2013-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee93a89b4e0f by Serhiy Storchaka in branch '2.7': Issue #15989: Fix possible integer overflow in str formatting as in unicode formatting. http://hg.python.org/cpython/rev/ee93a89b4e0f -- ___ Python

[issue16997] subtests

2013-01-19 Thread florian-rathgeber
Changes by florian-rathgeber florian.rathge...@gmail.com: -- nosy: -florian-rathgeber ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16997 ___ ___

[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-01-19 Thread Nadeem Vawda
Nadeem Vawda added the comment: I've reviewed the patch and posted some comments on Rietveld. I doubt about backward compatibility. It's obvious that struct.error and TypeError are unintentional, and EOFError is purposed for this case. However users can catch undocumented but de facto

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-19 Thread Sven Brauch
Sven Brauch added the comment: Okay, here they are. I'm not sure how to make hg include a commit message in the patch... 81299-extend-asdl.diff: Changes required to the ASDL framework, in order to allow attributes ( ... ) on a product 81300-change-var-kwargs.diff: Makes var/kwarg be instances

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-19 Thread Sven Brauch
Sven Brauch added the comment: second patch file -- Added file: http://bugs.python.org/file28788/81300-change-var-kwargs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16795 ___

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-19 Thread Sven Brauch
Sven Brauch added the comment: third patch file (... is there a better way to upload three files?) -- Added file: http://bugs.python.org/file28789/81301-change-attr-ranges.diff ___ Python tracker rep...@bugs.python.org

[issue16998] Lost updates with multiprocessing.Value

2013-01-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: I thought that access to the value field of Value instances was protected by locks to avoid lost updates. Loads and stores are both atomic. But += is made up of two operations, a load followed by a store, and the lock is dropped between the two. The same

[issue16042] smtplib: unlimited readline() from connection

2013-01-19 Thread R. David Murray
R. David Murray added the comment: Christian, do you want to try to complete this before the 2.7.4 RC? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16042 ___

[issue15955] gzip, bz2, lzma: add option to limit output size

2013-01-19 Thread Nadeem Vawda
Nadeem Vawda added the comment: What if unconsumed_tail is not empty but less than needed to decompress at least one byte? We need read more data until unconsumed_tail grow enought to be decompressed. This is possible in zlib, but not in bz2. According to the manual [1], it is perfectly OK

[issue10535] Enable warnings by default in unittest

2013-01-19 Thread Ezio Melotti
Ezio Melotti added the comment: Agreed, closing. -- resolution: - fixed stage: patch review - status: open - closed versions: +Python 3.2 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10535

[issue17000] Remove cruft from unittest docs

2013-01-19 Thread Antoine Pitrou
New submission from Antoine Pitrou: There's a lot of obsolete or simply pointless cruft in the unittest docs, including references to the runTest method, or a detailed description of how to manually collect test suites. Following patch simplifies things a lot and makes the doc easier to read.

[issue16999] Remove cruft from unittest docs

2013-01-19 Thread Antoine Pitrou
New submission from Antoine Pitrou: There's a lot of obsolete or simply pointless cruft in the unittest docs, including references to the runTest method, or a detailed description of how to manually collect test suites. Following patch simplifies things a lot and makes the doc easier to read.

[issue17001] Make uuid.UUID use functools.total_ordering

2013-01-19 Thread Ramchandra Apte
New submission from Ramchandra Apte: This would reduce the complexity of uuid.UUID and also if the way it compares changes, one would't have to change all the compare methods. Attached is a patch. -- components: Library (Lib) files: issue.patch keywords: patch messages: 180275 nosy:

[issue17001] Make uuid.UUID use functools.total_ordering

2013-01-19 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17001 ___ ___

[issue16557] PEP 380 isn't reflected in the Functional Programming HOWTO

2013-01-19 Thread Ramchandra Apte
Ramchandra Apte added the comment: Attached is a patch. Note that this is my first Doc patch; please apologize errors. -- keywords: +patch nosy: +ramchandra.apte Added file: http://bugs.python.org/file28793/issue16557.patch ___ Python tracker

[issue17001] Make uuid.UUID use functools.total_ordering

2013-01-19 Thread Brian Curtin
Brian Curtin added the comment: Can you provide test cases for this code? -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17001 ___

[issue17001] Make uuid.UUID use functools.total_ordering

2013-01-19 Thread Ramchandra Apte
Ramchandra Apte added the comment: Yes, will do so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17001 ___ ___ Python-bugs-list mailing list

[issue16273] f.tell() returning negative number on Windows build

2013-01-19 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16273 ___ ___ Python-bugs-list

[issue17001] Make uuid.UUID use functools.total_ordering

2013-01-19 Thread Ramchandra Apte
Ramchandra Apte added the comment: @Brian Curtin It appears that there are tests for UUID ordering. [0] I will run the tests. [0] http://hg.python.org/cpython/file/d1e6a48dfb0d/Lib/test/test_uuid.py#l188 -- ___ Python tracker rep...@bugs.python.org

[issue17001] Make uuid.UUID use functools.total_ordering

2013-01-19 Thread Ramchandra Apte
Ramchandra Apte added the comment: Damn, I forgot to add import functools. Here is a fixed version that passes test_uuid. -- Added file: http://bugs.python.org/file28794/issue-v2.patch ___ Python tracker rep...@bugs.python.org

[issue13598] string.Formatter doesn't support empty curly braces {}

2013-01-19 Thread Ramchandra Apte
Ramchandra Apte added the comment: Buump. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list