[issue20394] Coverity complains on audioop

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a406b6fe61f by Christian Heimes in branch 'default':
I forgot to add a Misc/NEWS entry for issue #20394
http://hg.python.org/cpython/rev/0a406b6fe61f

--

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



[issue20394] Coverity complains on audioop

2014-01-27 Thread Christian Heimes

Christian Heimes added the comment:

The commit has silenced coverity's warning.

--

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



[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 791b69f9f96d by Victor Stinner in branch '3.3':
Issue #20367: Fix behavior of concurrent.futures.as_completed() for duplicate
http://hg.python.org/cpython/rev/791b69f9f96d

--

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



[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-27 Thread STINNER Victor

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


--
resolution: remind - fixed
status: open - closed

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



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 323cb02abfc6 by Gregory P. Smith in branch '2.7':
Issue #19081: Remove the zipimporter.files reference as the zip TOC
http://hg.python.org/cpython/rev/323cb02abfc6

--

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



[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the updated patch for sha512module after changes from Larry to clinic.

--
Added file: http://bugs.python.org/file33742/clinic_sha512module_v3.patch

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



[issue19077] More robust TemporaryDirectory cleanup

2014-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yeah, I thought about it. Only flag should be false in shutdown mode, because 
it will be None when a module will be cleaned.

--

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



[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the updated patch for md5module after changes from Larry to clinic.

--
Added file: http://bugs.python.org/file33743/clinic_md5module_v3.patch

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



[issue18321] Multivolume support in tarfile module

2014-01-27 Thread Eduardo Robles Elvira

Eduardo Robles Elvira added the comment:

Do we have any news on this patch?

--

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-27 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the updated patch for resource module based on Zachary's comment.

--
Added file: http://bugs.python.org/file33744/clinic_resource_v2.patch

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



[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Status:
Modules/sha1module.c: done
Modules/sha256module.c: done
Modules/sha512module.c: done
Modules/md5module.c: done

All of them are ready for Python 3.4.

/* AC 3.5: optional positional arguments */
Modules/_codecsmodule

--

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



[issue20399] Comparison of memoryview

2014-01-27 Thread Mark Lawrence

Mark Lawrence added the comment:

Some discussion here 
https://groups.google.com/forum/#!topic/dev-python/1D_iExlsva8

--
nosy: +BreamoreBoy

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



[issue19077] More robust TemporaryDirectory cleanup

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 50aa9e3ab9a4 by Serhiy Storchaka in branch '3.3':
Issue #19077: tempfile.TemporaryDirectory cleanup is now most likely
http://hg.python.org/cpython/rev/50aa9e3ab9a4

New changeset d792eb3afa58 by Serhiy Storchaka in branch 'default':
Issue #19077: tempfile.TemporaryDirectory cleanup no longer fails when
http://hg.python.org/cpython/rev/d792eb3afa58

--
nosy: +python-dev

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



[issue20395] Extract generated clinic code in Modules/_pickle.c to separate file

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1aa8ea187560 by Serhiy Storchaka in branch 'default':
Issue #20395: Extract generated clinic code in Modules/_pickle.c to separate 
file.
http://hg.python.org/cpython/rev/1aa8ea187560

--
nosy: +python-dev

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



[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2014-01-27 Thread Wim

Wim added the comment:

Ping

--

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



[issue19077] More robust TemporaryDirectory cleanup

2014-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your patch Antoine. And thank you for your excellent idea Richard.

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

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



[issue20395] Extract generated clinic code in Modules/_pickle.c to separate file

2014-01-27 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

That doesn't sound terribly useful indeed. The hex example is a toy example. 
Real-world examples would involve compression (zlib...) but then it is probably 
much more efficient to have a dedicated implementation (GzipFile) rather than 
blindly call zlib.compress() or zlib.decompress() at each round.

--

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



[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread STINNER Victor

STINNER Victor added the comment:

I agree with Antoine, I dislike the idea of BinaryTransformWrapper, it 
remembers me the evil codecs.EncodedFile thing.

What are the usecases?

--

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



[issue20406] Use application icon for IDLE

2014-01-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Currently IDLE use default Tk icon. The proposed patch sets special application 
icon for IDLE.

--
components: IDLE
files: idle_appicon.patch
keywords: patch
messages: 209428
nosy: kbk, roger.serwy, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: Use application icon for IDLE
type: enhancement
Added file: http://bugs.python.org/file33745/idle_appicon.patch

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



[issue15189] tkinter.messagebox does not use the application's icon

2014-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Mark's recipe works pretty well (requires Tk 8.5+). And you can use special 
method for this: app.wm_iconphoto(True, icon).

What we can made more? We can set Python-related application icon for IDLE 
(issue20406).

But for user applications their authors are responsible to configure properly 
icons.

--

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



[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 27.01.2014 11:00, STINNER Victor wrote:
 
 STINNER Victor added the comment:
 
 I agree with Antoine, I dislike the idea of BinaryTransformWrapper, it 
 remembers me the evil codecs.EncodedFile thing.

 What are the usecases?

Ever used recode ?

The purpose of EncodedFile/StreamRecoder was to convert an externally
used encoding to a standard internal one - mainly to allow programs
that didn't want to use Unicode for processing to still benefit from
the codecs that come with Python.

E.g. the example at the end of codecs.py allows using Latin-1 within
the application, while talking to the console using UTF-8.

--

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



[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Nobody talks to the console using hex_codec.

--

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-27 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the updated patch for type module based on Zachary's comment.

However, I can not convert this method.

{__subclasshook__, object_subclasshook, METH_CLASS | METH_VARARGS,
 object_subclasshook_doc},

static PyObject *
object_subclasshook(PyObject *cls, PyObject *args)
{
Py_RETURN_NOTIMPLEMENTED;
}

 type.__subclasshook__()
NotImplemented
 type.__subclasshook__('cutecat')
NotImplemented
 type.__subclasshook__('cutecat', 1, [])
NotImplemented

--
Added file: http://bugs.python.org/file33746/clinic_typeobject_v2.patch

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



[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Nick Coghlan

Nick Coghlan added the comment:

I only used hex as the example because it was trivial to generate test data for.

The stackable streaming IO model is an extremely powerful one - the approach we 
already use in the io module has some similarities to the one Texas Instruments 
use in DSP/BIOS (http://www.ti.com/tool/dspbios) and I know from experience how 
convenient that is. The model means you can push a lot of your data 
manipulation into your stream definitions, and keep all that data 
transformation logic out of your main application. (In my case, it let us 
mostly ignore the differences in a-law, u-law and ADPCM encoded audio, since we 
just built the IO streams differently depending on which one we were dealing 
with).

However, relative to DSP/BIOS, our stream model is currently missing the 
stackable piece - it's difficult to plug additional wrappers into the stream, 
because we don't have either the binary in, binary out or the text in, text 
out component.

A well designed streaming codec should be able to sit in the pipeline providing 
transparent encryption whether you're piping to a file, to another process or 
to a socket. If you're handling audio or video data, then you would also be 
able to place your codecs directly in the stream pipeline, rather than needing 
to come up with your own custom data pipeline model.

This isn't a novel design overall - it's the way the signal processing world 
has been doing things for decades (I first learned this model when using 
DSP/BIOS more than a decade ago, and Linux STREAMS, which includes some similar 
concepts, is substantially older than that). The only novel concept here is the 
idea of offering this feature as part of Python 3's native io model.

DSP/BIOS and STREAMS also have some solid design concepts around using 
gather/scatter devices for stream multiplexing, but that's not related to codec 
handling improvements.

--

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



[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that this is something that could (and should) start life as a module on 
PyPI, which would also provide cross version support.

--

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



[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Larry Hastings

New submission from Larry Hastings:

The documentation for heapq.nsmallest and heapq.nlargest:

http://docs.python.org/3.3/library/heapq.html#heapq.nlargest

claim that they accept three arguments: n, iterable, and key=None.  In fact, 
the implementations of both these functions only accept two parameters: n and 
iterable.

I assume the right thing to do here is to remove the erroneous documentation, 
rather than implement this apparently-not-needed feature?

--
components: Library (Lib)
messages: 209435
nosy: larry
priority: low
severity: normal
stage: needs patch
status: open
title: heapq.nsmallest and heapq.nlargest don't accept a key parameter
type: behavior
versions: Python 3.3, Python 3.4

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



[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
nosy: +georg.brandl

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



[issue18321] Multivolume support in tarfile module

2014-01-27 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Lars, would you like to take a look?

--

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



[issue20408] memoryview() constructor documentation error

2014-01-27 Thread Larry Hastings

New submission from Larry Hastings:

The documentation for the memoryview constructor says it takes memoryview(obj). 
 Oddly, memoryview accepts keyword arguments (for its one required value), and 
the name of the argument is object, not obj.

--
messages: 209436
nosy: georg.brandl, larry
priority: low
severity: normal
stage: needs patch
status: open
title: memoryview() constructor documentation error
type: behavior
versions: Python 3.3, Python 3.4

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



[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-01-27 Thread Nick Coghlan

Nick Coghlan added the comment:

Attached patch checks the requested encoding is a valid text encoding in 
TextIOWrapper.__init__.

Two additional test changes were needed:

- the one that checks handling of non-text-encodings at runtime now tweaks 
quopri to lie about being a text encoding when creating the stream

- the one that checks the interpreter doesn't crash at shutdown needed to be 
adjusted to handle the fact that _pyio now also fails in that situation, but 
with a different error (it can't find the ascii codec because the codec 
machinery is mostly gone)

Currently, this adds a third lookup of the encoding name to the process of 
creating a TextIOWrapper instance. This could be reduced to just one by 
changing the retrieval of the encoder and decoder to look in the retrieved 
codec info tuple, rather than doing the lookup by name again.

--
components: +IO
keywords: +patch
nosy: +pitrou
Added file: 
http://bugs.python.org/file33747/issue20404_check_valid_textio_codec.diff

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-27 Thread Larry Hastings

Larry Hastings added the comment:

For what it's worth: I figured out how this happened.  Maybe it's obvious to 
you, but this behavior baffled me until I went back and looked at the revision 
history.

In revision e260d6daf784, the argument parsing for itertools.repeat looks like 
this:

Py_ssize_t cnt = -1;

if (type == repeat_type  !_PyArg_NoKeywords(repeat(), kwds))
return NULL;

if (!PyArg_ParseTuple(args, O|n:repeat, element, cnt))
return NULL;

if (PyTuple_Size(args) == 2  cnt  0)
cnt = 0;

In the subsequent revision, 3dbdbc5e6d85, it was changed to this:

Py_ssize_t cnt = -1;

if (!PyArg_ParseTupleAndKeywords(args, kwds, O|n:repeat, kwargs,
 element, cnt))
return NULL;

if (PyTuple_Size(args) == 2  cnt  0)
cnt = 0;

The original intent is now clear: only allow cnt to be -1 if it wasn't 
specified as an argument.  The author simply forgot that times could now be 
passed in as a keyword argument too.

What the author *probably* wanted was something like this:

PyObject *times_keyword;

...

times_keyword = PyDict_GetItemString(kwargs, times);
Py_XDECREF(times_keyword);
if ((PyTuple_Size(args) == 2 || times_keyword)  cnt  0)
cnt = 0;

But I suggest it's far too late to change it to that now.

--

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



[issue20319] concurrent.futures.wait() can block forever even if Futures have completed

2014-01-27 Thread Glenn Langford

Glenn Langford added the comment:

Revised patch; I don't think there is a need to sort the keys when waiters are 
being removed since only one lock is acquired at a time. Stress tests on both 
wait() and as_completed() work with this approach.

--
Added file: http://bugs.python.org/file33748/issue20319-no-sort.patch

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



[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-27 Thread Brett Cannon

Brett Cannon added the comment:

Technically you should only have one title at the very top of the heading 
hierarchy. That's why the patch changed the title to use top+bottom asterisks. 
You could have just as easily used equal signs as reST doesn't care, just that 
you are consistent.

--

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



[issue20398] stem crashes python

2014-01-27 Thread lothar

lothar added the comment:

i have the current cygwin python3 package:
http://mirrors.kernel.org/sourceware/cygwin/x86_64/release/python3/

i have no intention to build python myself.

--

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



[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Georg Brandl

Georg Brandl added the comment:

Yes.  Probably someone wished they would implement it :)

--

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



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-27 Thread Brett Cannon

Brett Cannon added the comment:

Just to answer Nick's question: I read the extension import code just last 
month to see if I could update it for PEP 451 fast enough (obviously the answer 
was no =). As for zipimport, I read that (and the extension import code yet 
again) in the 3.3 timeframe (and did not find the experience pleasant), so I 
don't know if that's too far in the past for you. =)

--

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



[issue20398] stem crashes python

2014-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Can you try with a standard Windows build?
http://python.org/download/releases/3.3.3/

--

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



[issue20398] stem crashes python

2014-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(note that stem.util.system at least uses ctypes)

--

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



[issue20399] Comparison of memoryview

2014-01-27 Thread Stefan Krah

Stefan Krah added the comment:

For integer sequences I think non-equality comparisons will be somewhat
confusing. Are the sequences little or big endian?

If we start to view bytes more like latin-1 again (PEP 461), it would
make sense for the 'B' and 'c' formats.

--

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



[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Georg Brandl

Georg Brandl added the comment:

I see, there are two def nsmallest in heapq.py.  Tricky!

--

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



[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The docs are correct as-is.  This is a documented and tested behavior.

 from heapq import nsmallest
 list(nsmallest(3, ['larry', 'georg', 'raymond', 'guido', 'tim'], 
key=len))
['tim', 'larry', 'georg']

The C implementation doesn't have a key-argument.  That behavior gets added 
downstream in pure python in Lib/heapq.py which wraps the C-function and adds 
the additional behavior.

--
assignee:  - rhettinger
nosy: +rhettinger
priority: low - normal
resolution:  - invalid
status: open - closed

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2014-01-27 Thread Tal Einat

Tal Einat added the comment:

Attached is a complete AC conversion of itertools.

This is a large conversion, so I was extra careful. I even went over the entire 
diff manually to check for any errors. Compilation runs without warnings and 
the entire test suite passes.

Notes:
* I didn't convert itertools.repeat due to the ongoing discussion regarding it.
* I didn't convert itertools.islice since its signature is like range() but 
with an additional first required argument, making it impossible to convert 
properly.
* I didn't convert several __new__ methods because they treat *args similarly 
to zip(): itertools.chain, itertools.product, itertools.zip_longest
* I used Larry's nullable ints patch (see issue20341) for the 'r' parameter 
to itertools.permutations.
* I converted all of the following methods when defined: __new__ (except for 
classes mentioned above), __sizeof__, __reduce__, __setstate__, __copy__, 
__length_hint__

--
Added file: 
http://bugs.python.org/file33749/taleinat.ac_conversion.itertools.c.patch

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2014-01-27 Thread Tal Einat

Tal Einat added the comment:

And at that, I've finished the conversion of this entire Derby group! Woohoo!

(except for itertools.repeat which is pending discussion)

--

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



[issue20409] .readline() returned garble text

2014-01-27 Thread Xiaoqing Rong

New submission from Xiaoqing Rong:

I'm using Windows 8. I created file 'weird1.txt' (attached) from an Excel 
worksheet using save as Unicode Text (*.txt). And this happened when I used 
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit 
(AMD64)] on win32:

 handle = open('weird1.txt'); handle.readline()
'ÿþ\x00P\x006\x004\x00;\x00Y\x00A\x00L\x000\x000\x001\x00C\x00;\x00T\x00F\x00C\x003\x00;\x00
 
\x00S\x00G\x00D\x00I\x00D\x00:\x00S\x000\x000\x000\x000\x000\x000\x000\x000\x001\x00,\x00
 \x00C\x00h\x00r\x00 \x00I\x00 \x00f\x00r\x00o\x00m\x00 
\x001\x005\x001\x000\x000\x006\x00-\x001\x004\x007\x005\x009\x004\x00,\x001\x005\x001\x001\x006\x006\x00-\x001\x005\x001\x000\x009\x007\x00,\x00
 \x00r\x00e\x00v\x00e\x00r\x00s\x00e\x00 
\x00c\x00o\x00m\x00p\x00l\x00e\x00m\x00e\x00n\x00t\x00,\x00 
\x00V\x00e\x00r\x00i\x00f\x00i\x00e\x00d\x00 \x00O\x00R\x00F\x00,\x00 
\x00\x00L\x00a\x00r\x00g\x00e\x00s\x00t\x00 \x00o\x00f\x00 \x00s\x00i\x00x\x00 
\x00s\x00u\x00b\x00u\x00n\x00i\x00t\x00s\x00 \x00o\x00f\x00 \x00t\x00h\x00e\x00 
\x00R\x00N\x00A\x00 \x00p\x00o\x00l\x00y\x00m\x00e\x00r\x00a\x00s\x00e\x00 
\x00I\x00I\x00I\x00 
\x00t\x00r\x00a\x00n\x00s\x00c\x00r\x00i\x00p\x00t\x00i\x00o\x00n\x00 
\x00i\x00n\x00i\x00t\x00i\x00a\x00t\x00i\x00o\x00n\x00 
\x00f\x00a\x00c\x00t\x00o\x00r\x00 \x00c\x00o\x00m\x00p\x00l\x00e\x00x\x00 
\x00(\x00T\x00F\x00I\x00I\x00I\x00C\x00)\x00;\x00 \x00p\x00a\x00r\x00t\x00 
\x00o\x00f\x00 \x00t\x00h\x00e\x00 \x00T\x00a\x00u\x00B\x00 
\x00d\x00o\x00m\x00a\x00i\x00n\x00 \x00o\x00f\x00 
\x00T\x00F\x00I\x00I\x00I\x00C\x00 \x00t\x00h\x00a\x00t\x00 
\x00b\x00i\x00n\x00d\x00s\x00 \x00D\x00N\x00A\x00 \x00a\x00t\x00 
\x00t\x00h\x00e\x00 \x00B\x00o\x00x\x00B\x00 
\x00p\x00r\x00o\x00m\x00o\x00t\x00e\x00r\x00 \x00s\x00i\x00t\x00e\x00s\x00 
\x00o\x00f\x00 \x00t\x00R\x00N\x00A\x00 \x00a\x00n\x00d\x00 
\x00s\x00i\x00m\x00i\x00l\x00a\x00r\x00 \x00g\x00e\x00n\x00e\x00s\x00;\x00 
\x00c\x00o\x00o\x00p\x00e\x00\n'

Then I opened 'weird1.txt' in Notepad++ 6.5.2, created file 'weird2.txt' by 
copying the whole content of 'weird1.txt' into a new file and saved it in 
Notepad++ 6.5.2 (I wanted to attach 'weird2.txt' but only one attachment is 
allowed), and this happened:

 handle = open('weird2.txt'); handle.readline()
'P64;YAL001C;TFC3; SGDID:S1, Chr I from 151006-147594,151166-151097, 
reverse complement, Verified ORF, Largest of six subunits of the RNA 
polymerase III transcription initiation factor complex (TFIIIC); part of the 
TauB domain of TFIIIC that binds DNA at the BoxB promoter sites of tRNA and 
similar genes; coope\n'

I can't see any difference between the contents of 'weird1.txt' and 
'weird2.txt' using Notepad++ or the Windows Notepad. Maybe some experts could 
tell me what's going on here?

--
components: IDLE
files: weird1.txt
messages: 209452
nosy: m123orning
priority: normal
severity: normal
status: open
title: .readline() returned garble text
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file33750/weird1.txt

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



[issue20409] .readline() returned garble text

2014-01-27 Thread R. David Murray

R. David Murray added the comment:

The file use different encodings.  In the first case, the first two bytes 
(which don't appear in the second example) I believe are the BOM.  I'm not an 
expert, but I believe it is a utf-16 file (thus all the \x00 bytes).  The 
second file is presumably utf-8, with no BOM.  Notepad++ handles both 
automatically.  For Python, you have to tell it to look for the BOM by 
specifying the appropriate codec in the open call.  This is because Python's 
philosophy is to not guess at the encoding of files (though it does have a 
default encoding, usually utf-8).

Questions like this are better directed to the python-list mailing list, by the 
way.

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

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



[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2014-01-27 Thread Glenn Langford

Glenn Langford added the comment:

Updated patch with change to Doc/library/concurrent.futures.rst.

--
Added file: http://bugs.python.org/file33751/issue20369.patch

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



[issue20378] Implement `Signature.__repr__`

2014-01-27 Thread Ram Rachum

Ram Rachum added the comment:

If you'd like to expand this issue's scope to all the objects related to 
Signature, I think that'll be good. All objects need good introspection strings.

--

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



[issue20378] Implement `Signature.__repr__`

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Ram, yes, I agree. Something like 'Signature f: alpha, beta=3, *args, 
**kwargs' should work.

--
assignee:  - yselivanov

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



[issue20410] Argument Clinic: add 'self' return converter

2014-01-27 Thread Zachary Ware

New submission from Zachary Ware:

It would be nice to have a 'self' return converter for simple functions like 
winreg.HKEYType.__enter__ (which is implemented as Py_XINCREF(self); return 
self;).  With the typedef and type_object specifications now required for the 
class directive, 'self' is passed to that function as a PyHKEYObject *, but 
impl is expected to return a PyObject *.

In this particular instance, I can solve the problem (which is a compiler 
warning) with a custom self_return_converter that casts _return_value to 
PyObject *.  I think a generic solution would be better in the long run and 
useful in more places, though.

--
messages: 209457
nosy: larry, zach.ware
priority: low
severity: normal
stage: needs patch
status: open
title: Argument Clinic: add 'self' return converter
type: enhancement
versions: Python 3.5

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



[issue20372] inspect.getfile should raise a TypeError if C object does not have __module__

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 50706164c38f by Yury Selivanov in branch 'default':
inspect.getfile: Don't crash on classes without '__module__' attribute #20372
http://hg.python.org/cpython/rev/50706164c38f

--
nosy: +python-dev

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



[issue20372] inspect.getfile should raise a TypeError if C object does not have __module__

2014-01-27 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
status: open - closed

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



[issue20380] __defaults__ changed by *args

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

 Though perhaps a note in the documentation would be helpful for future 
 confused people.

I agree. Also, __kwdefaults__ wasn't documented. Please take a look at the 
attached patch.

--
keywords: +patch
nosy: +yselivanov
Added file: http://bugs.python.org/file33752/inspect_doc_20380_01.patch

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



[issue6815] UnicodeDecodeError in os.path.expandvars

2014-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch (for 3.3+) which add support for environment variables with 
non-ASCII values and names in posixpath and ntpath.

--
nosy: +serhiy.storchaka
stage: test needed - patch review
versions: +Python 3.3, Python 3.4 -Python 3.1
Added file: http://bugs.python.org/file33753/expandvars_nonascii.patch

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-27 Thread Ethan Furman

Ethan Furman added the comment:

Well, so far I have tried:

  :class:`IntEnum`
  :class:`.IntEnum`
  :class:`~IntEnum`
  :class:`enum.IntEnum`
  :class:`.enum.IntEnum`
  :class:`~enum.IntEnum`
  :class:`~.enum.IntEnum`

and probably some others I have forgotten; nothing is giving me a link to 
enum.IntEnum.

Any ideas?

--

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



[issue20380] __defaults__ changed by *args

2014-01-27 Thread Ram Rachum

Ram Rachum added the comment:

Looks good. Ideally there would be a more details explanation and an example.

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-27 Thread Georg Brandl

Georg Brandl added the comment:

Well, IntEnum is nowhere documented as a class.  IOW,

.. class:: IntEnum

is missing if you want these references to work.

--

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



[issue20380] __defaults__ changed by *args

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Ram, those are internal attributes. I.e. it's not recommended to use them 
directly, there are better instruments for that, such as 'inspect.signature'. 
Hence, I don't think that having an example/detailed explanation here is really 
necessary.

--

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



[issue20380] __defaults__ changed by *args

2014-01-27 Thread Ram Rachum

Ram Rachum added the comment:

I take your point and I agree.

--

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



[issue20380] __defaults__ changed by *args

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fc32459495fc by Yury Selivanov in branch 'default':
doc/inspect: Clarify docs for __defaults__, add docs for __kwdefaults__ #20380
http://hg.python.org/cpython/rev/fc32459495fc

--
nosy: +python-dev

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



[issue6815] UnicodeDecodeError in os.path.expandvars

2014-01-27 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file33753/expandvars_nonascii.patch

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



[issue6815] UnicodeDecodeError in os.path.expandvars

2014-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, posixpath can be used on Windows. Here is corrected patch. Please test it 
on Windows.

--
Added file: http://bugs.python.org/file33754/expandvars_nonascii.patch

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-27 Thread Ethan Furman

Ethan Furman added the comment:

IntEnum is not a class in the socket module.

How do I make a link into another rst document?

--

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



[issue17481] inspect.getfullargspec should use __signature__

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

 There's a major difference between getfullargspec/getargspec and 
 inspect.signature: getfullargspec shows you the self parameter for bound 
 methods, and inspect.signature does not.

Larry, yes, that's correct. The attached patch simulates this behaviour, with:

if ismethod(func):
func = func.__func__

I'm attaching 'getargsspec_03.patch', as the previous one (02) was a bit 
crippled.

--
Added file: http://bugs.python.org/file33755/getargsspec_03.patch

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



[issue20356] fix formatting of positional-only parameters in inspect.Signature

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffe1d684b41e by Yury Selivanov in branch 'default':
inspect.signature: Use '/' to separate positional-only parameters from
http://hg.python.org/cpython/rev/ffe1d684b41e

--
nosy: +python-dev

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



[issue20356] fix formatting of positional-only parameters in inspect.Signature

2014-01-27 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
status: open - closed

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



[issue20411] IndexError in sys.__interactivehook__ with pyreadline installed

2014-01-27 Thread Jason R. Coombs

New submission from Jason R. Coombs:

Following the blame history, this appears to be new issue following issue5845.

I'm using Python 3.4b2 64-bit on Windows. I've installed pyreadline 2.0 using 
Setuptools 2.1. Now, when I start the interactive interpreter, I get this 
output:

 python
Python 3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan  5 2014, 16:13:26) [MSC v.1600 64 
bit (AMD64)] on win32
Type help, copyright, credits or license for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
  File c:\python\lib\site.py, line 412, in register_readline
if readline.get_history_item(1) is None:
  File 
c:\python\lib\site-packages\pyreadline-2.0-py3.4-win-amd64.egg\pyreadline\rlmain.py,
 line 154, in get_history_item
  File 
c:\python\lib\site-packages\pyreadline-2.0-py3.4-win-amd64.egg\pyreadline\lineeditor\history.py,
 line 52, in get_history_item
IndexError: list index out of range

It seems I don't yet have any history, and it seems that site.py is expecting 
get_history_item() to return None when no history is present, but the 
pyreadline 2.0 implementation does no such thing, but instead tries to index 
the history array directly, causing the IndexError.

--
components: Library (Lib)
messages: 209471
nosy: jason.coombs
priority: normal
severity: normal
status: open
title: IndexError in sys.__interactivehook__ with pyreadline installed
versions: Python 3.4

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



[issue5845] rlcompleter should be enabled automatically

2014-01-27 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Added issue20411, revealed in 3.4b2.

--
nosy: +jason.coombs

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



[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-27 Thread Serhiy Storchaka

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


--
nosy: +brian.curtin, tim.golden

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-27 Thread Georg Brandl

Georg Brandl added the comment:

IntEnum is not a class in the enum module either, as far as the docs are 
concerned ;)

Otherwise :class:`enum.IntEnum` or :class:`.IntEnum` would work, no matter the 
source and target documents.

--

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



[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-27 Thread R. David Murray

R. David Murray added the comment:

I think a python programmer is going to expect that

  join(a, b, c) == join(join(a, b), c)

so the answer to Serhiy's example should be 'c:z'.

--
nosy: +r.david.murray

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



[issue15185] Validate callbacks in 'contextlib.ExitStack.callback()'

2014-01-27 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
versions: +Python 3.5 -Python 3.4

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



[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-27 Thread Brian Curtin

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


--
nosy: +zach.ware -brian.curtin

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



[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Closing this issue. See #17481 for details.

--
resolution:  - duplicate
status: open - closed

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



[issue20412] Enum and IntEnum classes are not defined in the documentation

2014-01-27 Thread Ethan Furman

New submission from Ethan Furman:

While trying to update the socket documentation it was brought to my attention 
that Enum and IntEnum are not defined as classes as far as the docs are 
concerned [1].

[1] http://bugs.python.org/issue20386#msg209473

--
assignee: ethan.furman
messages: 209476
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: Enum and IntEnum classes are not defined in the documentation
versions: Python 3.4

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



[issue20413] Errors in documentation of standard codec error handlers

2014-01-27 Thread RalfM

New submission from RalfM:

The standard library documentation lists the standard codec error handlers in 
three places:

(a) 2. Build-in Functions, section open()
(b) 7.2 codecs - Codec registry and base classes
(c) 7.2.1 Codec Base Classes

As far as I can judge these lists, (c) looks ok, but (a) and (b) contain two 
errors:
1. 'surrogatepass' is not mentioned.
2. 'surrogateescape' is described as: 
   'on decoding, replace with code points in the Unicode Private
   Use Area ranging from U+DC80 to U+DCFF. These private code points
   will ...' 
   This is incorrect in so far as U+DC80 to U+DCFF are not private 
   code points, but (low-)surrogate code points. This is correctly
   explained in (c) and in PEP383 (and, of course, in the Unicode 
   standard, chapter 16).

I suggest to correct (a) and (b) by
* adding 'surrogatepass' with the description given in (c),
* changing the description of 'surrogateescape' to something like: 
  'on decoding, replace with surrogate code points ranging from 
  U+DC80 to U+DCFF. These surrogate code points will ...'.

These errors are present in the documentation (more precisely, the .chm files) 
of at least 
- Python 3.3.3
- Python 3.3.4rc1
- Python 3.4.0b3.

--
assignee: docs@python
components: Documentation
messages: 209477
nosy: RalfM, docs@python
priority: normal
severity: normal
status: open
title: Errors in documentation of standard codec error handlers
type: enhancement
versions: Python 3.3, Python 3.4

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



[issue20411] IndexError in sys.__interactivehook__ with pyreadline installed

2014-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Sounds reasonably easy to fix. Can you write a patch?

--
nosy: +pitrou
priority: normal - high
stage:  - needs patch
type:  - behavior

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



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-27 Thread Nick Coghlan

Nick Coghlan added the comment:

Heh, OK. I've managed to avoid learning the gory details of the zipimporter
internals so far, and the details of Windows DLL loading is the gap on the
extension module side :)

--

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



[issue20411] IndexError in sys.__interactivehook__ with pyreadline installed

2014-01-27 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Is the proper fix to address the issue in site.py? Does this issue reveal 
anything else of concern about the implementation?

Assuming Yes and No, then yes, I can put together a fix.

--

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



[issue20308] inspect.Signature doesn't support user classes without __init__ or __new__

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Larry,

Please take a look at the attached 'signature_plain_cls_04.patch'.
This one supports classes (returns signature of 'object' builtin), and 
metaclasses (returns signature of 'type' builtin).

--
Added file: http://bugs.python.org/file33756/signature_plain_cls_04.patch

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



[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6b314f5c9404 by Serhiy Storchaka in branch '2.7':
Issue #19456: ntpath.join() now joins relative paths correctly when a drive
http://hg.python.org/cpython/rev/6b314f5c9404

New changeset f4377699fd47 by Serhiy Storchaka in branch '3.3':
Issue #19456: ntpath.join() now joins relative paths correctly when a drive
http://hg.python.org/cpython/rev/f4377699fd47

New changeset 7ce464ba615a by Serhiy Storchaka in branch 'default':
Issue #19456: ntpath.join() now joins relative paths correctly when a drive
http://hg.python.org/cpython/rev/7ce464ba615a

--
nosy: +python-dev

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



[issue20411] IndexError in sys.__interactivehook__ with pyreadline installed

2014-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Is the proper fix to address the issue in site.py? Does this issue
 reveal anything else of concern about the implementation?

I don't know, but it's a regression, so we'd better add a fix or
workaround in site.py anyway.

--

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



[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed first patch (with small change, ntpath.join('c:', 'C:') now returns 
'C:').

There is yet one argument for first option: it is almost impossible (with 
current design) to implement second option in pathlib.

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

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



[issue20030] unittest.TestLoader.discover return value incorrectly documented.

2014-01-27 Thread Moritz Neeb

Changes by Moritz Neeb n...@kpvn.de:


--
nosy: +zormit

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



[issue18321] Multivolume support in tarfile module

2014-01-27 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
versions: +Python 3.5 -Python 3.4

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



[issue20223] inspect.signature does not support new functools.partialmethod

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset baedc256999a by Yury Selivanov in branch 'default':
inspect.signature: Add support for 'functools.partialmethod' #20223
http://hg.python.org/cpython/rev/baedc256999a

--
nosy: +python-dev

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



[issue20223] inspect.signature does not support new functools.partialmethod

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks for the review, Nick.
Closing the issue now.

--
resolution:  - fixed
status: open - closed

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



[issue20372] inspect.getfile should raise a TypeError if C object does not have __module__

2014-01-27 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
resolution:  - fixed

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



[issue20356] fix formatting of positional-only parameters in inspect.Signature

2014-01-27 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
resolution:  - fixed

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



[issue12296] Minor clarification in devguide

2014-01-27 Thread Moritz Neeb

Moritz Neeb added the comment:

Tried to summarize the previous discussion and generate a compromise here. 
Patch attached.

--
nosy: +zormit
Added file: http://bugs.python.org/file33757/devguide-patch.diff

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



[issue20401] inspect.signature removes initial starred method params (bug)

2014-01-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Patch is attached, please review.
Should we commit this to 3.3 too?

--
assignee:  - yselivanov
keywords: +patch
nosy: +ncoghlan
Added file: http://bugs.python.org/file33758/signature_method_first_arg_01.patch

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



[issue20308] inspect.Signature doesn't support user classes without __init__ or __new__

2014-01-27 Thread Larry Hastings

Larry Hastings added the comment:

(With a Misc/NEWS entry of course.)

--

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



[issue20308] inspect.Signature doesn't support user classes without __init__ or __new__

2014-01-27 Thread Larry Hastings

Larry Hastings added the comment:

Looks perfect!  Please check it in.

--

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



[issue20308] inspect.Signature doesn't support user classes without __init__ or __new__

2014-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9ca2019bcb9 by Yury Selivanov in branch 'default':
inspect.signature: Support classes without user-defined __init__/__new__ #20308
http://hg.python.org/cpython/rev/b9ca2019bcb9

--
nosy: +python-dev

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



[issue20308] inspect.Signature doesn't support user classes without __init__ or __new__

2014-01-27 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue20406] Use application icon for IDLE

2014-01-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There are two icon issues. First is the window icon at the left of the title 
bar of Idle windows. By the name 'wm_iconphote', I presume this is what this 
issue is about. Until recently, it *was* the red 'Tk' that is generally used 
for Tk windows. It is slightly different from idlelib/Icons/tk.gif so it must 
be in the tk code.

For 3.4.0, since the change to tcl/tk 8.6, there are two changes. First the Tk 
icon is changed to a nearly vertical blue feather. Second, when displayed on 
the window title bar (as opposed to the Windows taskbar popup listing 
application windows), it is no longer displayed on the title bar directly but 
is placed in a square brown background with a white outline. It is atrociously 
ugly. The same is used for other Tk windows. (On the Windows taskbar popup 
window listing app windows, only the feather itself appears on the overall 
light blue background.)

So I agree that we need to explicitly set the window title bar icon.  I tried 
the snake (python.gif) and like it better than the feather. It appears on a 
black square with no outline. Unlike the feather, the same is true on the 
taskbar popup. Perhaps the background is created by Windows after analyzing the 
colors in the icon. Visually, it is not much better than the red Tk, but I 
definitely think we should have a consistent Idle icon.

That particular snake is not the current Python logo and it is not Idle 
specific. Most apps (on Windows at least) use a miniture version of the app 
icon for the title bar icon. PC/py.ico is close to the Idle icon (see below) 
but is suffers when converted to py.gif (which I will attach in another 
message). The attached idle.gif is a cleaned up version of py.gif. It might be 
tweaked slightly. Or it might be redrawn from the console title bar icon, but I 
did not find the latter in the repository. In any case, I think we should add 
an idle.gif and use it in all versions. Otherwise, the patch looks good.

(The other .gifs are used in TreeWidget. Idle.icns is an Apple icon collection 
format, though I do not know if it is actually used.)

The other icon issue is the desktop and (on Windows at least) taskbar icon. 
Currently, when I first install Idle with the Windows installer, it uses the 
black console icon with Python icon in the lower right. After rebooting, it 
switches to a white spiral binder page with Python logo on the lower right. 
This seems to be specific to Idle and is appropriate as it represent the white 
Idle shell versus the black console. Once upon a time, Idle used this 'idle 
icon' when first installed, but something changed a few versions ago. There is 
another issue about this regression on the tracker.

--
versions: +Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33759/idle.gif

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



[issue20406] Use application icon for IDLE

2014-01-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For comparison.

--
Added file: http://bugs.python.org/file33760/py.gif

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



[issue7776] http.client.HTTPConnection tunneling is broken

2014-01-27 Thread Nikolaus Rath

Nikolaus Rath added the comment:

Hmm. I think I found another problem... please wait for another patch revision.

--

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



[issue3158] Doctest fails to find doctests in extension modules

2014-01-27 Thread Thomas Kluyver

Thomas Kluyver added the comment:

I think there's an issue with this change - ismethoddescriptor() doesn't 
guarantee that that the object has an __objclass__ attribute. Unbound PyQt4 
signals appear to be a case where this goes wrong.

This came up testing IPython on Python 3.4 - we subclass DocTestFinder, which 
creates other problems, but it looks like it would run into trouble even with 
the base implementation.
https://github.com/ipython/ipython/issues/4892

--
nosy: +takluyver

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



[issue20414] Python 3.4 has two Overlapped types

2014-01-27 Thread STINNER Victor

New submission from STINNER Victor:

Python 3.3 has _winapi.Overlapped. Python 3.4 _winapi.Overlapped but also 
_overlapped.Overlapped. Why do we have two implementations?

Most code looks to be duplicated.

--
components: Windows
messages: 209496
nosy: gvanrossum, haypo, pitrou, sbt
priority: normal
severity: normal
status: open
title: Python 3.4 has two Overlapped types
versions: Python 3.4

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



  1   2   >