[issue13028] python wastes linux users time by checking for dylib on each dynamic library load

2012-09-28 Thread Thomas Lee

Thomas Lee added the comment:

I know this is an old-ish issue, but I can't reproduce anything like this on 
Debian Wheezy with either Python 2.7 or tip (3.x). I think we need more details 
of what you're trying to do here Roger.

1. What exactly did you do to reproduce the strace output below?
2. What flavor of Linux did you attempt this on?

Further, a more detailed description of what you expected to happen vs. what 
actually happened would be a big help here.

As Victor says, .dylib shouldn't appear in strace output on Linux at all (and 
my testing seems to confirm this).

--
nosy: +thomaslee

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



[issue16061] performance regression in string replace for 3.3

2012-09-28 Thread Thomas Lee

Thomas Lee added the comment:

My results aren't quite as dramatic as yours, but there does appear to be a 
regression:

$ ./python -V
Python 2.7.3+

$ ./python -m timeit -s s = 'b'*1000 s.replace('b', 'a')
10 loops, best of 3: 16.5 usec per loop

$ ./python -V
Python 3.3.0rc3+

$ ./python -m timeit -s s = 'b'*1000 s.replace('b', 'a')
1 loops, best of 3: 22.7 usec per loop

--
nosy: +thomaslee

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



[issue16062] Socket closed prematurely in httplib for https

2012-09-28 Thread Thomas Lee

Thomas Lee added the comment:

Thanks ABR. You may be better off raising a ticket against requests 
(https://github.com/kennethreitz/requests).

I'm assuming what you want to happen here is for the session.post() call to 
return the 401 response without raising an exception. Perfectly reasonable, but 
to the best of my knowledge the requests library isn't in Python's standard 
library -- and so this is not the place to get it fixed :)

--
nosy: +thomaslee

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



[issue14886] json C vs pure-python implementation difference

2012-09-28 Thread Thomas Lee

Thomas Lee added the comment:

FWIW, I think Mark's right here. I'm +1 on the implementations being consistent.

Seems like a potentially nasty surprise if you move from one implementation to 
the other and, lacking awareness of this quirk, design your algorithm around 
semantics. I think this was Mark's original point.

If the json API doesn't care how the type check is performed, then we get a 
(probably very small :)) win from the type(o) in (list, tuple) for the Python 
impl in addition to bringing consistency to the two implementations.

--
nosy: +thomaslee

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



[issue16074] bad error in rename

2012-09-28 Thread Glenn Linderman

New submission from Glenn Linderman:

I've been using 3.3.0b1 for development, with mostly no problems, but today I 
was surprised and confused by an error message. It is an attempt to be an 
improvement over 3.2, giving the filename that os.rename cannot find... but 
instead, it gives the one it is renaming to.

So I quickly upgraded to 3.3.0rc3, and it contains the same error.

--
components: Windows
files: test93.py
messages: 171410
nosy: v+python
priority: normal
severity: normal
status: open
title: bad error in rename
versions: Python 3.3
Added file: http://bugs.python.org/file27324/test93.py

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



[issue16036] simplify int() signature docs

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9205277bc008 by Chris Jerdonek in branch '3.2':
Issue #16036: Improve documentation of built-in int()'s signature and arguments.
http://hg.python.org/cpython/rev/9205277bc008

New changeset 6ccb04c4cbae by Chris Jerdonek in branch 'default':
Issue #16036: Merge update from 3.2.
http://hg.python.org/cpython/rev/6ccb04c4cbae

--
nosy: +python-dev

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



[issue16036] simplify int() signature docs

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Leaving open until the change is made in 2.7 (the current wording is somewhat 
different there).  I will do that in the next day or so.

--
versions: +Python 2.7

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



[issue16061] performance regression in string replace for 3.3

2012-09-28 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.3 is 2x faster than Python 3.2 to replace a character with
another if the string only contains the character 3 times. This is not
acceptable, Python 3.3 must be as slow as Python 3.2!

$ python3.2 -m timeit ch='é'; sp=' '*1000; s = ch+sp+ch+sp+ch;
after='à'; s.replace(ch, after)
10 loops, best of 3: 3.62 usec per loop
$ python3.3 -m timeit ch='é'; sp=' '*1000; s = ch+sp+ch+sp+ch;
after='à'; s.replace(ch, after)
100 loops, best of 3: 1.36 usec per loop

$ python3.2 -m timeit ch='€'; sp=' '*1000; s = ch+sp+ch+sp+ch;
after='Ł'; s.replace(ch, after)
10 loops, best of 3: 3.15 usec per loop
$ python3.2 -m timeit ch='€'; sp=' '*1000; s = ch+sp+ch+sp+ch;
after='Ł'; s.replace(ch, after)
100 loops, best of 3: 1.91 usec per loop

