[issue22706] Idle extension configuration and key bindings

2014-12-17 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

ZoomHeight behavior on linux is as what you mentioned. Now I have understood 
this issue. Working on it.

--

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



[issue15513] Correct __sizeof__ support for pickle

2014-12-17 Thread Serhiy Storchaka

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


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue19548] 'codecs' module docs improvements

2014-12-17 Thread Serhiy Storchaka

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


--
stage:  - needs patch
type:  - enhancement
versions: +Python 2.7, Python 3.5 -Python 3.3

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-17 Thread Nick Coghlan

Nick Coghlan added the comment:

Perhaps an API like importlib.util.locks_held() that returns a list of module 
names?

We'd then just iterate over the _module_locks() dictionary, looking for locks 
where the owner matched the current thread id (alternatively, if speed was 
critical for Guido's use case, add a separate reverse mapping from tid to locks 
held)

(Unless I've missed something, we don't run user code with the global import 
lock held any more)

--

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



[issue20121] quopri_codec newline handling

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

RFC 1521 says that a text newline should be encoded as CRLF, and that any 
combination of 0x0D and 0x0A bytes that do not represent newlines should be 
encoded like other control characters as =0D and =0A.

Since in Python 3 the codec outputs bytes, I don’t think there is any excuse 
for it to be outputting plain CR or LF bytes. The question is, do they 
represent newlines to be encoded as CRLF, or just data bytes that need ordinary 
encoding.

--
nosy: +vadmium
versions: +Python 3.4

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



[issue22038] Implement atomic operations on non-x86 platforms

2014-12-17 Thread Gustavo Frederico Temple Pedrosa

Gustavo Frederico Temple Pedrosa added the comment:

ping

--
nosy: +gustavotemple

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



[issue20121] quopri_codec newline handling

2014-12-17 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

I agree with Vajrasky: a patch for the documentation would probably be a good 
idea.

Note that mixing line end conventions in a single text is never a good idea. If 
you stick to one line end convention, there's no problem with the codec, AFAICT.

 codecs.encode(b'\r\n\r\n', 'quopri_codec')
b'\r\n\r\n'
 codecs.decode(_, 'quopri_codec')
b'\r\n\r\n'
 codecs.encode(b'\n\n', 'quopri_codec')
b'\n\n'
 codecs.decode(_, 'quopri_codec')
b'\n\n'

--
nosy: +lemburg

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



[issue22919] Update PCBuild for VS 2015

2014-12-17 Thread Trent Nelson

Changes by Trent Nelson tr...@snakebite.org:


--
nosy: +trent

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



[issue23070] Error in Tutorial comment

2014-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 81c73f964066 by Berker Peksag in branch '3.4':
Issue #23070: Fix a comment in the tutorial.
https://hg.python.org/cpython/rev/81c73f964066

New changeset 81e2f58d9e4b by Berker Peksag in branch 'default':
Issue #23070: Fix a comment in the tutorial.
https://hg.python.org/cpython/rev/81e2f58d9e4b

--
nosy: +python-dev

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



[issue23070] Error in Tutorial comment

2014-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8cd84e62c1fd by Berker Peksag in branch '2.7':
Issue #23070: Fix a comment in the tutorial.
https://hg.python.org/cpython/rev/8cd84e62c1fd

--

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



[issue23070] Error in Tutorial comment

2014-12-17 Thread Berker Peksag

Berker Peksag added the comment:

Fixed. Thanks for the report, Ross.

--
nosy: +berker.peksag
resolution:  - fixed
stage:  - resolved
status: open - closed
type:  - behavior
versions: +Python 2.7, Python 3.5

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



[issue22733] MSVC ffi_prep_args doesn't handle 64-bit arguments properly

2014-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4c81b1846e14 by Steve Dower in branch 'default':
Issue #22733: MSVC ffi_prep_args doesn't handle 64-bit arguments properly
https://hg.python.org/cpython/rev/4c81b1846e14

--
nosy: +python-dev

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-17 Thread Eric Snow

