[issue16112] platform.architecture does not correctly escape argument to /usr/bin/file

2012-10-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Jesús Cea Avión wrote:
 
 Jesús Cea Avión added the comment:
 
 Thanks for the heads-up, Victor.
 
 I have added Marc-Andre Lemburg to the nosy list, so he can know about this 
 issue and can provide feedback (or request a backout for 2.7).
 
 Marc-Andre?.

The comment that Viktor posted still stands for Python 2.7.

You can use subprocess in platform for Python 2.7, but only if
it's available. Otherwise the module must fall back to the
portable popen() that comes with the platform module.

It may be worth adding that selection process to the popen()
function in platform itself.

For Python 3.x, you can use subprocess.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 05 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2012-09-27: Released eGenix PyRun 1.1.0 ...   http://egenix.com/go35
2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34
2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33
2012-10-23: Python Meeting Duesseldorf ... 18 days to go

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue11678] Add support for Arch Linux to platform.linux_distributions()

2012-10-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Éric Araujo wrote:
 
 Éric Araujo mer...@netwok.org added the comment:
 
 Feature freeze just came by; sorry we missed this.
 
 Given our recent-ish discussion about additions to mimetypes (and the 
 consensus (IIRC) that matching the IANA database can be considered a bug 
 fix), I wonder if detecting more OSes in platform should be considered a new 
 feature.  On one end we have mimetypes when there is just a dictionary update 
 with no risk, on the other end we have ports to new OSes which clearly are 
 new features; I think platform is on the fence, maybe just a bit on the new 
 feature side.

I'm fine with adding new OS support to platform in bugfix releases.

The idea is to support as many platforms as possible and if a popular
one is missing, that's a bug.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 05 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2012-09-27: Released eGenix PyRun 1.1.0 ...   http://egenix.com/go35
2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34
2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33
2012-10-23: Python Meeting Duesseldorf ... 18 days to go

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16112] platform.architecture does not correctly escape argument to /usr/bin/file

2012-10-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

 The implementation of platform.architecture shells out to the file command. 
 It tries to escape quotes by replacing  with \, but that's not sufficient.
 
 $ python3.2 -c 'import platform; platform.architecture(foo\\\; echo Hi 
 there  /tmp/Z; echo \\\)'  cat /tmp/Z
 Hi there
 
 Here's a patch to make it use subprocess instead. I haven't tested it 
 thoroughly building everything from trunk and running tests, but I verified 
 it works by replacing the platform.py in my system Python install.

I think a much better patch would be to test for existence of the
file in question. File names rarely use any of the mentioned quoting
and most certainly not for an executable, so if the check fails, that's
a good indication that something is not right.

Perhaps such a check could be added in addition to the other things
in the patch ?

BTW: It's probably better to discuss such patches on the tracker first,
before applying them to the code base. It becomes difficult discussing
patches that have already been partially applied to the code.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 05 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2012-09-27: Released eGenix PyRun 1.1.0 ...   http://egenix.com/go35
2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34
2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33
2012-10-23: Python Meeting Duesseldorf ... 18 days to go

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Gregory P. Smith

New submission from Gregory P. Smith:

Ben Leslie writes this on python-dev:

Hi all,

I have a Python program where I have many threads each calling Popen, and I was 
hitting some trouble.

I've been seeing this on 3.2.3, however I believe the same issue is still 
potentially a problem on head.