More seriously, I changed the algorithm of str.replace(before, after)
when before and after are only one character: changeset c802bfc8acfc.
The code is now using the heavily optimized findchar() function.
PyUnicode_READ() is slow and should be avoided when possible:
PyUnicode_READ() macro is expanded to 2 if, whereas findchar() uses
directly pointer of the right type (Py_UCS1*, Py_UCS2* or Py_UCS4*).

In Python 3.2, the code looks like:

for (i = 0; i  u-length; i++) {
if (u-str[i] == u1) {
if (--maxcount  0)
break;
u-str[i] = u2;
}
}

In Python 3.3, the code looks like:

pos = findchar(sbuf, PyUnicode_KIND(self), slen, u1, 1);
if (pos  0)
goto nothing;
...
while (--maxcount)
{
pos++;
src += pos * PyUnicode_KIND(self);
slen -= pos;
index += pos;
pos = findchar(src, PyUnicode_KIND(self), slen, u1, 1);
if (pos  0)
break;
PyUnicode_WRITE(rkind, PyUnicode_DATA(u), index + pos, u2);
}

--

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



[issue16075] incoming.cia hook error when pushing commits

2012-09-28 Thread Chris Jerdonek

New submission from Chris Jerdonek:

When pushing commits to hg.python.org, I got the following error re: the 
incoming.cia hook:

$ hg push ssh://h...@hg.python.org/cpython
pushing to ssh://h...@hg.python.org/cpython
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 2 changesets with 4 changes to 2 files
remote: buildbot: change(s) sent successfully
remote: sent email to roundup at rep...@bugs.python.org
remote: notified python-check...@python.org of incoming changeset 9205277bc008
remote: error: incoming.cia hook raised an exception: ProtocolError for 
cia.vc/RPC2: 404 Not Found
remote: notified python-check...@python.org of incoming changeset 6ccb04c4cbae
remote: error: incoming.cia hook raised an exception: ProtocolError for 
cia.vc/RPC2: 404 Not Found

--
messages: 171414
nosy: chris.jerdonek, georg.brandl, pitrou
priority: normal
severity: normal
status: open
title: incoming.cia hook error when pushing commits

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



[issue16060] Double decref and dereferencing after decref in int()

2012-09-28 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Serhiy, I wonder how you found this :)

--
nosy: +jcea

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



[issue16075] incoming.cia hook error when pushing commits

2012-09-28 Thread Georg Brandl

Georg Brandl added the comment:

Looking at http://cia.vc/, it seems like CIA is dead for now.  I've disabled 
the CIA hook on all hg.p.org repos.

--
resolution:  - fixed
status: open - closed

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



[issue16066] Truncated POST data in CGI script on Windows 7

2012-09-28 Thread Alexander Martin

Alexander Martin added the comment:

The successful script execution was run under Python 2.7.3 (as of today one of 
the two as production version labeled releases). The initial report's 
reference to Python 2.7.2 was made by mistake.

May anyone confirm this error behaviour on Python production version 3.2.3 on 
Windows?

--

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



[issue16001] small ints: cache string representation

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-09-28 Thread Einar Fløystad Dørum

New submission from Einar Fløystad Dørum:

The xml.etree.ElementTree.Element class is no longer pickleable in Python 
3.3.0rc3 . 

This is a regression from Python 3.2 where the Element class was pickleable, 
while the xml.etree.cElementTree.Element was not. So this is probably related 
to switching the ElementTree implementation in Python 3.3.

I've looked at the what's new documentation in Python 3.3, and there was 
nothing that indicated that the ElemenTree switchover would give this kind of 
issues.  

I've run into this issues because I use the multiprocessing module to pass 
parsed XML documents between processes, and when I can't pickle Element 
objects. This stops working. 

You can reproduce the issue with the following code:
import pickle
from xml.etree.ElementTree import Element

print(pickle.dumps(Element(foo)))

--
components: Library (Lib)
messages: 171418
nosy: einarfd
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree.Element is no longer pickleable
type: behavior
versions: Python 3.3

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



[issue16077] fix code example in docs for built-in reduce()

2012-09-28 Thread Chris Jerdonek