Eric Snow added the comment:

 (Unless I've missed something, we don't run user code with the global
import lock held any more)

Ah.  You are correct.

--

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



[issue22733] MSVC ffi_prep_args doesn't handle 64-bit arguments properly

2014-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 24f4569a1308 by Steve Dower in branch 'default':
Issue #22733: Added NEWS item
https://hg.python.org/cpython/rev/24f4569a1308

--

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



[issue23060] Assert fails in multiprocessing.heap.Arena.__setstate__ on Windows

2014-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1794d754ff3c by Steve Dower in branch 'default':
Issue #23060: Suppresses a multiprocessing assert that fails incorrectly
https://hg.python.org/cpython/rev/1794d754ff3c

--
nosy: +python-dev

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



[issue22733] MSVC ffi_prep_args doesn't handle 64-bit arguments properly

2014-12-17 Thread Steve Dower

Changes by Steve Dower steve.do...@microsoft.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23060] Assert fails in multiprocessing.heap.Arena.__setstate__ on Windows

2014-12-17 Thread Steve Dower

Steve Dower added the comment:

I've commented out the assertion for now with a comment pointing to this issue, 
so that'll keep the buildbots running while we figure out how to deal with this 
properly.

--

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



[issue23065] Pyhton27.dll at SysWOW64 not updated when updating Python 2.7.X

2014-12-17 Thread Steve Dower

Steve Dower added the comment:

When you say 2.7.X, which version are you installing and which version did 
you have installed?

--

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-17 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh. I'd forgotten the PY3 situation is completely different from the PY2
situation. We're still stuck here in PY2 land where there's just the one
import lock. I guess not even ctypes can help us find out whether the
current thread is holding the import lock (which is the condition we're
trying to test for so we can print the warning). Our current hack is to
check lock_held() and if it is held wait for up to 5 second (in 10 msec
increments) to see if it goes away -- if it doesn't go away it would seem
we are holding it in the current thread and then we fail with a rude
assert. If it does go away within that time we assume some other thread was
doing some lazy importing and we hope they'll be done soon because the
whole world is waiting for them.

On Wed, Dec 17, 2014 at 6:36 AM, Eric Snow rep...@bugs.python.org wrote:


 Eric Snow added the comment:

  (Unless I've missed something, we don't run user code with the global
 import lock held any more)

 Ah.  You are correct.

 --

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


--

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



[issue16991] Add OrderedDict written in C

2014-12-17 Thread Wes Turner

Wes Turner added the comment:

