[issue16218] Python launcher does not support unicode characters

2012-11-03 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
title: Python launcher does not support non ascii characters - Python launcher 
does not support unicode characters

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



[issue1207589] IDLE: Right Click Context Menu

2012-11-03 Thread Andrew Svetlov

Andrew Svetlov added the comment:

LGTM

--

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



[issue16218] Python launcher does not support unicode characters

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 884c2e93d3f7 by Andrew Svetlov in branch 'default':
Issue #16218: Fix broken test for supporting nonascii characters in python 
launcher
http://hg.python.org/cpython/rev/884c2e93d3f7

--

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



[issue16218] Python launcher does not support unicode characters

2012-11-03 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I like to follow Stefan suggestion.
New test is simple and it works.

--

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



[issue16309] PYTHONPATH= different from no PYTHONPATH at all

2012-11-03 Thread Alexey Kachayev

Alexey Kachayev added the comment:

Unit test added. pythonpath2.diff is included into issue16309.diff.

--
nosy: +kachayev
Added file: http://bugs.python.org/file27848/issue16309.diff

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



[issue16218] Python launcher does not support unicode characters

2012-11-03 Thread Stefan Krah

Stefan Krah added the comment:

I think this is what went wrong on Windows in the previous test (see
Lib/test/test_cmd_line_script.py:43):

 s = '\udcf1\udcea\udcf0\udce8\udcef\udcf2'
 f = open(s, w)
 f.write(print('%s\\n' % __file__))
 f.close()

C:\Users\stefan\pydev\cpythonPCbuild\amd64\python_d.exe ï�
encoding error

So __file__ isn't set correctly, which looks like a bug to me. I'm not sure
whether it should be part of this issue or if we should open a new one.

--

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Taras Lyapun

Taras Lyapun added the comment:

Diff with implementation, test and doc.

--
keywords: +patch
nosy: +lyapun
Added file: http://bugs.python.org/file27849/issue16353.diff

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



[issue13238] Add shell command helpers to subprocess module

2012-11-03 Thread Andrew Svetlov

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


--
nosy: +asvetlov

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