New submission from Chris Jerdonek:

 Date: Thu, 6 Sep 2012 20:38:21 +0800
 To: d...@python.org
 Subject: [docs] There is bug about the built-in function reduce in the
 document

 I found a bug in the document about reduce :
 http://docs.python.org/library/functions.html#reduce

 Here is the patch:
 def reduce(function, iterable, initializer=None):
 it = iter(iterable)
 if initializer is None:
 try:
 initializer = next(it)
 except StopIteration:
 raise TypeError('reduce() of empty sequence with no initial
 value')
 accum_value = initializer
 -for x in iterable:
 +   for x in it:
 accum_value = function(accum_value, x)
 return accum_value

 It duplicated the first element of iterable

 For example:
 In [4]: reduce(lambda x,y:x+y, [1,2,3,4])
 Out[4]: 10

 In [5]: docreduce.reduce(lambda x,y:x+y ,[1,2,3,4])
 Out[5]: 11

(from: http://mail.python.org/pipermail/docs/2012-September/010513.html and
  http://mail.python.org/pipermail/docs/2012-September/010526.html )

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 171419
nosy: chris.jerdonek, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: fix code example in docs for built-in reduce()
type: enhancement
versions: Python 2.7

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



[issue16064] unittest -m claims executable is python, not python3

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

It looks like the offending line is here:

http://hg.python.org/cpython/file/6ccb04c4cbae/Lib/unittest/__main__.py#l5

if sys.argv[0].endswith(__main__.py):
sys.argv[0] = python -m unittest

--
nosy: +chris.jerdonek

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



[issue16064] unittest -m claims executable is python, not python3

2012-09-28 Thread Larry Hastings

Larry Hastings added the comment:

Certainly.  But what is the right thing to do?

I talked to Michael about it in person this morning, and our consensus was: use 
basename of sys.executable.

Patch attached.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file27325/larry.unittest.argv0.1.diff

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



[issue16050] ctypes: callback from C++ to Python fails with Illegal Instruction call

2012-09-28 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Pavel, I think the FFI we use is a direct copy of libffi. Could you contact 
upstream?.

--
nosy: +jcea

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



[issue14679] Define an __all__ for html.parser

2012-09-28 Thread Michele Orrù

Michele Orrù added the comment:

# Internal appears only in HTMLParser's methods; how could __all__ fix this?

--
nosy: +maker

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



[issue16060] Double decref and dereferencing after decref in int()

2012-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Serhiy, I wonder how you found this :)

I just looked at the code for issue16036.

--

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



[issue16077] fix code example in docs for built-in reduce()

2012-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Indeed.

Will probably want to add an example with 1-element sequence for 
functools.reduce in Doc/howto/functional.rst.

--
nosy: +storchaka

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-09-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
components: +XML
keywords: +3.3regression

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-09-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +eli.bendersky, storchaka

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



[issue15953] Incorrect some fields declaration in the PyTypeObject documentation

2012-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

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



[issue16078] Calendar.leapdays(y1,y2) bug

2012-09-28 Thread Sasa Banjac

New submission from Sasa Banjac:

Hello!
I am using the calendar.leapdays(y1,y2) function. It should return the number 
of leap years betwwen y1 and y2 (exclusive). However the function still cant 
process mutliple centuries.
Example: between 1900 and 2000 we have 24 leap years:
1904,08,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96
leapdays(1900,2000) returns 24 - OK
however
leapdays(1899,2000) returns also 24 NOT OK
leapdays(1899,2001) returns 25 NOT OK
leapdays(1900,2001) returns 25 OK

This means that the function has a problem with the lower boundary
If I try to calculate the number of leap days in a larger interval of years, 
the error is considerable:
leapdays(1,2001) returns 485
But 485 * 4 = 1940

--
components: Library (Lib)
messages: 171427
nosy: sbanjac
priority: normal
severity: normal
status: open
title: Calendar.leapdays(y1,y2) bug
versions: Python 2.7

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



[issue16079] list duplicate test names with patchcheck

2012-09-28 Thread Xavier de Gaye

New submission from Xavier de Gaye:

See also issue 16056 for the current list of duplicate test names in
the std lib.

The attached patch improves patchcheck.py to list duplicate test
names when running 'make patchcheck'. This patch to the default
branch can also be applied asis to the 2.7 branch.

An example of patchcheck output with the patch applied:

==
$ make patchcheck
./python ./Tools/scripts/patchcheck.py
Getting the list of files that have been added/changed ... 1 file
Fixing whitespace ... 0 files
Fixing C file whitespace ... 0 files
Fixing docs whitespace ... 0 files
Duplicate test names ... 1 test:
  TestErrorHandling.test_get_only in file Lib/test/test_heapq.py
Docs modified ... NO
Misc/ACKS updated ... NO
Misc/NEWS updated ... NO
configure regenerated ... not needed
pyconfig.h.in regenerated ... not needed

Did you run the test suite?

==

--
components: Library (Lib)
files: duplicate_test_names.patch
keywords: patch
messages: 171428
nosy: chris.jerdonek, ezio.melotti, xdegaye
priority: normal
severity: normal
status: open
title: list duplicate test names with patchcheck
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file27326/duplicate_test_names.patch

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



[issue16056] shadowed test names in std lib regression tests

2012-09-28 Thread Xavier de Gaye

Xavier de Gaye added the comment:

 To simplify and keep the discussions more focused, etc, I would
 create a new issue for the patch to patchcheck

New issue 16079 has been created.

The proposed patch in the new issue 16079 is slightly improved to
produce a cleaner output by printing the number of duplicate tests
and not the number of files where there are duplicates.

--

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



[issue16080] test_decimal causes other tests to fail with LC_ALL=fr_FR

2012-09-28 Thread Manuel Pégourié-Gonnard

New submission from Manuel Pégourié-Gonnard:

Some tests, namely test_email, test_locale and test_mailbox, normally pass, but 
fail if both of the following conditions are met:
- the local is fr_FR (or probably any other non-C locale)
- test_decimal is run before them

Steps to repoduce:

% LC_ALL=fr_FR ./python -m test test_email test_locale test_mailbox test_decimal
[1/4] test_email
[2/4] test_locale
[3/4] test_mailbox
[4/4] test_decimal
All 4 tests OK.

% LC_ALL=C ./python -m test test_decimal test_email test_locale test_mailbox
  
[1/4] test_decimal
[2/4] test_email
[3/4] test_locale
[4/4] test_mailbox
All 4 tests OK.

% LC_ALL=fr_FR ./python -m test test_decimal test_email test_locale 
test_mailbox   
[1/4] test_decimal
[2/4] test_email
Warning -- sys.path was modified by test_email
test test_email failed -- Traceback (most recent call last):
  File /home/mpg/src/cpython/Lib/test/test_email/test_email.py, line 2716, in 
test_formatdate_usegmt
time.strftime('%a, %d %b %Y %H:%M:%S -', time.gmtime(now)))
AssertionError: 'Fri, 28 Sep 2012 10:05:26 -' != 'ven., 28 sept. 2012 
10:05:26 -'
- Fri, 28 Sep 2012 10:05:26 -
? ^^^ ^
+ ven., 28 sept. 2012 10:05:26 -
?  ^  ++