The error manifests itself when a call to os.close(errpipe_read) fails with 
EBADF 
(http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Lib/subprocess.py#l1314)

I believe the root cause of this problem is due to a double close() on a 
different file descriptor (which is then reused as errpipe_read).

The file descriptors: p2cwrite, c2pread and errread are all closed at the end 
of the _execute_child method:

http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Lib/subprocess.py#l1351

However, these filedescriptors are wrapped up into file objects during __init__ 
(see: 
http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Lib/subprocess.py#l725)

As far as I can tell at the point where the garbage collector kicks in  
Popen.{stdin,stdout,stderr} all go out of scope, and will be deallocated, and 
the underlying filedescriptor closed.

However because the filedescriptor is already closed, and by this time is 
actually reused, this deallocation closes what ends up being an incorrect 
file-descriptor.

Since closing a file object where the underlying fd is already closed is 
silenced 
(http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Modules/_io/iobase.c#l235)
 this would not normally be very apparent.

This race between a new filedescriptor being allocated and the garbage 
collector deallocating the file descriptors certainly hits when using a few 
threads, but I guess depending on the exact behaviour of the garbage collector 
it could potentially also occur in a single threaded case as well.

I think a fix would be to remove the explicit close of these file descriptors 
at the end of _execute_child, and let the garbage collector close them. Of 
course that may leak file descriptors, if the GC doesn't kick in for a while, 
so the other option would be to close the file object, rather than just the 
file descriptor.

Hopefully someone more intimately familiar with the module can point me in the 
right direction to verify this, and provide a fix.

Thanks,

Benno

--
assignee: gregory.p.smith
messages: 172053
nosy: gregory.p.smith
priority: high
severity: normal
stage: test needed
status: open
title: subprocess.Popen the os.close calls in _execute_child can raise an EBADF 
exception
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

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



[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
nosy: +rosslagerwall

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



[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2012-10-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

 IMHO either of these solutions would be fine.
 
 * have a PyOS_PutEnv() function, gettext has gettext_putenv() to
 workaround this problem.

This solution would help in many other cases as well, so adding
such an API would certainly help more than specialized interfaces.

 * manage this the same as Py_GetPythonHome(), which can be defined by
 the embedding application to override the default.

I think you meant Py_SetPythonHome().

Given that the IO encoding is very important for Python 3.x, a special
API just for setting the encoding may be useful to have as well.

Care must be taken, though, that the encoding cannot be set after
Py_Initialize() has been called.

It may overall be easier to go with the PyOS_PutEnv() solution to
not run into the problems with having to check for an initialized
interpreter first.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 05 2012)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2012-09-27: Released eGenix PyRun 1.1.0 ...   http://egenix.com/go35
2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34
2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33
2012-10-23: Python Meeting Duesseldorf ... 18 days to go

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue16112] platform.architecture does not correctly escape argument to /usr/bin/file

2012-10-05 Thread STINNER Victor

STINNER Victor added the comment:

1.7 -with open(DEV_NULL) as dev_null:
 1.8 -proc = subprocess.Popen(['file', '-b', '--', target],
 1.9 -stdout=subprocess.PIPE,
stderr=dev_null)
 1.9 +proc = subprocess.Popen(['file', target],
1.10 +stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

Errors should be ignored, not written into stderr. subprocess.DEVNULL
was added to Python 3.3, in older version you have to manually call
open the DEV_NULL file.

(Oh by the way, it should be opened in write mode for stderr, not in
read mode!?)

--

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



[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Gregory P. Smith

Gregory P. Smith added the comment:

What you've described makes sense.

The file descriptors are indeed conditionally wrapped in file objects using 
io.open which could lead to a double close in the error case in a threaded 
application.  yuck.

1) The code needs to check if the fd was wrapped before calling os.close() on 
it. It could do this by checking the sys.stdin, sys.stdout and sys.stderr 
attributes respectively for each fd.

2) another option that is a little more clear code wise as it doesn't try to 
use an implied connection between the stdin/stdout/strerr attributes would be 
to _always_ wrap the fd's that this can happen to in an io object (regardless 
of if they've been assigned to the stdin/stdout/stderr attributes) and pass 
those to _execute_child.  Their .fileno() method can be used for the value to 
pass to _posixsubprocess.fork_exec().  And the os.close on those would turn 
into a close method call which won't allow double close EBADF errors.

--

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



[issue16112] platform.architecture does not correctly escape argument to /usr/bin/file

2012-10-05 Thread STINNER Victor

STINNER Victor added the comment:

 You can use subprocess in platform for Python 2.7, but only if
 it's available. Otherwise the module must fall back to the
 portable popen() that comes with the platform module.

Marc-Andre: I still don't understand why you want to run platform.py
of Python 2.7 on older Python version? How does it happen? I expected
Python 2.3 to use its own version of platform.py.

--

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



[issue16112] platform.architecture does not correctly escape argument to /usr/bin/file

2012-10-05 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution: fixed - 
status: closed - open

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread Christian Fertig

Christian Fertig added the comment:

ok, here's a run with debuglevel for the headers:

python 2.7 on openSuSE 11.4:

fertig@hornisse:/home/fertig  python
Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2
Type help, copyright, credits or license for more information.
 import urllib2
 request = urllib2.Request('https://172.23.6.222')
 opener = urllib2.build_opener(urllib2.HTTPSHandler(debuglevel=111))
 feeddata = opener.open(request).read()
send: 'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 
172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 05 Oct 2012 09:46:33 GMT
header: Server: Virata-EmWeb/R6_2_0
header: Connection: close
header: Transfer-Encoding: chunked
header: Content-Type: text/html
header: Expires: Fri, 05 Oct 2012 09:46:33 GMT
header: Last-Modified: Fri, 05 Oct 2012 09:46:33 GMT
header: Cache-Control: no-cache


python 2.7.2 on openSuSE 12.1:

fertig@wespe:/home/fertig  python
Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2
Type help, copyright, credits or license for more information.
 import urllib2
 request = urllib2.Request('https://172.23.6.222')
 opener = urllib2.build_opener(urllib2.HTTPSHandler(debuglevel=111))
 feeddata = opener.open(request).read()
urllib2.Request instance at 0x90d878
send: 'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 
172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
reply: 'HTTP/1.1 405 Method Not Allowed\r\n'
header: Date: Fri, 05 Oct 2012 09:44:11 GMT
header: Server: Virata-EmWeb/R6_2_0
header: Connection: close
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib64/python2.7/urllib2.py, line 401, in open
response = meth(req, response)
  File /usr/lib64/python2.7/urllib2.py, line 514, in http_response
'http', request, response, code, msg, hdrs)
  File /usr/lib64/python2.7/urllib2.py, line 439, in error
return self._call_chain(*args)
  File /usr/lib64/python2.7/urllib2.py, line 372, in _call_chain
result = func(*args)
  File /usr/lib64/python2.7/urllib2.py, line 522, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 405: Method Not Allowed


--

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread Christian Fertig

Christian Fertig added the comment:

the IP is private and even for testing I can't put it in a public IP range, as 
the device is an IP Phone with a custom firmware (Siemens optiPoint 420).

--

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



[issue16123] IDLE - deprecate running without a subprocess

2012-10-05 Thread Ned Deily

Ned Deily added the comment:

A popup menu on every invocation of IDLE would be a very user-unfriendly thing 
to do.  If it's possible that a print to stderr might not be visible to a user, 
another solution might be to use the approach in Lib/idlelib/macosxSupport.py 
tkVersionWarning which causes the warning message to show up in the PyShell 
window.

--

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



[issue16136] Removal of VMS support

2012-10-05 Thread Charles-François Natali

Charles-François Natali added the comment:

 After the blog post, Mathew, Sandeep from HP asked how to help:

It was more than a year ago.
Has something actually be done?

--
nosy: +neologix

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



[issue16139] Python 3.3 fails when starting from read-only FS

2012-10-05 Thread Richard Oudkerk

Richard Oudkerk added the comment:

This is more or less a duplicate of #15833 (although the errno mentioned there 
is EIO instead of the more sensible EROFS).

--
nosy: +sbt

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-05 Thread Masami HIRATA

Masami HIRATA added the comment:

I have tested the workaround and it works correctly.
Please see attached log file.

--
Added file: http://bugs.python.org/file27429/Python33_with_venv_2.txt

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



[issue8800] add threading.RWLock

2012-10-05 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Thanks Richard.
I wonder if the issues with the multiprocessing tests can be fixed by making 
use of Barriers?

One of the reasons I introduced Barriers into the lib originally was my alarm 
at seeing the various springklings of different _wait() calls in the unittests, 
particularly in the threading module (there are Condition variable tests there 
still that have race conditions, that are cunnrently hidden by liberal use of 
_wait())

Then I started to wonder if it were appropriate to use a Barrier in the 
Condition variable tests, particularly given that the former is implemented by 
way of the latter :)