* Macros could be useful.
* Would this make it easy/faster to also have a DefaultOrderedDict (which 
can/could also be accomplished with .get(attr, []) and .setdefault(attr, [])?
* There may be some value in looking at 
https://pypi.python.org/pypi/cyordereddict
* (I'm really not qualified to review this. Valgrind?)

--
nosy: +westurner

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



[issue20121] quopri_codec newline handling

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Okay so maybe the documentation should include these restrictions on encoding:

* The data being encoded should only include \r or \n bytes that are part of \n 
or \r\n newline sequences. Encoding arbitrary non-text data is not supported.
* The two kinds of newlines should not be mixed
* If \n is used for newlines in the input, the encoder will output \n newlines, 
and they will need converting to CRLF in a later step to conform to the RFC

--

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



[issue20121] quopri_codec newline handling

2014-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Pure Python implementation returns different result.

 import quopri
 quopri.encodestring(b'\r\n')
b'\r\n'
 quopri.a2b_qp = quopri.b2a_qp = None
 quopri.encodestring(b'\r\n')
b'=0D\n'

See also issue18022.

--
nosy: +serhiy.storchaka

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



[issue16991] Add OrderedDict written in C

2014-12-17 Thread Eric Snow

Eric Snow added the comment:

Suggestions from Antoine on python-dev:

* do not make cOrderedDict builtin; drop changes to:
  - Include/Python.h
  - Objects/object.c
  - Makefile.pre.in
* do not add a C-API
* include the linked list pointers in the hash entries? (may simplify things)
* drop the shared/split keys mechanism?
* do not subclass dict? (can of worms)

--

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



[issue23073] Broken turtle example in Cmd documentation

2014-12-17 Thread bbc

New submission from bbc:

The documentation page for the cmd module contains an example with the turtle 
module:

https://docs.python.org/3.4/library/cmd.html#cmd-example

It seems like the turtle module has changed quite a bit since the code was 
written, and exposes a Pen class instead of all the various movement functions. 
 The example, while still useful, cannot be executed as is.

I like the example and would be happy to provide an idiomatic replacement if 
you think this is necessary.

--
assignee: docs@python
components: Documentation
messages: 232829
nosy: bbc, docs@python
priority: normal
severity: normal
status: open
title: Broken turtle example in Cmd documentation
type: behavior
versions: Python 3.4

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



[issue23074] asyncio: get_event_loop() must always raise an exception, even when assertions are disabled by -O

2014-12-17 Thread STINNER Victor

New submission from STINNER Victor:

Spinoff of the issue #22926: asyncio.get_event_loop() must always raise an 
exception, even when assertions are disabled by -O.

Attached patch implements this suggestion.

--
components: asyncio
files: get_event_loop.patch
keywords: patch
messages: 232830
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: get_event_loop() must always raise an exception, even when 
assertions are disabled by -O
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37482/get_event_loop.patch

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-17 Thread Nick Coghlan

Nick Coghlan added the comment:

Looking at the implementation of PyImport_ImportModuleNoBlock, you should be 
able to invoke that via ctypes with a nonsense module name to probe for whether 
or not the current thread has the import lock.

A call like 'PyImport_ImportModuleNoBlock(this-is-not-a-legal-module-name)' 
will always fail with ImportError, but the exception message will be different 
if another thread holds the import lock. Specifically, it will end with 
because the import lock is held by another thread.

--

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-17 Thread Nick Coghlan

Nick Coghlan added the comment:

You'd still need to check lock_held() to see if *some* thread is holding the 
import lock. The non-blocking import API should then let you determine if that 
thread is the current one.

--

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



[issue22926] asyncio: raise an exception when called from the wrong thread

2014-12-17 Thread STINNER Victor

STINNER Victor added the comment:

Guido So in order to do correct diagnostics here we would have to add an 
owning
thread pointer to every event loop;

I didn't understand why this approach was not taken when the check was 
introduced. I was surprised that get_event_loop() was used for the check 
instead.

Here is a patch checking the thread using threading.get_ident(). The check 
still works when set_event_loop(None) is used in unit tests.

I created the issue #23074 for the change: get_event_loop() must always raise 
an exception, even when assertions are disabled by -O.

--

asyncio requires thread support, it is already the case without my patch. For 
example, the event loop policy uses threading.Local.

In the aioeventlet project, call_soon() writes a byte in the self pipe (to wake 
up the selector) if the selector is waiting for events; call_soon() is green 
thread safe. It is less efficient than calling forcing users to call 
explicitly call_soon_threadsafe(), but aioeventlet is written to be compatible 
with asyncio and eventlet, while these projects are very different.

In the aiogevent and aioeventlet projects, I also store the current greenlet, 
but for a different purpose: ensure that yield_future() is not called in the 
greenlet running the event loop, which would blocking.

--
Added file: http://bugs.python.org/file37483/check_thread.patch

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



[issue23073] Broken turtle example in Cmd documentation

2014-12-17 Thread Ethan Furman

Ethan Furman added the comment:

Please do!  Working examples are better than non-working ones.  :)

--
nosy: +ethan.furman

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



[issue23073] Broken turtle example in Cmd documentation

2014-12-17 Thread Ethan Furman

Ethan Furman added the comment:

While you're at it, could you also sign the contributors' license agreement?

https://www.python.org/psf/contrib/contrib-form/

--

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



[issue22038] Implement atomic operations on non-x86 platforms

2014-12-17 Thread STINNER Victor

STINNER Victor added the comment:

Fedora 20 provides GCC 4.7 but no stdatomic.c: HAVE_BUILTIN_ATOMIC set 
(HAVE_STD_ATOMIC unset).

Fedora 21 provides GCC 4.9 with stdatomic.c: HAVE_BUILTIN_ATOMIC and 
HAVE_STD_ATOMIC are set.

I tested atomicv2.patch on Fedora 20 (x86_64) and Fedora 21 (x86_64): the whole 
test suite pass.

--

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-17 Thread Guido van Rossum

Guido van Rossum added the comment:

Interesting. The Dropbox server team thanks you for the suggestion!

--

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



[issue23075] Mock backport in 2.7 relies on implementation defined behavior

2014-12-17 Thread Alex Gaynor

New submission from Alex Gaynor:

Whether __builtins__ is a module or a dict is undefined in CPython. Use the 
reliably well defined `import __builtin__` instead.

--
components: Library (Lib)
files: mock-backport.diff
keywords: patch
messages: 232838
nosy: alex, benjamin.peterson, dstufft
priority: normal
severity: normal
status: open
title: Mock backport in 2.7 relies on implementation defined behavior
versions: Python 2.7
Added file: http://bugs.python.org/file37484/mock-backport.diff

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



[issue22038] Implement atomic operations on non-x86 platforms

2014-12-17 Thread STINNER Victor

STINNER Victor added the comment:

atomicv2.patch:
 _Atomic int _value;

Why not using the atomic_int type from stdatomic.h here?

 https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

__atomic_store_n(): The valid memory model variants are __ATOMIC_RELAXED, 
__ATOMIC_SEQ_CST, and __ATOMIC_RELEASE.

I understand that _Py_atomic_store_explicit() only accept some values for 
order. An assertion should be added here, maybe for any implementation. 
Something like:

#define _Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, ORDER) \
(assert((ORDER) == __ATOMIC_RELAXED   \
|| (ORDER) == __ATOMIC_SEQ_CST\
|| (ORDER) == __ATOMIC_RELEASE),  \
 __atomic_store_n((ATOMIC_VAL)-_value, NEW_VAL, ORDER))

Same remark for _Py_atomic_load_explicit():

__atomic_load_n(): The valid memory model variants are __ATOMIC_RELAXED, 
__ATOMIC_SEQ_CST, __ATOMIC_ACQUIRE, and __ATOMIC_CONSUME.

--

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



[issue21071] struct.Struct.format is bytes, but should be str

2014-12-17 Thread STINNER Victor

STINNER Victor added the comment:

 It would be backwards incompatible to change, though.

I'm in favor of breaking the compatibility with Python 3.4 and return the 
format as an Unicode string.

--
nosy: +haypo

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



[issue21619] Cleaning up a subprocess with a broken pipe

2014-12-17 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue23076] path.glob() fails with IndexError