[3/4/1] test_locale
test test_locale failed -- Traceback (most recent call last):
  File /home/mpg/src/cpython/Lib/test/test_locale.py, line 246, in 
test_percent_escape
self.assertEqual(locale.format_string('%f%%', 1.0), '%f%%' % 1.0)
AssertionError: '1,00%' != '1.00%'
- 1,00%
?  ^
+ 1.00%
?  ^


[4/4/2] test_mailbox
test test_mailbox failed -- Traceback (most recent call last):
  File /home/mpg/src/cpython/Lib/test/test_mailbox.py, line 1754, in 
test_mboxmmdf_to_maildir
self.assertEqual(msg.get_date(), 0.0)
AssertionError: 1348826768.3964105 != 0.0

1 test OK.
3 tests failed:
test_email test_locale test_mailbox

--
components: Tests
messages: 171431
nosy: mpg
priority: normal
severity: normal
status: open
title: test_decimal causes other tests to fail with LC_ALL=fr_FR
versions: Python 3.3

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



[issue15280] Don't use builtins as variable names in urllib.request

2012-09-28 Thread Michael Foord

Michael Foord added the comment:

Code cleanups for their own sake sound like a good thing, *iff* the cleanup is 
worthwhile (for example it makes debugging easier). i.e. the cleanup isn't 
gratuitous but worthwhile. 

This seems to be the case here and the rejected patch in issue #15137 had other 
(better) reasons to reject it as it stood.

Not accepting cleanups greatly limits the opportunity for our code base to 
improve.

--
nosy: +michael.foord
status: pending - open

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



[issue16081] Fix compile warnings in thread_pthread.h

2012-09-28 Thread Brian Brazil

New submission from Brian Brazil:

Please see attached patch to fix warnings about error being set but not used, 
I've eliminated error except for the one function that was using it.

--
components: Interpreter Core
files: pthread-warnings.patch
keywords: patch
messages: 171432
nosy: bbrazil
priority: normal
severity: normal
status: open
title: Fix compile warnings in thread_pthread.h
type: compile error
versions: Python 3.4
Added file: http://bugs.python.org/file27327/pthread-warnings.patch

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-09-28 Thread Einar Fløystad Dørum

Changes by Einar Fløystad Dørum eina...@gmail.com:


--
components:  -Library (Lib)

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



[issue16078] Calendar.leapdays(y1,y2) bug

2012-09-28 Thread Peter Inglesby

Peter Inglesby added the comment:

This behaviour is correct.  Years divisible by 4 are leap years, except years 
divisible by 100, except years divisible 400.

Source http://en.wikipedia.org/wiki/Leap_year.

--
nosy: +inglesp

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



[issue16082] xml.etree.ElementTree.tostringlist does conform to it's documentation

2012-09-28 Thread Einar Fløystad Dørum

New submission from Einar Fløystad Dørum:

The tostringlist documentation says Returns a list of (optionally) encoded 
strings containing the XML data. It does not guarantee any specific sequence, 
except that .join(tostringlist(element)) == tostring(element).. 
But in reality it is possible to get tostringlist to return a string and not a 
list. 
The following code will demonstrates problem, by failing with a TypeError:

from xml.etree.ElementTree import Element, tostringlist, tostring

