[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
http://bugs.python.org/issue16991
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 documentation)
* takelast, droplast was added cause itertools.islice doesn't support negative 
indices (which is ok). both functions have not obvious implementation - I'm 
sure that recipes will be good example for users how to work with iterators 
even if concrete functions aren't so widely-spreaded

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16774
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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?

Frankly, not very much.

Note, that least common element is not defined in most cases. Usually there are 
only a few most (or even one) common elements, but a lot of least common 
elements. Result of least_common(n) is practically random due to hash 
randomization.

Another note is that most_common()[:-n] in many cases faster than 
least_common(n) for n  1. This is right for most_common(n) too, but it 
usually used for very small n (in particular for n=1) and this has more sense.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16994
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 occurrences of integer overflow
http://hg.python.org/cpython/rev/8f10c9eae183

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15989
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue15989
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 '3.2':
Issue #16953: Fix socket module compilation on platforms with HAVE_BROKEN_POLL.
http://hg.python.org/cpython/rev/101e821e5e70

New changeset f04c97bbb241 by Charles-François Natali in branch '3.3':
Issue #16953: Fix socket module compilation on platforms with HAVE_BROKEN_POLL.
http://hg.python.org/cpython/rev/f04c97bbb241

New changeset 79912bb1a884 by Charles-François Natali in branch 'default':
Issue #16953: Fix socket module compilation on platforms with HAVE_BROKEN_POLL.
http://hg.python.org/cpython/rev/79912bb1a884

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16953
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue16953
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 that most deprecations have been 
around for 2-3 versions already.

--
status: pending - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10535
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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].

http://mail.python.org/pipermail/python-dev/2012-September/121651.html

--
nosy: +skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15989
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 of parameters as a distinct test case or as a 
subtest - historical solutions would appear as distinct test cases, while new 
approaches might choose to use the subtest machinery).

The aggregation of subtest results to test case results would then be that the 
test case fails if either:
- an assertion directly in the test case fails
- an assertion fails in at least one subtest of that test case

The interpretation of expected failure in a world with subtests is then 
clear: as long as at least one subtest or assertion fails, the decorator is 
satisfied that the expected test case failure is occurred.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is not in hash.)

BTW, since co_firstlineno is used including co_name is redundant -- there's no 
way to have 2 named code objects on the same line, AFAIK.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11983
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue15989
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 multiprocessing.Value(typecode_or_type, *args[, lock]) and
multiprocessing.sharedctypes.Value(typecode_or_type, *args[, lock]) the
documentation states:
 By default the return value is actually a synchronized wrapper for the
 object. [...]
 If lock is True (the default) then a new lock object is created to
 synchronize access to the value. If lock is a Lock or RLock object then that
 will be used to synchronize access to the value. If lock is False then
 access to the returned object will not be automatically protected by a lock,
 so it will not necessarily be “process-safe”.

(By the way, I'm not sure why both, multiprocessing.Value and
multiprocessing.sharedctypes.Value are documented.  They appear to be the same
thing.)

The following tests (also attached as file) show that lost updates may occur
if several instances of multiprocessing.Process increment the same Value that
is passed as args parameter.

def do_inc(integer):
Increment integer.value for multiprocessing.Value integer.
integer.value += 1

def do_test(notasks):
Create notasks processes, each incrementing the same Value.

As the Value is initialized to 0, its final value is expected to be
notasks.

tasks = list()
integer = multiprocessing.sharedctypes.Value(i, 0)
for run in range(notasks):
proc = multiprocessing.Process(target=do_inc, args=(integer,))
proc.start()
tasks.append(proc)
for proc in tasks:
proc.join()
if integer.value != notasks:
logging.error(
Unexpected value: %d (expected: %d), integer.value, notasks)

if __name__ == __main__:
do_test(100)


Sample invocations and results:

Note that on a single CPU machine the error is not reported for every
execution but only for about every third run.
$ python --version
Python 2.6.5
$ uname -a
Linux ubuntu-desktop 2.6.32.11+drm33.2 #2 Fri Jun 18 20:30:49 CEST 2010 i686 
GNU/Linux
$ python test_multiprocessing.py
ERROR:root:Unexpected value: 99 (expected: 100)

On a quadcore, the error occurs almost every time.
$ uname -a
Linux PC 2.6.35.13 #4 SMP Tue Dec 20 15:22:02 CET 2011 x86_64 GNU/Linux
$ ~/local/Python-2.7.3/python test_multiprocessing.py
ERROR:root:Unexpected value: 95 (expected: 100)
$ ~/local/Python-3.3.0/python test_multiprocessing.py
ERROR:root:Unexpected value: 86 (expected: 100)

--
components: Library (Lib)
files: test_multiprocessing.py
messages: 180251
nosy: lechten
priority: normal
severity: normal
status: open
title: Lost updates with multiprocessing.Value
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file28782/test_multiprocessing.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16998
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 compatibility.

(that said, I also think it's a useless feature)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 that a single test could count for several failures (for example,
an exception in the test method and another in tearDown). Therefore, I
think it is independent from the subtest proposal and could be tackled
separately (which would also help keep this issue focussed :-)).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: http://bugs.python.org/file28783/subtests3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: http://bugs.python.org/file28785/subtests3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: http://bugs.python.org/file28784/subtests3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 you rather 
like to review (and apply) 3..4 patches split into the individual features I 
implemented?

--
Added file: http://bugs.python.org/file28786/full3.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16795
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16795
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue15989
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 exceptions and doesn't expect 
 EOFError.

I think it's fine for us to change it to raise EOFError in these cases.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1159051
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 of arg, and adds the 
lineno / col_offset attributes to arg.
81301-change-attr-ranges.diff: Changes power ranges as described in the first 
post of this report.

All three patches include the corresponding changes to the unit tests, and 
hopefully the correct set of changes to the generated (Python-ast.h/.c) files.

--
Added file: http://bugs.python.org/file28787/81299-extend-asdl.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16795
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue16795
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 lack of atomicity applies when using += to modify an attribute of a 
normal python object in a multithreaded program.

If you want an atomic increment you could try

def do_inc(integer):
with integer.get_lock():
integer.value += 1

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16998
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to supply one byte at a time.

For xz, I'm not sure whether this problem could occur. I had assumed that it
could not, but I may be mistaken ;-). Unfortunately liblzma has no proper
manual, so I'll have to dig into the implementation to find out, and I haven't
had the time to do this yet.


[As an aside, it would be nice if the documentation for the zlib module
 mentioned this problem. We can't assume that users of the Python module are
 familiar with the C API for zlib...]


[1] http://www.bzip.org/1.0.5/bzip2-manual-1.0.5.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15955
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
assignee: docs@python
components: Documentation
files: unittest-doc-fix.patch
keywords: patch
messages: 180273
nosy: docs@python, ezio.melotti, michael.foord, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Remove cruft from unittest docs
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28791/unittest-doc-fix.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
assignee: docs@python
components: Documentation
files: unittest-doc-fix.patch
keywords: patch
messages: 180274
nosy: docs@python, ezio.melotti, michael.foord, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Remove cruft from unittest docs
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28790/unittest-doc-fix.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16999
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: ramchandra.apte
priority: normal
severity: normal
status: open
title: Make uuid.UUID use functools.total_ordering
versions: Python 3.4
Added file: http://bugs.python.org/file28792/issue.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17001
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16557
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue17001
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue17001
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com