[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2011-07-13 Thread Matt Joiner

Matt Joiner  added the comment:

I get this on Linux with ^D

--
nosy: +anacrolix

___
Python tracker 

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



[issue12554] Failed imports clean up module, but not sub modules

2011-07-13 Thread Eric Snow

Eric Snow  added the comment:

Yeah, I missed the line where he imported foo.bar in "foo/__init__.py", and 
thought something else was going on.
  
"foo/__init__.py" does not have to finish importing (just has to be on 
sys.modules) at the point foo.bar is imported.  So foo.bar would be completely 
imported before the "1/0" expression was evaluated, and you are exactly right, 
David.

Sorry for adding to the confusion.

--

___
Python tracker 

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



[issue8916] Move PEP 362 (function signature objects) into inspect

2011-07-13 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

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



[issue12554] Failed imports clean up module, but not sub modules

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

In fact, to hopefully make perfectly clear what is going on here, let me 
demonstrate that *any* executable statement in the module that fails to load is 
executed if it occurs before the error that causes the load failure:

rdmurray@hey:~/python/p32>cat temp.py
import os

print('foo:', hasattr(os, 'foo'))

try:
import temp2
except AttributeError:
print('attribute error')

print('temp2:', 'temp2' in globals())
print('foo:', hasattr(os, 'foo'))
rdmurray@hey:~/python/p32>cat temp2.py
import os

os.foo = 2
os.bar

rdmurray@hey:~/python/p32>./python temp.py
foo: False
attribute error
temp2: False
foo: True

--

___
Python tracker 

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



[issue12550] regrtest: register SIGALRM signal using faulthandler

2011-07-13 Thread STINNER Victor

STINNER Victor  added the comment:

My patch doesn't work: the traceback is not printed:
--
$ ./python -m test -v -u network -F test_threadsignals
(...)
[106] test_socketserver
(...)
test_UnixStreamServer (test.test_socketserver.SocketServerTest) ... creating 
server
ADDR = /tmp/unix_socket.wuwy8y
CLASS = 
server running
test client 0
test client 1
test client 2
waiting for server
done
ok
test_shutdown (test.test_socketserver.SocketServerTest) ... Alarm clock: 14
--

SocketServerTest uses a timeout of 20 seconds implemented using signal.alarm(). 
I suppose that the timeout is too small for this very slow buildbot.

--

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file22648/d305942126b6.diff

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file22650/9bb6b71f172d.diff

___
Python tracker 

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



[issue12554] Failed imports clean up module, but not sub modules

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

Yes, that's exactly my point.  The loading of a module into sys.modules is a 
separate issue from the creation of a pointer to that module in the local name 
space.  Once the former succeeds, it has succeeded and won't be done again.  
When the module that did the import fails to complete, *it* is cleaned up, 
which cleans up the pointer in the local name space, but that doesn't (by 
design) affect sys.modules.

It's not all that dissimilar to what would happen if you had top-level code in 
your module that opened and wrote to a file.  If an exception later in the 
module code causes it to fail to load, the file it created would not be deleted.

--

___
Python tracker 

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



[issue665194] datetime-RFC2822 roundtripping

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

OK, here is a new patch proposal.  As suggested by Alexander, it adds two 
functions to email.utils: format_datetime and parsedate_to_datetime.  Adding 
these does not require having localtime.  In fact, with this patch you can get 
an aware datetime representing email's current best guess at localtime by doing:

   dt = parsedate_to_datetime(formatdate(localtime=True))

Reviews welcome, but this is simple enough I'll probably just commit it if no 
one objects.

--
assignee: belopolsky -> r.david.murray
Added file: http://bugs.python.org/file22649/util_datetime.patch

___
Python tracker 

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



[issue12554] Failed imports clean up module, but not sub modules

2011-07-13 Thread Eric Snow

Eric Snow  added the comment:

But it is curious that the submodules were added to sys.modules even though the 
package failed to import.

--
nosy: +ericsnow

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

(I'm sorry for the filenames. I'm using the "create patch" feature in the hope 
that a code review is possible through the Rietveld integration :-))

--

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file22648/d305942126b6.diff

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue12551] Provide data for TLS channel binding

2011-07-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you, this looks mostly good.
A couple of nits:

+#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
+# define HAVE_OPENSSL_FINISHED 1
+#else
+# undef HAVE_OPENSSL_FINNISHED
+#endif

you have a typo in the #undef, also it would be more logical to have
  # define HAVE_OPENSSL_FINISHED 0
instead.

_ssl.c will not compile if OpenSSL is too old, because you lack some #if's (or 
#ifdef's) around PySSL_tls_unique_cb.

Also, it would be nice to expose the availability of tls-unique as a public 
constant, as we already do for "ssl.HAS_SNI". ssl.HAS_TLS_UNIQUE?

Similarly, you need to skip some of the tests when the functionality isn't 
available.
And I think get_channel_binding() should raise NotImplementedError in that case.

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file22647/cac46b853098.diff

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
keywords: +patch
Added file: http://bugs.python.org/file22647/cac46b853098.diff

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
hgrepos: +41

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-07-13 Thread Antoine Pitrou