[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-11-03 Thread Taras Lyapun

Taras Lyapun added the comment:

Added comments to patch

--
nosy: +lyapun
Added file: http://bugs.python.org/file27850/issue16284_with_comments.diff

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



[issue16309] PYTHONPATH= different from no PYTHONPATH at all

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 05f8f7544f92 by Andrew Svetlov in branch 'default':
Issue #16309: Make PYTHONPATH= behavior the same as if PYTHONPATH not set at 
all.
http://hg.python.org/cpython/rev/05f8f7544f92

--
nosy: +python-dev

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



[issue16309] PYTHONPATH= different from no PYTHONPATH at all

2012-11-03 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks.

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

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



[issue16218] Python launcher does not support unicode characters

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 95d1adf144ee by Andrew Svetlov in branch 'default':
Issue #16218: skip test if filesystem doesn't support required encoding
http://hg.python.org/cpython/rev/95d1adf144ee

--

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



[issue16392] frozen importlib crashes on circular imports in ext modules

2012-11-03 Thread Stefan Behnel

New submission from Stefan Behnel:

After compiling the stdlib with Cython with the attached script, modules that 
use circular imports fail to initialise. That includes os and posixpath, as 
well as shutil and tarfile. Example:

$ ./python -c 'import shutil'
Traceback (most recent call last):
  File string, line 1, in module
  File tarfile.py, line 44, in init tarfile (tarfile.c:44135)
import shutil
  File shutil.py, line 14, in init shutil (shutil.c:22497)
import tarfile
  File frozen importlib._bootstrap, line 1556, in _find_and_load
RuntimeError: maximum recursion depth exceeded

I've tried this with the latest CPython 3.4 hg version, but I'm pretty sure it 
fails in Py3.3 as well.

--
components: Interpreter Core
files: cystdlib.py
messages: 174612
nosy: scoder
priority: normal
severity: normal
status: open
title: frozen importlib crashes on circular imports in ext modules
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file27851/cystdlib.py

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



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-11-03 Thread Eran Rundstein

Eran Rundstein added the comment:

The patch is probably trivial - however I would still like some verification.
Would it be correct to call self.close() when fp.read returns ''? In case 
self.length is not present, I don't see a way around this anyway. When it is 
present, and fp.read returns '', how should we go about that? We can either 
return less data, or raise an exception to indicate that the connection 
terminated prematurely.

Thanks

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16298
___
___
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-11-03 Thread Taras Lyapun

Taras Lyapun added the comment:

Deleted code, docs, tests, and tests related stuff (like mocks). Test passes.

--
keywords: +patch
nosy: +lyapun
Added file: http://bugs.python.org/file27852/issue15641.diff

___
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



[issue16393] typo in pkgutil.py

2012-11-03 Thread Stefan Behnel

New submission from Stefan Behnel:

My guess is that line 454 in pkgutil.py should pass pkg_name into the 
import_module() function, not pkg. I get the following error when compiling 
it with Cython:

Error compiling Cython file:

...
msg = Relative module name {!r} not supported.format(fullname)
raise ImportError(msg)
if '.' in fullname:
# Get the containing package's __path__
pkg_name = fullname.rpartition(.)[0]
pkg = importlib.import_module(pkg)
^

pkgutil.py:454:41: local variable 'pkg' referenced before assignment

--
components: Library (Lib)
messages: 174615
nosy: scoder
priority: normal
severity: normal
status: open
title: typo in pkgutil.py
type: behavior
versions: Python 3.3, Python 3.4

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



[issue7317] Display full tracebacks when an error occurs asynchronously

2012-11-03 Thread Alexey Kachayev

Alexey Kachayev added the comment:

Updated test case for traceback printing, fixed test_cmd_line crashing with new 
ignored exception message formatting (test was based on regular expression). 
Patch is attached.

--
nosy: +kachayev
Added file: http://bugs.python.org/file27853/issue7317.diff

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



[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 70cef0a160cf by Andrew Svetlov in branch 'default':
Issue #16284: Prevent keeping unnecessary references to worker functions in 
concurrent.futures ThreadPoolExecutor.
http://hg.python.org/cpython/rev/70cef0a160cf

--
nosy: +python-dev

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



[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-11-03 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Committed. Thanks.

--
resolution:  - fixed
stage:  - test needed
status: open - closed

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I would to prefer *get_default_shell* as function name (it's a bit shorter).

Also please add .. versionadded:: 3.4 tag to docs.

--

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




[issue16218] Python launcher does not support unicode characters

2012-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Andrew, you shod a flea.

1. Now the test skipped on non Cyrillic-compatible locales (such as 
en_US.ISO-8859-1).
2. On UTF-8 locale the test does not test the bug (it passed even without the 
patch).

Here is a new patch. It should fail on FreeBSD with ASCII locale (because there 
is a yet not fixed bug), and I don't know how it will behave on Windows. 
Temporary you can explicitly skip the test for such case:

@unittest.skipIf(sys.platform.startswith('freebsd') and
 sys.getfilesystemencoding() == 'ascii',
 'skip on FreeBSD with ASCII filesystem encoding')

--
Added file: 
http://bugs.python.org/file27854/pythonrun_filename_decoding_test_2.patch

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



[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-11-03 Thread Andrew Svetlov

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


--
stage: test needed - committed/rejected

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Taras Lyapun

Taras Lyapun added the comment:

 I would to prefer *get_default_shell* as function name (it's a bit shorter).

Hm... I'm not sure, because someone can imagine that function returns some 
object or something like this... 'path' indicates that function returns 
something like string.

 Also please add .. versionadded:: 3.4 tag to docs.

Oh, sorry, added.

--
Added file: http://bugs.python.org/file27855/issue16353_added_doc_tag.diff

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



[issue7317] Display full tracebacks when an error occurs asynchronously

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a281604a5c9a by Andrew Svetlov in branch 'default':
Issue #7317: Display full tracebacks when an error occurs asynchronously.
http://hg.python.org/cpython/rev/a281604a5c9a

--
nosy: +python-dev

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Christian Heimes

Christian Heimes added the comment:

which('sh') isn't correct here. 'which' searches in all PATH environ parts. 
However the shell must be looked up in CS_PATH only.

From man sh(1posix):

 Applications should note that the standard PATH to the shell cannot be 
 assumed to be either /bin/sh or /usr/bin/sh, and should  be determined by 
 interrogation of the PATH returned by getconf PATH , ensuring that the 
 returned pathname is an absolute pathname and not a shell built-in.

'getconf PATH' queries confstr(_CS_PATH).

I suggest that you modify the POSIX part to:

  path = os.confstr(CS_PATH)
  which('sh', path=path)

--
nosy: +christian.heimes

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

+++ b/Lib/shutil.py Sat Nov 03 13:32:05 2012 +0200
+
+def get_default_shell_path():

Why is the patch putting the function in the shutil module?  The function 
should go in the os module as the title and comments of this issue state.  
shutil seems misplaced to me.

For example, the description of shutil in the docs is, The shutil module 
offers a number of high-level operations on files and collections of files.  In 
particular, functions are provided which support file copying and removal.  In 
contrast, the description of the os module is, This module provides a portable 
way of using operating system dependent functionality.  The default shell is 
operating system dependent functionality.

--

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



[issue16393] typo in pkgutil.py

2012-11-03 Thread Berker Peksag

Berker Peksag added the comment:

Duplicate of issue 16163.

--
nosy: +berker.peksag

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



[issue16393] typo in pkgutil.py

2012-11-03 Thread Ezio Melotti

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


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - Wrong name in Lib/pkgutil.py:iter_importers

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



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-03 Thread mike bayer

mike bayer added the comment:

in response to ezio, I poked around the source here, since I've never been sure 
if re.compile() cached its result or not.   It seems to be the case in 2.7 and 
3.2 also - 2.7 uses a local caching scheme and 3.2 uses functools.lru_cache, 
yet we don't see as much of a slowdown with 3.2.

so it seems like the caching behavior is precedent here, but I would revert 
re.py's caching scheme to the one used in 2.7 if the functools.lru_cache can't 
be sped up very significantly.  ideally lru_cache would be native.

also does python include any kind of benchmarking unit tests ?   over in SQLA 
we have an approach that fails if the call-counts of various functions, as 
measured by cProfile, fall outside of a known range.   it's caught many issues 
like these for me.

--

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



[issue7317] Display full tracebacks when an error occurs asynchronously

2012-11-03 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Committed. Thanks, guys!

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

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Christian Heimes

Christian Heimes added the comment:

I'm with Chris. The information should be stored in the os module. I suggest 
os.shell var or os.get_shell() function like this:

def get_shell():
for path in confstr(CS_PATH).split(pathsep):
sh = sep.join((path, sh))
try:
mode = stat(sh).st_mode
except OSError:
pass
else:
if st.S_ISREG(mode):
return sh
raise FileNotFound(sh)

According to all examples S_ISREG() is sufficient here.

On Windows the function should use the env var COMSPEC instead of hard coding 
cmd.exe.

--

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Is it ok to import *which* functions from shutil in *os* module?
There is only reason to put function into shutil.

But I like Christian's sketch.

Also, what reason to get shell name from COMSPEC? What should we do if COMSPEC 
points to some another shell, not cmd.exe?

--

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



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-03 Thread Nick Coghlan

Nick Coghlan added the comment:

Now that Brett has a substantial portion of the benchmark suite running on 
Py3k, we should see a bit more progress on the PyPy-inspired speed.python.org 
project (which should make it much easier to catch this kind of regression 
before it hits a production release).

In this case, as I noted in my earlier comment, I think the 3.3 changes to 
make_key broke an important single-argument fast path that the re module was 
previously relying on, thus the major degradation in performance on a cache 
hit. I haven't looked into setting up the benchmark suite on my own machine 
though, so we won't know for sure until either I get around to doing that, or 
someone with it already set up tries the change I suggested above.

--

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread R. David Murray

R. David Murray added the comment:

I think it would not be ok to import shutil in os, so I'm glad there is an 
alternative.

--

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



[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau

New submission from Carsten Milkau:

The memory footprint of itertools.tee can be reduced substantially by using a 
shared buffer for the child iterators (see sample code). If local queues are 
desired for efficient threading support, they can be combined with a global 
queue, allowing to constrain the size of local queues.

--
components: Library (Lib)
files: tee.py
messages: 174632
nosy: cami
priority: normal
severity: normal
status: open
title: Improving tee() memory footprint
type: performance
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27856/tee.py

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



[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Simon Law

New submission from Simon Law:

The documentation in Python 2.7, 3.2, and 3.3 claim that:

PyObject* PySequence_Fast(PyObject *o, const char *m)
Return value: New reference.
Returns the sequence o as a tuple, unless it is already a tuple or list, in 
which case o is returned...

Unfortunately, the code does this in Objects/abstract.c:

v = PySequence_List(it);

And the header file in Include/abstract.h matches the documentation:

 PyAPI_FUNC(PyObject *) PySequence_Fast(PyObject *o, const char* m);
   /*
 Returns the sequence, o, as a tuple, unless it's already a
 tuple or list.
   */

--
components: Interpreter Core
messages: 174633
nosy: sfllaw
priority: normal
severity: normal
status: open
title: Documentation claims that PySequence_Fast returns a tuple, when it 
actually returns a list.
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2012-11-03 Thread anatoly techtonik

New submission from anatoly techtonik:

 import ctypes.wintypes
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python3.2/ctypes/wintypes.py, line 20, in module
class VARIANT_BOOL(ctypes._SimpleCData):
ValueError: _type_ 'v' not supported
 


Shouldn't it just import silently without failing? Or if it's destined to fail, 
explain how to make a cross-platform import?

--
components: ctypes
messages: 174634
nosy: techtonik
priority: normal
severity: normal
status: open
title: Importing ctypes.wintypes on Linux gives a traceback
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2012-11-03 Thread anatoly techtonik

anatoly techtonik added the comment:

Perhaps the patch already there - see http://www.themacaque.com/?p=826

--

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



[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +rhettinger

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



[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Simon Law

Simon Law added the comment:

It looks like this was caught in the 3.3 branch, but only fixed it in the 
comment:

changeset:   75448:d8f68195210e
user:Larry Hastings la...@hastings.org
date:Mon Mar 05 22:59:13 2012 -0800
summary: Fix a comment: PySequence_Fast() creates a list, not a tuple.

The included patch applies cleanly to Python 2.7 and 3.2. When applying to 3.3, 
include the failure in Objects/abstract.c because the same change has already 
been made.

--
keywords: +patch
Added file: http://bugs.python.org/file27857/16395.patch

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



[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Éric Araujo

Éric Araujo added the comment:

Larry, any objection to backporting this?

--
assignee:  - docs@python
components: +Documentation -Interpreter Core
nosy: +docs@python, eric.araujo, larry
stage:  - patch review
versions:  -Python 3.3

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



[issue5184] Add -3 warning for extension types that implement tp_compare but not tp_richcompare

2012-11-03 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
type:  - behavior

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



[issue5720] ctime: I don't think that word means what you think it means.

2012-11-03 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
versions: +Python 3.4

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



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not only 3.3 regression, this is also 3.2 regression. 3.1, 3.2 and 3.3 
have different caching implementation.

Mikrobenchmark:
$ ./python -m timeit -s import re  re.match('', '')

Results:
3.1: 2.61 usec per loop
3.2: 5.77 usec per loop
3.3: 11.8 usec per loop

--
keywords: +3.2regression
nosy: +serhiy.storchaka

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



[issue5141] C API for appending to arrays

2012-11-03 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
components: +Library (Lib)

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



[issue6933] Threading issue with Tkinter Frame.insert

2012-11-03 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Bump.

--
nosy: +ramchandra.apte

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



[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb7ea51e658e by Ezio Melotti in branch '2.7':
#16152: fix tokenize to ignore whitespace at the end of the code when no 
newline is found.  Patch by Ned Batchelder.
http://hg.python.org/cpython/rev/eb7ea51e658e

New changeset 31798ed5 by Ezio Melotti in branch '3.2':
#16152: fix tokenize to ignore whitespace at the end of the code when no 
newline is found.  Patch by Ned Batchelder.
http://hg.python.org/cpython/rev/31798ed5

New changeset 1fdeddabddda by Ezio Melotti in branch '3.3':
#16152: merge with 3.2.
http://hg.python.org/cpython/rev/1fdeddabddda

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

--
nosy: +python-dev

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



[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-11-03 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee:  - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
type:  - behavior
versions: +Python 3.2

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



[issue16048] Tutorial-classes-remarks: replace paragraph

2012-11-03 Thread Yongzhi Pan

Changes by Yongzhi Pan fossi...@users.sourceforge.net:


--
nosy: +fossilet

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



[issue9625] argparse: Problem with defaults for variable nargs when using choices

2012-11-03 Thread Cédric Krier

Cédric Krier added the comment:

Here is a new version of the patch with tests

--
nosy: +ced
Added file: http://bugs.python.org/file27858/issue9625.patch

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



[issue16383] Python 3.3 Permission Error with User Library on Windows

2012-11-03 Thread Jim Pattee

Jim Pattee added the comment:

You have been in contact with my friends at Mensa.

Further information:
Just branching into the library causes a problem with permissions when opening 
files, even if the library just immediately returns.
Opening the file in the library, before returning to the calling program, will 
work.

You definitely have a problem somewhere.

--

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



[issue4711] Wide literals in the table of contents overflow in documentation

2012-11-03 Thread Éric Araujo

Éric Araujo added the comment:

Screenshot looks great, +1

--

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



[issue14302] Rename Scripts directory to bin and move python.exe to bin

2012-11-03 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage: needs patch - 
title: Move python.exe to bin/ - Rename Scripts directory to bin and move 
python.exe to bin
versions: +Python 3.4 -Python 3.3

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



[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-11-03 Thread Éric Araujo

Éric Araujo added the comment:

Can this issue be closed?  If there are still disagreements about the UI or UX, 
it could be a separate 3.4 report.

--

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 Also, what reason to get shell name from COMSPEC? What should we do if 
 COMSPEC points to some another shell, not cmd.exe?

FWIW, the subprocess module does this (with surrounding code linked after):

comspec = os.environ.get(COMSPEC, cmd.exe)

http://hg.python.org/cpython/file/ed091424f230/Lib/subprocess.py#l1060

--

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



[issue4711] Wide literals in the table of contents overflow in documentation

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cae65dd22826 by Ezio Melotti in branch '2.7':
#4711: break long words in the docs sidebar to avoid overflow.
http://hg.python.org/cpython/rev/cae65dd22826

New changeset 1046110a819d by Ezio Melotti in branch '3.2':
#4711: break long words in the docs sidebar to avoid overflow.
http://hg.python.org/cpython/rev/1046110a819d

New changeset 1bdab9112e59 by Ezio Melotti in branch '3.3':
#4711: merge with 3.2.
http://hg.python.org/cpython/rev/1bdab9112e59

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

--
nosy: +python-dev

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



[issue4711] Wide literals in the table of contents overflow in documentation

2012-11-03 Thread Ezio Melotti

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


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
type: behavior - enhancement
versions: +Python 3.4

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

Brett Cannon added the comment:

Thanks for the patch, Taras! It looks good and I will apply it when I have time 
(or some other core dev beats me to it).

--
stage: needs patch - commit review

___
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



[issue16392] frozen importlib crashes on circular imports in ext modules

2012-11-03 Thread Brett Cannon

Brett Cannon added the comment:

I don't mean for this to sound rude, but this seems like a Cython issue and not 
one for the stdlib. Can you reproduce the problem without using Cython? The new 
per-module locking mechanism Antoine prevents this from being a problem 
normally, so it makes me think Cython is at fault here.

--
nosy: +brett.cannon, pitrou

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



[issue16163] Wrong name in Lib/pkgutil.py:iter_importers

2012-11-03 Thread Brett Cannon

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


--
nosy: +brett.cannon

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



[issue13615] setup.py register fails with -r argument

2012-11-03 Thread anatoly techtonik

anatoly techtonik added the comment:

It is ok with http://pypi.python.org/pypi, but not with http://pypi.python.org, 
for example. Complaining that  http://pypi.python.org is not found in .pypirc

--

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



[issue16392] frozen importlib crashes on circular imports in ext modules

2012-11-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, it might be a legitimate issue, but due to the setup needed to reproduce, 
I would hope a Cython developer could do the diagnosis and possibly submit a 
patch.

--

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



[issue16353] add function to os module for getting path to default shell

2012-11-03 Thread Christian Heimes

Christian Heimes added the comment:

The os module can't import shutil as it would create a circular import. Also 
shutil.which() does lots of stat calls and we don't want additional stat calls 
in a core module like os. My implementation requires just one stat() call.

COMSPEC can point to an alternative command implementation. That's the point of 
COMSPEC. Perhaps some people remember 4DOS and 4NT.

--

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



[issue16394] Improving tee() memory footprint

2012-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why do you think that your implementation uses less memory? You have some 
measurements confirming it?

--
nosy: +serhiy.storchaka
versions:  -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PySequence_Tuple() was changed to PySequence_List() in the changeset 
4714aff4bf75 in 2004.  Are there any measurements which show PySequence_List() 
faster than PySequence_Tuple() on modern Python?  I don't see any references in 
4714aff4bf75 description.

--
nosy: +serhiy.storchaka

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



[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law

Simon Law added the comment:

 But patching the module to allow explicitly setting dest via keyword 
 argument shouldn't hurt anybody.

 I agree that it wouldn't hurt anybody. If you can find a way to do
 this, feel free to provide a patch.

 However, the correct way to have one name for the attribute (i.e.
 dest=) and one name for the help (i.e. metavar=) is to use the
 metavar argument like so:

 parser.add_argument('positional_args', metavar='positional-args')

I don't think that making ``dest`` more magical is a good idea. In the
included patch, you'll find a change that makes the ValueError tell
people about ``metavar``, which is the right way to go about things
anyway.

 That said, this is not the first time I've seen someone run into this
 problem. I think the documentation could be improved in a few ways:

 (1) In the name or flags section, describe how the flags (for
 optional arguments) are translated into both a default dest
 (stripping initial '-' and converting '-' to '_') and into a default
 metavar (stripping initial '-' and uppercasing). Part of this is
 in the dest and metavar documentation, but probably belongs up
 in the name or flags documentation. Add cross-references to dest
 and metavar sections.

In the included patch.

 (2) In the name or flags section, describe how the name (for
 positional arguments) are translated into the same default dest
 and metavar (no string munging at all). Again, move stuff from the
 dest and metavar sections as necessary. Add cross-references to
 dest and metavar sections.

 (3) In the dest section and somewhere in the parse_args section,
 describe how getattr can be used to get attributes whose names
 aren't valid Python identifiers. Maybe cross-reference this section
 from the edits in (2).

If we make optional and positional arguments consistent, and provide
backwards-compatibility for positional arguments, then these two are
not necesssary.

--
nosy: +sfllaw
Added file: http://bugs.python.org/file27859/15125-1.patch

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



[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law

Simon Law added the comment:

Sorry, there was a small typo in the previous patch. Here's the newer version.

--
Added file: http://bugs.python.org/file27860/15125-1.patch

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



[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-11-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

As Eric says: any further issues with this change should be reported separately.

--
status: open - closed

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



[issue16397] UserString doesn't combine nicely with strings

2012-11-03 Thread Jorge Cardona

New submission from Jorge Cardona:

Hi,

I think UserString must play nicely with other standard objects to be useful. 
For example, right now is not possible to join a list of UserString with a 
string. 

This shouldn't fail:

   from UserString import UserString
   '.'.join([UserString('some')])

but it fails in 2.7 and it fails too with 3.2 (replacing with collections).

I'm assuming most of the user of UserString, use it as a replacement of a 
string, and it would be great to actually be able to replace strings passed to 
thid parties with userstrings. 

I imagine there would be some edge situations harder to resolve, but if someone 
is just using standard libraries it should be safe to pass a string or an 
userstring.

Bye.

--
messages: 174658
nosy: Jorge.Cardona
priority: normal
severity: normal
status: open
title: UserString doesn't combine nicely with strings
type: behavior
versions: Python 2.7, Python 3.2

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



[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


Removed file: http://bugs.python.org/file27859/15125-1.patch

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



[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau

Carsten Milkau added the comment:

No. The sample code is a demonstration how to do it, it's by no means a 
full-fledged patch.

The drawback of the current implementation is that if you tee n-fold, and then 
advance one of the iterators m times, it fills n queues with m references each, 
for a total of (n-1)*m references. The documentation explicitly mentions this 
is unfortunate.

I only demonstrate that it is perfectly unnecessary to fill n separate queues, 
as you can use a single queue and index into it. Instead of storing duplicate 
references, you can store a counter with each cached item reference. Replacing 
duplicates by refcounts, it turns (n-1)*m references into 2*m references (half 
of which being the counters). 

Not in the demo code: you can improve this further by storing items in 
iterator-local queues when that iterator is the only one that still needs to 
return it, and in a shared queue with refcount when there are more of them. 
That way, you eleminate the overhead of storing (item, 1) instead of item for a 
fix-cost per-iterator.

--
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law

Simon Law added the comment:

Note that 15125-1.patch applies to Python 2.7 cleanly as it is a bugfix.

--

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



[issue16397] UserString doesn't combine nicely with strings

2012-11-03 Thread Serhiy Storchaka

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


--
components: +Library (Lib)
nosy: +rhettinger
versions: +Python 3.3, Python 3.4

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



[issue16397] UserString doesn't combine nicely with strings

2012-11-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

This is not a bug, but a potential new feature. Therefore, it can go only into 
3.4 (if at all).

--
nosy: +loewis
versions:  -Python 2.7, Python 3.2, Python 3.3

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



[issue16397] UserString doesn't combine nicely with strings

2012-11-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

If you want a class that behaves like a string object, you should subclass from 
str.

--

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



[issue10395] new os.path function to extract common prefix based on path components

2012-11-03 Thread Éric Araujo

Éric Araujo added the comment:

Rafik is working on os.path.commonpath for the bug day.

--
versions: +Python 3.4 -Python 3.3

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



[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5b5c2c3b2268 by Ezio Melotti in branch '2.7':
#12759: sre_parse now raises a proper error when the name of the group is 
missing.  Initial patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/5b5c2c3b2268

New changeset 29983dd7191e by Ezio Melotti in branch '3.2':
#12759: sre_parse now raises a proper error when the name of the group is 
missing.  Initial patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/29983dd7191e

New changeset 28be586287c8 by Ezio Melotti in branch '3.3':
#12759: merge with 3.2.
http://hg.python.org/cpython/rev/28be586287c8

New changeset 3f4fbad75c99 by Ezio Melotti in branch 'default':
#12759: merge with 3.3.
http://hg.python.org/cpython/rev/3f4fbad75c99

--
nosy: +python-dev

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



[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception

2012-11-03 Thread Ezio Melotti

Ezio Melotti added the comment:

I updated the patch to use 'missing group name' instead of 'bad group name', 
and added a couple more tests.
This also fixes the issue in redemo.py.
Thanks Serhiy and Masha for the patches!

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

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



[issue13349] Non-informative error message in index() and remove() functions

2012-11-03 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
title: Uninformal error message in index() and remove() functions - 
Non-informative error message in index() and remove() functions

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



[issue13349] Non-informative error message in index() and remove() functions

2012-11-03 Thread Sean Ochoa

Sean Ochoa added the comment:

Working on issue as part of Python Bug Day, Oct 2012.

--
nosy: +Sean.Ochoa

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



[issue6683] smtplib authentication - try all mechanisms

2012-11-03 Thread A.M. Kuchling

A.M. Kuchling added the comment:

The attached patch against trunk (3.4) exercises the multiple-authentication 
functionality; the SMTP server advertises four different authentication methods,
and the code will try CRAM-MD5 first, which will fail, but LOGIN succeeds.

If this patch is OK, or if having a test isn't considered necessary, then this 
bug can be closed.

--
nosy: +akuchling
Added file: http://bugs.python.org/file27861/bug6683-patch.txt

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



[issue16397] UserString doesn't combine nicely with strings

2012-11-03 Thread Jorge Cardona

Jorge Cardona added the comment:

mm, I thought that was impossible, and that I should be using UserString
actually. I didn't notice the big warning at the beginning of the section
at the docs.

Sorry, I will change my code.

Thanks.

On Sat, Nov 3, 2012 at 2:33 PM, Martin v. Löwis rep...@bugs.python.orgwrote:


 Martin v. Löwis added the comment:

 If you want a class that behaves like a string object, you should subclass
 from str.

 --

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


-- 
Jorge Eduardo Cardona

jorgeecard...@gmail.com
jo...@cardona.co

cardona.co
github.com/jorgeecardona

--

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



[issue7976] warnings should provide a public API for accessing its option parsing code

2012-11-03 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
keywords: +easy -patch
versions: +Python 3.4 -Python 3.2

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



[issue16394] Improving tee() memory footprint

2012-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 The documentation explicitly mentions this is unfortunate.

Ah, here's the thing.  The code in the documentation is provided only for the 
explanation.  In fact tee() is implemented in the same way that you suggest 
(but uses a more efficient deque implementation).  I propose to close this 
issue as invalid.  Thanks for the suggestion.

--

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



[issue8401] Strange behavior of bytearray slice assignment

2012-11-03 Thread Mark Dickinson

Mark Dickinson added the comment:

The patch looks fine to me.

--
nosy: +mark.dickinson

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



[issue9109] absolute import cleanups for Python 3

2012-11-03 Thread A.M. Kuchling

A.M. Kuchling added the comment:

It seems to me that this issue was fixed for Python 3.3 by commit 2dd046be2c88 
for #2377, which made importlib the implementation of __import__().  
Python/import.c now raises a ValueError if level  0, and the docstring has 
been corrected to have 'level=0' as the default.  

I'll therefore close this issue.

--
nosy: +akuchling
resolution:  - fixed
status: open - closed

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



[issue12634] Random Remarks in class documentation

2012-11-03 Thread Éric Araujo

Éric Araujo added the comment:

+1 to something like Terry’s proposal.

--
keywords: +easy
stage:  - needs patch
type: enhancement - 
versions: +Python 3.4

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



[issue12614] Allow to explicitly set the method of urllib.request.Request

2012-11-03 Thread Éric Araujo

Éric Araujo added the comment:

Senthil, any objections on committing this?

--

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



[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau

Carsten Milkau added the comment:

Oh great! Then I can use it as-is. How about reassigning the issue to 
documentation (for clarifying the inefficiency warning)?

--

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



[issue16394] Improving tee() memory footprint

2012-11-03 Thread Carsten Milkau

Changes by Carsten Milkau chat.n...@arcor.de:


--
assignee:  - docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python

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



[issue14794] slice.indices raises OverflowError

2012-11-03 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch.

--
keywords: +patch
stage: needs patch - patch review
type: behavior - enhancement
versions:  -Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file27862/issue14794.patch

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



[issue8401] Strange behavior of bytearray slice assignment

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1bd2b272c568 by Ezio Melotti in branch '2.7':
#8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an 
error.
http://hg.python.org/cpython/rev/1bd2b272c568

New changeset 8f00af8abaf9 by Ezio Melotti in branch '3.2':
#8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an 
error.
http://hg.python.org/cpython/rev/8f00af8abaf9

New changeset 06577f6b1c99 by Ezio Melotti in branch '3.3':
#8401: merge with 3.2.
http://hg.python.org/cpython/rev/06577f6b1c99

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

--
nosy: +python-dev

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



[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law

Simon Law added the comment:

15125-2.patch applies to the default branch.

It makes dest behave the same for positional and optional arguments in terms of 
name mangling.

Also, there is a backward-compatibility path in Namespace to support old-style 
getattr() access. However, it's not documented as we really don't want people 
to use it.

--
Added file: http://bugs.python.org/file27863/15125-2.patch

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



[issue16394] Improving tee() memory footprint

2012-11-03 Thread Serhiy Storchaka

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


--
nosy:  -serhiy.storchaka
stage:  - needs patch
type: performance - enhancement
versions:  -Python 2.6, Python 3.1

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



[issue14794] slice.indices raises OverflowError

2012-11-03 Thread Mark Dickinson

Mark Dickinson added the comment:

I should note that this patch fixes/changes one other aspect of slice.indices:  
namely that it used to accept a negative length, and return essentially 
meaningless results in that case:

 slice(0, 10, 1).indices(-3)
(-3, -3, 1)

With the patch, it now raises ValueError if given a negative length:

 slice(0, 10, 1).indices(-3)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: length should not be negative

--

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



[issue16398] deque.rotate() could be much faster

2012-11-03 Thread Simon Law

New submission from Simon Law:

If you look at the implementation of deque.rotate(), it does the equivalent of 
deque.append(deque.popleft()) or deque.appendleft(deque.pop()).

Unfortunately, for larger rotations, the pop() and append() calls just do too 
much work. Since the documentation recommends using rotate() to do 
slicing-style operations, this could get seriously slow.

deque.rotate() could just touch up the internal pointers and use memmove() to 
realign the data.

Benchmarks, of course, would have to be written to make sure this is a win.

--
components: Library (Lib)
messages: 174679
nosy: sfllaw
priority: normal
severity: normal
status: open
title: deque.rotate() could be much faster
type: performance
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue16349] Document whether it's safe to use bytes for struct format string

2012-11-03 Thread Mark Dickinson

Mark Dickinson added the comment:

 but also discovered that example outputs are wrong

That's documented to some extent:  there's a line in the docs that says:
All examples assume a native byte order, size, and alignment with a big-endian 
machine.

Given that little-endian machines are much more common that big-endian these 
days, it may be worth rewriting the examples for little-endian machines.

--

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



[issue8401] Strange behavior of bytearray slice assignment

2012-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a7ebc0db5c18 by Ezio Melotti in branch 'default':
Merge typo fixes (and the fix for #8401 that I wrongly merged) with 3.3.
http://hg.python.org/cpython/rev/a7ebc0db5c18

--

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



[issue16349] Document whether it's safe to use bytes for struct format string

2012-11-03 Thread Mark Dickinson

Mark Dickinson added the comment:

 Also it would be nice to clarify if struct.Struct.format is meant to be  a 
 byte string.

Hmm.  That seems wrong to me.  After all, the format string is supposed to be a 
piece of human-readable text rather than a collection of bytes.  I think it's 
borderline acceptable to allow a bytes instance to be passed in for the format 
(practicality beats purity and all that), but I'd say that the output format 
should definitely be unicode.

--

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



[issue16398] deque.rotate() could be much faster

2012-11-03 Thread Serhiy Storchaka

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


--
components: +Extension Modules -Library (Lib)
stage:  - needs patch
versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3

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



  1   2   >