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

2012-10-04 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 

___
___
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-04 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 

___
___
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-04 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Éric Araujo wrote:
> 
> Éric Araujo  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 

___
___
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-04 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 

___
___
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-04 Thread Charles-François Natali

Charles-François Natali added the comment:

> Hmm... I guess maybe we should trap all OSErrors after all (and print the 
> error when in verbose mode).

Yes.

--

___
Python tracker 

___
___
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-04 Thread Kushal Das

Kushal Das added the comment:

Can not reproduce this on 2.7.3 on Fedora 17, x86_64.

--
nosy: +kushaldas

___
Python tracker 

___
___
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-04 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Why I was not seeing "test_platform.py" failing in the buildbots? :-?

--

___
Python tracker 

___
___
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-04 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

David, after so many patches, can you confirm that we have solved the original 
issue? :)

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
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-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9838ae397a19 by Jesus Cea in branch '3.2':
#16112: platform.architecture does not correctly escape argument to 
/usr/bin/file. Fix original patch
http://hg.python.org/cpython/rev/9838ae397a19

New changeset 64a0caf49429 by Jesus Cea in branch '3.3':
MERGE: #16112: platform.architecture does not correctly escape argument to 
/usr/bin/file. Fix original patch
http://hg.python.org/cpython/rev/64a0caf49429

New changeset b9ac3c44a4eb by Jesus Cea in branch 'default':
MERGE: #16112: platform.architecture does not correctly escape argument to 
/usr/bin/file. Fix original patch
http://hg.python.org/cpython/rev/b9ac3c44a4eb

--

___
Python tracker 

___
___
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-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 04f39958aea9 by Jesus Cea in branch '3.2':
#16112: platform.architecture does not correctly escape argument to 
/usr/bin/file. Use 'communicate()' and decode the bytes
http://hg.python.org/cpython/rev/04f39958aea9

New changeset 19d37c8d1882 by Jesus Cea in branch '2.7':
#16112: platform.architecture does not correctly escape argument to 
/usr/bin/file. Fix original patch
http://hg.python.org/cpython/rev/19d37c8d1882

--

___
Python tracker 

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



[issue16132] ctypes incorrectly encodes .format attribute of memory views

2012-10-04 Thread Meador Inge

Changes by Meador Inge :


--
nosy: +meador.inge

___
Python tracker 

___
___
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-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b94a9ff13199 by Jesus Cea in branch '2.7':
#16112: platform.architecture does not correctly escape argument to 
/usr/bin/file. Use 'communicate()'
http://hg.python.org/cpython/rev/b94a9ff13199

--

___
Python tracker 

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



[issue10142] Support for SEEK_HOLE/SEEK_DATA

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

Changes by Jesús Cea Avión :


--
status: open -> closed

___
Python tracker 

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



[issue14446] Remove deprecated tkinter functions

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e278f3ab0190 by Jesus Cea in branch 'default':
Issue #14446: Remove deprecated tkinter functions: Delete an unused function to 
avoid a warning
http://hg.python.org/cpython/rev/e278f3ab0190

--

___
Python tracker 

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



[issue14446] Remove deprecated tkinter functions

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4f45d8ff785 by Jesus Cea in branch 'default':
Issue #14446: Remove deprecated tkinter functions: Delete an unused function to 
avoid a warning
http://hg.python.org/cpython/rev/f4f45d8ff785

--

___
Python tracker 

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



[issue14446] Remove deprecated tkinter functions

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

Jesús Cea Avión added the comment:

I am getting a warning about a statically defined function not being used:



Static functions not called inside the module can be safely deleted. In this 
case, "Merge".

--
nosy: +jcea

___
Python tracker 

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



[issue16135] Removal of OS/2 support

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

Jesús Cea Avión added the comment:

I am leaving alone "distutils", "zlib" and "libffi", because I think they are 
external projects. is that OK?.

--

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9ba1f113c3ec by Jesus Cea in branch 'default':
Closes #16135: Removal of OS/2 support
http://hg.python.org/cpython/rev/9ba1f113c3ec

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d853354e1470 by Jesus Cea in branch 'default':
#16135: Removal of OS/2 support (Remove OS2 and OS/2 references)
http://hg.python.org/cpython/rev/d853354e1470