2014-12-17 Thread Antony Lee

New submission from Antony Lee:

glob.glob returns an empty list when passed an empty pattern as argument, but 
pathlib's Path.glob fails with IndexError.  The first option seems more 
reasonable (or at least it should be a ValueError).

--
components: Library (Lib)
messages: 232841
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: path.glob() fails with IndexError
versions: Python 3.4

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



[issue23077] PEP 1: Allow Provisional status for PEPs

2014-12-17 Thread Nick Coghlan

New submission from Nick Coghlan:

As per python-dev discussion [1], filing this as the home for a proposed update 
to PEP 1 that allows Standards Track PEPs to be granted Provisional status 
before moving on to Accepted/Final.

The new status will be for PEPs where we want to release an initial reference 
implementation (whether in CPython under PEP 411 or through the PyPA toolchain) 
before locking down the exact details of the API specification.

[1] https://mail.python.org/pipermail/python-dev/2014-December/137622.html

--
assignee: ncoghlan
messages: 232842
nosy: Jeremy.Hylton, barry, goodger, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: PEP 1: Allow Provisional status for PEPs
type: enhancement

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



[issue21071] struct.Struct.format is bytes, but should be str

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

I originally assumed it would be a text string from the existing documentation, 
so changing the behaviour to match also seems reasonable