--

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



[issue8800] add threading.RWLock

2012-10-05 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

 although I'd prefer a BSD errno example, such as ECONNRESET, instead of a 
 winsock one
Are you referring to the comment where I mention ECONNABORTED?  That is a 
regular unix error (windows version is WSAECONNABORTED).
This error occurs when the local stack decides to kill the connection, as 
opposed to ECONNRESET which occurs on account of receiving a RST packet.

New patch includes documentation change.

If 2.7 is still in bugfix mode, then this patch could probably be accepted.

--
Added file: http://bugs.python.org/file27430/socketserver.patch

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



[issue16138] In the glossary there is a small typo about __len__() in the sequence definition

2012-10-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7cf0d8b2744b by Andrew Svetlov in branch '3.2':
Issue #16138: fix typo.
http://hg.python.org/cpython/rev/7cf0d8b2744b

New changeset a093d39fdda4 by Andrew Svetlov in branch '3.3':
Merge issue #16138: fix typo.
http://hg.python.org/cpython/rev/a093d39fdda4

New changeset cbb9b5dcb88a by Andrew Svetlov in branch 'default':
Merge issue #16138: fix typo.
http://hg.python.org/cpython/rev/cbb9b5dcb88a

--
nosy: +python-dev

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-05 Thread Masami HIRATA

Masami HIRATA added the comment:

btw, it seems to me that -IC:\Python33\include -IC:\Python33\include should 
be -IC:\Users\msmhrt\mypython\3.3.0\include -IC:\Python33\include.
What do you think about it?

--

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



[issue16138] In the glossary there is a small typo about __len__() in the sequence definition

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks to py.user

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

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



[issue4821] Patches for thread-support in built-in SHA modules

2012-10-05 Thread Christian Heimes

Christian Heimes added the comment:

I'll integrate your patch once I'm done with my SHA-3 patch #16113. I'm using 
parts of your patch in my new sha3 code to release the GIL.

I'll also check if I can share more code between the SHA family modules.

--
assignee:  - christian.heimes
components: +Extension Modules
nosy: +christian.heimes
stage:  - patch review
type:  - performance

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



[issue16113] Add SHA-3 (Keccak) support

2012-10-05 Thread Christian Heimes

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


Added file: http://bugs.python.org/file27431/49a949116245.diff

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



[issue16113] Add SHA-3 (Keccak) support

2012-10-05 Thread Christian Heimes

Christian Heimes added the comment:

The hightlights of the next patch are

* release the GIL
* more test vectors
* remove bgr_endian.h
* move typedef UINT64 to sha3module
* declare more globals as static

--

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



[issue8800] add threading.RWLock

2012-10-05 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Kristjan: you seem to have attached socketserver.patch to the wrong issue.

--

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-05 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

 although I'd prefer a BSD errno example, such as ECONNRESET, instead of a 
 winsock one
Are you referring to the comment where I mention ECONNABORTED?  That is a 
regular unix error (windows version is WSAECONNABORTED).
This error occurs when the local stack decides to kill the connection, as 
opposed to ECONNRESET which occurs on account of receiving a RST packet.

New patch includes documentation change.

If 2.7 is still in bugfix mode, then this patch could probably be accepted.

--
Added file: http://bugs.python.org/file27432/socketserver.patch

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



[issue8800] add threading.RWLock

2012-10-05 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson krist...@ccpgames.com:


Removed file: http://bugs.python.org/file27430/socketserver.patch

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



[issue8800] add threading.RWLock

2012-10-05 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson krist...@ccpgames.com:


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

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



[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2012-10-05 Thread Campbell Barton

Campbell Barton added the comment:

Agree PyOS_PutEnv would be good since its not restricted to string encoding and 
resolves the problem of not being able to control env vars for an embedded 
interpreter in general.

Having ways to change encoding is good too but a bit outside the scope of this 
report and possibly not the best solution either since its possible (through 
unlikely), that you need to set the encoding at the very start of python 
initialization- rather than site  builtin modules loads.

--

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



[issue8800] add threading.RWLock

2012-10-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le vendredi 05 octobre 2012 à 09:51 +, Kristján Valur Jónsson a
écrit :
 Then I started to wonder if it were appropriate to use a Barrier in
 the Condition variable tests, particularly given that the former is
 implemented by way of the latter :)

Indeed, the reason I wrote the lock tests that way is that I want the
tests to be independent of the primitives under test. Otherwise things
become very messy.

--

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



[issue16112] platform.architecture does not correctly escape argument to /usr/bin/file

2012-10-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 BTW: It's probably better to discuss such patches on the tracker first,
 before applying them to the code base. It becomes difficult discussing
 patches that have already been partially applied to the code.

Agreed with Marc-André. Jesus, please understand that by committing bogus code, 
you are annoying every other core developer. Be careful and run the test suite 
before pushing any new code. And waiting for reviews doesn't hurt.

--

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