New changeset 15949f34e08f by Jesus Cea in branch 'default':
#16135: Removal of OS/2 support (Python code partial cleanup)
http://hg.python.org/cpython/rev/15949f34e08f

--

___
Python tracker 

___
___
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-04 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage: needs patch -> test needed

___
Python tracker 

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



[issue16127] Correct mentions of narrow build in documentation and comments

2012-10-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python -> ezio.melotti
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



[issue16127] Correct mentions of narrow build in documentation and comments

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a1aa13ef00c5 by Ezio Melotti in branch '3.3':
#16127: remove outdated references to narrow builds.  Patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/a1aa13ef00c5

New changeset 89ee959a9b54 by Ezio Melotti in branch 'default':
#16127: merge with 3.3.
http://hg.python.org/cpython/rev/89ee959a9b54

--
nosy: +python-dev

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42c063b3821f by Jesus Cea in branch 'default':
#16135: Removal of OS/2 support (C code and Docs)
http://hg.python.org/cpython/rev/42c063b3821f

--

___
Python tracker 

___
___
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-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hmm... I guess maybe we should trap all OSErrors after all (and print the error 
when in verbose mode).

--
nosy: +neologix, pitrou

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.2 logs an error to stderr (if Python is started in verbose mode) if 
the directory and/or the pyc file cannot be created, and continue.