New submission from Antoine Pitrou :

I now have a working PEP 3151 implementation, working on various platforms 
(tested on Linux, Windows, FreeBSD and OpenIndiana buildbots).

The implementation has all the semantic changes and additions in PEP 3151. It 
still lacks the deprecation mechanism mentioned in "step 1" of the PEP.

The implementation is at http://hg.python.org/features/pep-3151/ in the branch 
named "pep-3151".

--
assignee: pitrou
components: Interpreter Core
messages: 140314
nosy: barry, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: PEP 3151 implementation
type: feature request
versions: Python 3.3

___
Python tracker 

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



[issue12536] lib2to3 BaseFix class creates un-needed loggers leading to refleaks

2011-07-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset dd004e85e299 by Vinay Sajip in branch 'default':
Closes #12536: Unused logger removed from lib2to3.
http://hg.python.org/cpython/rev/dd004e85e299

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

___
Python tracker 

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



[issue12549] test_platform test_mac_ver fails on Darwin x86_64

2011-07-13 Thread Ned Deily

Changes by Ned Deily :


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

___
Python tracker 

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



[issue12549] test_platform test_mac_ver fails on Darwin x86_64

2011-07-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0a53a978a160 by Ned Deily in branch '2.7':
Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
http://hg.python.org/cpython/rev/0a53a978a160

New changeset d050c8c9a3b3 by Ned Deily in branch '3.2':
Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
http://hg.python.org/cpython/rev/d050c8c9a3b3

New changeset 0025ce38fbd0 by Ned Deily in branch 'default':
Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
http://hg.python.org/cpython/rev/0025ce38fbd0

--
nosy: +python-dev

___
Python tracker 

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



[issue12550] regrtest: register SIGALRM signal using faulthandler

2011-07-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 30f91fbfc8b3 by Victor Stinner in branch 'default':
Issue #12550: regrtest displays the Python traceback on SIGALRM or SIGUSR1
http://hg.python.org/cpython/rev/30f91fbfc8b3

--

___
Python tracker 

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



[issue12550] regrtest: register SIGALRM signal using faulthandler

2011-07-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 39873557ff4f by Victor Stinner in branch 'default':
Issue #12550: Add chain optional argument to faulthandler.register()
http://hg.python.org/cpython/rev/39873557ff4f

--
nosy: +python-dev

___
Python tracker 

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



[issue9592] Limitations in objects returned by multiprocessing Pool

2011-07-13 Thread STINNER Victor

STINNER Victor  added the comment:

A recent test_rapid_restart hang:

[ 14/357] test_multiprocessing
Timeout (1:00:00)!
Thread 0xb18c4b70:
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 237 in wait
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 
185 in get
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 376 in _handle_results
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 in _bootstrap

Thread 0xb20c5b70:
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 237 in wait
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 
185 in get
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 335 in _handle_tasks
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 in _bootstrap

Thread 0xb28c6b70:
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 326 in _handle_workers
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 in _bootstrap

Thread 0xb30c7b70:
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 237 in wait
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 
185 in get
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 102 in worker
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 in _bootstrap

Thread 0xb38c8b70:
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 237 in wait
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 
185 in get
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 102 in worker
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 in _bootstrap

Thread 0xb40c9b70:
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 237 in wait
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 
185 in get
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 102 in worker
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 in _bootstrap

Thread 0xb48cab70:
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 237 in wait
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 
185 in get
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 102 in worker
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 in _bootstrap

Thread 0xb50cbb70:
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py",
 line 411 in _recv
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py",
 line 432 in _recv_bytes
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py",
 line 275 in recv
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", 
line 376 in _handle_results
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 690 in run
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 737 in _bootstrap_inner
  File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", 
line 710 

[issue1559549] ImportError needs attributes for module and file name

2011-07-13 Thread Brett Cannon

Brett Cannon  added the comment:

No, we don't need attribute_name as that is getting too specific. Your example 
is simply importing validmodule.name_with_typo which happens to possibly be an 
attribute on the module instead of another module or subpackage.

--

___
Python tracker 

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



[issue12549] test_platform test_mac_ver fails on Darwin x86_64

2011-07-13 Thread Ned Deily

Ned Deily  added the comment:

Thanks for running that.  I guess the significant difference is having an i5 
processor.  We'll need to fix it.

--
assignee: ronaldoussoren -> ned.deily
stage:  -> needs patch

___
Python tracker 

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



[issue12549] test_platform test_mac_ver fails on Darwin x86_64

2011-07-13 Thread Davide Rizzo

Davide Rizzo  added the comment:

I first saw it failing on 3.3 while testing for another bug, then run the test 
on other versions including 2.7 and it always fails. System Python 2.6 does NOT 
fail, but it has no _mac_ver_xml().

This is a MacBook Pro 13" with Intel Core i5.


