[issue18990] Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser

2013-09-20 Thread Nick Coghlan

Nick Coghlan added the comment:

It's the docs for XMLPullParser.close that need to be updated.

On 20 September 2013 15:59, Stefan Behnel  wrote:
>
> Stefan Behnel added the comment:
>
> I'm not entirely happy about the docs anyway. Most people just want to loop 
> over iterparse() and be done (use case being to save memory). The new parser 
> class is a rather special and more complex thing that we shouldn't let 
> innocent users run into that easily. But that's a different ticket, I guess, 
> and in no way time critical.
>
> I can't see a reference to "parser.root" in the ElementTree doc page, BTW, so 
> maybe there's just nothing to do there?
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18990] Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser

2013-09-20 Thread Stefan Behnel

Stefan Behnel added the comment:

Ah, right - I forgot that it currently only implements a part of the parser API 
in ElementTree. Adding "Returns the toplevel document element." behind the 
current sentence would do, I guess. That will need updating once the 
XMLPullParser implements support for parser targets, though. Also, the 
description could just be dropped if XMLPullParser inherited from XMLParser 
(ticket #19010), because it's just (or should just be) a redundant repitition. 
All that's really new is the read_events() method and the constructor's 
arguments. Keeping the rest out would simplify both the interface and the 
documentation.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19044] getaddrinfo raises near-useless exception

2013-09-20 Thread Balazs

Balazs added the comment:

Hi, this is the platform:

Linux cloudbackupbr 3.8.0-30-generic #44-Ubuntu SMP Thu Aug 22 20:52:24 UTC 
2013 x86_64 x86_64 x86_64 GNU/Linux

/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically 
linked (uses shared libs), for GNU/Linux 2.6.24, 
BuildID[sha1]=0x6db033ec6858b391e114e252b3354ddbf5a9f7be, stripped

Thanks

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11632] difflib.unified_diff loses context

2013-09-20 Thread Benoît D Vages

Benoît D Vages added the comment:

An other exemple if necessary (python 2.6 / 2.7)
Got same behavior than mal using his script and my files.

Seems to occur when the chunk of lines between 2 differences is repeated many 
times in the file

--
nosy: +folder4ben
Added file: http://bugs.python.org/file31823/450.zip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19049] itertools.tee uses int for indices

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are disadvantages in the changing int to Py_ssize_t. Converting 
Py_ssize_t  to/from Python int is a little harder than converting C int or 
long. This change (as any other change) has a risk of introduce new bugs (as 
you can see on example of your patch).

I suggest just add (yet one) explicit comment.

int index; /* 0 <= index <= LINKCELLS */

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19056] Windows 7, script exec not working without explicit cal of python.exe

2013-09-20 Thread Thierry Seunevel

New submission from Thierry Seunevel:

Executing a script from the command prompt works if Python.exe called 
explicitly, doesn't work if script name only.
Example :
python.exe script.py is ok
script.py gives the following :
Traceback (most recent call last):
  File "D:\soft\python\lib\site.py", line 548, in 
main()
  File "D:\soft\python\lib\site.py", line 530, in main
known_paths = addusersitepackages(known_paths)
  File "D:\soft\python\lib\site.py", line 266, in addusersitepackages
user_site = getusersitepackages()
  File "D:\soft\python\lib\site.py", line 241, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "D:\soft\python\lib\site.py", line 231, in getuserbase
USER_BASE = get_config_var('userbase')
  File "D:\soft\python\lib\sysconfig.py", line 516, in get_config_var
return get_config_vars().get(name)
  File "D:\soft\python\lib\sysconfig.py", line 449, in get_config_vars
import re
  File "D:\soft\python\lib\re.py", line 105, in 
import sre_compile
  File "D:\soft\python\lib\sre_compile.py", line 14, in 
import sre_parse
  File "D:\soft\python\lib\sre_parse.py", line 17, in 
from sre_constants import *
  File "D:\soft\python\lib\sre_constants.py", line 18, in 
from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
Association of py extension to the python.exe is ok, Path contains the path for 
python directory (and also to \lib) and is the first dir in path.
Why is there a difference between the 2 invocations as they are calling the 
same exe?

--
components: Windows
messages: 198136
nosy: tsunwell
priority: normal
severity: normal
status: open
title: Windows 7, script exec not working without explicit cal of python.exe
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19049] itertools.tee uses int for indices