[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Benno Leslie

Changes by Benno Leslie be...@benno.id.au:


--
nosy: +bennoleslie

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



[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Benno Leslie

Benno Leslie added the comment:

Regarding #2 my understanding is that the FDs are already always wrapped.

E.g: at line 
http://hg.python.org/cpython/file/b9ac3c44a4eb/Lib/subprocess.py#l798 it shows 
these always being wrapped (assuming the file descriptor is not -1).

For my test case on 3.2.3, replacing the os.close loop with:

if p2cwrite != -1:
self.stdin.close()
if c2pread != -1:
self.stdout.close()
if errread != -1:
self.stderr.close()

This fixed all my stability problems and races, and can't (as far as I can 
tell) cause any other problems; however this is a very subtle module, so I'm 
eager to understand if this would cause any undesirable side-effects.

--

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



[issue16134] Add support for RTMP schemes to urlparse

2012-10-05 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +orsenthil

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



[issue15528] Better support for finalization with weakrefs

2012-10-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

In:

+except:
+sys.excepthook(*sys.exc_info())

I would write except Exception instead. You don't want to trap e.g. 
KeyboardInterrupt.

For clarity, I would also add _dirty = False at the finalize top-level.
Otherwise, looks fine to me.

--

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread R. David Murray

R. David Murray added the comment:

It looks like the data input is the same in both cases. (Although why does your 
second example show 'urllib2.Request instance at 0x90d878'?  Does urllib2 
really output that as part of the debug output?)  It is hard to see what could 
be causing the divergence in response here.  Is it possible for there to be 
something in the SSL setup that triggers a different response from your server?

Any chance you could try Python 3.2 or 3.3 just to see if there is a difference 
there?

--
nosy: +orsenthil, pitrou

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



[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Yury Selivanov

Yury Selivanov added the comment:

I don't know why, but it seems that the bug reappeared in 3.3.

Examples:

1. --- (python 3.4 from repo)

yury@sxair ~/dev/py/python (master) $ ./python.exe 
Python 3.4.0a0 (default, Oct  5 2012, 15:08:35) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin
Type help, copyright, credits or license for more information.
 from distutils import msvc9compiler
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: cannot import name msvc9compiler

2. --- (python 3.3.0 from macports)

yury@sxair ~/dev/py/python (master) $ python3.3
Python 3.3.0 (default, Oct  5 2012, 13:41:24) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin
Type help, copyright, credits or license for more information.
 from distutils import msvc9compiler
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: cannot import name msvc9compiler


3. --- (python 3.2 from macports)

yury@sxair ~/dev/py/python (master) $ python3.2
Python 3.2.2 (default, Sep 27 2012, 13:31:01) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin
Type help, copyright, credits or license for more information.
 from distutils import msvc9compiler
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/msvc9compiler.py,
 line 27, in module
import winreg
ImportError: No module named winreg

Platform: macos x 10.8

Please reopen the issue.

--
nosy: +yselivanov

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

By using openssl s_client -connect 172.23.6.222:443 you can open a 
telnet-like session (but using SSL) to your server, and try to type/paste an 
HTTP request there. That would help check whether it's a Python problem, or 
something else due to OpenSSL changes.

--

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread Christian Fertig

Christian Fertig added the comment:

python3 example, not working on both machines (3.2.1 on openSuSE 12.1 and 3.1.3 
on openSuSE 11.4)

fertig@wespe:/home/fertig  python3
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: invalid syntax (sitecustomize.py, line 89)
Python 3.2.1 (default, Jul 18 2011, 16:24:40) [GCC] on linux2
Type help, copyright, credits or license for more information.
 import http.client
 import urllib.request
 http.client.HTTPConnection.debuglevel = 1
 request = urllib.request.urlopen('https://172.23.6.222')
send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 
172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Date header: Server Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib64/python3.2/urllib/request.py, line 138, in urlopen
return opener.open(url, data, timeout)
  File /usr/lib64/python3.2/urllib/request.py, line 375, in open
response = meth(req, response)
  File /usr/lib64/python3.2/urllib/request.py, line 487, in http_response
'http', request, response, code, msg, hdrs)
  File /usr/lib64/python3.2/urllib/request.py, line 413, in error
return self._call_chain(*args)
  File /usr/lib64/python3.2/urllib/request.py, line 347, in _call_chain
result = func(*args)
  File /usr/lib64/python3.2/urllib/request.py, line 495, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
 request = urllib.request.urlopen('https://172.23.6.222')
send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 
172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n'
reply: 'HTTP/1.1 405 Method Not Allowed\r\n'
header: Date header: Server header: Connection Traceback (most recent call 
last):
  File stdin, line 1, in module
  File /usr/lib64/python3.2/urllib/request.py, line 138, in urlopen
return opener.open(url, data, timeout)
  File /usr/lib64/python3.2/urllib/request.py, line 375, in open
response = meth(req, response)
  File /usr/lib64/python3.2/urllib/request.py, line 487, in http_response
'http', request, response, code, msg, hdrs)
  File /usr/lib64/python3.2/urllib/request.py, line 413, in error
return self._call_chain(*args)
  File /usr/lib64/python3.2/urllib/request.py, line 347, in _call_chain
result = func(*args)
  File /usr/lib64/python3.2/urllib/request.py, line 495, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 405: Method Not Allowed

--

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