$ uname -m
x86_64
$ ./python.exe 
Python 3.3.0a0 (default:e0cd35660ae9, Jul 13 2011, 11:02:57) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[63386 refs]
>>> sys.maxsize
9223372036854775807
[63389 refs]
>>> import platform
[65649 refs]
>>> platform.mac_ver()
('10.6.8', ('', '', ''), 'x86_64')
[69688 refs]
>>> platform._mac_ver_xml()
('10.6.8', ('', '', ''), 'x86_64')
[69733 refs]
>>> platform._mac_ver_gestalt()
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/davide/cpython/Lib/platform.py", line 682, in _mac_ver_gestalt
return release,versioninfo,machine
NameError: global name 'versioninfo' is not defined
[69809 refs]
>>> import os
[69811 refs]
>>> os.uname()
('Darwin', 'Brude.local', '10.8.0', 'Darwin Kernel Version 10.8.0: Tue Jun  7 
16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64', 'x86_64')
[69814 refs]





The following is with System Python 2.6 on the same OS:

Python 2.6.1 (r261:67515, Aug  2 2010, 20:10:18) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.mac_ver()
('10.6.8', ('', '', ''), 'i386')
>>> import sys
>>> sys.maxsize
9223372036854775807




Then Python 2.7 from www.python.org:

Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
9223372036854775807
>>> import platform
>>> platform.mac_ver()
('10.6.8', ('', '', ''), 'x86_64')
>>> platform._mac_ver_xml()
('10.6.8', ('', '', ''), 'x86_64')
>>> platform._mac_ver_gestalt()
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", 
line 768, in _mac_ver_gestalt
return release,versioninfo,machine
NameError: global name 'versioninfo' is not defined



If you need any more info feel free to ask.

--

___
Python tracker 

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



[issue2506] Add mechanism to diasable optimizations

2011-07-13 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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

___
Python tracker 

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



[issue2506] Add mechanism to diasable optimizations

2011-07-13 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Choose pydev if you want. Discussion there is *usually* (but definitely not 
always) more focused on implementation of uncontroversial changes. I am pretty 
much +-0 on the issue, though Jean-Paul's post seems to add to the + side 
arguments that might be persuasive to others also.

--

___
Python tracker 

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



[issue2506] Add mechanism to diasable optimizations

2011-07-13 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Choose pydev if you want. Discussion there is *usually* (but definitely not 
always) more focused on implementation of uncontroversial changes. I am pretty 
much +-0 on the issue, though Jean-Paul's post seems to add to the + side 
arguments that might be persuasive to others also.

--

___
Python tracker 

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



[issue12549] test_platform test_mac_ver fails on Darwin x86_64

2011-07-13 Thread Ned Deily

Ned Deily  added the comment:

I have never seen this failure on any Apple x86_64 running 10.x including 
10.6.8.  Could you please report what Mac model you are running on and the 
output from running the following:

$ uname -m
$ /path/to/your/python
Python 3.2.1 (v3.2.1:ac1f7e5c0510, Jul  9 2011, 01:03:53) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
9223372036854775807
>>> import platform
>>> platform.mac_ver()
('10.6.8', ('', '', ''), 'i386')
>>> platform._mac_ver_xml()
('10.6.8', ('', '', ''), 'i386')
>>> platform._mac_ver_gestalt()  # a bug!
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/platform.py", 
line 761, in _mac_ver_gestalt
return release,versioninfo,machine
>>> import os
>>> os.uname()
('Darwin', 'fimt.baybryj.net', '10.8.0', 'Darwin Kernel Version 10.8.0: Tue Jun 
 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386', 'i386')

Thanks!

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread STINNER Victor

STINNER Victor  added the comment:

I commited your fix, thanks Vlad!

--

___
Python tracker 

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



[issue12554] Failed imports clean up module, but not sub modules

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

That can't be done.  If an import fails, it fails.  But if it succeeds, the 
module is loaded, and there is no reason to unload it.  After all, import in 
python is idempotent (doing it a second time has no effect other than adding 
the name to the local namespace).  So the import in the module that failed to 
load may not be the first, and unloading it would break other modules using it.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 72e73fa03124 by Victor Stinner in branch '3.2':
Close #4376: ctypes now supports nested structures in a endian different than
http://hg.python.org/cpython/rev/72e73fa03124

New changeset 637210b9d054 by Victor Stinner in branch 'default':
(merge 3.2) Close #4376: ctypes now supports nested structures in a endian
http://hg.python.org/cpython/rev/637210b9d054

New changeset a9d0fab19d5e by Victor Stinner in branch '2.7':
Close #4376: ctypes now supports nested structures in a endian different than
http://hg.python.org/cpython/rev/a9d0fab19d5e

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

___
Python tracker 

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



[issue12554] Failed imports clean up module, but not sub modules

2011-07-13 Thread Calvin Spealman

New submission from Calvin Spealman :

I came across this behavior when it was related to the shadowing of a small 
typo bug and took me forever to find. In my case, the original error was 
shadowed in a way that is unrelated to this bug, but lead to the module being 
imported twice (because it was removed when it failed the first time) and then 
the second import caused a completely unexpected error, because the state of 
the submodules conflicted with the import-time logic of the top-level package.

I think when a module fails to load, all of its sub-modules should be removed 
from sys.modules, not just itself.

calvin@willow-delta:/tmp$ mkdir foo/
calvin@willow-delta:/tmp$ cat >> foo/__init__.py
import foo.bar
1/0
calvin@willow-delta:/tmp$ cat >> foo/bar.py
name = "bar"
calvin@willow-delta:/tmp$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import foo
Traceback (most recent call last):
  File "", line 1, in 
  File "foo/__init__.py", line 2, in 
1/0
ZeroDivisionError: integer division or modulo by zero
>>> import sys
>>> sys.modules['foo.bar']

>>>

--
components: Interpreter Core
messages: 140298
nosy: Calvin.Spealman
priority: normal
severity: normal
status: open
title: Failed imports clean up module, but not sub modules
type: behavior

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

Michael, if you have no objection to this patch I'm willing to commit it.

--

___
Python tracker 

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



[issue12549] test_platform test_mac_ver fails on Darwin x86_64

2011-07-13 Thread Davide Rizzo

Davide Rizzo  added the comment:

No, it's 10.6.8. Now that I think of it I updated from 10.6.7
recently. But I have no 10.6.7 x86_64 bit machine where to test.

--

___
Python tracker 

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



[issue12551] Provide data for TLS channel binding

2011-07-13 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue12549] test_platform test_mac_ver fails on Darwin x86_64

2011-07-13 Thread Ned Deily

Ned Deily  added the comment:

What version of OS X are you running this on?  10.7 perhaps?  AFAIK, uname has 
always reported 'i386' for Intel machines.

--
nosy: +ned.deily

___
Python tracker 

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



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-13 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue12552] email.MIMEText overide BASE64 for utf8 charset

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

