[issue9942] Allow memory sections to be OS MERGEABLE

2011-05-22 Thread s7v7nislands

Changes by s7v7nislands :


--
nosy: +s7v7nislands

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



[issue11284] slow close file descriptors in subprocess, popen2, os.pepen*

2011-02-22 Thread s7v7nislands

s7v7nislands  added the comment:

thanks, neologix.

I think should put this hint in python doc.

--

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



[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread s7v7nislands

Changes by s7v7nislands :


Removed file: http://bugs.python.org/file20834/py3k.patch

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



[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread s7v7nislands

Changes by s7v7nislands :


Removed file: http://bugs.python.org/file20835/python27.patch

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



[issue11635] concurrent.futures uses polling

2011-03-26 Thread s7v7nislands

Changes by s7v7nislands :


--
nosy: +s7v7nislands

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



[issue11743] Rewrite PipeConnection and Connection in pure Python

2011-04-03 Thread s7v7nislands

Changes by s7v7nislands :


--
nosy: +s7v7nislands

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



[issue5315] signal handler never gets called

2010-12-30 Thread s7v7nislands

Changes by s7v7nislands :


--
nosy: +s7v7nislands

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



[issue11284] slow close file descriptors in subprocess, popen2, os.pepen*

2011-02-22 Thread s7v7nislands

New submission from s7v7nislands :

when use popen*() and close_fds is True, python will close unused fds. but the 
MAXFD is not the real max. especially in freebsd, subprocess.MAXFD=655000. so 
python will try to close to many fd, it's too slow, in my test on freebsd, 
using about 3 seconds.

poor english.

patch for 2.7 trunck:
jiangxiaobing@s7v7nislands ~/source/svn/python27 $ svn diff
Index: Lib/subprocess.py
===
--- Lib/subprocess.py   (revision 88499)
+++ Lib/subprocess.py   (working copy)
@@ -1065,11 +1065,16 @@
 
 
 def _close_fds(self, but):
+maxfd = MAX_FD
+try:
+maxfd = os.dup(0) + 1
+except:
+pass
 if hasattr(os, 'closerange'):
 os.closerange(3, but)
-os.closerange(but + 1, MAXFD)
+os.closerange(but + 1, maxfd)
 else:
-for i in xrange(3, MAXFD):
+for i in xrange(3, maxfd):
 if i == but:
 continue
 try:
Index: Lib/popen2.py
===
--- Lib/popen2.py   (revision 88499)
+++ Lib/popen2.py   (working copy)
@@ -82,8 +82,13 @@
 def _run_child(self, cmd):
 if isinstance(cmd, basestring):
 cmd = ['/bin/sh', '-c', cmd]
-os.closerange(3, MAXFD)
+maxfd = MAXFD
 try:
+maxfd = os.dup(0) + 1
+except:
+pass
+os.closerange(3, maxfd)
+try:
 os.execvp(cmd[0], cmd)
 finally:
 os._exit(1)



patch for 3.3 truck:
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index c02fb52..98a25b3 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1112,8 +1112,14 @@ class Popen(object):
 if fd >= start_fd:
 os.closerange(start_fd, fd)
 start_fd = fd + 1
-if start_fd <= MAXFD:
-os.closerange(start_fd, MAXFD)
+maxfd = MAXFD
+try:
+maxfd = os.dup(0) + 1
+except:
+pass
+
+if start_fd <= maxfd:
+os.closerange(start_fd, maxfd)
 
 
 def _execute_child(self, args, executable, preexec_fn, close_fds,

--
components: Library (Lib)
files: py3k.patch
keywords: patch
messages: 129043
nosy: s7v7nislands
priority: normal
severity: normal
status: open
title: slow close file descriptors in subprocess, popen2, os.pepen*
type: performance
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20834/py3k.patch

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



[issue11284] slow close file descriptors in subprocess, popen2, os.pepen*

2011-02-22 Thread s7v7nislands

Changes by s7v7nislands :


Added file: http://bugs.python.org/file20835/python27.patch

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



[issue14499] Extension module builds fail with Xcode 4.3 on OS X 10.7 due to SDK move

2012-04-13 Thread s7v7nislands

s7v7nislands  added the comment:

maybe you can use xcode-select to set the correct path

xcode-select -print-path
/Applications/Xcode.app/Contents/Developer

Usage: xcode-select -print-path
   or: xcode-select -switch 

   -switch  Sets the path for the current Xcode 


for detail, you can man xcode-select

--
nosy: +s7v7nislands

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



[issue6874] sequence method .count() and .index() shoud be in immutable sequence method list.

2009-09-09 Thread s7v7nislands

New submission from s7v7nislands :

In document 6.6.4. Mutable Sequence Types says:
The following operations are defined on mutable sequence types:
s.count(x)  return number of i‘s for which s[i] == x 
s.index(x[, i[, j]])return smallest k such that s[k] == x and i <= k
< j (4)

here, s.count() and s.index() maybe should in immutable sequence types
operations list.

--
assignee: georg.brandl
components: Documentation
messages: 92471
nosy: georg.brandl, s7v7nislands
severity: normal
status: open
title: sequence method  .count() and .index() shoud be in immutable sequence 
method list.

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



[issue7087] use keyword 'as' in _xmlplus

2009-10-08 Thread s7v7nislands

New submission from s7v7nislands :

In these files: _xmlplus/xpath/ParsedAbbreviatedAbsoluteLocationPath.py
_xmlplus/xpath/ParsedAbbreviatedRelativeLocationPath.py, use the keyword
'as'.

--
messages: 93770
nosy: s7v7nislands
severity: normal
status: open
title: use keyword 'as' in _xmlplus
type: compile error
versions: Python 2.6

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