element = Element(foo)
print (.join(tostringlist(element)) == tostring(element))

--
components: XML
messages: 171434
nosy: einarfd
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree.tostringlist does conform to it's documentation
type: behavior
versions: Python 3.3

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread Michele Orrù

New submission from Michele Orrù:

Sending a GET /\0 causes a TypeEror to be raised and the connection to be 
unexpectedly closed. 

$ python -m SimpleHTTPServer 8000
$ printf GET /\00 | nc localhost 8000

TypeError: must be encoded string without NULL bytes, not str


I think raising a 400 error should be fine. Also, shouldn't the error message 
contain a repr(string)?

[From http://corte.si/posts/code/pathod/pythonservers/index.html]

--
components: Library (Lib)
messages: 171435
nosy: maker
priority: normal
severity: normal
status: open
title: HTTPServer does not correctly handle bad headers
type: security
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue16078] Calendar.leapdays(y1,y2) bug

2012-09-28 Thread Peter Inglesby

Changes by Peter Inglesby peter.ingle...@gmail.com:


--
nosy: +larry

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



[issue16078] Calendar.leapdays(y1,y2) bug

2012-09-28 Thread Larry Hastings

Larry Hastings added the comment:

Agreed.  Not a bug.  Closing the issue.

--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
type:  - behavior

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Peter Inglesby

Peter Inglesby added the comment:

The attached patch updates the error message to:

 int(base=100, x='123')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: int() base must be = 2 and = 36, or 0

--
keywords: +patch
nosy: +inglesp
Added file: http://bugs.python.org/file27328/issue16055.patch

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



[issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear

2012-09-28 Thread Brian Brazil

Brian Brazil added the comment:

How does the attached patch look?

I also reworded the first line to be a bit clearer, and be under 80 chars.

--
keywords: +patch
nosy: +bbrazil
Added file: http://bugs.python.org/file27329/issue15350.patch

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



[issue16062] Socket closed prematurely in httplib for https

2012-09-28 Thread ABR

ABR added the comment:

If that's where the bug is.  I forgot to mention this issue seems identical to 
5542 (http://bugs.python.org/issue5542), but for https.  The fix there was in 
the underlying url/httplib.

--

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



[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2012-09-28 Thread Michael Foord

Michael Foord added the comment:

So on OS X (Python 2.7 only) the following still fails:

PYTHONIOENCODING=ascii ./python.exe unicodetest.py --verbose

--

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



[issue11798] Test cases not garbage collected after run

2012-09-28 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
versions: +Python 3.4 -Python 2.7, Python 3.2

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



[issue16064] unittest -m claims executable is python, not python3

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

(I was just including the line for the convenience of anyone that might happen 
to come across the issue.  It was not to inform you of course! :) )

FWIW, if you already know from talking to Michael or looking at the code, I 
think a comment saying why sys.argv[0] is being rewritten in the first place 
would be useful.  For example, is it strictly to have a nicer-looking usage 
string for --help, or are there other reasons?

$ ./python.exe -m unittest --help
Usage: python -m unittest [options]
...

--

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



[issue16064] unittest -m claims executable is python, not python3

2012-09-28 Thread Michael Foord

Michael Foord added the comment:

Yes it is for nicer help output, and a comment in the code is certainly 
warranted.

--

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



[issue15144] Possible integer overflow in operations with addresses and sizes.

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



[issue15677] Gzip/zlib allows for compression level=0

2012-09-28 Thread Brian Brazil

Brian Brazil added the comment:

The attached patch fixes this.

--
keywords: +patch
nosy: +bbrazil
Added file: http://bugs.python.org/file27330/issue15677.patch

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



[issue15992] Strict aliasing violations in Objects/unicodeobject.c

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I should have said that I had started working on this issue.  I think failing 
tests for both messages should accompany the patch (otherwise I would have 
already submitted a patch).  The tricky one is the error message for 
PyLong_FromString(), which I believe can only be tested from C (e.g. by adding 
to Modules/_testcapimodule.c).

--
keywords:  -easy

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



[issue16082] xml.etree.ElementTree.tostringlist does conform to it's documentation

2012-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Bug in the documentation, but not in the implementation.

See also issue8047 and issue1767933 (changeset 63845:57e631f088d7).

--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python, eli.bendersky, storchaka
versions: +Python 3.2

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



[issue16072] fix documentation of string.replace() signature

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks, Andrew.  I didn't look closely enough when reading the e-mail or I 
wouldn't have posted.  I had assumed from the e-mail that this was in the 
string *method* section rather than string module.

--

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



[issue16072] fix documentation of string.replace() signature

2012-09-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

No it shoudn't.
It works exactly as described:
Return a copy of string *str* with all occurrences of substring *old* replaced 
by *new*. If the optional argument *maxreplace* is given, the first 
*maxreplace* occurrences are replaced.
*str* is updated string and it is definitelly required.

--
nosy: +asvetlov
resolution:  - invalid
stage: needs patch - committed/rejected
status: open - closed

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



[issue9374] urlparse should parse query and fragment for arbitrary schemes

2012-09-28 Thread Georg Brandl

Georg Brandl added the comment:

After encountering an instance of people relying on fragment not being parsed 
for irc:// URLs, with resulting breakage, I don't think we should change this 
in point releases.  IOW, it's fine for 3.3.0, but not for 2.7.x or 3.2.x.

It may be fixing a bug, but the bug is not obvious and the fix is not backward 
compatible.  I therefore suggest to roll back the commits to 3.2 and 2.7.

--
priority: release blocker - critical
status: closed - open

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



[issue16072] fix documentation of string.replace() signature

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

[Reopening] It looks like at least *some* change is warranted here.  Notice 
that all the functions document s for the string argument but 
string.replace() documents str.  However, we have (in 2.7):

 string.replace(str='aab', old='a', new='b')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: replace() got an unexpected keyword argument 'str'
 string.replace(s='aab', old='a', new='b')
'bbb'

--
resolution: invalid - 
stage: committed/rejected - needs patch
status: closed - open

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



[issue9650] format codes in time.strptime docstrings

2012-09-28 Thread Christian Heimes

Christian Heimes added the comment:

If we want to archive platform independence from the libc's strftime() and 
strptime() function and its bugs, we could include our own implementation. Or 
rather than writing our own code we may be able to include some working and 
well tested code.

BSD's libc contains the functions. Its license should allow the inclusion into 
Python core. http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdtime/

If you like my idea we should discuss it on python-ideas and start a new 
tracker entry.

--
nosy: +christian.heimes

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



[issue9374] urlparse should parse query and fragment for arbitrary schemes

2012-09-28 Thread Ezio Melotti

Ezio Melotti added the comment:

If there is a list of known protocols that don't use the fragment, can't we 
include it in urlparse as we already do in Lib/urlparse.py:34?
If #channel in irc://example.com/#channel should not be parsed as fragment, 
then this can be considered as a regression.  This doesn't necessary mean that 
the whole change is a regression though.

--

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



[issue16072] fix documentation of string.replace() signature

2012-09-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

If you want just to change parameter name in the docs — I'm ok with that.

--

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



[issue15992] Strict aliasing violations in Objects/unicodeobject.c

2012-09-28 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
nosy: +christian.heimes

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Peter Inglesby

Peter Inglesby added the comment:

Ah, sorry about that.  Are you happy for me to write the test?

Poking around the C API docs suggests that I should call PyErr_Fetch() to get 
the value of the a raised exception, but I can't see any precedent for this in 
existing test code.  Can you point me to something I could use for inspiration?

--

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



[issue16064] unittest -m claims executable is python, not python3

2012-09-28 Thread Larry Hastings

Larry Hastings added the comment:

Michael, you're the one who came up with the feature.  If you write the comment 
I'll fold it into the patch.

--

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



[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0362d64c783a by Michael Foord in branch '3.2':
Closes issue #12376 : Pass on parameters in unittest.TextTestResult.__init__ 
super call
http://hg.python.org/cpython/rev/0362d64c783a

--
nosy: +python-dev

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
nosy: +christian.heimes

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



[issue14295] PEP 417: adding mock module

2012-09-28 Thread Michael Foord

Michael Foord added the comment:

unittest.mock addition is complete.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue16073] fix map() statement in list comprehension example

2012-09-28 Thread Peter Inglesby

Peter Inglesby added the comment:

Have attached a patch with suggested update.

Have also grepped for similar issues elsewhere in documentation, and haven't 
found anything, but may have missed something.

--
keywords: +patch
nosy: +inglesp
Added file: http://bugs.python.org/file27332/issue16073.patch

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread Michele Orrù

Changes by Michele Orrù maker...@gmail.com:


--
nosy: +exarkun

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



[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call

2012-09-28 Thread Michael Foord

Michael Foord added the comment:

Fixed in 2.7, 3.2 and 3.3.1.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue15593] urlparse.parse_qs documentation wrong re: urlencode

2012-09-28 Thread Peter Russell

Peter Russell added the comment:

Attached is a patch which adds a reference to the doseq parameter to urlencode 
to the documentation for parse_qs

--
keywords: +patch
nosy: +qwertyface
Added file: http://bugs.python.org/file27331/Issue-15593.patch

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread Michele Orrù

Changes by Michele Orrù maker...@gmail.com:


--
nosy:  -exarkun

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 Are you happy for me to write the test?

I had started working on that, but sure, be my guest. :)

You seem to be on the right track.  I didn't find precedent nearby either.  We 
basically want a C version of unittest's assertRaisesRegex() (but it can be a 
straight string match).  CHECK_INVALID comes close to that.