--

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



[issue23074] asyncio: get_event_loop() must always raise an exception, even when assertions are disabled by -O

2014-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b4dce0e695df by Victor Stinner in branch '3.4':
Issue #23074: asyncio.get_event_loop() now raises an exception if the thread
https://hg.python.org/cpython/rev/b4dce0e695df

--
nosy: +python-dev

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



[issue23074] asyncio: get_event_loop() must always raise an exception, even when assertions are disabled by -O

2014-12-17 Thread STINNER Victor

STINNER Victor added the comment:

Change applied to Python 3.4, 3.5 and Tulip (c6115bc83acc).

Thanks for the review Guido.

--
resolution:  - fixed
status: open - closed

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



[issue23074] asyncio: get_event_loop() must always raise an exception, even when assertions are disabled by -O

2014-12-17 Thread STINNER Victor

STINNER Victor added the comment:

I also updated aiotest test suite:
https://bitbucket.org/haypo/aiotest/commits/d6f544a16a8f55729268d8d4b8d864d1b0af2d12

--

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



[issue23073] Broken turtle example in Cmd documentation

2014-12-17 Thread bbc

bbc added the comment:

It turns out the script is fine.  I could have investigated it more thoroughly 
at first if I had more carefully read the docs for turtle.

I thought those functions were not exposed because they were reportedly not 
found after I copy-pasted, executed the example script and entered commands.  
The reason was my file was named turtle.py.

Sorry for the noise.

--

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



[issue23073] Broken turtle example in Cmd documentation

2014-12-17 Thread Ethan Furman

Ethan Furman added the comment:

No worries, thanks for following up.

--
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue19548] 'codecs' module docs improvements

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Here is a patch addressing many of the points raised. Please have a look and 
give any feedback. Beware I am not very familiar with the Restructured Text 
markup and haven’t tried compiling it.

1. Mentioned bytes-to-bytes and text-to-text in general right at the top. Any 
APIs (e.g. see Issue 20132) that don't support them should be pointed out as 
exceptions to the rule.

8. The underlying mode is forced to binary, so 'r' is the same as 'rb'. I 
removed the 'b' from the signature for clarity.

## Jan’s points not yet addressed: ##

3. I expect the built-in open() function would already be much more obvious and 
advertised, so I didn't add any cross-reference from codecs.open().

5. Both points still need addressing:
  * Lack of requirement for implementing incremental codecs
  * Responsibility of implementing error handlers

9. First point left unaddressed:
  * register_error() error_handler replacement data type (unsure of details)

## Numbering Nick’s points: ##

12. Codec name normalization: Not addressed; what should be written?

[13. Registration not reversible: Added in patch]

[14. Added CodecInfo class, pulling out some existing details from register().]

15. “encodings” module: not done

16. Import system: not done

## My (Martin’s) point: ##

[17. IncrementalEncoder.reset(): done]

## Zoinkity’s points, not addressed: ##

18. Multibyte codecs

19. register() usage example

## Some new points of my own that need fixing: ##

20. The doc string for register() says the search function is also allowed to 
return a tuple of functions, but the reference manual does not mention this. 
Which is more accurate? (I notice CodecInfo is a subclass of “tuple”.)

21. EncodedFile() seems to return StreamRecoder instances. Perhaps move them 
closer together? Should probably warn that EncodedFile's data_encoding is 
handled by a stateless codec.

22. The Codec.encode() and decode() methods return a length consumed, but I 
suspect they have to consume everything they are supplied because the code I 
have seen ignores this return value.

--
keywords: +patch
Added file: http://bugs.python.org/file37485/codecs-doc.patch

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



[issue20132] Many incremental codecs don’t handle fragmented data

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