Good point.  In 2.x that will work, and will give you the 8bit CTE at need, as 
long as you pass encoded text to MIMEText (as opposed to unicode...which it 
doesn't really handle correctly if I recall right).

--

___
Python tracker 

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



[issue12551] Provide data for TLS channel binding

2011-07-13 Thread Jacek Konieczny

Jacek Konieczny  added the comment:

Here is a patch, ready for review. Seems to work, though I still need to check 
it with some other implementation.

I have chosen not to expose another three OpenSSL functions (SSL_get_finished, 
SSL_get_peer_finished, SSL_session_reused), but provide API just for getting 
the channel binding. If OpenSSL provides a better API some day (gnutls already 
has a dedicated function), we can use that.

The method added to SSLSocket - get_channel_binding() currently can return only 
the 'tls-unique' channel binding type, but can be easily extended for other 
types, which also may be easier to get from the C module.

--
keywords: +patch
Added file: http://bugs.python.org/file22646/tls_channel_binding.patch

___
Python tracker 

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



[issue11183] Finer-grained exceptions for the ssl module

2011-07-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Note: the ERR_GET_REASON() macro helps get a more precise explanation of an 
error. We could add a reason attribute to raised exceptions, and also provide a 
mnemonic-integer mapping.

--
stage:  -> needs patch

___
Python tracker 

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



[issue12552] email.MIMEText overide BASE64 for utf8 charset

2011-07-13 Thread Blame-me Jaillie

Blame-me Jaillie  added the comment:

Very much obliged to you - as pointed out by R David Murray:

  from email import charset
  charset.add_charset('utf-8', charset.SHORTEST, charset.QP)

This works exactly as expected - but to expand for anyone else who happens 
across this, this will result in quoted printable transfer encoding. Removing 
the final 'charset.QP' results in (for me) the desired 7bit. 

Again, sincere thanks to R David Murray for pointing me in the correct way, and 
making my first experience with a Python 'issue' painless and flame free. 
Really appreciated.

--

___
Python tracker 

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



[issue2506] Add mechanism to diasable optimizations

2011-07-13 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I think supporters of this feature request should take discussion to 
python-ideas to try to gather more support. The initial post should summarize 
reasons for the request, possible implementations, and the counter-arguments of 
Raymond.

--
title: Line tracing of continue after always-taken if is incorrect -> Add 
mechanism to diasable optimizations
type: behavior -> feature request
versions: +Python 3.3 -Python 2.3, Python 2.4, Python 2.5, Python 2.6

___
Python tracker 

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



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-13 Thread Kuberan Naganathan

Kuberan Naganathan  added the comment:

I did some testing on this.  Solaris seems to treat files as a large
circular buffer of size 2^64 with respect to seeks in the /proc file system
address space file. No error results with seeks of greater than 2^63 with
any of SEEK_SET, SEEK_CUR, SEEK_END.  This is not true of a regular file
where I get errno=22 when seeking to an offset greater than or equal to
2^63.

So even on solaris the behavior seems to be filesystem dependent.

--
Added file: http://bugs.python.org/file22645/unnamed

___
Python tracker 

___I did some testing on this.  Solaris seems to treat files as a large 
circular buffer of size 2^64 with respect to seeks in the /proc file system 
address space file. No error results with seeks of greater than 2^63 with any 
of SEEK_SET, SEEK_CUR, SEEK_END.  This is not true of a regular file where I 
get errno=22 when seeking to an offset greater than or equal to 2^63.  

So even on solaris the behavior seems to be filesystem dependent.  
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12552] email.MIMEText overide BASE64 for utf8 charset

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