I would suggest defining a helper function that accepts an exception type and 
message text, and that clears the current error if it matches.  If the error 
doesn't match, you can restore the existing one with PyErr_Restore(), or else 
call raiseTestError() if there isn't one (similar to CHECK_INVALID).

I was thinking of putting the test right after the call to TESTNAME() in 
test_long_api(), but maybe you know a better location:

http://hg.python.org/cpython/file/default/Modules/_testcapimodule.c#l313

I'll upload what I had for the pure Python failing test since that portion was 
finished.

--

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



[issue16060] Double decref and dereferencing after decref in int()

2012-09-28 Thread Georg Brandl

Georg Brandl added the comment:

Applied: d23eb81bd482.

--
resolution:  - fixed
status: open - closed

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



[issue16072] fix documentation of string.replace() signature

2012-09-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed in c34a177d1f38

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Attaching failing test for pure Python portion.

--
Added file: http://bugs.python.org/file27333/issue-16055-1-failing-test.patch

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



[issue15593] urlparse.parse_qs documentation wrong re: urlencode

2012-09-28 Thread Michael Foord

Michael Foord added the comment:

UTF-16 patches are relatively unusual...

--
nosy: +michael.foord

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



[issue9374] urlparse should parse query and fragment for arbitrary schemes

2012-09-28 Thread Georg Brandl

Georg Brandl added the comment:

People make up URL schemes all the time, irc:// is not a special case. This 
change will mean breakage for them, unwarranted.

--

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



[issue15593] urlparse.parse_qs documentation wrong re: urlencode

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8590e9b05069 by Michael Foord in branch 'default':
urllib.parse.urlencode doc updarte.
http://hg.python.org/cpython/rev/8590e9b05069

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue9035] os.path.ismount on windows doesn't support windows mount points

2012-09-28 Thread Tim Golden

Tim Golden added the comment:

Unfortunately this missed the boat for 3.3; I'll target 3.4 when we've got a 
branch to commit to.

--
versions: +Python 3.4 -Python 3.2, Python 3.3

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



[issue16073] fix map() statement in list comprehension example

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

2.7 is not affected.

--
assignee: docs@python - chris.jerdonek
versions: +Python 3.2

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



[issue6839] zipfile can't extract file

2012-09-28 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee: tim.golden - 

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



[issue9374] urlparse should parse query and fragment for arbitrary schemes

2012-09-28 Thread Éric Araujo

Éric Araujo added the comment:

One would hope that people making up URI schemes would follow the generic 
syntax (and thus irc would be an exception), but as the risk exists I agree we 
should not break code in bugfix releases.

--

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



[issue16064] unittest -m claims executable is python, not python3

2012-09-28 Thread Arnav Khare

Arnav Khare added the comment:

Added comment explaining why we alter the executable string.

--
nosy: +Arnav.Khare
Added file: http://bugs.python.org/file27334/arnav.unittest.argv0.1.diff

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



[issue16064] unittest -m claims executable is python, not python3

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c76f1d78ff78 by Michael Foord in branch 'default':
Closes issue 16064. No longer hard code executable name in unittest help output.
http://hg.python.org/cpython/rev/c76f1d78ff78

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread Michele Orrù

Michele Orrù added the comment:

Note: on python3, the error is 
  File /[...]/cpython/Lib/genericpath.py, line 41, in isdir
st = os.stat(s)
TypeError: embedded NUL character
(same exception but different message.)

I don't know where to start fixing, because the documentation for os.stat says 
Perform the equivalent of a stat() system call on the given path., which is 
not exactly the correct behavior in this case.

I see that 
$ printf /\00 | xargs stat
stat()s correctly the root directory, and
$ printf /\00tmp | xargs stat
stat()s still '/'. So, is this a bug of os.stat?

Noising some coredevs.

--
nosy: +eric.araujo, ezio.melotti, r.david.murray

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 +with self.assertRaises(ValueError) as e:
 +int('100', 1)
 +self.assertEquals(str(e.exception),
 +  int() arg base must be 0 or = 2 and = 36)

Why not use assertRaisesRegex()?

self.assertRaisesRegex(ValueError,
   r'^int\() arg base must be 0 or = 2 and = 36$',
   int, '100', 1)

--
nosy: +storchaka

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



[issue16073] fix map() statement in list comprehension example

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6c96878eb729 by Chris Jerdonek in branch '3.2':
Close issue #16073: fix map() example in list comprehension documentation.
http://hg.python.org/cpython/rev/6c96878eb729

New changeset 8a4a88b1e964 by Chris Jerdonek in branch 'default':
Close issue #16073: merge fix from 3.2.
http://hg.python.org/cpython/rev/8a4a88b1e964

--
nosy: +python-dev

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