The “unicode-escape” and “utf-7” cases affect the more widely-used 
TextIOWrapper interface:

 TextIOWrapper(BytesIO(br\u2013 * 2000), unicode-escape).read(1)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python3.4/encodings/unicode_escape.py, line 26, in decode
return codecs.unicode_escape_decode(input, self.errors)[0]
UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 
8190-8191: truncated \u escape
 w = TextIOWrapper(BytesIO(), utf-7)
 w.writelines(\xA9\xA9)  # Write one character at a time
 w.detach().getvalue()
b'+AKk-+AKk-'
 r = TextIOWrapper(BytesIO(b+ + b * 10 + b-), utf-7)
 r.read(1)  # Short delay as all 800 kB are decoded to read one character
'\x00'
 r.buffer.tell()
82

For UTF-7 decoding to work optimally I think the amount of data buffering 
necessary would be limited to only a few bytes.

--

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



[issue19539] The 'raw_unicode_escape' codec buggy + not appropriate for Python 3.x

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

I included the proposed doc fix in my patch for Issue 19548

--
nosy: +vadmium

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



[issue19548] 'codecs' module docs improvements

2014-12-17 Thread Berker Peksag

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


--
nosy: +berker.peksag
stage: needs patch - patch review

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



[issue23071] codecs.__all__ incomplete

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Here is the patch (against the default branch)

--
keywords: +patch
Added file: http://bugs.python.org/file37486/codecs-all.patch

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



[issue23062] test_argparse --version test cases

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Patch looks sensible enough to me

--

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



[issue23071] codecs.__all__ incomplete

2014-12-17 Thread Berker Peksag

Berker Peksag added the comment:

Thanks! Could you also add a test? See PublicAPITests in 
Lib/test/test_shutil.py as an example.

--
stage: needs patch - patch review

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



[issue21279] str.translate documentation incomplete

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Here is a new patch based on John’s suggestion

--
Added file: http://bugs.python.org/file37487/issue21279.patch

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



[issue23076] path.glob() fails with IndexError

2014-12-17 Thread liu chang

liu chang added the comment:

In[6]: pathlib.Path.glob()
Traceback (most recent call last):
  File 
/home/liuchang/ENV3/lib/python3.4/site-packages/IPython/core/interactiveshell.py,
 line 2883, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
  File ipython-input-6-a6dcf250fe73, line 1, in module
pathlib.Path.glob()
TypeError: glob() missing 1 required positional argument: 'pattern'

the version of my python is 3.4。
I got a TypeError, No IndexError。

--
nosy: +liu chang

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



[issue21071] struct.Struct.format is bytes, but should be str

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Here is a patch that changes over to a str() type.

Is it safe to assume PyUnicode_AsUTF8() is null-terminated (like 
PyBytes_AS_STRING() is)? My documentation doesn’t say.

--
Added file: http://bugs.python.org/file37488/format-str.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21071
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://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

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Assuming it is intended to support byte strings, here is a patch that documents 
them being allowed, and adds a test case

--
keywords: +patch
Added file: http://bugs.python.org/file37489/format-bytes.patch

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



[issue23065] Pyhton27.dll at SysWOW64 not updated when updating Python 2.7.X

2014-12-17 Thread GamesGamble

GamesGamble added the comment:

2.7.7 was installed and I has installed 2.7.8 and 2.7.8 was installed and then 
I has installed 2.7.9.

--

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

Here is another patch that removes the method instead, as suggested in the 
review

--
Added file: http://bugs.python.org/file37490/doctype-remove.patch

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



[issue23071] codecs.__all__ incomplete

2014-12-17 Thread Martin Panter

Martin Panter added the comment:

This patch includes a new test; although this kind of testing won’t detect when 
someone adds a new API and forgets to add it to __all__.

--
Added file: http://bugs.python.org/file37491/codecs-all.patch

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2014-12-17 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

doctype-remove.patch is acceptable for both 3.4 and 3.5 or only 3.5?
If only 3.5, then please apply inherit-doctype.patch in 3.4.

--

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