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

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3dd012397b11 by Chris Jerdonek in branch '3.2':
Issue #16115: Improve subprocess.Popen() documentation around args, shell, and 
executable arguments.
http://hg.python.org/cpython/rev/3dd012397b11

New changeset 0ef3b801ccbc by Chris Jerdonek in branch '3.3':
Issue #16115: Merge subprocess.Popen() documentation improvements from 3.2.
http://hg.python.org/cpython/rev/0ef3b801ccbc

New changeset 91d4593ac974 by Chris Jerdonek in branch 'default':
Issue #16115: Merge subprocess.Popen() documentation improvements from 3.3.
http://hg.python.org/cpython/rev/91d4593ac974

New changeset 11171bf6a6bd by Chris Jerdonek in branch '2.7':
Issue #16115: Backport subprocess.Popen() documentation improvements from 3.2.
http://hg.python.org/cpython/rev/11171bf6a6bd

--

___
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

2012-10-09 Thread Chris Jerdonek

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


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



[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 46889b772442 by Vinay Sajip in branch 'default':
Issue #16141: replaced old-style exception handling code in logging with the 
modern idiom.
http://hg.python.org/cpython/rev/46889b772442

--
nosy: +python-dev

___
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



[issue16161] broken link to Visual Studio 2008 in devguide

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6f3e48838a2d by Chris Jerdonek in branch 'default':
Issue #16161: Update link for downloading Microsoft Visual Studio 2008.
http://hg.python.org/devguide/rev/6f3e48838a2d

--
nosy: +python-dev

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



[issue16161] broken link to Visual Studio 2008 in devguide

2012-10-09 Thread Chris Jerdonek

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


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

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



[issue16141] Possible simplification for old-style exception handling code in stdlib

2012-10-09 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


--
assignee: vinay.sajip - 
title: Possible simplification for logging.StreamHandler exception handling - 
Possible simplification for old-style exception handling code in stdlib

___
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



[issue16168] SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6e31832f8275 by Vinay Sajip in branch '2.7':
Issue #16168: Use specified socket type for domain sockets in SysLogHandler.
http://hg.python.org/cpython/rev/6e31832f8275

New changeset f41e6ef3392a by Vinay Sajip in branch '3.2':
Issue #16168: Use specified socket type for domain sockets in SysLogHandler.
http://hg.python.org/cpython/rev/f41e6ef3392a

New changeset e4212f81d633 by Vinay Sajip in branch '3.3':
Issue #16168: Merged SysLogHandler update from 3.2.
http://hg.python.org/cpython/rev/e4212f81d633

New changeset d7d3e1a03fe0 by Vinay Sajip in branch 'default':
Closes #16168: Merged SysLogHandler update from 3.3.
http://hg.python.org/cpython/rev/d7d3e1a03fe0

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

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



[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a6f37d503878 by Senthil Kumaran in branch '3.2':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/a6f37d503878

New changeset a24d3e2124b6 by Senthil Kumaran in branch '3.3':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/a24d3e2124b6

New changeset 8f699eac0908 by Senthil Kumaran in branch 'default':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/8f699eac0908

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15922
___
___
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-09 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 BTW, the patch fails for 3.2 and 3.3 but works for 3.4

By patch do you mean test?  And by works, do you mean fails or succeeds? 
:)

I haven't prepared a patch yet, but I just started working on it.  On my 
machine, I found that the test fails as is on 3.3 and 3.4, but on 3.2 it fails 
for a different reason: the FileNotFoundError needs to be switched to OSError 
(which was to be expected).

--

___
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



[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks, Senthil!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15922
___
___
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-09 Thread Chris Jerdonek

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


--
assignee:  - chris.jerdonek

___
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



[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2f282991973 by Senthil Kumaran in branch '2.7':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/b2f282991973

--

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



[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Senthil Kumaran

Changes by Senthil Kumaran sent...@uthcode.com:


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

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



[issue14039] Add metavar argument to add_subparsers() in argparse

2012-10-09 Thread Kushal Das

Changes by Kushal Das kushal...@gmail.com:


--
nosy: +kushaldas

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14039
___
___
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-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ce0d0d052494 by Vinay Sajip in branch 'default':
Closes #16110: fileConfig now accepts a pre-initialised ConfigParser instance.
http://hg.python.org/cpython/rev/ce0d0d052494

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

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



[issue16171] do nothing load_tests could be improved

2012-10-09 Thread Antoine Pitrou

New submission from Antoine Pitrou:

unittest docs suggest the following load_tests for a __main__.py:

def load_tests(loader, standard_tests, pattern):
# top level directory cached on loader instance
this_dir = os.path.dirname(__file__)
package_tests = loader.discover(start_dir=this_dir, pattern=pattern)
standard_tests.addTests(package_tests)
return standard_tests

This function fails with a weird error message when no pattern is given on the 
command line. A better alternative would be:

def load_tests(loader, standard_tests, pattern):
# top level directory cached on loader instance
this_dir = os.path.dirname(__file__)
pattern = pattern or test_*.py
package_tests = loader.discover(start_dir=this_dir, pattern=pattern)
standard_tests.addTests(package_tests)
return standard_tests

--
assignee: docs@python
components: Documentation
messages: 172460
nosy: docs@python, ezio.melotti, michael.foord, pitrou
priority: low
severity: normal
status: open
title: do nothing load_tests could be improved
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue16119] Python 2.7 _socket DLL import error on Windows Vista

2012-10-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Note: the error message above is mojibake (cp1253-encoded message written to a 
cp737 console) for:
Δεν ήταν δυνατό να εντοπιστεί η καθορισμένη μονάδα (The specified module 
could not be found)

Spiros, you closed the issue. How did you fix it exactly?

--
nosy: +amaury.forgeotdarc

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



[issue16061] performance regression in string replace for 3.3

2012-10-09 Thread Kushal Das

Changes by Kushal Das kushal...@gmail.com:


--
nosy: +kushaldas

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



[issue16171] do nothing load_tests could be improved

2012-10-09 Thread Michael Foord

Michael Foord added the comment:

Yes the version of load_tests you show is better. However there is an 
outstanding issue to fix the load_tests protocol to work with pattern=None 
which is a better fix. (I think this is a bug in load_tests rather than a doc 
issue really.)

Issue 11218.

--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - pattern=None when following documentation for load_tests and 
unittest.main()

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



[issue11218] pattern=None when following documentation for load_tests and unittest.main()

2012-10-09 Thread Michael Foord

Michael Foord added the comment:

Changing the docs to the following fixes the original reported issue:

def load_tests(loader, standard_tests, pattern):
# top level directory cached on loader instance
this_dir = os.path.dirname(__file__)
pattern = pattern or test_*.py
package_tests = loader.discover(start_dir=this_dir, pattern=pattern)
standard_tests.addTests(package_tests)
return standard_tests

(Suggested by Antoine in issue 16171.)

I think that load_tests not working as documented is a bug and calling discover 
with pattern=None should work.

--

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



[issue16125] open accepts arbitrary mode strings as long as they contain U

2012-10-09 Thread Kushal Das

Kushal Das added the comment:

So, should I submit a new patch which will just put a warning ?

--

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



[issue15574] IDLE crashes using clipboard copy command on OS X with ActiveTcl 8.5.12

2012-10-09 Thread Ned Deily

Ned Deily added the comment:

I've been able to isolate the problem to a particular Tk checkin and have 
opened an Tk issue with details here:
https://sourceforge.net/tracker/?func=detailaid=3575681group_id=12997atid=112997

--

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



[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-09 Thread Ned Deily

Ned Deily added the comment:

I've been able to build Cocoa Tk and isolate the crash regression to a 
particular Tk checkin.  This Tk issue contains the details: 
https://sourceforge.net/tracker/?func=detailatid=112997aid=3575664group_id=12997

--

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



[issue16172] Fix is/== misuse

2012-10-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here are two patches written on the discussion in Python-Ideas [1].

The first patch fixes incorrect use of x is 0 or x is 'foo'. Result of this 
operations is implementation details.

The second patch changes non-idiomatic use of x == None or x == True.

[1] http://comments.gmane.org/gmane.comp.python.ideas/16547

--
files: is_int_or_str.patch
keywords: patch
messages: 172467
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix is/== misuse
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27503/is_int_or_str.patch

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



[issue16172] Fix is/== misuse

2012-10-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file27504/equals_none_or_bool.patch

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



[issue16172] Fix is/== misuse

2012-10-09 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
components: +Tests
nosy: +ezio.melotti
stage:  - patch review

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Try prefixing doesnotexist with the same dirname as sys.executable
(i.e. `os.path.join(os.path.dirname(sys.executable), doesnotexist)`).

Python under Unix uses its own path to determine where the standard library is, 
and it does so by inspecting argv[0].

--
nosy: +pitrou

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 If you prefer two macros instead of three then we should name them
 PY_IS_LITTLE_ENDIAN and PY_IS_BIG_ENDIAN.

Fine with me. Having three macros is pointless complication.

 If I understand you correctly than we can't have a configure definition 
 and need macro magic like brg_endian.h.

Replicating the current WORDS_BIGENDIAN logic should be enough.

--

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



[issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters

2012-10-09 Thread Baptiste Mispelon

New submission from Baptiste Mispelon:

When a syntax error happens, the exception that gets printed has an extra line 
with a caret that helps locate the error.

If the line also contains an identifier with non-ascii characters, then this 
caret is misaligned (too far on the right).

I've investigated briefly and it seems that the offset attribute on the 
SyntaxError has a wrong value:

for varname in ['a', 'é', '蟒']: # 1, 2 and 3 bytes
try:
exec(%s$ % varname) # SyntaxError
except SyntaxError as e:
print(e.offset) # should be 2

The example above prints 2, 3, and 4 when it should be printing 2 every time.

It seems that the calculation of the offset takes into account the size in 
bytes instead of the size in characters.

I've tested and reproduced the issue on 3.2.2 and on a recent clone of the 
mercurial repository (dd5e98ddcd39).

--
components: Interpreter Core
messages: 172470
nosy: bmispelon
priority: normal
severity: normal
status: open
title: Wrong offset on SyntaxError when identifier contains non-ascii characters
type: behavior
versions: Python 3.2, Python 3.4

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



[issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters

2012-10-09 Thread Ezio Melotti

Ezio Melotti added the comment:

See #2382.

--
nosy: +ezio.melotti

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



[issue16174] Fix suggested usage of dummy_threading module

2012-10-09 Thread Berker Peksag

New submission from Berker Peksag:

The suggested usage should be like this:

try:
import threading
except ImportError:
import dummy_threading as threading

See:
- http://hg.python.org/cpython/file/ce0d0d052494/Lib/queue.py#l3
- http://hg.python.org/cpython/file/ce0d0d052494/Lib/sched.py#l34
- http://hg.python.org/cpython/file/ce0d0d052494/Lib/socketserver.py#l137

--
assignee: docs@python
components: Documentation
files: fix-dummy-threading-usage.diff
keywords: patch
messages: 172472
nosy: berker.peksag, docs@python
priority: normal
severity: normal
status: open
title: Fix suggested usage of dummy_threading module
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27505/fix-dummy-threading-usage.diff

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



[issue16164] there is no easy way to force unittest.main to use stdout rather than stderr

2012-10-09 Thread Michael Foord

Michael Foord added the comment:

Unfortunately subclassing core components is the *intended* mechanism for 
customising unittest behaviour. Changing this is possible, but is a big job 
with very extensive changes.

I don't think this request is *invalid* per-se, but it isn't something that 
we're about to change and there are much higher priorities for providing 
customization points for unittest. Closing as wont fix, but eventually 
hopefully it will be possible to do without requiring changes in unittest.

(And it *can't* be fixed in Python 2.6 or 2.7 as it isn't a bug and no new 
features are being added to these versions - so I've changed the tags even 
though I'm closing it.)

--
assignee:  - michael.foord
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed
versions: +Python 3.4 -Python 2.6

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



[issue16174] Fix suggested usage of dummy_threading module

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7de9c620716e by Andrew Svetlov in branch '3.2':
Issue #16174: Fix suggested usage of dummy_threading module.
http://hg.python.org/cpython/rev/7de9c620716e

New changeset f02974773a71 by Andrew Svetlov in branch '3.3':
Merge issue #16174: Fix suggested usage of dummy_threading module.
http://hg.python.org/cpython/rev/f02974773a71

New changeset a93efd445982 by Andrew Svetlov in branch 'default':
Merge issue #16174: Fix suggested usage of dummy_threading module.
http://hg.python.org/cpython/rev/a93efd445982

--
nosy: +python-dev

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



[issue16174] Fix suggested usage of dummy_threading module

2012-10-09 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks, Berker.

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

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



[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-09 Thread Michael Vogt

Michael Vogt added the comment:

Thanks for this detailed explaination! I will workaround this outside of python 
(that is easy ;) - I just thought that it would be a good idea to be able to 
change the fsencoding (and therefore send the patch), but in the light of e.g. 
sys.path it seems to be indeed a pretty bad idea.

--

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



[issue16169] ctypes.WinError() confuses errno with winerror

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a3d65edc3b04 by Richard Oudkerk in branch '3.3':
Issue #16169: Fix ctypes.WinError()'s confusion between errno and winerror
http://hg.python.org/cpython/rev/a3d65edc3b04

New changeset d3c4dcd9a048 by Richard Oudkerk in branch 'default':
Issue #16169: Merge
http://hg.python.org/cpython/rev/d3c4dcd9a048

--
nosy: +python-dev

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



[issue15641] Clean up importlib for Python 3.4

2012-10-09 Thread Brett Cannon

Brett Cannon added the comment:

Finder is only documented as deprecated; actually making it work with a 
reasonable warning is too much of a pain for such little gain. So it can just 
stay in as there is no maintenance burden.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15641
___
___
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-09 Thread Brett Cannon

Brett Cannon added the comment:

This can get fixed in 3.3.1, which is why I left Python 3.3 as an affected 
version.

Hopefully I can get to a fix this week. I need to write a test showing that a 
module that doesn't exist as specified in a fromlist is silently ignored, but 
if a module in a fromlist does exist *but* triggers an ImportError itself while 
being imported that exception propagates. Then I need to come up with a fix.

--

___
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



[issue12322] ElementPath 1.3 expressions documentation

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 79231a12567a by Eli Bendersky in branch '3.3':
Issue #12322: clarify xpath reference for cases where the path reaches 
ancestors of the start element. Also add missing markup for a None. Thanks to 
patrick vrijlandt and Mike Hoy for the report and initial patches.
http://hg.python.org/cpython/rev/79231a12567a

New changeset 5cb3c08997e6 by Eli Bendersky in branch 'default':
Merge 3.3
http://hg.python.org/cpython/rev/5cb3c08997e6

--
nosy: +python-dev

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



[issue12322] ElementPath 1.3 expressions documentation

2012-10-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Changes pushed. Thanks for the report and patches.

Mike - a note for the future: when you create an updated patch, create it anew 
vs. a clean repo. Don't compound patches.

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

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



[issue16169] ctypes.WinError() confuses errno with winerror

2012-10-09 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


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

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



[issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation

2012-10-09 Thread Eli Bendersky

Eli Bendersky added the comment:

Einar, TypeError is raised because tostring/tostringlist return bytes with the 
default encoding, and you can't join bytes on  (which is unicode).

--

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



[issue16082] xml.etree.ElementTree.tostringlist does not conform to its documentation

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff925e135e60 by Eli Bendersky in branch '3.3':
Issue #16082: clarify the documentation of tostring[list] saying that it may 
generate a bytestring, depending on the given encoding.
http://hg.python.org/cpython/rev/ff925e135e60

New changeset 6e407fcf7380 by Eli Bendersky in branch 'default':
Merge 3.3
http://hg.python.org/cpython/rev/6e407fcf7380

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

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread Christian Heimes

Christian Heimes added the comment:

I think it's not enough as some platforms prefix/suffix the macros with dashes. 
The values must be compared to BYTE_ORDER iff the macro is defined. too. I've 
checked some machines of the Snakebite network and came up with this macro 
cascade:

/*
 * The endianess (byte order) can be defined in several ways. Some platforms
 * define either LITTLE_ENDIAN or BIG_ENDIAN while other platforms define
 * both and require comparison to BYTE_ORDER. Sometimes the macros are
 * prefixed or suffixed with one or two dashes, too. SPAM seems to be an
 * alias of __SPAM an all platforms that have SPAM.
 * The endian check can't be handled in a configure step as it would break
 * Apple's universal builds.
 */

#if defined(__BYTE_ORDER)
#  if defined(__BIG_ENDIAN)  __BYTE_ORDER == __BIG_ENDIAN
#define PY_IS_BIG_ENDIAN 1
#  elif defined(__LITTLE_ENDIAN)  __BYTE_ORDER == __LITTLE_ENDIAN
#define PY_IS_LITTLE_ENDIAN 1
#  else
#error __BYTE_ORDER not in (__BIG_ENDIAN, __LITTLE_ENDIAN)
#  endif
#elif defined(__BIG_ENDIAN)  !defined(__LITTLE_ENDIAN)
#  define PY_IS_BIG_ENDIAN 1
#elif defined(__LITTLE_ENDIAN)  !defined(__BIG_ENDIAN)
#  define PY_IS_LITTLE_ENDIAN 1
/* and know the same block with just one dash as prefix */
#elif defined(_BYTE_ORDER)
#  if defined(_BIG_ENDIAN)  _BYTE_ORDER == _BIG_ENDIAN
#define PY_IS_BIG_ENDIAN 1
#  elif defined(_LITTLE_ENDIAN)  _BYTE_ORDER == _LITTLE_ENDIAN
#define PY_IS_LITTLE_ENDIAN 1
#  else
#error _BYTE_ORDER not in (_BIG_ENDIAN, _LITTLE_ENDIAN)
#  endif
#elif defined(_BIG_ENDIAN)  !defined(_LITTLE_ENDIAN)
#  define PY_IS_BIG_ENDIAN 1
#elif defined(_LITTLE_ENDIAN)  !defined(_BIG_ENDIAN)
#  define PY_IS_LITTLE_ENDIAN 1
/* extra apple */
#elif defined(__APPLE__)
#  if defined(__BIG_ENDIAN__)
#define PY_IS_BIG_ENDIAN 1
#  elif defined(__LITTLE_ENDIAN__)
#define PY_IS_LITTLE_ENDIAN 1
#  else
#error __APPLE__ but neither __BIG_ENDIAN__ nor __LITTLE_ENDIAN__
#  endif
/* Windows */
#elif defined(WIN32)
#  define PY_IS_LITTLE_ENDIAN 1
#else
#  error Unable to detect endianess
#endif

--

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



[issue16172] Fix is/== misuse

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 842276ae4a3f by Benjamin Peterson in branch '3.3':
compare with equality not identity (issue #16172)
http://hg.python.org/cpython/rev/842276ae4a3f

--
nosy: +python-dev

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



[issue16172] Fix is/== misuse

2012-10-09 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Also http://hg.python.org/cpython/rev/332b93ce7bf9

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

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



[issue16125] open accepts arbitrary mode strings as long as they contain U

2012-10-09 Thread R. David Murray

R. David Murray added the comment:

I think we'd probably better find out if there is support for applying it 
before you go to the trouble of writing it.  It might be appropriate as a -3 
warning, since the behavior changes in python3.  I would be +1 for applying it 
as a -3 warning, and -0 as a not-silenced-by-default warning.

--

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



[issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters

2012-10-09 Thread R. David Murray

R. David Murray added the comment:

Ezio, is there a reason you didn't close this as a duplicate?

--
nosy: +r.david.murray

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



[issue16125] open accepts arbitrary mode strings as long as they contain U

2012-10-09 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2012-10-09 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Christian Heimes

New submission from Christian Heimes:

Guido has expressed [1] that he like to see IOCP support in the stdlib for the 
grant unified asyncore interface.

Quote from MSDN [2]:
---
I/O completion ports provide an efficient threading model for processing 
multiple asynchronous I/O requests on a multiprocessor system. When a process 
creates an I/O completion port, the system creates an associated queue object 
for requests whose sole purpose is to service these requests. Processes that 
handle many concurrent asynchronous I/O requests can do so more quickly and 
efficiently by using I/O completion ports in conjunction with a pre-allocated a 
 thread pool than by creating threads at the time they receive an I/O request.
---

I've found a couple of interfaces to IOCP in Python projects. Twisted [3] has a 
Cython based interface to the IOCP API, Cogen [4] uses ctypes wrapper. I 
couldn't find IOCP support in Tornado. I favor a C implementation over ctypes. 
What's our attitude to Cython? Personally I like Cython and use it in several 
projects but I'm not sure if we shall use it in core development.

Christian

[1] http://mail.python.org/pipermail/python-ideas/2012-October/016539.html
[2] http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx
[3] 
http://twistedmatrix.com/trac/browser/trunk/twisted/internet/iocpreactor/iocpsupport/
[4] http://code.google.com/p/cogen/source/browse/trunk/cogen/core/proactors

--
components: Extension Modules, Windows
messages: 172489
nosy: christian.heimes, exarkun, gvanrossum
priority: normal
severity: normal
status: open
title: Add I/O Completion Ports wrapper
type: enhancement
versions: Python 3.4

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



[issue16176] platform.platform() identifies Windows 8 as post2008Server

2012-10-09 Thread Brian Curtin

New submission from Brian Curtin:

 platform.platform()
'Windows-post2008Server-6.2.9200'

The change is trivial, just accounting for a point release of 2 (from the major 
release 6).

--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -595,8 +595,13 @@
 release = '7'
 else:
 release = '2008ServerR2'
+elif min == 2:
+if product_type == VER_NT_WORKSTATION:
+release = '8'
+else:
+release = '2012Server'
 else:
-release = 'post2008Server'
+release = 'post2012Server'

--
assignee: brian.curtin
components: Library (Lib), Windows
messages: 172490
nosy: brian.curtin
priority: normal
severity: normal
status: open
title: platform.platform() identifies Windows 8 as post2008Server
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2012-10-09 Thread Christian Heimes

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


--
nosy: +christian.heimes
stage:  - needs patch
versions: +Python 3.4

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Fine with me. Having three macros is pointless complication.

Don't having two macros for one boolean value pointless complication too?

--

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 Cogen [4] uses ctypes wrapper.

In the code for the IOCP reactor only ctypes.FormatError() is used from ctypes. 
 It uses pywin32 instead.

--
nosy: +sbt

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
nosy: +mhammond

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum

Guido van Rossum added the comment:

Tough choice.  I'm not in favor of using either ctypes or Cython for this 
purpose -- ctypes because it's brittle, and Cython because it is a huge 
complicated system of its own that I would rather not depend on.  Cython 
already depends on CPython, so CPython depending on Cython would essentially 
marry the two systems.

How hard could it be to write a C++ extension wrapping IOCP?  From reading the 
docs there are only a handful API methods (of which the main one stands out as 
a nadir of API design -- it's like the designers were told they could only add 
one function... :-).

However a bigger problem probably is that it only makes sense if you also wrap 
the rest of the handle-based I/O functionality on Windows.  The docs talk about 
overlapping I/O which I presume is a form of async I/O.  Most likely we'll 
have to look at Mark Hammond's venerable win32 package for that.  Maybe it 
makes most sense to have IOCP integrated there?  (For all I know it's already 
supported...)

The main think I want to be sure of is to design the abstract I/O loop (aka 
reactor) general enough that it will be easy to hook in IOCP-based 
event-generating and -handling components.

--

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Jeremy Kloth

Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:


--
nosy: +jkloth

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Christian Heimes

Christian Heimes added the comment:

Guido,

Richard pointed out that pywin32 already wraps the necessary bits of IOCP. The 
functions are in the win32file package. Cogen's reactor uses pywin32 instead of 
ctypes, too. The library has an *additional* ctypes based interface in the 
directory ctypes_iocp_impl.

--

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum

Guido van Rossum added the comment:

So do we need this ticket at all?  It seems there's no code to write -- all we 
need to do is make sure we can integrate IOCP in the future standard reactor 
interface.  That hardly seems a reason to keep a ticket open.

--

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



[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2012-10-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +serhiy.storchaka

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Note that since Python 3.3, multiprocessing and _winapi make some use of 
overlapped IO.

One can use _winapi.ReadFile() and _winapi.WriteFile() to do overlapped IO on 
normal socket handles created using socket.socket().

--

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



[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2012-10-09 Thread Matthias Klose

Matthias Klose added the comment:

http://www.freedesktop.org/software/systemd/man/os-release.html

is the next step, with the advantage of the definition of the file format for 
/etc/os-release.

--

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
nosy: +brian.curtin

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

  Fine with me. Having three macros is pointless complication.
 
 Don't having two macros for one boolean value pointless complication too?

No, since you need only one to get going. Either:

#ifdef PY_LITTLE_ENDIAN
...

or:

#ifdef PY_BIG_ENDIAN
...

So this is really a simplification compared to the awkward:

#ifdef PY_ENDIAN == BIG_ENDIAN

--

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



[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2012-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch upgraded to Python 3.3. It uses a little different approach and 
works with invalid encoded data. unicode_utf8size.patch is not needed.

This patch fixes a half of the issue - working with non-ascii non-wide 
characters. It's enough for many people. Let's commit it and go further.

--
Added file: http://bugs.python.org/file27506/adjust_offset-3.3.patch

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



[issue16177] IDLE Crash on Open Parens

2012-10-09 Thread Ned Deily

Ned Deily added the comment:

I've not seen any reports of this behavior before.  Can you try two things?  
One, try temporarily disabling your current IDLE preferences. Quit IDLE, then 
from a terminal shell, type something like:

mv ~/.idlerc ~/.idlerc-disabled

then launch IDLE and try the paren again.  If that doesn't help, try 
temporarily disabling the ActiveState Tk.  Again, quit IDLE. Then, from a 
terminal shell:

cd /Library/Frameworks
sudo mv Tcl.framework Tcl-disabled
sudo mv Tk.framework Tk-disabled

Then try IDLE again.

--
nosy: +ned.deily

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm not sure why we would have no code to write unless you're thinking of 
integrating pywin32 into the stdlib.
As Richard said, overlapped I/O is already more or less supported as part of 
the _winapi private module. But IOCP itself isn't exposed. We could have a 
public module exposing IOCP as a nice API :-)

--
nosy: +pitrou

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Usually you need code for both alternatives.

#ifdef WORDS_BIGENDIAN
...
#else
...
#endif

What can be simpler? Of cause, using *two* macros is complicated. You need 
only one and second macros is unnecessary.

--

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



[issue16177] IDLE Crash on Open Parens

2012-10-09 Thread Brian Keegan

Brian Keegan added the comment:

I moved the idlerc to the disabled folder like you recommended and I
haven't been able to reproduce the error again. I'll cautiously take this
as an indication of a fix, but will update if it changes.

Thank you!

On Tue, Oct 9, 2012 at 2:40 PM, Ned Deily rep...@bugs.python.org wrote:


 Ned Deily added the comment:

 I've not seen any reports of this behavior before.  Can you try two
 things?  One, try temporarily disabling your current IDLE preferences. Quit
 IDLE, then from a terminal shell, type something like:

 mv ~/.idlerc ~/.idlerc-disabled

 then launch IDLE and try the paren again.  If that doesn't help, try
 temporarily disabling the ActiveState Tk.  Again, quit IDLE. Then, from a
 terminal shell:

 cd /Library/Frameworks
 sudo mv Tcl.framework Tcl-disabled
 sudo mv Tk.framework Tk-disabled

 Then try IDLE again.

 --
 nosy: +ned.deily

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16177
 ___


--

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



[issue16178] atexit._run_exitfuncs should be a public API

2012-10-09 Thread Gregory P. Smith

New submission from Gregory P. Smith:

The atexit module's _run_exitfuncs() function needs to be a public API.  In 
Python 2.x it was exposed through a disgusting hack as sys.exitfunc() that 
the atexit module monkeypatched into place at import time.

This monkeypatching was cleaned up in Python 3.

But it is still useful to expose this to users who need to write their own 
program shutdown code that ultimately calls os._exit or similar (avoiding 
atexit hooks that way) but also need to make sure the atexit exit functions get 
called.

--
messages: 172505
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: atexit._run_exitfuncs should be a public API
type: enhancement
versions: Python 3.4

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



[issue16179] hashlib.md5 / json inconsistency

2012-10-09 Thread Robin Åsén

New submission from Robin Åsén:

I am getting inconsistent behavior when getting an md5 hexdigest on a json 
structure that's converted to a string.
Am I doing something wrong here?

import json
import hashlib

data = '''{key1:value1,key2:value2}'''

print(hashlib.md5(data.encode()).hexdigest())
jsonData = json.loads(data)
print(hashlib.md5(str(jsonData).encode()).hexdigest())
print(hashlib.md5(str(jsonData).encode()).hexdigest())

When I run this code everything seems just fine at a first glance. However, 
when it is run again I get different md5 checksums.
The first md5 checksum on the data string seems consistent every time.
The two last md5 checksums never seems to contradict each other during the same 
run, but between each run I often get different values.
Here are some outputs I'm getting:

ff45cc3835165307ef414c23ca2c6f67
423b2b4d92c0947e3d99d207c7c06175
423b2b4d92c0947e3d99d207c7c06175

ff45cc3835165307ef414c23ca2c6f67
101d66cd2878eacf47c618cea6862125
101d66cd2878eacf47c618cea6862125

ff45cc3835165307ef414c23ca2c6f67
423b2b4d92c0947e3d99d207c7c06175
423b2b4d92c0947e3d99d207c7c06175

ff45cc3835165307ef414c23ca2c6f67
101d66cd2878eacf47c618cea6862125
101d66cd2878eacf47c618cea6862125


(If it makes any difference, I'm running on Windows XP SP3)

--
components: Interpreter Core
messages: 172506
nosy: poppe1219
priority: normal
severity: normal
status: open
title: hashlib.md5 / json inconsistency
type: behavior
versions: Python 3.3

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



[issue16176] platform.platform() identifies Windows 8 as post2008Server

2012-10-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Brian Curtin wrote:
 
 New submission from Brian Curtin:
 
 platform.platform()
 'Windows-post2008Server-6.2.9200'
 
 The change is trivial, just accounting for a point release of 2 (from the 
 major release 6).

Looks good. Please also backport this to Python 2.7.

Thanks.

 --- a/Lib/platform.py
 +++ b/Lib/platform.py
 @@ -595,8 +595,13 @@
  release = '7'
  else:
  release = '2008ServerR2'
 +elif min == 2:
 +if product_type == VER_NT_WORKSTATION:
 +release = '8'
 +else:
 +release = '2012Server'
  else:
 -release = 'post2008Server'
 +release = 'post2012Server'
 
 --
 assignee: brian.curtin
 components: Library (Lib), Windows
 messages: 172490
 nosy: brian.curtin
 priority: normal
 severity: normal
 status: open
 title: platform.platform() identifies Windows 8 as post2008Server
 type: behavior
 versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
 
 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16176
 ___
 ___
 Python-bugs-list mailing list
 Unsubscribe: 
 http://mail.python.org/mailman/options/python-bugs-list/mal%40egenix.com
 

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source
 Python/Zope Consulting and Support ...http://www.egenix.com/
 mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 

   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/

--
nosy: +lemburg

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



[issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it)

2012-10-09 Thread Xavier de Gaye

New submission from Xavier de Gaye:

$ tmp=`mktemp /tmp/foo.XX`; echo 'def foo: pass'  $tmp; python3 -m pdb 
$tmp; rm $tmp
Traceback (most recent call last):
  File /usr/local/lib/python3.2/pdb.py, line 1556, in main
pdb._runscript(mainpyfile)
  File /usr/local/lib/python3.2/pdb.py, line 1437, in _runscript
self.run(statement)
  File /usr/local/lib/python3.2/bdb.py, line 392, in run
exec(cmd, globals, locals)
  File string, line 1, in module
  File /tmp/foo.iLhPYHBZrF, line 1
def foo: pass
   ^
SyntaxError: invalid syntax
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
 string(1)module()
(Pdb) quit
Post mortem debugger finished. The /tmp/foo.iLhPYHBZrF will be restarted
Traceback (most recent call last):
  File /usr/local/lib/python3.2/pdb.py, line 1556, in main
pdb._runscript(mainpyfile)
  File /usr/local/lib/python3.2/pdb.py, line 1437, in _runscript
self.run(statement)
  File /usr/local/lib/python3.2/bdb.py, line 392, in run
exec(cmd, globals, locals)
  File string, line 1, in module
  File /tmp/foo.iLhPYHBZrF, line 1
def foo: pass
   ^
SyntaxError: invalid syntax
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
 string(1)module()
(Pdb) --KeyboardInterrupt--
(Pdb)

--
components: Library (Lib)
messages: 172508
nosy: xdegaye
priority: normal
severity: normal
status: open
title: cannot quit pdb when there is a syntax error in the debuggee (must kill 
it)
type: behavior
versions: Python 3.2

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



[issue16179] hashlib.md5 / json inconsistency

2012-10-09 Thread R. David Murray

R. David Murray added the comment:

The order in which elements are produced when iterating a dictionary is not 
fixed.  In python3.3 it is intentionally perturbed by a randomized seed at 
interpreter startup by default.

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

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



[issue16160] subclassing types.SimpleNamespace does not work

2012-10-09 Thread Eric Snow

Eric Snow added the comment:

Yikes.  I'll get a patch up tonight.

--
assignee:  - eric.snow

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks for the explanation and suggestion, Antoine.  I'm attaching a patch that 
incorporates the suggestion, but I haven't checked that it works yet (I would 
need to use snakebite).

--
keywords: +patch
Added file: http://bugs.python.org/file27507/issue-16170-1.patch

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Chris Jerdonek

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


--
stage:  - patch review

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Chris, you can also push a custom repo to a custom builder:
http://docs.python.org/devguide/buildbots.html#custom-builders

--

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Actually, I've just checked that your patch works under Linux.

--

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Chris Jerdonek

Chris Jerdonek added the comment:

That's great, thanks for the pointer, Antoine.  I will try that out later today.

--

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



[issue16181] cookielib.http2time raises ValueError for invalid date.

2012-10-09 Thread Charles Jones

New submission from Charles Jones:

The docs for http2time state that None is returned if [...] the time is 
outside the representable range. However, it is raising a ValueError when a 
year larger than datetime.MAXYEAR is provided (actually raised downstream by 
calendar.date()).

To reproduce:
import cookielib
print cookielib.http2time(08-Oct-3697739)

Expected Result:
Should return None

Actual Result:
Raises ValueError: year is out of range

--
components: Library (Lib)
messages: 172515
nosy: Charles.Jones
priority: normal
severity: normal
status: open
title: cookielib.http2time raises ValueError for invalid date.
type: behavior
versions: Python 2.7

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Okay, even better. :)

--

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



[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2012-10-09 Thread Kaarle Ritvanen

New submission from Kaarle Ritvanen:

Tab completion in the readline module does not seem to work well with Unicode 
terminals. The get_line_buffer function converts the line buffer to the str 
type (which are Unicode strings in Python 3), but the indices returned by 
get_begidx and get_endidx are not adjusted with respect to possible wide 
characters in the buffer, and hence are not very useful. The documentation is a 
bit vague on the index functions, but I think they should be relative to code 
points, regardless of the encoding used by the C library. The suggested 
correction is attached.

My second point of complaint is related to the use of PyUnicode_FromString in 
the module. The strings returned by the readline library use the current locale 
encoding, which is not necessarily UTF-8. I wonder if PyUnicode_DecodeLocale 
should be used instead for more portable code.

--
components: Library (Lib)
files: readline-wide-char-index.patch
keywords: patch
messages: 172517
nosy: kunkku
priority: normal
severity: normal
status: open
title: readline: Wrong tab completion scope indices in Unicode terminals
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file27508/readline-wide-char-index.patch

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



[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2012-10-09 Thread Antoine Pitrou

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


--
nosy: +haypo
stage:  - patch review
versions: +Python 3.4

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9451908da615 by Chris Jerdonek in branch '3.3':
Issue #16170: Remove Linux skip from test_subprocess's test_executable test.
http://hg.python.org/cpython/rev/9451908da615

New changeset 0ee03c9b098f by Chris Jerdonek in branch 'default':
Issue #16170: Merge subprocess test unskip from 3.3.
http://hg.python.org/cpython/rev/0ee03c9b098f

--
nosy: +python-dev

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



[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Chris Jerdonek

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


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

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

 We could have a public module exposing IOCP as a nice API :-)

What about select module?

--
nosy: +giampaolo.rodola

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



[issue16088] http.server's send_error could set the content-length of the error body

2012-10-09 Thread Senthil Kumaran

Senthil Kumaran added the comment:

+1 to this change. It may be helpful in the cases like issue15991.

--

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



[issue16178] atexit._run_exitfuncs should be a public API

2012-10-09 Thread Antoine Pitrou

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


--
nosy: +sbt

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



[issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE

2012-10-09 Thread Maciej Szulik

Maciej Szulik added the comment:

I've confirmed that bug in the latest repo version, still exists. I attach 
patch for py3k. 
I'll try to have a look at it in the current version, as soon as it will be 
fixed I'll port it to 2.7.

--
nosy: +maciej.szulik
versions: +Python 3.4
Added file: http://bugs.python.org/file27509/test_csv_py3k.py

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread STINNER Victor

STINNER Victor added the comment:

AC_C_BIGENDIAN

--
nosy: +haypo

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



[issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE

2012-10-09 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
assignee:  - lukasz.langa
nosy: +lukasz.langa
versions: +Python 3.2, Python 3.3

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum

Guido van Rossum added the comment:

I would be happy with requiring that the user use pywin32 if they want to use 
this.

Have you all read the docs for IOCP?  It is not for the faint of heart.  E.g. 
it integrates with the thread scheduler.

--

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Have you all read the docs for IOCP?  It is not for the faint of
 heart.  E.g. it integrates with the thread scheduler.

Yes, IOCP (or overlapped I/O) may use threads under the hood, but IIUC
this can be ignored by the programmer, and GetQueuedCompletionStatus()
acts as the select()-like function (this is assuming you create a single
I/O cooperation port and register all your socket handles to this single
object).

--

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



[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2012-10-09 Thread STINNER Victor

STINNER Victor added the comment:

 This patch fixes a half of the issue - working with non-ascii
 non-wide characters.

The purpose of this issue is to handle CJK characters taking 2 columns instead 
of 1 in a terminal, or did I misunderstand it?

--

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum

Guido van Rossum added the comment:

According to http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx 
once you call GetQueuedCompletionStatus() your thread is managed by the IOCP 
and only up to a given parameter of those threads are allowed to run.  They 
recommend setting that parameter to the number of CPUs.  This feels scary 
(doubly so in the light of the GIL).

--

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



[issue15278] UnicodeDecodeError when readline in codecs.py

2012-10-09 Thread STINNER Victor

STINNER Victor added the comment:

This issue may be related or a duplicate of #11461.

 For example codecs.utf_16_le_decode(b'\x00\xd8\x00') should return ('', 0), 
 but raises UnicodeDecodeError.

Only incremental decoder should return partial results. Other decoders are 
strict and (usually) stateless.

$ ./python 
 import codecs
 decoder = codecs.getdecoder('utf8')
 decoder('\u20ac'.encode('utf8'), 'strict')
('€', 3)
 decoder('\u20ac'.encode('utf8')[:2], 'strict')
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: 
unexpected end of data

--

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



[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 According to http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%
 29.aspx once you call GetQueuedCompletionStatus() your thread is
 managed by the IOCP and only up to a given parameter of those threads
 are allowed to run.  They recommend setting that parameter to the
 number of CPUs.  This feels scary (doubly so in the light of the GIL).

I think this mostly means that you should always call
GetQueuedCompletionStatus() from the same thread for a given IO
completion port. Which, in the context of a single-threaded event loop,
shouldn't be a problem (also, this can be enforced by our stdlib
wrapper).

AFAIU, the MSDN docs have this complicated language about threads mostly
because they suggest you to use as many threads as there are CPUs on the
machines (in order to max out the I/O processing bandwidth).

By the way, I've just checked: the Twisted IOCP reactor uses a single
I/O completion port to which it registers all socket handles, and its
event loop calls GetQueuedCompletionStatus() in a loop.

--

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



  1   2   >