#ifdef MS_WINDOWS
if (_mkdir(cpathname) < 0 && errno != EEXIST) {
#else
if (mkdir(cpathname, dirmode) < 0 && errno != EEXIST) {
#endif
*dirpath = saved;
if (Py_VerboseFlag)
PySys_WriteStderr(
"# cannot create cache dir %s\n", cpathname);
return;
}
*dirpath = saved;

fp = open_exclusive(cpathname, mode);
if (fp == NULL) {
if (Py_VerboseFlag)
PySys_WriteStderr(
"# can't create %s\n", cpathname);
return;
}

--
nosy: +haypo

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dea15868963f by Jesus Cea in branch 'default':
#16135: Removal of OS/2 support (Modules/*)
http://hg.python.org/cpython/rev/dea15868963f

--

___
Python tracker 

___
___
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-04 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +brett.cannon
type: behavior -> crash
versions: +Python 3.4

___
Python tracker 

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



[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-04 Thread Felipe Cruz

Felipe Cruz added the comment:

This patch retries write() until success if errno == EINTR.
There is also a test.

--
Added file: http://bugs.python.org/file27428/issue16105_v3.patch

___
Python tracker 

___
___
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-04 Thread Andrew Gallagher

New submission from Andrew Gallagher:

This occurs when python is installed on a read-only mount AND all the .pyc 
files are out-of-date.  Therefore, when python starts and attempts to write a 
new .pyc file, _write_atomic in "Lib/importlib/_bootstrap.py" throws an OSError 
with an errno of EROFS, which is not handled (and ignored) and kills the 
interpreter.

$ python
Fatal Python error: Py_Initialize: Unable to get the locale encoding
Traceback (most recent call last):
  File "", line 1558, in _find_and_load
  File "", line 1525, in _find_and_load_unlocked
  File "", line 586, in _check_name_wrapper
  File "", line 1023, in load_module
  File "", line 1004, in load_module
  File "", line 562, in module_for_loader_wrapper
  File "", line 854, in _load_module
  File "", line 990, in get_code
  File "", line 1051, in _cache_bytecode
  File "", line 1074, in set_data
  File "", line 128, in _write_atomic
OSError: [Errno 30] Read-only file system: 
'/lib/python3.3/encodings/__pycache__/__init__.cpython-33.pyc.139872939267056'
Aborted (core dumped)

The following (hacky) patch fixes the issue for me:

--- a/Python-3.3.0/Lib/importlib/_bootstrap.py
+++ b/Python-3.3.0/Lib/importlib/_bootstrap.py
@@ -1070,6 +1070,10 @@ class SourceFileLoader(FileLoader, SourceLoader):
 # If can't get proper access, then just forget about writing
 # the data.
 return
+except OSError as e:
+if e.errno != 30:  # ignore EROFS
+raise
+return
 try:
 _write_atomic(path, data, _mode)
 _verbose_message('created {!r}', path)
@@ -1077,6 +1081,9 @@ class SourceFileLoader(FileLoader, SourceLoader):
 # Don't worry if you can't write bytecode or someone is writing
 # it at the same time.
 pass
+except OSError as e:
+if e.errno != 30:  # ignore EROFS
+raise

--
components: Library (Lib)
messages: 172029
nosy: andrewjcg
priority: normal
severity: normal
status: open
title: Python 3.3 fails when starting from read-only FS
type: behavior
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



[issue16135] Removal of OS/2 support

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

Jesús Cea Avión added the comment:

Victor, I am removing the support step by step, because I am monitoring the 
buildbots. Thanks for taking an eye on this.

--

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29155fa21a41 by Jesus Cea in branch 'default':
#16135: Removal of OS/2 support (posixmodule y platform dependent files)
http://hg.python.org/cpython/rev/29155fa21a41

--

___
Python tracker 

___
___
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-04 Thread David Benjamin

David Benjamin added the comment:

Yes, communicate is needed if you have multiple pipes and need to be careful 
about both ends doing a blocking reads/writes on different ones. There's only 
one pipe here. Eh, whatever. If you guys really want to use communicate, I 
don't really care.

--

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread STINNER Victor

STINNER Victor added the comment:

Most of the OS/2 specific code in the C part: search PYOS_OS2.

--

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

> Victor: your patch doesn't apply on 3.2, but it works for me on 3.3.

I wrote it for Python 3.4. I'm too lazy for adapt it to other branches.

--

___
Python tracker 

___
___
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-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Victor is right, communicate() is usually the right way to do it. No need to 
use unsafe idioms.

--

___
Python tracker 

___
___
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-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Victor: your patch doesn't apply on 3.2, but it works for me on 3.3.

--

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

> Well, the theoretical deadlock's just if stdin is also a pipe, right?

If I remember correctly, the parent process (Python) and the child
process (file) can be blocked if the child is blocked in a blocking
write into a pipe (ex: stderr), whereas the pipe buffer is full (the
size of the buffer is usually 4096 bytes) and the parent is reading
all content of another pipe (ex: stdout). So it occurs if the process
uses more than 1 pipe for standard input/output streams. In the case
of platform, it looks like the issue cannot occur.

I always prefer communicate() because I consider it safer :-)

> Though it might be worth passing DEVNULL to stdin instead of inheriting, just 
> to be tidy.

Yeah, maybe. As you want.

--

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b08416a31d15 by Jesus Cea in branch 'default':
#16135: Removal of OS/2 support (Docs)
http://hg.python.org/cpython/rev/b08416a31d15

--

___
Python tracker 

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



[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory

2012-10-04 Thread Eli Bendersky

Eli Bendersky added the comment:

Ah, OK. I was actually putting off refactorings in that code to after 
refactoring the test suite. The latter is in progress, it was paused by my 
vacation but I do plan to resume it eventually. Once the test suite is 
sufficiently humane (esp. moves off doctest to enable normal testing of 
multiple modules with the same set of tests) the refactoring should become 
easier.

--

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffc6e6b00949 by Jesus Cea in branch 'default':
#16135: Removal of OS/2 support (I)
http://hg.python.org/cpython/rev/ffc6e6b00949

--
nosy: +python-dev

___
Python tracker 

___
___
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-04 Thread David Benjamin

David Benjamin added the comment:

Well, the theoretical deadlock's just if stdin is also a pipe, right? I think 
there isn't be a difference between communicate and stdout.read if only stdout 
is a pipe. Though it might be worth passing DEVNULL to stdin instead of 
inheriting, just to be tidy.

--

___
Python tracker 

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



[issue16110] Provide logging.config.configParserConfig

2012-10-04 Thread Vinay Sajip

Changes by Vinay Sajip :


--
resolution: wont fix -> 

___
Python tracker 

___
___
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-04 Thread R. David Murray

R. David Murray added the comment:

I can't reproduce this.  What version of 2.7?  (This might have been fixed by 
the issue 8013 fix).

--
nosy: +r.david.murray

___
Python tracker 

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



[issue16110] Provide logging.config.configParserConfig

2012-10-04 Thread Vinay Sajip

Vinay Sajip added the comment:

I could consider relaxing the parameters on fileConfig such that instead of 
accepting just a string or a file-like object, it additionally accepts a 
ConfigParser instance. More specifically:

def fileConfig(file_or_fname_or_cp, defaults=None):
if isinstance(file_or_fname_or_cp, RawConfigParser):
cp = file_or_filename_or_cp
else:
cp = ConfigParser.ConfigParser(defaults)
if hasattr(cp, 'readfp') and\
hasattr(file_or_fname_or_cp, 'readline'):
cp.readfp(file_or_fname_or_cp)
else:
cp.read(file_or_fname_or_cp)

formatters = _create_formatters(cp)

This will only require (in addition to the above) small tweaks to docs
and tests. It would appear to fit the bill for your use case. Do you agree?

--

___
Python tracker 

___
___
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-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +lemburg, loewis

___
Python tracker 

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



[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory

2012-10-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> > the coding style there is quite old
> 
> It would be great if you could elaborate, however briefly, if there's
> anything else besides your fixes that is old and should be modernized.
> I will admit to writing some of that code very recently, but that's
> mostly because I was trying to follow the existing coding style of the
> module, which was written a long time ago.

I don't think that's you. I was talking about some of the cruft I
removed (such as list_join() which was going through complicated hoops
instead of calling PyUnicode_Join(), or manual filling of tuples instead
of calling PyTuple_Pack()).

There are still issues with internal functions stealing references and
such.

--

___
Python tracker 

___
___
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-04 Thread py.user

New submission from py.user:

http://docs.python.org/py3k/glossary.html#term-sequence

"and defines a len() method that returns the length of the sequence" 

change to

"and defines a __len__() special method that returns the length of the sequence"

--
assignee: docs@python
components: Documentation
messages: 172013
nosy: docs@python, py.user
priority: normal
severity: normal
status: open
title: In the glossary there is a small typo about __len__() in the sequence 
definition
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



[issue16136] Removal of VMS support

2012-10-04 Thread Trent Nelson

Trent Nelson added the comment:

FWIW, I have another Itanium box that I've earmarked for OpenVMS.  I don't 
believe the installation media is readily available for free, though, so I'd 
need to ping HP to try arrange a copy.

--
nosy: +trent

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

Another email from Mathew, Sandeep:
http://mail.python.org/pipermail/python-dev/2011-May/111382.html

--

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

After the blog post, Mathew, Sandeep from HP asked how to help:
http://mail.python.org/pipermail/python-dev/2011-May/111367.html

--

___
Python tracker 

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



[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory

2012-10-04 Thread Eli Bendersky

Eli Bendersky added the comment:

Antoine, Thanks!

You said :

> the coding style there is quite old

It would be great if you could elaborate, however briefly, if there's anything 
else besides your fixes that is old and should be modernized. I will admit to 
writing some of that code very recently, but that's mostly because I was trying 
to follow the existing coding style of the module, which was written a long 
time ago.

--

___
Python tracker 

___
___
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-04 Thread Viktor Chynarov

Viktor Chynarov added the comment:

If an array created from a struct_time that has a negative tm_hour is passed as 
an argument to time.asctime(), Python crashes. 

>>> initial_struct_time = [tm for tm in time.localtime()]
>>> initial_struct_time[3] = -1
>>> faulty_time = time.asctime(initial_struct_time)

--

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

See also:
http://blog.python.org/2011/05/python-33-to-drop-support-for-os2.html

--

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread STINNER Victor

STINNER Victor added the comment:

See also:
http://blog.python.org/2011/05/python-33-to-drop-support-for-os2.html

--

___
Python tracker 

___
___
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-04 Thread Viktor Chynarov

New submission from Viktor Chynarov:

If a that has a negative tm_hour is passed as an argument to time.asctime(), 
Python crashes. 

>>> initial_struct_time = [tm for tm in time.localtime()]
>>> initial_struct_time[3] = -1
>>> faulty_time = time.asctime(initial_struct_time)

--
components: Library (Lib)
messages: 172005
nosy: Viktor.Chynarov
priority: normal
severity: normal
status: open
title: Using time.asctime() with an array with negative tm_hour causes Python 
Crash.
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2012-10-04 Thread STINNER Victor

STINNER Victor added the comment:

I first proposed to drop OS/2 support in 2010. Andrew MacIntyre ported Python 2 
to OS/2, he answered me:
"The 3.x branch needs quite a bit of work on OS/2 to 
deal with Unicode, as OS/2 was one of the earlier OSes with full 
multiple language support and IBM developed a unique API.  I'm still 
struggling to come to terms with this, partly because I myself don't 
"need" it."
Full answer:
http://mail.python.org/pipermail/python-dev/2010-April/099477.html

Thread in 2010:
http://mail.python.org/pipermail/python-dev/2010-April/099471.html

Thread in 2011:
http://mail.python.org/pipermail/python-dev/2011-April/110872.html

--
nosy: +haypo

___
Python tracker 

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



[issue16135] Removal of OS/2 support

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

Changes by Jesús Cea Avión :


--
assignee:  -> jcea

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

Python on VMS is maybe not completly dead:
http://www.vmspython.org/History

--
nosy: +haypo

___
Python tracker 

___
___
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-04 Thread Jesús Cea Avión

New submission from Jesús Cea Avión:

According to PEP-11, we have to remove VMS support.

--
messages: 172001
nosy: jcea
priority: normal
severity: normal
status: open
title: Removal of VMS support
versions: Python 3.4

___
Python tracker 

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



[issue16135] Removal of OS/2 support

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

New submission from Jesús Cea Avión:

According to PEP-11, We have to remove OS/2 support for 3.4.

--
messages: 172000
nosy: jcea
priority: normal
severity: normal
status: open
title: Removal of OS/2 support
versions: Python 3.4

___
Python tracker 

___
___
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-04 Thread STINNER Victor

STINNER Victor added the comment:

Reopen: test_platform is failing. Attached patch should fix the issue. It fixes 
a theoric "deadlock" issue in _syscmd_file: use proc.communicate() instead of 
proc.stdout.read().

--
resolution: fixed -> 
Added file: http://bugs.python.org/file27427/platform.patch

___
Python tracker 

___
___
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-04 Thread Charles-François Natali

Charles-François Natali added the comment:

> Please consider the attached patch and see if it solves the issue.

The patch looks OK (although I'd prefer a BSD errno example, such as
ECONNRESET, instead of a winsock one).

We should also update the documentation that states that in finish()
won't be called if handle() raises an exception.

--

___
Python tracker 

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



[issue16105] Pass read only FD to signal.set_wakeup_fd

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

Charles-François Natali added the comment:

> You mean retry one time or until success?

Until success.

It should also come with a test.

--

___
Python tracker 

___
___
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-04 Thread Christian Heimes

Changes by Christian Heimes :


--
versions: +Python 3.4

___
Python tracker 

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



[issue16110] Provide logging.config.configParserConfig

2012-10-04 Thread thbach

thbach added the comment:

vinay: I understand your preference of dictConfig over fileConfig as 
maintainer. But as an application developer I want to provide my user an easy 
way to adjust logging herself. In the end of the day she is the one knowing 
what has to be logged in which place. Therefor, having something like 
fileConfig is essential.

david: The modified configuration can be passed to fileConfig via a StringIO 
instance. 

The downside is that ConfigParser instances with e.g. 'allow_no_value' set to 
True are currently difficult to handle – e.g.:

>>> sys.version
'3.2.3 (default, Jun 25 2012, 23:10:56) \n[GCC 4.7.1]'
>>> cp = configparser.ConfigParser(allow_no_value=True)
>>> cp.read_string('[foo]\nbar')
>>> buf = io.StringIO()
>>> cp.write(buf)
>>> buf.seek(0)
0
>>> logging.config.fileConfig(buf)
---
ParsingError  Traceback (most recent call last)
 in ()
> 1 logging.config.fileConfig(buf)

/usr/lib/python3.2/logging/config.py in fileConfig(fname, defaults, 
disable_existing_loggers)
 64 cp = configparser.ConfigParser(defaults)
 65 if hasattr(fname, 'readline'):
---> 66 cp.read_file(fname)
 67 else:
 68 cp.read(fname)

/usr/lib/python3.2/configparser.py in read_file(self, f, source)
706 except AttributeError:
707 source = ''
--> 708 self._read(f, source)
709 
710 def read_string(self, string, source=''):

/usr/lib/python3.2/configparser.py in _read(self, fp, fpname)
   1079 # if any parsing errors occurred, raise an exception
   1080 if e:
-> 1081 raise e
   1082 self._join_multiline_values()
   1083 

ParsingError: Source contains parsing errors: 
[line  2]: 'bar\n'

Hence, logging.config.fileConfig should at least provide a way to pass in 
arguments for the ConfigParser initialization. Anyways, I think it is much 
cleaner to provide a function which gets the configuration directly from the 
ConfigParser instance.

--

___
Python tracker 

___
___
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-04 Thread Christian Heimes

Christian Heimes added the comment:

Please review the latest patch. 

I've included Gregory as he is the creator of hashlib.

--
nosy: +gregory.p.smith
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



[issue16113] Add SHA-3 (Keccak) support

2012-10-04 Thread Christian Heimes

Changes by Christian Heimes :


Added file: http://bugs.python.org/file27426/44920b1d9db1.diff

___
Python tracker 

___
___
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-04 Thread Christian Heimes

Changes by Christian Heimes :


Removed file: http://bugs.python.org/file27423/79e3fb1838ce.diff

___
Python tracker 

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



[issue16096] Get rid of dangerous integer overflow tricks

2012-10-04 Thread STINNER Victor

STINNER Victor added the comment:

It's maybe safer (and simpler) to not touch such code in Python older than 3.4.

--

___
Python tracker 

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



[issue16096] Get rid of dangerous integer overflow tricks

2012-10-04 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue16096] Get rid of dangerous integer overflow tricks

2012-10-04 Thread Andrew Svetlov

Andrew Svetlov added the comment:

The patches looks good for me, but I like to double check before commit.
Let's wait for a week for other reviewers.

--
nosy: +asvetlov

___
Python tracker 

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



[issue14997] IDLE tries to run shell window if line is completed with F5 rather than Enter

2012-10-04 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks to Roger Serwy.

--
nosy: +asvetlov
resolution:  -> fixed
stage: patch review -> 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



[issue14997] IDLE tries to run shell window if line is completed with F5 rather than Enter

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 52ef53398096 by Andrew Svetlov in branch '3.3':
Merge: Issue #14997: disable  in idle shell window.
http://hg.python.org/cpython/rev/52ef53398096

New changeset a40981be184d by Andrew Svetlov in branch 'default':
Merge: Issue #14997: disable  in idle shell window.
http://hg.python.org/cpython/rev/a40981be184d

New changeset 06772ba3d001 by Andrew Svetlov in branch '2.7':
Issue #14997: disable  in idle shell window.
http://hg.python.org/cpython/rev/06772ba3d001

--

___
Python tracker 

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



[issue14997] IDLE tries to run shell window if line is completed with F5 rather than Enter

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f6aaac839d83 by Andrew Svetlov in branch '3.2':
Issue #14997: disable  in idle shell window.
http://hg.python.org/cpython/rev/f6aaac839d83

--
nosy: +python-dev

___
Python tracker 

___
___
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-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Conformed other error messages. Now expected exceptions raised 
for all of the following strings:

''
'['
'[42'
'[42,'
'{'
'{"'
'{"spam'
'{"spam"'
'{"spam":'
'{"spam":42'
'{"spam":42,'

--
Added file: http://bugs.python.org/file27425/json_errmsg_2.patch

___
Python tracker 

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



[issue14446] Remove deprecated tkinter functions

2012-10-04 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Thanks to Michael Driscoll.
BTW you have forgotten to remove C functions from module definition in your 
patch.

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



[issue14446] Remove deprecated tkinter functions

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 83da5729e362 by Andrew Svetlov in branch 'default':
Issue #14446: Remove deprecated tkinter functions
http://hg.python.org/cpython/rev/83da5729e362

--
nosy: +python-dev

___
Python tracker 

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



[issue15417] Add support for csh and fish in venv activation scripts

2012-10-04 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
assignee:  -> asvetlov
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



[issue15417] Add support for csh and fish in venv activation scripts

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c519b490f4e4 by Andrew Svetlov in branch 'default':
Issue #15417: Add support for csh and fish in venv activation scripts.
http://hg.python.org/cpython/rev/c519b490f4e4

--
nosy: +python-dev

___
Python tracker 

___
___
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-04 Thread Eric V. Smith

Eric V. Smith added the comment:

As this is a feature request, it can only be applied to 3.4. I've modified the 
versions.

--
components: +Library (Lib)
nosy: +eric.smith
versions:  -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.5

___
Python tracker 

___
___
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-04 Thread Jorge Gomes

New submission from Jorge Gomes:

Please add support in urlparse for the family of RTMP schemes:
rtmp
rtmpe
rtmps
rtmpt

I believe these schemes should be added to the following module variables:
uses_relative
uses_netloc
uses_params
uses_query
[essentially, the one where rtsp already is]

The RTMP spec is hosted at http://www.adobe.com/devnet/rtmp.html which 
describes the format as "protocol://servername:port/"
The example provided there is rtmp://localhost:1935/test

An example YouTube RTMP *service* URL looks like:
rtmp://a.rtmp.youtube.com/videolive?ns=yt-live&id=123456&itag=35&signature=blahblahblah

Please let me know if further information is required.

Thanks!


Footnote:

A full YouTube RTMP stream URL may look like this:

rtmp://a.rtmp.youtube.com/videolive?ns=yt-live&id=123456&itag=35&signature=blahblahblah/yt-live.123456.35

i.e. it is the stream service url suffixed with '/' + the_stream_name. 

When one uses urlparse (extended with the 'rtmp' scheme), the stream name part 
gets lumped in with the last query value.
I think it's reasonable to expect the user of the urlparse library to strip the 
stream name off, thus returning just the service URL, which can be parsed 
normally. However, if urlparse could handle this sort use-case generically, 
then that would be great.

--
messages: 171984
nosy: Jorge.Gomes
priority: normal
severity: normal
status: open
title: Add support for RTMP schemes to urlparse
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5

___
Python tracker 

___
___
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-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file27424/json_errmsg.patch

___
Python tracker 

___
___
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-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file27420/json_errmsg.patch

___
Python tracker 

___
___
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-04 Thread Christian Heimes

Changes by Christian Heimes :


Added file: http://bugs.python.org/file27423/79e3fb1838ce.diff

___
Python tracker 

___
___
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-04 Thread Christian Heimes

Christian Heimes added the comment:

Antoine pointed out that the code contains C++ comments and exports a lot of 
functions. The latest patch has all // comments replaced, marks all functions 
and globals as static and #includes the C files directly.

--

___
Python tracker 

___
___
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-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This change broke test_platform for me:

==
ERROR: test_architecture (test.test_platform.PlatformTest)
--
Traceback (most recent call last):
  File "/home/antoine/cpython/32/Lib/test/test_platform.py", line 11, in 
test_architecture
res = platform.architecture()
  File "/home/antoine/cpython/32/Lib/platform.py", line 1072, in architecture
if 'executable' not in fileout:
TypeError: Type str doesn't support the buffer API

--
nosy: +pitrou
status: closed -> open

___
Python tracker 

___
___
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-04 Thread Christian Heimes

Changes by Christian Heimes :


Removed file: http://bugs.python.org/file27419/4509ef9b28a0.diff

___
Python tracker 

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



[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory

2012-10-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7bd9626d8b4f by Antoine Pitrou in branch '3.3':
Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element 
element_factory (fixes a regression in SimpleTAL).
http://hg.python.org/cpython/rev/7bd9626d8b4f

New changeset a8c044188731 by Antoine Pitrou in branch 'default':
Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element 
element_factory (fixes a regression in SimpleTAL).
http://hg.python.org/cpython/rev/a8c044188731

--

___
Python tracker 

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



[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2012-10-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +giampaolo.rodola, josiahcarlson, stutzbach
versions: +Python 3.4

___
Python tracker 

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



[issue16131] Pylauncher is being installed in Windows system folder

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

Martin v. Löwis added the comment:

I read the discussion, but couldn't see anything relevant in it. Please be 
explicit.

As for the reading the PEP, consider this paragraph in particular:

It may be surprising that the launcher is installed into the
Windows directory, and not the System32 directory. The reason is
that the System32 directory is not on the Path of a 32-bit process
running on a 64-bit system. However, the Windows directory is
always on the path.

I think this is quite an explicit rationale.

--

___
Python tracker 

___
___
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-04 Thread Richard Oudkerk

Changes by Richard Oudkerk :


Removed file: http://bugs.python.org/file27421/rwlock-sbt.patch

___
Python tracker 

___
___
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-04 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Fixed patch because I didn't test on Unix...

--
Added file: http://bugs.python.org/file27422/rwlock-sbt.patch

___
Python tracker 

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



[issue15513] Correct __sizeof__ support for pickle

2012-10-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patches will be more complex and will depend on functions added in the 
patches for issue15490. So I'm waiting for the final adoption of the patches 
for issue15490.

--

___
Python tracker 

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



[issue16131] Pylauncher is being installed in Windows system folder

2012-10-04 Thread Piotr Dobrogost

Piotr Dobrogost added the comment:

I read this pep. It doesn't tell why installing in Program Files and adding 
install folder to PATH wasn't chosen. Please take a look at the link I gave

--

___
Python tracker 

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



[issue16120] Use |yield from| in stdlib

2012-10-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Personally I ran the following command:

  find -type f -name '*.py' -exec egrep -n -A1 '\bfor\b.*\bin\b' '{}' + | egrep 
-v 'yield +from' | egrep -B1 'yield +\w+(, *\w+)* *(#|$)'

I deliberately missed tests and lib2to3, because that's where the changes 
required more attention. Berker Peksag found a few missed, these changes LGTM.

--
nosy: +storchaka

___
Python tracker 

___
___
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-04 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Attached is a new version of Kristjan's patch with support for managers.  (A 
threading._RWLockCore object is proxied and wrapped in a local instance of a 
subclass of threading.RWLock.)

Also I made multiprocessing.RWLock.__init__() use 
multiprocessing.util.register_after_fork() to clear self._owners.  Otherwise on 
Unix you can run into trouble if a forked processes starts a new thread whose 
id was in self._owners at the time of the fork.

I found that test_many_readers() and test_recursion() tended to fail when run 
with processes (on Windows).  This is because starting a process on Windows is 
slow, particularly with a debug build.  (Some of the buildbots running Windows 
in a VM can be crazily slow.)  Each reader only held the lock for 0.02 secs 
which is much less than the time to start a process on Windows.  This meant 
that it was easy to never have overlapping ownership, causing the tests to fail.

I fixed this by starting the readers while holding an exclusive, waiting for 
period, and then releasing the exclusive lock.  This makes it possible to change

self.assertTrue(max(nlocked) > 1)

to

self.assertEqual(max(nlocked), N)

Choosing timeouts to keep the buildbots happy can be a pain:-(

--
Added file: http://bugs.python.org/file27421/rwlock-sbt.patch

___
Python tracker 

___
___
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-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that makes error message more informative. I also changed 
message "Expecting object" to "Expecting value" as more conformed to JSON 
terminology.

--
nosy: +storchaka
Added file: http://bugs.python.org/file27420/json_errmsg.patch

___
Python tracker 

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



[issue16130] "Porting to Python 3.3" needs to be fixed in "What's new In Python 3.4"

2012-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b21288c1ec68 by Benjamin Peterson in branch 'default':
3.3 -> 3.4 (closes #16130)
http://hg.python.org/cpython/rev/b21288c1ec68

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



[issue13477] tarfile module should have a command line

2012-10-04 Thread Kyle Shannon

Changes by Kyle Shannon :


--
nosy: +kyle

___
Python tracker 

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



  1   2   >