[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread Christian Fertig

Christian Fertig added the comment:

ok actually it isn't working either with curl or wget. So probably this is not 
a python problem, it seems more something in the underlying libs:

Output from curl on the machine, where python 2.7 is working:

fertig@hornisse:/home/fertig  curl --insecure 'https://172.23.6.222/' --verbose
* About to connect() to 172.23.6.222 port 443 (#0)
*   Trying 172.23.6.222... connected
* Connected to 172.23.6.222 (172.23.6.222) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs/
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
*subject: C=DE; L=Munich; O=Siemens Enterprise Communications; 
OU=Enterprise Systems; CN=optiPoint - WBM
*start date: 2007-04-11 12:26:43 GMT
*expire date: 2022-04-10 12:26:43 GMT
*common name: optiPoint - WBM (does not match '172.23.6.222')
*issuer: C=DE; L=Munich; O=Siemens AG; OU=Com Enterprise Systems; 
CN=Siemens Com ESY HD Security Office; 
emailAddress=hipath_security_off...@siemens.com
*SSL certificate verify result: self signed certificate in certificate 
chain (19), continuing anyway.
 GET / HTTP/1.1
 User-Agent: curl/7.21.2 (x86_64-unknown-linux-gnu) libcurl/7.21.2 
 OpenSSL/1.0.0c zlib/1.2.5 libidn/1.15 libssh2/1.2.7
 Host: 172.23.6.222
 Accept: */*

 HTTP/1.1 405 Method Not Allowed
 Date: Fri, 05 Oct 2012 11:03:02 GMT
 Server: Virata-EmWeb/R6_2_0
 Connection: close

405 Method Not Allowed
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
fertig@hornisse:/home/fertig 


No idea anymore :/ But I fear you can close this ticket...

--

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread Christian Fertig

Christian Fertig added the comment:

for completeness: the openssl output from the machine, where python 2.7 is 
working:

fertig@hornisse:/home/fertig  openssl s_client -connect 172.23.6.222:443
CONNECTED(0003)
depth=1 C = DE, L = Munich, O = Siemens AG, OU = Com Enterprise Systems, CN = 
Siemens Com ESY HD Security Office, emailAddress = 
hipath_security_off...@siemens.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:/C=DE/L=Munich/O=Siemens Enterprise Communications/OU=Enterprise 
Systems/CN=optiPoint - WBM
   i:/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY 
HD Security Office/emailAddress=hipath_security_off...@siemens.com
 1 s:/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY 
HD Security Office/emailAddress=hipath_security_off...@siemens.com
   i:/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY 
HD Security Office/emailAddress=hipath_security_off...@siemens.com
---
Server certificate
-BEGIN CERTIFICATE-
MIIEwDCCA6igAwIBAgIBFjANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCREUx
[..]
dEYuDjj21U+xronZ0FYVieIP1jk=
-END CERTIFICATE-
subject=/C=DE/L=Munich/O=Siemens Enterprise Communications/OU=Enterprise 
Systems/CN=optiPoint - WBM
issuer=/C=DE/L=Munich/O=Siemens AG/OU=Com Enterprise Systems/CN=Siemens Com ESY 
HD Security Office/emailAddress=hipath_security_off...@siemens.com
---
No client certificate CA names sent
---
SSL handshake has read 2748 bytes and written 407 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 1024 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol  : TLSv1
Cipher: AES256-SHA
Session-ID: 506EDFB9B197A00F67A43F34B3313B660DBC64FF7353112836F813723B30071C
Session-ID-ctx:
Master-Key: 
6928F9EF19DB7DBEEEA6D09392EF2F848613E40C1B6CE6226C342AB3D211AA1A8E04EF27BDEE4CD03AB4F6AD7317EBB3
Key-Arg   : None
PSK identity: None
PSK identity hint: None
Start Time: 1349443513
Timeout   : 300 (sec)
Verify return code: 19 (self signed certificate in certificate chain)
---
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Fri, 05 Oct 2012 15:25:21 GMT
Server: Virata-EmWeb/R6_2_0
Connection: close

400 Bad Request

--

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



[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, closing then. Thanks for the debugging, and good luck :)

--
resolution:  - invalid
status: open - closed

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



[issue16112] platform.architecture does not correctly escape argument to /usr/bin/file

2012-10-05 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Antoine, I agree. I beg your pardon. This patch was suppose to be quite 
trivial, and test_platform passes just fine on my Linux and Solaris 
computers. And the four buildbots I was monitoring, the testsuite passed.

The suggestion of Marc-Andre of simply adding an os.access() to check for 
file existence first is quite sensible and would be enough and compatible in 
all platforms and python releases.

I am for backing out my patches so far and push a simple os.access() check. 
What do you think?.

Marc-Andre, I was wondering if you could elaborate a bit why 2.7 platform.py 
file should be able to run fine in 2.3 :-?

--

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



[issue16009] Json error messages could provide more information about the error

2012-10-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Tests added. One discrepancy between Python an C versions fixed.

In fact, we can get rid of StopIteration and directly raise ValueError. I don't 
know what are the functions of StopIteration here, so preserve it. Perhaps the 
author could explain the details.

--
keywords: +needs review
nosy: +bob.ippolito
stage: test needed - patch review
Added file: http://bugs.python.org/file27433/json_errmsg_3.patch

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



[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-05 Thread Guido van Rossum

New submission from Guido van Rossum:

I just noticed that StreamHandler contains the following fragment in its emit() 
method:

  try:
do some writing
  except (KeyboardInterrupt, SystemExit): #pragma: no cover
raise
  except:
self.handleError(record)

Couldn't this be simplified to the following?

  try:
do some writing
  except Exception:
self.handleError(record)

I.e. instead of manually catching and re-raising a few BaseExceptions, just 
don't catch anything that derives from BaseException but not from Exception?

(I noticed because we have an internal clone of this class that occasionally 
gets augmented with yet another base exception that shouldn't be handled.

--
components: Library (Lib)
messages: 172087
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: Possible simplification for logging.StreamHandler exception handling
type: behavior
versions: Python 3.4

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



[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-05 Thread Idan Kamara

New submission from Idan Kamara:

When known and unknown options are given together in the same option string 
(e.g. -xy) then ArgumentParser behaves in a strange way:

- if the known option is given first (so -k is known and the parser is fed with 
['-ku']) then the parsing aborts with error: argument -k/--known: ignored 
explicit argument 'u'

- if the unknown option is given first then both options are treated as unknown 
and returned in the list of remaining arguments.

This makes it impossible to use parse_known_args for its intended purpose 
because every single letter option might be interleaved with other unknown 
options.

I attached a test script that demonstrates this.

--
components: Library (Lib)
files: aparse.py
messages: 172088
nosy: idank
priority: normal
severity: normal
status: open
title: ArgumentParser inconsistent with parse_known_args
type: behavior
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file27434/aparse.py

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



[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-05 Thread R. David Murray

R. David Murray added the comment:

Looks like parse_known_args needs to be taught to not treat unknown text 
following an option as an argument if the option does not take an argument.  
That would be in keeping with its mission, I think :)

There will still probably be ambiguous cases that will trip you up, but that 
should help.

--
keywords: +easy
nosy: +bethard, r.david.murray
stage:  - needs patch

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



[issue8492] Addition to readline module to get dictionary of keystrokes and commands

2012-10-05 Thread Steven D'Aprano

Steven D'Aprano added the comment:

A question came up on Python-ideas about readline apparently missing a standard 
function. See:

http://mail.python.org/pipermail/python-ideas/2012-October/016329.html

For debugging issues with readline, it would be be very useful to be able to 
query the current set of bindings. This would also help people avoid 
accidentally over-writing existing bindings.

I suggest emulating the three bash commands:

bind -p  # List functions and bindings in a form that can be reused as input.
bind -v  # As above for variable names and values.
bind -s  # As above for macros and values.

--
nosy: +stevenjd
versions: +Python 3.4 -Python 3.2

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



[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
keywords: +3.2regression
resolution: fixed - 
status: closed - open
versions: +Python 3.4

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



[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-05 Thread Idan Kamara

Idan Kamara added the comment:

Yes that'd fix the known option before unknown but not the other way around.

--

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



[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-05 Thread R. David Murray

R. David Murray added the comment:

Right.  I didn't read what you wrote carefully enough.  Clearly 
parse_known_args is buggy here.

--

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



[issue5845] rlcompleter should be enabled automatically

2012-10-05 Thread Steven D'Aprano

Changes by Steven D'Aprano steve+pyt...@pearwood.info:


--
nosy: +stevenjd

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



[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 I don't know why, but it seems that the bug reappeared in 3.3.

Part of it could be that the original fix added no tests.

--

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-05 Thread Vinay Sajip

Vinay Sajip added the comment:

 I have tested the workaround and it works correctly.
 Please see attached log file.

Thanks for the update.

 btw, it seems to me that -IC:\Python33\include -IC:\Python33\include
 should be -IC:\Users\msmhrt\mypython\3.3.0\include -IC:\Python33\include.

Could well be a similar problem; I'll look into it.

--

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue16123] IDLE - deprecate running without a subprocess

2012-10-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Brett Cannon

Brett Cannon added the comment:

http://hg.python.org/cpython/rev/dc18a2a66d16 did add a test, just not the 
right one.

--

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



[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Brett Cannon

Brett Cannon added the comment:

Actually, I take it back, it removed a test without adding a new one. Obviously 
that's my bad.

--

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



[issue16143] Building with configure option --without-doc-strings crashes first time through PyUnicode_DecodeUTF8Stateful

2012-10-05 Thread Gregory Andersen

New submission from Gregory Andersen:

Seems unicode_empty is still NULL at this point.

A gdb backtrace from an x86_64 build.  Reproduced on i686 and mips build as 
well.

Program received signal SIGSEGV, Segmentation fault.
0x0044f61e in PyUnicode_DecodeUTF8Stateful (s=0x59a767 , size=0, 
errors=0x0, consumed=0x0) at Objects/unicodeobject.c:4726
4726Py_INCREF(unicode_empty);
(gdb) bt
#0  0x0044f61e in PyUnicode_DecodeUTF8Stateful (s=0x59a767 , size=0, 
errors=0x0, consumed=0x0) at Objects/unicodeobject.c:4726
#1  0x00433087 in PyType_Ready (type=0x7d5340) at 
Objects/typeobject.c:4235
#2  0x004332ae in PyType_Ready (type=optimized out) at 
Objects/typeobject.c:4116
#3  PyType_Ready (type=0x7d54e0) at Objects/typeobject.c:4146
#4  0x0041bbfe in _Py_ReadyTypes () at Objects/object.c:1576
#5  0x004a6eb0 in _Py_InitializeEx_Private (install_sigs=optimized 
out, install_importlib=optimized out) at Python/pythonrun.c:301
#6  Py_InitializeEx (install_sigs=optimized out) at Python/pythonrun.c:401
#7  Py_Initialize () at Python/pythonrun.c:407
#8  0x004bb9fc in Py_Main (argc=1, argv=0x82f010) at Modules/main.c:646
#9  0x0041949e in main (argc=1, argv=0x7fffe658) at 
./Modules/python.c:66

--
components: Interpreter Core
messages: 172097
nosy: Gregory.Andersen
priority: normal
severity: normal
status: open
title: Building with configure option --without-doc-strings crashes first 
time through PyUnicode_DecodeUTF8Stateful
type: crash
versions: Python 3.3

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



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2012-10-05 Thread Mark Lawrence

Mark Lawrence added the comment:

I can reproduce this on Windows Vista running 2.7.3.  With 3.3.0 I get
 faulty_time = time.asctime(initial_struct_time)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: Tuple or struct_time argument required


--
nosy: +BreamoreBoy

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



[issue812369] module shutdown procedure based on GC

2012-10-05 Thread Stefan Friesel

Stefan Friesel added the comment:

What is the status of this? Does the patch need more reviewing?

--
nosy: +Stefan.Friesel

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



[issue16113] Add SHA-3 (Keccak) support

2012-10-05 Thread Christian Heimes

Christian Heimes added the comment:

I've documented the optimization options of Keccak. The block also contains a 
summarization of my modifications of the reference code.

http://hg.python.org/sandbox/cheimes/file/57948df78dbd/Modules/_sha3/sha3module.c#l22

--

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



[issue16143] Building with configure option --without-doc-strings crashes first time through PyUnicode_DecodeUTF8Stateful

2012-10-05 Thread Stefan Krah

Stefan Krah added the comment:

This seems related to #9242: _Py_InitializeEx_Private() calls _Py_ReadyTypes(),
which uses the Unicode API, well before actually calling _PyUnicode_Init().

--
nosy: +georg.brandl, skrah
priority: normal - release blocker
stage:  - needs patch

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



[issue16143] Building with configure option --without-doc-strings crashes first time through PyUnicode_DecodeUTF8Stateful

2012-10-05 Thread Stefan Krah

Stefan Krah added the comment:

Sorry, wrong issue number: Related to #10156.

--

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



[issue10156] Initialization of globals in unicodeobject.c

2012-10-05 Thread Stefan Krah

Stefan Krah added the comment:

See also #16143.

--
versions: +Python 3.3, Python 3.4

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



[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Couldn't this be simplified to the following?

I think this is idiomatic now (since 2.5).

There are some places where similar outdated code used. See the attached patch. 
There are more dubious places in Lib/multiprocessing/managers.py and 
Lib/asyncore.py.

--
keywords: +patch
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file27435/reraise_keyboard_interrupt.patch

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



[issue16144] misleading sentence in reference/import

2012-10-05 Thread Manuel Pégourié-Gonnard

New submission from Manuel Pégourié-Gonnard:

I find the following sentences, from import.rst, section Finders and loaders, 
misleading: Python includes a number of default finders and importers. One 
knows how to locate frozen modules, and another knows how to locate built-in 
modules. in that one may think frozen comes before built-in, while the 
converse is true.

Attached is a patch with a hopefully clearer version. While at it, the patch 
also turns into links the references to PEPs in the introduction.

--
assignee: docs@python
components: Documentation
files: import-doc-fixes.patch
keywords: patch
messages: 172105
nosy: docs@python, mpg
priority: normal
severity: normal
status: open
title: misleading sentence in reference/import
versions: Python 3.4
Added file: http://bugs.python.org/file27436/import-doc-fixes.patch

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



[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-05 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +vinay.sajip
stage:  - patch review

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



[issue812369] module shutdown procedure based on GC

2012-10-05 Thread Martin v . Löwis

Martin v. Löwis added the comment:

At the moment, it's like that the status of the patch needs to be 
reestablished. Does it apply? Does it work? Does the test suite still pass?

--

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



[issue16144] misleading sentence in reference/import

2012-10-05 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +brett.cannon, ncoghlan

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



[issue16098] Bisect optimization in heapq.nsmallest is never used

2012-10-05 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

I've to say that I also ran into that by following coverage numbers and as a 
newbie is not so easy to see what Raymond told. IMHO that information could be 
put as a comment.

Regards

francis

--
nosy: +francismb

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



[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2012-10-05 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
type:  - enhancement

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



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2012-10-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Viktor, what happen when a large positive number (=100) used as tm_hour?

--
nosy: +serhiy.storchaka

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



[issue16123] IDLE - deprecate running without a subprocess

2012-10-05 Thread Roger Serwy

Roger Serwy added the comment:

I agree that a message within the shell would be more informative to the user. 
The _rev1 patch also adds a message to the shell.

--
Added file: http://bugs.python.org/file27437/idle_deprecate_rev1.patch

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



[issue16145] Abort in _csv module

2012-10-05 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

Commit f2adbb1065eb introduced abort in _csv module in debug builds in Python 
3.3, when using APSW shell.

(You need to have SQLite =3.7.14 installed.)

$ cd /tmp
$ wget http://apsw.googlecode.com/files/apsw-3.7.14-r2.zip
$ unzip apsw-3.7.14-r2.zip
$ cd apsw-3.7.14-r2
$ python3.3dm setup.py build
...
$ PYTHONPATH=$(ls -d build/lib*) python3.3dm tools/shell.py
SQLite version 3.7.14.1 (APSW 3.7.14-r2)
Enter .help for instructions
Enter SQL statements terminated with a ;
sqlite .output output_file
sqlite .mode csv
sqlite select a;
python3.3dm: /tmp/cpython/Modules/_csv.c:: join_append: Assertion 
`(((PyASCIIObject*)field)-state.ready)' failed.
Aborted
$ 

In bash shell:
$ PYTHONPATH=$(ls -d build/lib*) python3.3dm tools/shell.py  $'.output 
output_file\n.mode csv\nselect a;'
python3.3dm: /tmp/cpython/Modules/_csv.c:: join_append: Assertion 
`(((PyASCIIObject*)field)-state.ready)' failed.
Aborted
$

--
keywords: 3.3regression
messages: 172110
nosy: Arfrever, pitrou, rogerbinns
priority: normal
severity: normal
status: open
title: Abort in _csv module
versions: Python 3.3, Python 3.4

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



[issue16124] fcntl_ioctl still not 100% sane with unsigned longs

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Is it affected for 3.3 and 3.4 also?

--
nosy: +asvetlov
versions: +Python 3.3, Python 3.4

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



[issue16128] hashable documentation error

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Please write what exact text you want to see in documentation.

--
nosy: +asvetlov

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



[issue16058] ConfigParser no longer deepcopy compatible in 2.7

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

ConfigParser is not intended to be deep copy-able, at least documentation says 
nothing about it.

--
nosy: +asvetlov, lukasz.langa

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



[issue16113] Add SHA-3 (Keccak) support

2012-10-05 Thread Christian Heimes

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


Added file: http://bugs.python.org/file27438/622009fb6192.diff

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



[issue16145] Abort in _csv module

2012-10-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, can you try to enable core dumps and get a complete stack trace?

--

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



[issue16123] IDLE - deprecate running without a subprocess

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Looks good for me.

--

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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-05 Thread Charles-François Natali

Charles-François Natali added the comment:

 Are you referring to the comment where I mention ECONNABORTED?  That is a 
 regular unix error (windows version is WSAECONNABORTED).
 This error occurs when the local stack decides to kill the connection, as 
 opposed to ECONNRESET which occurs on account of receiving a RST packet.

Oops, I misread. ECONNABORTED is fine.

 New patch includes documentation change.

LGTM.

 If 2.7 is still in bugfix mode, then this patch could probably be accepted.

I guess so.

--

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



[issue16123] IDLE - deprecate running without a subprocess

2012-10-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0430986a8c03 by Andrew Svetlov in branch 'default':
Issue #16123: IDLE - deprecate running without a subprocess.
http://hg.python.org/cpython/rev/0430986a8c03

--
nosy: +python-dev

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



[issue16139] Python 3.3 fails when starting from read-only FS

2012-10-05 Thread Charles-François Natali

Charles-François Natali added the comment:

 This is more or less a duplicate of #15833

Indeed, closing as duplicate.

--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - most failures to write byte-compiled file no longer suppressed
type: crash - behavior

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



[issue16123] IDLE - deprecate running without a subprocess

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Change priority to deferred blocker for reminding to remove no-subprocess mode 
in 3.5.

Thanks, Roger.

--
priority: normal - deferred blocker

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



[issue15833] most failures to write byte-compiled file no longer suppressed

2012-10-05 Thread Charles-François Natali

Charles-François Natali added the comment:

We should probably catch all OSErrors, and log a warning in verbose mode, as 
suggested by Antoine.
Catching individual errnos is tedious and error-prone.

--
nosy: +neologix

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



[issue15833] most failures to write byte-compiled file no longer suppressed

2012-10-05 Thread STINNER Victor

STINNER Victor added the comment:

Issue #16139 has been marked as a duplicate of this issue.

--
nosy: +haypo

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



[issue13896] Make shelf instances work with 'with' as context managers

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Filip, please describe why you prevent closing if writeback attribute is not 
present.
I see comment for __del__ related to #1339007, but at __exit__ call __enter__ 
has called already and __init__ has finished definitely with success.
Also I would to see reference to http://bugs.python.org/issue1339007 in __del__ 
comment to cleaner description of issue.

--

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



[issue13896] Make shelf instances work with 'with' as context managers

2012-10-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
assignee:  - asvetlov

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



[issue16115] test that executable arg to Popen() takes precedence over args[0] arg

2012-10-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0df5aeab229f by Andrew Svetlov in branch '3.3':
Issue #16115: Add test for check that executable arg to Popen() takes 
precedence over args[0] arg\n\n 
   Patch by Kushal Das
http://hg.python.org/cpython/rev/0df5aeab229f

New changeset 0fcfb6066e17 by Andrew Svetlov in branch 'default':
Merge issue #16115: Add test for check that executable arg to Popen() takes 
precedence over args[0] arg\n\n 
   Patch by Kushal Das
http://hg.python.org/cpython/rev/0fcfb6066e17

--
nosy: +python-dev

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



[issue16115] test that executable arg to Popen() takes precedence over args[0] arg

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Committed. Thank you, Kushal Das.
BTW, please fill http://www.python.org/psf/contrib/ as contributor of Python 
project.
We would to get that agreement from everybody who has pushed any patch.
Thanks again.

--

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



[issue16115] test that executable arg to Popen() takes precedence over args[0] arg

2012-10-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


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

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



[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Maybe better to fix Windows behavior for unifying FileNotFoundError?

--

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



[issue16146] MIMEApplication cannot access

2012-10-05 Thread yinian1992

New submission from yinian1992:

I have a python 2.7.3 installation both on Debian 6 and Windows 7. And under 
both environment email.mime.application cannot access.

 email.mime.application
Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: 'module' object has no attribute 'application'

It seems that the import list of email module's __init__.py doesn't include it.

--
components: Library (Lib)
files: __init__.patch
keywords: patch
messages: 172126
nosy: yinian1992
priority: normal
severity: normal
status: open
title: MIMEApplication cannot access
versions: Python 2.7
Added file: http://bugs.python.org/file27439/__init__.patch

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



[issue16115] test that executable arg to Popen() takes precedence over args[0] arg

2012-10-05 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Actually, I was still working on this.  I had assigned it to myself.

+p = subprocess.Popen([nonexistent,-c,'import sys; sys.exit(42)'],
+executable=sys.executable, cwd=python_dir)

The test for the executable argument should really test the executable argument 
independent of the cwd argument.  Also, it would be better if the test uses a 
valid args[0] to demonstrate precedence.  I had prepared a test but did not 
upload it yet, because I also wanted to add an accompanying clarification to 
the docs which I am still preparing.  Reopening.

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

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



[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-05 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I will be opening a separate issue to have the same behavior in a future 
version after this issue is closed.  For existing releases, we don't want to 
break working code that could be relying on the difference.

--

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



[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-05 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Sorry, I was confusing this issue with issue 15533.  Yes, I support adding the 
file path to the error message in the Windows implementation, though my 
preference would be for that to be addressed as part of a separate issue.

--

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



[issue16145] Abort in _csv module

2012-10-05 Thread Roger Binns

Roger Binns added the comment:

I'm the APSW author.  You do not need SQLite installed - APSW's setup can fetch 
the current SQLite and use it privately not affecting the rest of the system.

An easier way of testing is:

  python3 setup.py fetch --sqlite --version 3.7.14 build_ext --inplace --force

Create test.sql with these contents

  .output output_file
  .mode csv
  select 3, '4';

Then run:

  env PYTHONPATH=. python3 tools/shell.py
  .read test.sql

The actual code where the problem happens does the following:

- Create a StringIO
- Initialize csv.writer using the StringIO
- Write one row with two values (this is when the crash happens in Python 3.3 
on the first write)
- Copy the current contents of the StringIO to the actual output file changing 
encoding as needed
- Truncate StringIO and seek back to offset zero ready for the next line

The relevant code is in tools/shell.py in the output_csv function.  Writing 
just that sequence of code above doesn't result in the assertion.  valgrind 
doesn't show any problems either (using pydebug, without pymalloc and all the 
freelists set to zero).

A stack trace is here:  https://code.google.com/p/apsw/issues/detail?id=132#c4

If not using a debug/nopymalloc build then you get a crash happening later.

--

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



[issue16146] MIMEApplication cannot access

2012-10-05 Thread R. David Murray

R. David Murray added the comment:

This is by design.  If you want to load the application module, you have to do 
so explicitly:

  import email.mime.application

This is similar to the way many other packages are organized.  An __init__ file 
importing a submodule is the (relatively) exceptional case rather than the 
common case.  This is so that applications that do not need particular 
submodules do not incur the performance and memory hit of importing those 
submodules implicitly.

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

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



  1   2   >