Opened issue 12553 for the 8bit feature request.

--

___
Python tracker 

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



[issue12553] email should default to 8bit CTE unless policy.must_be_7bit is set

2011-07-13 Thread R. David Murray

New submission from R. David Murray :

Most MTA/MTUs these days can handle 8bit just fine.  I think that the CTE for 
MIMEText parts should default to 8bit unless policy.must_be_7bit is set.  This 
will require adding support for this CTE to Charset.  The Policy docs imply 
that this is already the case, but it is not true for MIMEText objects.

--
components: Library (Lib)
messages: 140287
nosy: Blame-me.Jaillie, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: email should default to 8bit CTE unless policy.must_be_7bit is set
type: feature request
versions: Python 3.3

___
Python tracker 

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



[issue12552] email.MIMEText overide BASE64 for utf8 charset

2011-07-13 Thread R. David Murray

R. David Murray  added the comment:

This should do what you want:

  from email import charset
  charset.add_charset('utf-8', charset.SHORTEST, charset.QP)

This will override the default handling of utf-8 (which is BASE64, as you note).

If this doesn't solve your problem please reopen the issue.

It is a valid feature request (for 3.3) to have a way to make this '8bit'.  I 
think I'll open an issue for that.

--
assignee:  -> r.david.murray
components: +Library (Lib) -None
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
title: email.MIMEText overide BASE64 on TEXT/HTML -> email.MIMEText overide 
BASE64 for utf8 charset

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Vlad Riscutia

Vlad Riscutia  added the comment:

You're right. I was busy swapping bytes in my head and missed that :)

--
Added file: http://bugs.python.org/file22644/issue4376_fix.diff

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Vlad Riscutia

Changes by Vlad Riscutia :


Removed file: http://bugs.python.org/file22643/issue4376_fix.diff

___
Python tracker 

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



[issue2506] Line tracing of continue after always-taken if is incorrect

2011-07-13 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread STINNER Victor

STINNER Victor  added the comment:

> But if you set raw memory to let's say b'\0\0\0\1',
> when you look at the c_int value afterwards, won't it
> be different on little endian and big endian machines?

A big endian structure is supposed to read and write memory in the... big 
endian order, not in the host endian.

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Jake

Changes by Jake :


--
nosy:  -Jake.Coffman

___
Python tracker 

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



[issue3177] implement os.startfile on posix and MacOSX

2011-07-13 Thread Ram Rachum

Ram Rachum  added the comment:

Eric, I have no problem with this function being placed in `shutil` instead of 
`os`, as long as it's implemented and it's in the standard library, and people 
don't have to use subprocess to run open or xdg-open themselves as I currently 
do.

So I have no problem with renaming this bug to "Add shutil.open".

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Vlad Riscutia

Vlad Riscutia  added the comment:

But if you set raw memory to let's say b'\0\0\0\1', when you look at the c_int 
value afterwards, won't it be different on little endian and big endian 
machines?

--

___
Python tracker 

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



[issue11470] Flag inappropriate uses of callable class attributes

2011-07-13 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

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



[issue1559549] ImportError needs attributes for module and file name

2011-07-13 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

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



[issue2506] Line tracing of continue after always-taken if is incorrect

2011-07-13 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

Since the main argument for not fixing this bug seems to be that it doesn't 
affect many users, it seems like I should comment here that the issue is 
affecting me.  A recently proposed addition to Twisted gets bitten by this 
case, resulting in a report of less than full test coverage when in fact the 
tests do exercise every line and branch of the change.

Perhaps it is too hard to add and maintain a no-optimizations feature for 
Python (although I agree with Ned that this would be a useful feature for many 
reasons, not just to fix this bug).  There are other possible solutions to the 
issue of inaccurate coverage reports though.

For example, Python could provide an API for determining which lines have code 
that might be executed.  coverage.py (and the stdlib trace.py) currently use 
the code object's lnotab to decide which lines might be executable.  Maybe that 
should omit "continue" lines that get jumped over.  If the line will never 
execute, it seems there is no need to have it in the lnotab.

Using the lnotab is something of a hack though, so it might also make sense to 
leave it alone but introduce an API to get the same information, but corrected 
for whatever peephole optimizations the interpreter happens to have.

As far as the "not a bug" arguments go, I don't think it matters much whether 
you ultimately decide to call it a bug or a feature request.  It *is* clearly a 
useful feature to some people though, and rejecting the requested behavior as 
"not a bug" doesn't help anyone.  So call it a feature request if that makes it 
more palletable. :)

--
nosy: +exarkun
resolution: wont fix -> 
status: closed -> open

___
Python tracker 

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



[issue10224] Build 3.x documentation using python3.x

2011-07-13 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

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



[issue3177] implement os.startfile on posix and MacOSX

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

So, unless someone wants to turn this request into “Add shutil.open”, I’ll 
close it in a few days.  (I haven’t found the original discussion; if someone 
could add a link to the archives on mail.python.org or copy relevant quotes, it 
could help.)

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread STINNER Victor

STINNER Victor  added the comment:

I don't like your test because it depends on system endian:

+if sys.byteorder == "little":
+struct.menu.spam = 0x00FF
+else:
+struct.menu.spam = 0xFF00

I would prefer a test creating a structure from a byte string. Something like:
---
import ctypes

class Nested(ctypes.BigEndianStructure):
_fields_ = (
('x', ctypes.c_uint32),
('y', ctypes.c_uint32),
)

class TestStruct(ctypes.BigEndianStructure):
_fields_ = (
('point', Nested),
)

data = b'\0\0\0\1\0\0\0\2'
assert len(data) == ctypes.sizeof(TestStruct)
obj = ctypes.cast(data, ctypes.POINTER(TestStruct))[0]
assert obj.point.x == 1
assert obj.point.y == 2
---

Use b'\1\0\0\0\2\0\0\0' for little endian.

--

___
Python tracker 

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



[issue9285] Add a profile decorator to profile and cProfile

2011-07-13 Thread Collin Winter

Changes by Collin Winter :


--
nosy:  -collinwinter

___
Python tracker 

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

Here are comments on the doc patch.

+Run as a script
+---
I’d say “Command-Line Interface”.

+``smtpd`` is a pluggable RFC 2821-compliant SMTP proxy.
:mod:`smtpd` is also a pluggable etc.

+.. program:: smtpd.py
Strip the .py

+   the ``setuid``
Please use markup like :func:`os.setuid`.

+   flag in order to run ``smtpd`` as a regular user.
Use :mod:`smtpd` or :program:`smtp` (not very important).

+   Turns on verbose debugging prints (to stderr)
Turn on verbose debbugging, which prints to stderr.

+   The concrete SMTP proxy class ``smtpd`` should use to perform its
+   proxying.
Could you add a link to a section of the doc that defines such classes?

+.. option:: localhost:localport
Currently undocumented.

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Vlad Riscutia

Vlad Riscutia  added the comment:

Changed c_int in tests to c_int32 just to be on the safe side.

--
Added file: http://bugs.python.org/file22643/issue4376_fix.diff

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Vlad Riscutia

Changes by Vlad Riscutia :


Removed file: http://bugs.python.org/file22642/issue4376_fix.diff

___
Python tracker 

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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2011-07-13 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue3177] implement os.startfile on posix and MacOSX

2011-07-13 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

+1 on what Eric just said.
See issue 10882 and msg 126049

--

___
Python tracker 

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



[issue11698] Improve repr for structseq objects to show named, but unindexed fields

2011-07-13 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue5907] repr of time.struct_time type does not eval

2011-07-13 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue3177] implement os.startfile on posix and MacOSX

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

I’m not sure we want to copy the Windows startfile call for other OSes.  The os 
module is designed to wrap system-level calls, masking OS differences (for 
sendfile, for example) but not going further; it’s up to other modules (like 
shutil) to build more convenient APIs on top of what os provides.  xdg-open is 
a program that’s used to open files or URIs, but it does not provide other 
actions like Windows’ startfile does (edit, print, etc.), not is it backed by a 
system call.  For these reasons, I think it’s inappropriate to implement 
os.startfile for non-Windows systems.  People can use subprocess to run open or 
xdg-open.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12412] non defined representation for pwd.struct_passwd

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

Actually, I’ve found that there are some structseq’s repr that get tested in 
the CPython test suite.

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Vlad Riscutia

Vlad Riscutia  added the comment:

New patch containing unittest that actually tests the feature.

I would appreciate it if someone can try this on a bigendian machine.

--
Added file: http://bugs.python.org/file22642/issue4376_fix.diff

___
Python tracker 

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



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Im most familiar with solaris.  Atleast on solaris lseek interprets its
> signed arg as the unsigned value with the same bit pattern.

Only with SEEK_SET, I assume?

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-13 Thread Vlad Riscutia

Changes by Vlad Riscutia :


Removed file: http://bugs.python.org/file22627/issue4376_fix.diff

___
Python tracker 

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



[issue11344] Add os.path.splitpath(path) function

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

I’m not sure this is correct for POSIX:
  splitpath('/gparent/parent/') returns ['gparent', 'parent']

/ is a real directory, it should be the ultimate parent of any path IIUC.

On a related note, using “parent” for the leaf file looks strange to me, I 
think something like this would make more sense:

 /gparent/parent/somedir/

--

___
Python tracker 

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



[issue9285] Add a profile decorator to profile and cProfile

2011-07-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-13 Thread Kuberan Naganathan

Kuberan Naganathan  added the comment:

Im most familiar with solaris.  Atleast on solaris lseek interprets its
signed arg as the unsigned value with the same bit pattern.  I cannot be
certain that this is common across other operating systems.
On Jul 13, 2011 8:09 AM, "Antoine Pitrou"  wrote:
>
> Antoine Pitrou  added the comment:
>
>> In addition I would like the posix_lseek function to accept a value
>> larger than 2^63 as a seek offset
>
> How would it work? The C lseek() takes a signed (64-bit) offset as
argument, so we would have to call it multiple times anyway.
>
> --
> nosy: +neologix, pitrou
> versions: +Python 3.2, Python 3.3
>
> ___
> Python tracker 
> 
> ___