[issue16080] test_decimal causes other tests to fail with LC_ALL=fr_FR

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f5fedb17a78 by Stefan Krah in branch 'default':
Issue #16080: Use run_with_locale() decorator to reset the locale properly.
http://hg.python.org/cpython/rev/3f5fedb17a78

--
nosy: +python-dev

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



[issue16073] fix map() statement in list comprehension example

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks for helping with the patch and search, Peter.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue15953] Incorrect some fields declaration in the PyTypeObject documentation

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 08aa289a757c by Jesus Cea in branch '2.7':
Closes #15953: Incorrect some fields declaration in the PyTypeObject 
documentation
http://hg.python.org/cpython/rev/08aa289a757c

New changeset c87ea480ddf3 by Jesus Cea in branch '3.2':
Closes #15953: Incorrect some fields declaration in the PyTypeObject 
documentation
http://hg.python.org/cpython/rev/c87ea480ddf3

New changeset 3bb53816f9c5 by Jesus Cea in branch 'default':
MERGE: Closes #15953: Incorrect some fields declaration in the PyTypeObject 
documentation
http://hg.python.org/cpython/rev/3bb53816f9c5

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue16080] test_decimal causes other tests to fail with LC_ALL=fr_FR

2012-09-28 Thread Stefan Krah

Stefan Krah added the comment:

Thanks for the report. -- The locale wasn't properly reset in
test_wide_char_separator_decimal_point(). Should be fixed now.

--
nosy: +skrah
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - behavior

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



[issue15953] Incorrect some fields declaration in the PyTypeObject documentation

2012-09-28 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Thanks!.

--
nosy: +jcea
resolution: fixed - 
stage: committed/rejected - 
status: closed - open

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



[issue15953] Incorrect some fields declaration in the PyTypeObject documentation

2012-09-28 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue16080] test_decimal causes other tests to fail with LC_ALL=fr_FR

2012-09-28 Thread Stefan Krah

Stefan Krah added the comment:

Here we go. The new code fails if ps_AF isn't available.

--
resolution: fixed - 
stage: committed/rejected - 
status: closed - open

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



[issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al).

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

It could be done that way.  It just seems simpler to me to do a simple string 
check when regex's aren't necessary.  Then you don't have to worry about 
escaping characters, etc.

--

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



[issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS

2012-09-28 Thread Peter Russell

Peter Russell added the comment:

I can confirm that the current equivalent to Mark's original test case works as 
expected on default.

I recommend closing this issue.

--
nosy: +qwertyface

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread R. David Murray

R. David Murray added the comment:

There has been some discussion about what the correct behavior of os.stat is, 
as well, I think.  Alex Gaynor raised a question about testing our behavior 
when nulls are present.

But clearly, if the desired behavior for url processing is different from the 
actual behavior of os.stat, you need to catch the error and turn it into the 
correct response.  I don't think we can change this aspect of the behavior of 
os.stat for a bug fix, even if we decide we want to.

--
nosy: +alex

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



[issue16069] packaging shows up on docs.python.org/dev

2012-09-28 Thread Georg Brandl

Georg Brandl added the comment:

Should be fixed now.  The daily builds are just copied over to /dev, so removed 
pages don't get removed automatically.

I could add an rm -r to the dailybuild steps, but that would cause a few 
moments of missing pages for everyone browsing /dev at that moment.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue15280] Don't use builtins as variable names in urllib.request

2012-09-28 Thread Éric Araujo

Éric Araujo added the comment:

Well, here I don’t see the benefit in avoiding the use of “file”, given that 
the builtin of the same name is not needed thanks to the open function 
(contrary to id, type, str, string and others).

If you think our (unwritten?) policy of not doing cleanup-only commits is 
wrong, you could bring it up on a mailing list (maybe committers to avoid an 
endless thread).

--

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



[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-09-28 Thread Arnav Khare

Arnav Khare added the comment:

Added a test to the patch supplied.

--
nosy: +Arnav.Khare
Added file: 
http://bugs.python.org/file27335/mock_assert_called_once_with_output_update_including_test.patch

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



[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 70d43fedb2d7 by Michael Foord in branch 'default':
Closes issue 15323. Improve failure message of Mock.assert_called_once_with
http://hg.python.org/cpython/rev/70d43fedb2d7

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue15821] PyMemoryView_FromBuffer() behavior change (possible regression)

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread Michele Orrù

Changes by Michele Orrù maker...@gmail.com:


Added file: http://bugs.python.org/file27337/issue16083.patch

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



[issue16083] HTTPServer does not correctly handle bad headers

2012-09-28 Thread Michele Orrù

Michele Orrù added the comment:

Attaching tests that asserts the issue, and a patch for http.server. 
Works on tip.
Should be ported also to 2.x?

Note: that 'f = None' is unnecessary, maybe an isolated commit for that?

--
keywords: +patch
Added file: http://bugs.python.org/file27336/issue16083.tests.patch

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



  1   2   >