2013-09-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I suggest just add (yet one) explicit comment.
> 
> int index; /* 0 <= index <= LINKCELLS */

Ok, I think a comment is good enough here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19045] Make on Solaris 11 x64 with OracleStudio12.3 failed

2013-09-20 Thread Borut Podlipnik

Borut Podlipnik added the comment:

Using c compiler instead of c++ compiler, solved the problem:
setenv CC cc 
setenv CXX cc 
setenv LD_LIBRARY_PATH "/opt/solarisstudio12.3/lib:/usr/lib"

# ./configure --without-gcc --with-cxx-main=CC --prefix=/opt/python
# make
# make test

However, make test failed:
….
352 tests OK.
3 tests failed:
test_ctypes test_posix test_uuid
1 test altered the execution environment:
test_distutils
36 tests skipped:
test_aepack test_al test_applesingle test_bsddb185 test_bsddb3
test_cd test_cl test_codecmaps_cn test_codecmaps_hk
test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
test_epoll test_gdb test_gl test_imgfile test_kqueue
test_linuxaudiodev test_macos test_macostools test_msilib
test_ossaudiodev test_scriptpackages test_smtpnet
test_socketserver test_startfile test_sunaudiodev test_timeout
test_tk test_ttk_guionly test_urllib2net test_urllibnet
test_winreg test_winsound test_zipfile64
4 skips unexpected on sunos5:
test_gdb test_sunaudiodev test_tk test_ttk_guionly
*** Error code 1
make: Fatal error: Command failed for target `test'
# 

# ./python Lib/test/regrtest.py -v test_uuid
== CPython 2.7.5 (default, Sep 19 2013, 12:00:58) [C]
==   Solaris-2.11-i86pc-i386-32bit-ELF little-endian
==   /home/borut/admin/python/Python-2.7.5/build/test_python_14443
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, 
division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, 
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, 
unicode=0, bytes_warning=0, hash_randomization=0)
test_uuid
testIssue8621 (test.test_uuid.TestUUID) ... ok
test_UUID (test.test_uuid.TestUUID) ... ok
test_exceptions (test.test_uuid.TestUUID) ... ok
test_getnode (test.test_uuid.TestUUID) ... ok
test_ifconfig_getnode (test.test_uuid.TestUUID) ... ok
test_ipconfig_getnode (test.test_uuid.TestUUID) ... ok
test_netbios_getnode (test.test_uuid.TestUUID) ... ok
test_random_getnode (test.test_uuid.TestUUID) ... ok
test_unixdll_getnode (test.test_uuid.TestUUID) ... ok
test_uuid1 (test.test_uuid.TestUUID) ... ok
test_uuid3 (test.test_uuid.TestUUID) ... ok
test_uuid4 (test.test_uuid.TestUUID) ... FAIL
test_uuid5 (test.test_uuid.TestUUID) ... ok
test_windll_getnode (test.test_uuid.TestUUID) ... ok

==
FAIL: test_uuid4 (test.test_uuid.TestUUID)
--
Traceback (most recent call last):
  File "/home/borut/admin/python/Python-2.7.5/Lib/test/test_uuid.py", line 422, 
in test_uuid4
equal(u.variant, uuid.RFC_4122)
AssertionError: 'reserved for future definition' != 'specified in RFC 4122'

--
Ran 14 tests in 0.166s

FAILED (failures=1)
test test_uuid failed -- Traceback (most recent call last):
  File "/home/borut/admin/python/Python-2.7.5/Lib/test/test_uuid.py", line 422, 
in test_uuid4
equal(u.variant, uuid.RFC_4122)
AssertionError: 'reserved for future definition' != 'specified in RFC 4122'

1 test failed:
test_uuid
# 

# ./python Lib/test/regrtest.py -v test_ctypes
== CPython 2.7.5 (default, Sep 19 2013, 12:00:58) [C]
==   Solaris-2.11-i86pc-i386-32bit-ELF little-endian
==   /home/borut/admin/python/Python-2.7.5/build/test_python_14454
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, 
division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, 
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, 
unicode=0, bytes_warning=0, hash_randomization=0)
test_ctypes
test_incomplete_example (ctypes.test.test_incomplete.MyTestCase) ... ok
test_native (ctypes.test.test_unaligned_structures.TestStructures) ... ok
test_swapped (ctypes.test.test_unaligned_structures.TestStructures) ... ok


==
FAIL: test_ints (ctypes.test.test_bitfields.C_Test)
--
Traceback (most recent call last):
  File 
"/home/borut/admin/python/Python-2.7.5/Lib/ctypes/test/test_bitfields.py", line 
40, in test_ints
self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), 
name)))
AssertionError: Tuples differ: ('A', 1, -1) != ('A', 1, 1)

First differing element 2:
-1
1

- ('A', 1, -1)
?  -

+ ('A', 1, 1)

==
FAIL: test_shorts (ctypes.test.test_bitfields.C_Test)
--
Traceback (most recent call last):
  File 
"/home/borut/admin/python/Python-2.7.5/Lib/ctypes/test/test_bitfields.py", line 
47, in test_shorts
self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), 
name)))
AssertionError: Tuples differ: ('R', 32, -32) != ('R', 32, 32)

First differing element 2:
-32
32


[issue11220] Sometimes library raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .

mrDoctorWho0 . added the comment:

Trying to use POST-request to https://vk.com and sometimes library raise an 
error.
  File "library/vkApi.py", line 31, in post
response = self.Opener.open(request)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: 

--
components: +Library (Lib) -None
nosy: +mrDoctorWho0..
title: https sslv3 error 14077417: illegal parameter -> Sometimes library 
raises URLError when trying POST with httpS
versions: +Python 2.7 -Python 2.6, Python 3.1
Added file: http://bugs.python.org/file31824/code.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11220] Sometimes library raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .

mrDoctorWho0 . added the comment:

oops! wrong place!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11220] Sometimes library raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .

Changes by mrDoctorWho0 . :


Removed file: http://bugs.python.org/file31824/code.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19057] Sometimes urllib2 raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .

New submission from mrDoctorWho0 .:

Trying to use POST-request to https://vk.com and sometimes library raise an 
error.
  File "library/vkApi.py", line 31, in post
response = self.Opener.open(request)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: 

This exception appears randomly, connection is ok 100%. I tried it on different 
machines with python 2.7.4 and 2.7.3.

--
components: Library (Lib)
files: code.py
messages: 198141
nosy: mrDoctorWho0..
priority: normal
severity: normal
status: open
title: Sometimes urllib2 raises URLError when trying POST with httpS
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file31825/code.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6792] Distutils-based installer does not detect 64bit versions of Python

2013-09-20 Thread Christopher Benson

Changes by Christopher Benson :


--
nosy: +ChrisBenson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11220] https sslv3 error 14077417: illegal parameter

2013-09-20 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy:  -mrDoctorWho0..
title: Sometimes library raises URLError when trying POST with httpS -> https 
sslv3 error 14077417: illegal parameter
versions: +Python 2.6, Python 3.1 -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11220] https sslv3 error 14077417: illegal parameter

2013-09-20 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
Removed message: http://bugs.python.org/msg198139

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11220] https sslv3 error 14077417: illegal parameter

2013-09-20 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
Removed message: http://bugs.python.org/msg198140

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After adding read1() and peek() what stop us from inheriting HTTPResponse from 
BufferedIOBase?

I suggest split _read1_or_peek_chunked() by two parts. First part calculates n 
bounded by chunk_left (it can read the next chunk size and close a connection 
if needed). Perhaps it can be reused in _readall_chunked() and 
_readinto_chunked(() too. Second part which is  controlled by boolean parameter 
should be moved out in read1() and peek().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19051] Unify buffered readers

2013-09-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If you want this, I think it should be somehow folded into existing classes 
(for example BufferedIOBase). Yet another implementation of readline() isn't 
really a good idea.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18756] os.urandom() fails under high load

2013-09-20 Thread Adam Bielański

Changes by Adam Bielański :


--
nosy: +Adam.Bielański

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18003] lzma module very slow with line-oriented reading.

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See issue19051. Even preliminary Python implementation noticeable speed up the 
reading of short lines.

$ ./python -m timeit -s "import lzma, io" "f=lzma.LZMAFile('words.xz', 'r')" 
"for line in f: pass"

Unpatched: 1.44 sec per loop
Patched: 1.06 sec per loop

With C implementation it should be as fast as with BufferedReader.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18990] Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser

2013-09-20 Thread Eli Bendersky

Eli Bendersky added the comment:

Hi Nick,

I disagree with this change. The way the APIs are currently defined, XMLParser 
and XMLPullParser are different animals. XMLParser can be considered to only 
have one "front" in the API - feed() and close(). You feed() until the document 
is done and then you close() and get the parsed tree. There's no other way to 
get the parsed tree (unless you use a custom builder, I guess).

On the other hand XMLPullParser has two clear "fronts" - an input front with 
feed() and close() and an output front with read_events(). For XMLPullParser, 
close() is just an input signal. The canonical way to get output from 
XMLPullParser is read_events(). close() has no better reason to return output 
than feed(). When we decided to change the method names (recall that Antoine's 
originals were completely different), we perhaps forgot this detail. Even 
though XMLPullParser's method is named close(), it's *not* like XMLParser's 
close(). If someone is using XMLPullParser for its close() he's likely using 
the class incorrectly.

Just as an example: consider that in a lot of use cases the programmer will 
want to discard parts of the tree that's parsed iteratively (similarly to the 
main use case of iterparse()), because the XML itself is too huge. It's a 
convenient streaming API, in other words. Now, if the reader discards parts of 
the tree (by deleting subtrees), then returning the root from close() becomes 
even more meaningless, because it's no longer the root and we have no idea what 
it actually is.

Finally, I will add that we can always err on the side of under-specifying. We 
plan to change the implementation of the class in the future, so we can always 
add to the API. Specifying that close() returns the root is something we can't 
back out of, but we can always add in a future release without hurting 
backwards compatibility, if we do reach the conclusion that it's better.

---

P.S. all of this makes me wonder if we should mark the API of XMLPullParser 
provisional for 3.4

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18003] lzma module very slow with line-oriented reading.

2013-09-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> With C implementation it should be as fast as with BufferedReader.

So why not simply use BufferedReader?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19057] Sometimes urllib2 raises URLError when trying POST with httpS

2013-09-20 Thread R. David Murray

R. David Murray added the comment:

I would guess that if you did a network trace you'd find out there really was a 
packet that did not arrive (a timeout).  Note that detecting this is 
complicated by the fact that ssl is involved.  (I don't know the details, but I 
remember someone saying that more than one packet may be involved in something 
that looks like a single event at the OpenSSL level.)

It is certainly *possible* that there is a bug at the OpenSSL or (less likely) 
the _ssl module level, but the first step in debugging it would be to get that 
network trace, I think...

As I said, though, I'm not an expert in this area, perhaps someone who is will 
have other suggestions.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Ok, I have refactored this a bit.
A separate new function now takes care of the reading of chunk-header and tail. 
 This simplifies the other functions.

I'm not sure what you mean by inheriting from the buffered class.  Do we gain 
anything by doing that, would it change the code? or would it merely be for the 
benefit of ABC?

Note that the chunk protocol was wrong and I fixed the unittests:  The final 
chunk is a _valid_ zero length chunk, i.e. 0\r\n\r\n.  It contains two eol 
tokens like other chunks, one at the end of the length, the other at the end of 
the(null) payload.

--
Added file: http://bugs.python.org/file31826/httpresponse.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-20 Thread Ronald Oussoren

Changes by Ronald Oussoren :


--
nosy: +ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18764] The pdb print command prints repr instead of str in python3

2013-09-20 Thread Connor Osborn

Connor Osborn added the comment:

Should the pretty print behavior remain?

--
nosy: +cdosborn

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18764] The pdb print command prints repr instead of str in python3

2013-09-20 Thread R. David Murray

R. David Murray added the comment:

Ah, that's a very good question.  So perhaps the print command should be 
renamed 'pprint'.

Anyone else have thoughts about the API?  Do we instead need to fix the print 
command, for backward compatibility reasons?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10976] json.loads() raises TypeError on bytes object

2013-09-20 Thread Josh Lee

Changes by Josh Lee :


--
nosy: +jleedev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19056] Windows 7, script exec not working without explicit cal of python.exe

2013-09-20 Thread Eric V. Smith

Eric V. Smith added the comment:

Can you print out sys.executable and sys.path in both cases, and post the 
results here?

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter

2013-09-20 Thread Charles-François Natali

Charles-François Natali added the comment:

> So this may have been a DNS related issue, perhaps a load balancer referring 
> the connection to a dead machine.  Yet, for some reason, the Windows command 
> line FTP client can recover from this problem after 20 seconds? What are they 
> doing right? Completely retrying the open?

Do you mean you're able to pass a timeout greater than 20 seconds to
the Windows command line FTP client?

In any case, there's nothing much we can do: if the TCP stack returns
the connection broken (timed out), we can't do much.
On Linux, you can increase the sysctls I mentioned in my previous
message, but that's it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19044] getaddrinfo raises near-useless exception

2013-09-20 Thread Charles-François Natali

Charles-François Natali added the comment:

Well, as Ned explained, that's a libc bug.
If getaddrinfo() fails with EAI_SYSTEM, errno should be set.

There's nothing more Python can do.
If the error is reproducible, you can run the failing code with strace, to see 
what's going on (and check if there's a more recent glib version which could 
fix this bug).

--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19045] Make on Solaris 11 x64 with OracleStudio12.3 failed

2013-09-20 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +jcea

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19056] Windows 7, script exec not working without explicit cal of python.exe

2013-09-20 Thread Ned Deily

Ned Deily added the comment:

You may have a mismatch with two different versions of Python 2.7 installed.  
Issue18050 documents the basic problem: a change introduced in Python 2.7.4 
causes problems if a pre-2.7.4 interpreter executable is launched with a 2.7.4 
or later Python standard library.

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-09-20 Thread Jason Stumpf

Jason Stumpf added the comment:

I like that clearer description.  "as produce matches" is more correct than "as 
possible".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1615] descriptor protocol bug

2013-09-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
priority: high -> normal
versions:  -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> A separate new function now takes care of the reading of chunk-header and 
> tail.  This simplifies the other functions.

Good. It is even better than I expected.

> Do we gain anything by doing that, would it change the code? or would it 
> merely be for the benefit of ABC?

Yes, it for the benefit of ABC. Some code tests isinstance(file, 
io.BufferedIOBase) and wraps stream in BufferedReader if it is false.

> Note that the chunk protocol was wrong and I fixed the unittests:  The final 
> chunk is a _valid_ zero length chunk, i.e. 0\r\n\r\n.  It contains two eol 
> tokens like other chunks, one at the end of the length, the other at the end 
> of the(null) payload.

How new code processes invalid final chunk 0\r\n? We need test to check that 
there is no degradation.

Perhaps it relates to behavior change which I mention in the comment on 
Rietveld.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18050] embedded interpreter or virtualenv fails with "ImportError: cannot import name MAXREPEAT"

2013-09-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68a7d77a90c3 by Serhiy Storchaka in branch '3.3':
Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0
http://hg.python.org/cpython/rev/68a7d77a90c3

New changeset f27af2243e2a by Serhiy Storchaka in branch '2.7':
Issue #18050: Fixed an incompatibility of the re module with Python 2.7.3
http://hg.python.org/cpython/rev/f27af2243e2a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2013-09-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Marking this for Python 3.4.  It isn't a bug in the descriptor protocol; 
rather, it is an implementation detail that is sometimes helpful but is mostly 
annoying.

--
title: descriptor protocol bug -> PyObject_GenericGetAttr suppresses 
AttributeErrors in descriptors

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18050] embedded interpreter or virtualenv fails with "ImportError: cannot import name MAXREPEAT"

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Samuel for your report and suggested solution. Thank you Ned for 
additional investigating.

--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18003] lzma module very slow with line-oriented reading.

2013-09-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> > So why not simply use BufferedReader?
> 
> Because we want good performance LZMAFile and compatibility with older
> versions.

You're reading me wrong. I'm simply suggesting that users interested in
readline() performance wrap LZMAFile in a BufferedReader. The
documentation can mention it.

>  And I guess that it will be even faster than wrapping in
> BufferedReader (due to the avoiding of double buffering).

Let's wait for the numbers, then. The performance increase would have to
be quite large to justify such code duplication.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18003] lzma module very slow with line-oriented reading.

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> So why not simply use BufferedReader?

Because we want good performance LZMAFile and compatibility with older 
versions. And I guess that it will be even faster than wrapping in 
BufferedReader (due to the avoiding of double buffering).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18575] Fixing tarfile._mode when using gzip via ":gz"

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps we should rather change GzipFile.mode to be a string?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Note for the different interpretation of the final chunk:
> Chunked encoding allows for adding headers after the final chunk.
> This is what _read_and_discard_trailer() does, but discarding the
> trailing headers.  So, if support is ever added for reading those
> trailing headers, then we need make sure that we consume the last
> chunk correctly.

I think what Serhiy is proposing is that we also succeed when the
server sends a truncated last chunk (and I agree with him).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3015] tkinter with wantobjects=False has been broken for some time

2013-09-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3015] tkinter with wantobjects=False has been broken for some time

2013-09-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 08c45e18e7b2 by Serhiy Storchaka in branch '3.3':
Issue #3015: Fixed tkinter with wantobject=False.  Any Tcl command call
http://hg.python.org/cpython/rev/08c45e18e7b2

New changeset 65dd0de6b4a5 by Serhiy Storchaka in branch 'default':
Issue #3015: Fixed tkinter with wantobject=False.  Any Tcl command call
http://hg.python.org/cpython/rev/65dd0de6b4a5

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3015] tkinter with wantobjects=False has been broken for some time

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which change the default value for the wantobjects parameter of 
_tkinter.create() and adds deprecation warnings.

--
stage:  -> patch review
type:  -> behavior
versions:  -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Ok, I can change the base class inheritance and see if it changes things.

Note for the different interpretation of the final chunk:
Chunked encoding allows for adding headers after the final chunk.  This is what 
_read_and_discard_trailer() does, but discarding the trailing headers.  So, if 
support is ever added for reading those trailing headers, then we need make 
sure that we consume the last chunk correctly.
It is, of course, a matter of resilience, v.s. correctness, but the lesson of 
Internet Explorer should tell us to prefer correctness over flexibility, I 
think.  
We can, of course, change this back. if you think.  It is ieasier now, that the 
chunk consumer is in a single method.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3015] tkinter with wantobjects=False has been broken for some time

2013-09-20 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

> Here is a patch

You again forgot to attach a patch :) .

--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19049] itertools.tee uses int for indices

2013-09-20 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19049] itertools.tee uses int for indices

2013-09-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 900bf633b7f4 by Antoine Pitrou in branch 'default':
Add a comment making it explicit that itertools.tee() is already 64bit-safe 
(issue #19049)
http://hg.python.org/cpython/rev/900bf633b7f4

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19050] crash while writing to a closed file descriptor

2013-09-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't get a crash under Linux. Perhaps this is a Windows-specific thing.

--
components: +Interpreter Core, Windows -Library (Lib)
nosy: +brian.curtin, pitrou, tim.golden, tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3015] tkinter with wantobjects=False has been broken for some time

2013-09-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, thanks Arfrever.

--
Added file: http://bugs.python.org/file31827/tkinter_deprecate_wantobjects.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Ok, I can make it resilient.  I was just pointing out that resilience in the 
face of RFC violations can be a bad thing.  E.g. Internet explorer and how they 
allowed internet servers of the world to be lax in how they served their data.
No matter, I can allow truncated tails when reading chunks.  But I don't think 
we ought to make that a requirement or make special unit tests for that.  
Either you read chunked encoding correctly or you don't.  There are so many 
different ways you can break protocol, that this particular one is really only 
a special case.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19058] test_ioencoding_nonascii (test_sys) fails on Snow Leopard

2013-09-20 Thread Antoine Pitrou

New submission from Antoine Pitrou:

The test added in issue18818 fails on the new OS X buildbot:

==
FAIL: test_ioencoding_nonascii (test.test_sys.SysModuleTest)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_sys.py", 
line 581, in test_ioencoding_nonascii
self.assertEqual(out, os.fsencode(test.support.FS_NONASCII))
AssertionError: b'' != b'\xc3\xa6'

http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/4

--
components: Tests
messages: 198174
nosy: haypo, pitrou, r.david.murray, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: test_ioencoding_nonascii (test_sys) fails on Snow Leopard
type: behavior
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19049] itertools.tee uses int for indices

2013-09-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Ok, I can make it resilient.  I was just pointing out that resilience
> in the face of RFC violations can be a bad thing.  E.g. Internet
> explorer and how they allowed internet servers of the world to be lax
> in how they served their data.

I'm afraid the ship has sailed a long time ago on that. Poor HTTP
implementations are everywhere.

> No matter, I can allow truncated tails when reading chunks.  But I
> don't think we ought to make that a requirement or make special unit
> tests for that.

Well, the unit tests already exist, which is why I think we shouldn't
stop supporting that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19009] Enhance HTTPResponse.readline() performance

2013-09-20 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Very well, let's support both then :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19058] test_ioencoding_nonascii (test_sys) fails on Snow Leopard

2013-09-20 Thread STINNER Victor

STINNER Victor added the comment:

The test fails with ASCII locale encoding (ex: LANG= on Linux).

The test should not try to display a non-ASCII character, but should check the 
encoding (sys.stdout.encoding) instead. The test should ensure that 
sys.stdout.encoding is the same with the PYTHONIOENCODING unset (python started 
with -E option and the current environment) and with the variable set to an 
empty value.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19059] test_posix failure on OS X snow leopord buildbot

2013-09-20 Thread R. David Murray

New submission from R. David Murray:

The new OS X buildbot is failing in test_posix:

==
FAIL: test_getgroups (test.test_posix.PosixTester)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_posix.py",
 line 734, in test_getgroups
set(posix.getgroups() + [posix.getegid()]))
AssertionError: Items in the second set but not the first:
1

I can't reproduce this at the command line, so it probably has something to do 
with the fact that buildbot is running in daemon mode.

--
components: Tests
keywords: buildbot
messages: 198177
nosy: r.david.murray
priority: normal
severity: normal
status: open
title: test_posix failure on OS X snow leopord buildbot
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19059] test_posix failure on OS X snow leopord buildbot

2013-09-20 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19059] test_posix failure on OS X snow leopord buildbot

2013-09-20 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> ronaldoussoren
components: +Macintosh
nosy: +ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-20 Thread R. David Murray

R. David Murray added the comment:

I've spun up a 10.6.8 OS X buildbot.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19048] itertools.tee doesn't have a __sizeof__ method

2013-09-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
versions:  -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15475] Correct __sizeof__ support for itertools

2013-09-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: serhiy.storchaka -> rhettinger
versions:  -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19048] itertools.tee doesn't have a __sizeof__ method

2013-09-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> getsizeof() is interesting only if it gives sensible results 
> when used correctly, especially if you want to sum these values
> and get a global memory usage.

If accounting for global memory usage is a goal, it needs to have a much more 
comprehensively thought out, implementation dependent approach.  There are many 
issues (memory fragmentation, key-sharing dictionaries, dummy objects, list 
over-allocation, the minsize dictionary that is part of the dict object in 
addition to its variable sized portion, non-python objects held by Python 
objects, the extra few bytes per object consumed by the freelisting scheme in 
Objects/obmalloc.c etc).

> The thing is, "Total size" is generally meaningless. 

I concur.  This is a pipe dream without a serious investment of time and 
without creating a new and unnecessary maintenance burden.

> (By the way, OrderedDict.__sizeof__ already breaks the
> rule you are trying to impose)

FWIW, the way OrderedDict computes sizeof is probably typical of how anyone is 
currently using sys.getsizeof().   If you change the premise of how it 
operates, you're probably going to break the code written by the very few 
people in the world who care about sys.getsizeof():

def __sizeof__(self):
sizeof = _sys.getsizeof
n = len(self) + 1   # number of links including root
size = sizeof(self.__dict__)# instance dictionary
size += sizeof(self.__map) * 2  # internal dict and inherited 
dict
size += sizeof(self.__hardroot) * n # link objects
size += sizeof(self.__root) * n # proxy objects
return size

I don't have any specific recommendation for itertools.tee other than that I 
think it doesn't really need a __sizeof__ method.  The typical uses of tee are 
a transient phenomena that temporarily use some memory and then disappear.  I'm 
not sure that any mid-stream sizeof checks reveal information of any worth.

Overall, this thread indicates that the entire concept of __sizeof__ has been 
poorly defined, unevenly implemented, and not really useful when aggregated.

For those who are interested in profiling and optimizing Python's memory usage, 
I think we would be much better off providing a memory allocator hook that can 
know about every memory allocation and how those allocations have been arranged 
(revealing the fragmentation of the unused memory in the spaces between).  
Almost anything short of that will provide a grossly misleading picture of 
memory usage.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19059] test_posix failure on OS X snow leopord buildbot

2013-09-20 Thread Ned Deily

Ned Deily added the comment:

>From irc, I believe RDM has changed the buildbot to run under a group that the 
>user is a member of ("staff") and so I think this issue can be closed.  David?

--
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19059] test_posix failure on OS X snow leopord buildbot

2013-09-20 Thread R. David Murray

R. David Murray added the comment:

Yes, the problem turned out to be that the buildslave process was running under 
group 'daemon' (1), but the buildbot userid that it was running under was not 
part of that group.  So I changed the run group to 'staff', which buildbot is a 
member of, and the test passed.  So I consider this a bug in the buildbot setup 
rather than a bug in the test.

--
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19059] test_posix failure on OS X snow leopord buildbot

2013-09-20 Thread R. David Murray

Changes by R. David Murray :


--
resolution: out of date -> invalid

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19058] test_ioencoding_nonascii (test_sys) fails on Snow Leopard

2013-09-20 Thread R. David Murray

R. David Murray added the comment:

I set LC_CTYPE to en_US.utf-8 on the buildbot, which I think is the better 
setting for that buildbot, so the test doesn't fail there anymore.  However, 
the test should still be fixed (and maybe we should have a buildbot running 
with no language set at all).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Changes by Marco Buttu :


Removed file: http://bugs.python.org/file31820/py3howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Changes by Marco Buttu :


Removed file: http://bugs.python.org/file31821/py2howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Changes by Marco Buttu :


Added file: http://bugs.python.org/file31829/py2howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Marco Buttu added the comment:

Maybe is better to underline the difference between classes and non-classes 
objects, instead of between objects and classes, because a class is an object, 
so it could be confusing). 
Raymond, what do you think about rewriting this sentence:

  `The details of invocation depend on whether obj is an object or a class.`

as:

  `The details of invocation depend on whether obj is a class or not.`

I upload two new patches (one for py2 and the other for py3)

--
Added file: http://bugs.python.org/file31828/py3howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Changes by Marco Buttu :


Removed file: http://bugs.python.org/file31829/py2howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Changes by Marco Buttu :


Added file: http://bugs.python.org/file31830/py2howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Changes by Marco Buttu :


Removed file: http://bugs.python.org/file31828/py3howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Marco Buttu

Marco Buttu added the comment:

I saw right now your decision about keeping object in the Python 3 doc:

http://bugs.python.org/issue17351#msg183870

So, now the py3 patch takes in account just the indentation of the 
`RevealAccess` example and the "class or not" suggestion.

--
Added file: http://bugs.python.org/file31831/py3howto.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2013-09-20 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
priority: normal -> low

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19054] Descriptors howto

2013-09-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The indentation is not incorrect.  What you're seeing is normal for the 
interactive prompt.

Also, it is not incorrect to inherit from object in Python 3.
There is some value in keeping the document the same between versions.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18990] Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser

2013-09-20 Thread Stefan Behnel

Stefan Behnel added the comment:

> Just as an example: consider that in a lot of use cases the programmer will 
> want to discard parts of the tree that's parsed iteratively (similarly to the 
> main use case of iterparse()), because the XML itself is too huge. It's a 
> convenient streaming API, in other words. Now, if the reader discards parts 
> of the tree (by deleting subtrees), then returning the root from close() 
> becomes even more meaningless, because it's no longer the root and we have no 
> idea what it actually is.

Well, that's how the parser API works. It's the target's responsibility to make 
something (really, anything) of the parser's callbacks. Why change this for 
XMLPullParser if it already works that way for both XMLParser and iterparse() ? 
It's an inherent part of the design, and it really fits together just fine.

I don't like the idea of deliberately adding surprises to an otherwise simple 
API, especially if they clearly restrict future developments.


> Finally, I will add that we can always err on the side of under-specifying. 
> We plan to change the implementation of the class in the future, so we can 
> always add to the API. Specifying that close() returns the root is something 
> we can't back out of, but we can always add in a future release without 
> hurting backwards compatibility, if we do reach the conclusion that it's 
> better.

Eli, if you had taken a look at my patch (and also a closer look at some of my 
earlier patches), you would have noticed that it not only makes close() behave 
as expected, but also removes the ".root" attribute from the parser. This 
removes a very unfortunate design decision in iterparse() that has bugged me 
several times in the past already, because it really gets in the way of both 
the implementation and the usage. Please keep that a misfeature only of 
iterparse() and do not repeat this mistake in this newly introduced API.

In fact, my decision to make XMLPullParser.close() consistent with 
XMLParser.close() was mostly motivated by this change, not the other way round.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com