--
Added file: http://bugs.python.org/file22641/unnamed

___
Python tracker 

___Im most familiar with solaris.  Atleast on solaris lseek interprets its 
signed arg as the unsigned value with the same bit pattern.  I cannot be 
certain that this is common across other operating systems.  
On Jul 13, 2011 8:09 AM, "Antoine Pitrou" 
rep...@bugs.python.org> 
wrote:> > Antoine Pitrou pit...@free.fr> added the comment:
> >> In addition I would like the posix_lseek function to accept a 
value>> larger than 2^63 as a seek offset> > How would 
it work? The C lseek() takes a signed (64-bit) offset as argument, so we would 
have to call it multiple times anyway.
> > --> nosy: +neologix, pitrou> versions: 
+Python 3.2, Python 3.3> > 
___> Python tracker rep...@bugs.python.org>
> http://bugs.python.org/issue12545>>
 ___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9285] Add a profile decorator to profile and cProfile

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

See #8916 for adding standard functionality similar to the decorator module.

--
components: +Extension Modules -Benchmarks
dependencies: +Move PEP 362 (function signature objects) into inspect
nosy: +eric.araujo
title: A decorator for cProfile and profile modules -> Add a profile decorator 
to profile and cProfile

___
Python tracker 

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



[issue1559549] ImportError needs attributes for module and file name

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

How about this case:

  from validmodule import name_with_typo

Do we need one keyword argument module_name and one attribute_name?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue11604] Have type(n,b,d) check for type(b[i]) is module

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

I don’t know if this should be left to lint tools or addressed by CPython 
itself.  Raymond, do you have an opinion?

--
nosy: +rhettinger

___
Python tracker 

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



[issue4819] Misc/cheatsheet needs updating

2011-07-13 Thread Ezio Melotti

Ezio Melotti  added the comment:

Another idea might be to have a "cheatsheet" in the official docs with links to 
the right section and possibly a minimal description.  It would be useful to 
get a quick overview of the features of the language and use the links to jump 
to the extended doc without having duplication.
Otherwise the examples could be moved to an external file that gets included 
both in the cheatsheet and in the official doc.

--

___
Python tracker 

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



[issue11470] Flag inappropriate uses of callable class attributes

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

Hi Thomas, could you give us a status update?  Maybe I can help with tests or 
docs?

--

___
Python tracker 

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



[issue11027] Implement sectionxform in configparser

2011-07-13 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue1043134] Add preferred extensions for MIME types

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

The proposed patch does not solve the issue.  In the current API, there is no 
way to do it, so this bug requires a new feature.  I think it would involve a 
new dict, like preferred_extensions, which would be seeded with default values, 
like .jpg for image/jpeg and .txt for text/plain, and a few functions/methods 
to query the dict or add items.

--
keywords:  -easy, patch
title: mimetypes.guess_extension('text/plain') == '.ksh' ??? -> Add preferred 
extensions for MIME types

___
Python tracker 

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



[issue4819] Misc/cheatsheet needs updating

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

I spent a few minutes updating the cheatsheet.  I think that the document is an 
outdated duplicate of random parts of the docs (syntax, man page, library 
reference, etc.) that’s rather hard to maintain for little benefit.  Is there 
any evidence that people used it?

I’d like to propose that we delete the file in 2.7 (it’s already gone from 
3.2+) and that we start anew on a real cheatsheet, i.e. one or two A4 pages, in 
HTML and PDF and t-shirts, which are a useful summary of commonly used things.  
I think one Python language cheatsheet and one standard library cheatsheet 
could be useful (one set for 2.7, another one for 3.2).

Regarding process, I’m not sure using a wiki or a non-reST file not included in 
the real docs is the way to go.  Maybe volunteers could work with the PSF team 
that’s producing a brochure?  (http://brochure.getpython.info/ —I discovered it 
recently, and don’t know at all who works on it and how)

--
versions:  -Python 3.1

___
Python tracker 

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



[issue1170] shlex have problems with parsing unicode

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

Would raising a TypeError if the given argument is a unicode be unacceptable 
for 2.7?  It would at least make things clear.

--

___
Python tracker 

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



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-13 Thread STINNER Victor

STINNER Victor  added the comment:

> How would it work? The C lseek() takes a signed (64-bit) offset
> as argument, so we would have to call it multiple times anyway.

Python does already call multiple times the same function if the input is 
larger than the type used by the function. Some examples:

 - mbcs codec: work on chunk on INT_MAX bytes (input size type: Py_ssize_t)
 - zlib: crc32() works on chunk on UINT_MAX bytes (input size type: Py_ssize_t)

We have also functions processing fewer data if the function cannot handle all 
data: FileIO.write() clamps the buffer size of INT_MAX on Windows for example.

If we call lseek() multiple times, the implementation will depend on the whence 
value: SEEK_SET will use SEEK_SET and then SEEK_CUR. For SEEK_CUR, all calls 
can use SEEK_CUR. For SEEK_END... hum? SEEK_END and then SEEK_CUR?

I vote -1 for this feature because I bet that the behaviour of lseek() with an 
file position > 2^63 or offset > 2^63 highly depend on the platform (kernel, 
libc) version.

You can implement it in Python for your usecase. I prefer to keep a thin 
wrapper with an known and reliable behaviour.

--

___
Python tracker 

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



[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue7484] smtplib: verify breaks with Postfix servers

2011-07-13 Thread Felipe Cruz

Felipe Cruz  added the comment:

Can anyone take a loot at those patches?

Do they need more tests?

--

___
Python tracker 

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



[issue12552] email.MIMEText overide BASE64 on TEXT/HTML

2011-07-13 Thread Blame-me Jaillie

New submission from Blame-me Jaillie :

Apologies if this is in the wrong place.

Simple enough issue. This line of code from email.mime:

MIMEText(textonly, 'plain', _charset='UTF-8')
Where 'textonly' is just a plain text email message to be displayed on a 
multipart message in a client that does not support HTML email.

This always results in: Content-Transfer-Encoding: BASE64
rather than allowing selection of the encoder (7 or 8 bit MIME/quoted 
printable). The option to set this with _encoders was removed.

This presents a couple of issues. First of all, BASE64 is not optimal for text 
- it adds (granted small) amounts of overhead and CPU usage. Second, commercial 
and O/S anti-spam scanners have rules that penalise messages solely BASE64 
encoded.

As this is part of the mime email package, a simple flag to set the 
Content-Transfer-Encoding by hand would be help anyone trying to produce 
sensible email applications with Python.

Whilst my version of Python is old - I believe this issue remains in later 
versions.

--
components: None
messages: 140259
nosy: Blame-me.Jaillie
priority: normal
severity: normal
status: open
title: email.MIMEText overide BASE64 on TEXT/HTML
type: feature request
versions: Python 2.6

___
Python tracker 

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



[issue12551] Provide data for TLS channel binding

2011-07-13 Thread Jacek Konieczny

Jacek Konieczny  added the comment:

I skim-read the TLS specification, looked at the OpenSSL API and it seems it 
should be easy to implement. I am getting to work right now…

--

___
Python tracker 

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



[issue12536] lib2to3 BaseFix class creates un-needed loggers leading to refleaks

2011-07-13 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I say kill the loggers.

--

___
Python tracker 

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



[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-13 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Actually, what happened was I saw the bug report, didn't see your patch, and 
started working on my own patch. I see we came to roughly the same conclusion, 
though. :) About the test, I'm not sure testcases having no cyclic references 
is part of the guarantee of the API. Perhaps Michael can chime in on that.

--

___
Python tracker 

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



[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

What’s the typo?

About the test case: Benjamin probably judged that testing this internal detail 
was not worth it, as long as the code was readable and working.

--
nosy: +benjamin.peterson, eric.araujo

___
Python tracker 

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



[issue12536] lib2to3 BaseFix class creates un-needed loggers leading to refleaks

2011-07-13 Thread Éric Araujo

Éric Araujo  added the comment:

If the logger attribute is part of the official API and Benjamin doesn’t think 
it wise to just remove it, I think we should either start deprecating it (using 
a property), or set it to a shared logger object instead of creating one per 
file.

--

___
Python tracker 

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



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-13 Thread Charles-François Natali

Charles-François Natali  added the comment:

> In the posix_lseek function check for result != -1 instead of checking
> for result < 0 in return code checks of the value returned by lseek.

+1
This can be useful when parsing /dev/mem on x86_64, for example.

> In addition I would like the posix_lseek function to accept a value
> larger than 2^63 as a seek offset

Like Antoine, I'm a little bit puzzled here.

--

___
Python tracker 

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



[issue10224] Build 3.x documentation using python3.x

2011-07-13 Thread Sye van der Veen

Sye van der Veen  added the comment:

When I built the documentation on Win7, it failed with a SyntaxError, and it 
took some digging to find the reason why.  I was hoping that issuing this 
warning would save others the trouble.

I agree: on Windows, PYTHON is rarely set.  However, look in make.bat: you'll 
see that when PYTHON is not already set, it's set to ..\pcbuild\python, which 
is Python 3.

--

___
Python tracker 

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



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-13 Thread STINNER Victor

STINNER Victor  added the comment:

"... A negative file offset may be valid for some devices in some 
implementations.

The POSIX.1-1990 standard did not specifically prohibit lseek() from returning 
a negative offset. Therefore, an application was required to clear errno prior 
to the call and check errno upon return to determine whether a return value of 
( off_t)-1 is a negative offset or an indication of an error condition. The 
standard developers did not wish to require this action on the part of a 
conforming application, and chose to require that errno be set to [EINVAL] when 
the resulting file offset would be negative for a regular file, block special 
file, or directory."

Extract of:
http://pubs.opengroup.org/onlinepubs/009695399/functions/lseek.html

--

___
Python tracker 

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



[issue12527] assertRaisesRegex doc'd with 'msg' arg, but it's not implemented?

2011-07-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti
nosy: +ezio.melotti

___
Python tracker 

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



  1   2   >