[issue5319] stdout error at interpreter shutdown fails to return OS error status

2014-12-20 Thread Martin Panter

Martin Panter added the comment:

Here is a patch that changes Py_Finalize() to return -1 on error, and then sets 
the exit status to 1. It did not introduce any failures in the test suite for 
me. However I suspect it deserves more consideration about backwards 
compatibility etc, which is beyond my knowledge.

--
Added file: http://bugs.python.org/file37513/finalize-error.patch

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



[issue22896] Don't use PyObject_As*Buffer() functions

2014-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is simplified patch. _PyBuffer_Converter() and simple_buffer converter 
are gone. Fixed few leaks found by Martin. Fixed potential crash in ctypes. 
Fixed minor bugs and cleaned up ctypes tests for from_buffer().

--

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



[issue22896] Don't use PyObject_As*Buffer() functions

2014-12-20 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file37514/buffers_3.patch

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



[issue23090] fix test_doctest relying on refcounting to close files

2014-12-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

See also issue22831.

--
nosy: +serhiy.storchaka

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



[issue22671] Typo in class io.BufferedIOBase docs

2014-12-20 Thread Martin Panter

Martin Panter added the comment:

The documentation was technically correct but too scanty. RawIOBase.read(-1) 
does defer to readall(), but with a proper size passed, it defers to readinto() 
instead. Here is a patch which hopefully clarifies this, and also explains 
which methods have a usable default implementation. Includes some tests for 
RawIOBase and BufferedIOBase which didn’t seem to be there already.

--
keywords: +patch
nosy: +vadmium
Added file: http://bugs.python.org/file37515/read-defaults.patch

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



[issue23093] repr() on detached stream objects fails

2014-12-20 Thread Martin Panter

New submission from Martin Panter:

Patch to fix the underlying issue I mentioned in msg230955. After calling 
detach() on one of the BufferedIOBase wrappers or a TextIOWrapper, most 
operations will raise an exception. My patch ensures the following operations 
are still usable, because they are documented and it doesn’t make sense to 
disable them:

repr(stream)
stream.encoding
stream.errors
stream.line_buffering

--
components: IO
files: detach-indep.patch
keywords: patch
messages: 232971
nosy: vadmium
priority: normal
severity: normal
status: open
title: repr() on detached stream objects fails
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file37516/detach-indep.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23093
___
___
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-20 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

___
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



[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6491d91d59a by Serhiy Storchaka in branch '2.7':
Issue #23071: Added missing names to codecs.__all__.  Patch by Martin Panter.
https://hg.python.org/cpython/rev/c6491d91d59a

New changeset 2b642f2ca391 by Serhiy Storchaka in branch '3.4':
Issue #23071: Added missing names to codecs.__all__.  Patch by Martin Panter.
https://hg.python.org/cpython/rev/2b642f2ca391

New changeset 73086376ed3c by Serhiy Storchaka in branch 'default':
Issue #23071: Added missing names to codecs.__all__.  Patch by Martin Panter.
https://hg.python.org/cpython/rev/73086376ed3c

--
nosy: +python-dev

___
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



[issue23093] repr() on detached stream objects fails

2014-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The issue is still here.

 f = open('/dev/null')
 f
_io.TextIOWrapper name='/dev/null' mode='r' encoding='UTF-8'
 f.buffer.detach()
_io.FileIO name='/dev/null' mode='rb' closefd=True
 f
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: raw stream has been detached

Python implementation works.

 import _pyio
 f = _pyio.open('/dev/null')
 f
_pyio.TextIOWrapper name='/dev/null' mode='r' encoding='UTF-8'
 f.buffer.detach()
_io.FileIO name='/dev/null' mode='rb' closefd=True
 f
_pyio.TextIOWrapper mode='r' encoding='UTF-8'
 f = _pyio.open('/dev/null')
 f.detach()
_pyio.BufferedReader name='/dev/null'
 f
_pyio.TextIOWrapper mode='r' encoding='UTF-8'
 f = _pyio.open('/dev/null', 'rb')
 f
_pyio.BufferedReader name='/dev/null'
 f.detach()
_io.FileIO name='/dev/null' mode='rb' closefd=True
 f
_pyio.BufferedReader

I would be good to make Python and C implementation match.

--
nosy: +benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach
stage:  - patch review
versions: +Python 2.7, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23093
___
___
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-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your patch Martin.

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

___
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



[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Berker Peksag

Berker Peksag added the comment:

In 3.4, namereplace_errors needs to be removed in the test:

https://hg.python.org/cpython/rev/2b642f2ca391#l2.17

==
FAIL: test_all (test.test_codecs.CodecsModuleTest)
--
Traceback (most recent call last):
  File 
/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/test_codecs.py, 
line 1668, in test_all
self.assertCountEqual(api, codecs.__all__)
AssertionError: Element counts were not equal:
First has 1, Second has 0:  'namereplace_errors'

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4/builds/645/steps/test/logs/stdio

--

___
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



[issue22350] nntplib file write failure causes exception from QUIT command

2014-12-20 Thread Serhiy Storchaka

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


--
nosy: +pitrou
stage:  - patch review
type:  - behavior
versions: +Python 2.7, Python 3.5

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

Roundup Robot added the comment:

New changeset 1ab04bcd03bf by Serhiy Storchaka in branch '3.4':
Issue #23071: namereplace_errors was added only in 3.5.
https://hg.python.org/cpython/rev/1ab04bcd03bf

--

___
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



[issue23071] codecs.__all__ incomplete

2014-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Hmm, I have no ideas how I missed this when ran tests. Thank you Berker.

--

___
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



[issue17530] pprint could use line continuation for long bytes literals

2014-12-20 Thread Serhiy Storchaka

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


--
dependencies: +pprint doesn't use all width, pprint produces invalid output for 
long strings
versions: +Python 3.5 -Python 3.4

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



[issue19104] pprint produces invalid output for long strings

2014-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 872f048f0403 by Serhiy Storchaka in branch '3.4':
Issue #19104: pprint now produces evaluable output for wrapped strings.
https://hg.python.org/cpython/rev/872f048f0403

New changeset 4d3066d4a5df by Serhiy Storchaka in branch 'default':
Issue #19104: pprint now produces evaluable output for wrapped strings.
https://hg.python.org/cpython/rev/4d3066d4a5df

--
nosy: +python-dev

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



[issue1763] Get path to shell/known folders on Windows

2014-12-20 Thread Jason R. Coombs

Jason R. Coombs added the comment:

+1 from me for supporting this functionality in Python natively.

I tried winpaths but it doesn't yet support Python 3. I've e-mailed the author 
so it might be considered for a future release.

--
nosy: +jason.coombs

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



[issue23090] fix test_doctest relying on refcounting to close files

2014-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f00412d32b41 by Benjamin Peterson in branch '2.7':
explicitly close files (closes #23090)
https://hg.python.org/cpython/rev/f00412d32b41

--
nosy: +python-dev
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue19104] pprint produces invalid output for long strings

2014-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Antoine for your review.

--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue19105] pprint doesn't use all width

2014-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Resolved conflicts with issue19104.

--
Added file: http://bugs.python.org/file37517/pprint_all_width_3.patch

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



[issue1763] Get path to shell/known folders on Windows

2014-12-20 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue23093] repr() on detached stream objects fails

2014-12-20 Thread Martin Panter

Martin Panter added the comment:

Damn, detaching the intermediate buffered stream is a bit more awkward. The 
difference between the “io” and “_pyio” implementations boils down to:

* io.BufferedReader/Writer/RWPair.name properties raise a ValueError if the 
stream is detached
* _pyio._BufferedIOMixin.name property returns “self.raw.name”. When detached, 
“self.raw” is None, so this causes an AttributeError.

This is significant because io.TextIOWrapper.__repr__() only handles 
AttributeError when accessing “self.buffer.name”. The best option that I can 
think of to fix this is to make all the repr() implementations handle this 
ValueError exception.

--

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



[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string

2014-12-20 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-20 Thread CensoredUsername

New submission from CensoredUsername:

If a pickle frame ends at the end of a pickle._Unframer.readline() call then an 
UnpicklingError(pickle exhausted before end of frame) will unconditionally be 
raised due to a faulty check if the frame ended before the line ended.

It concerns this conditional in pickle._Unframer.readline, line 245 in 
pickle.py:

if data[-1] != b'\n':
raise UnpicklingError(
pickle exhausted before end of frame)

This comparison will always evaluate to True even if data ends in a newline. 
This is caused by data being a bytes object, and such data[-1] will evaluate to 
10 in case of data ending in a newline. 10 != b'\n' will then always evaluate 
to True due to the type mismatch, and the UnpicklingError will be raised.

This error can be corrected by slicing an actual one character bytes object 
like:

if data[-1:] != b'\n':
raise UnpicklingError(
pickle exhausted before end of frame)

Or by comparing against the numeric representation of b'\n':

if data[-1] != b'\n'[0]:
raise UnpicklingError(
pickle exhausted before end of frame)

--
messages: 232984
nosy: CensoredUsername
priority: normal
severity: normal
status: open
title: Unpickler failing with PicklingError at frame end on readline due to a 
broken comparison
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23094
___
___
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-20 Thread STINNER Victor

STINNER Victor added the comment:

Rebased patch which now always check the thread, even in release mode.

Summary of the current version of the patch (check_thread-2.patch):

- call_soon/call_at now checks if they are called from the thread running the 
event loop
- the check is only done when the event loop in running
- the check is always done, in relase and debug mode (we may only do it in 
release mode if you consider that the overhead is too high, see benchmark 
numbers below)
- add a unit test for the thread check
- since the check is only done when the event loop in running, we don't need 
the hack to avoid the thread check in the proactor event loop, for 
self._call_soon(self._loop_self_reading, ())
- replace the _running attribute with a new _owner attribute in BaseEventLoop


 Victor, can you benchmark this?

Here is a benchmark for call_soon(): bench_call_soon.py. It computes the 
performance of one call to call_soon() in average. It uses 10,000 iterations, 
the test is run 5 times and the minimum timing is displayed.

Since a call to traceback.extract_stack() takes more than 65 us, whereas a call 
to call_soon() in release mode takes 2.8 us, I removed the call in Handle 
constructor for the benchmark to focus on the thread check.

- asyncio without extract_stack(), in release mode: 2491 ns per call
- asyncio without extract_stack(), in debug mode: 3588 ns per call (1.4x 
slower, +1097 ns)
- asyncio without extract_stack(), with check_thread-2.patch: 2721 ns per call 
(1.1x slower, +230 ns)

The overhead of check_thread-2.patch is +230 ns (1.1x slower) per call to 
call_soon().

Do you consider that the overhead is low enough to run the check even in 
release mode?

At least on Linux, threading.get_ident() is not a system call. Performances may 
be different on other platforms (ex: BSD, Windows).

In check_thread-2.patch, I inlined the thread check directly in call_at() and 
call_soon(). For performance, but also because the check only takes 2 lines, 
and so the error message can contain the function name (call_soon/call_at).

--
Added file: http://bugs.python.org/file37518/check_thread-2.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



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

2014-12-20 Thread STINNER Victor

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


Added file: http://bugs.python.org/file37519/bench_call_soon.py

___
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



[issue22585] os.urandom() should use getentropy() of OpenBSD 5.6

2014-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75ede5bec8db by Victor Stinner in branch 'default':
Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
https://hg.python.org/cpython/rev/75ede5bec8db

--
nosy: +python-dev

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



[issue22585] os.urandom() should use getentropy() of OpenBSD 5.6

2014-12-20 Thread STINNER Victor

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


--
resolution:  - fixed
status: open - closed

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



[issue23095] asyncio: race condition in the IOCP code (proactor event loop)

2014-12-20 Thread STINNER Victor

New submission from STINNER Victor:

On Windows using the IOCP (proactor) event loop, I noticed race conditions when 
running the test suite of Trollius. For examples, sometimes the returncode of a 
process is None, which should never happen. It looks like wait_for_handle() has 
an invalid behaviour.

When I run the test suite of asyncio in debug mode (PYTHONASYNCIODEBUG=1), 
sometimes I see the message GetQueuedCompletionStatus() returned an unexpected 
event which should never occur neither.

I added debug traces. I saw that the IocpProactor.wait_for_handle() calls later 
PostQueuedCompletionStatus() through its internal C callback 
(PostToQueueCallback). It looks like sometimes the callback is called whereas 
the wait was cancelled/acked with UnregisterWait().

I didn't understand the logic between RegisterWaitForSingleObject(), 
UnregisterWait() and the callback.

It looks like sometimes the overlapped object created in Python (ov = 
_overlapped.Overlapped(NULL)) is destroyed, before PostToQueueCallback() was 
called. In the unit tests, it doesn't crash because a different overlapped 
object is created and it gets the same memory address (probably because we are 
lucky!).

The current implementation of wait_for_handle() has an optimization: it polls 
immediatly the wait to check if it already completed. I tried to remove it, but 
I got some different issues. If I understood correctly, this optimization hides 
other bugs and reduce the probability of getting the race condition.

wait_for_handle() in used to wait for the completion of a subprocess, so by all 
unit tests running subprocesses, but also in test_wait_for_handle() and 
test_wait_for_handle_cancel() tests. I suspect that running 
test_wait_for_handle() or test_wait_for_handle_cancel() schedule the bug.

Note: Removing _winapi.CloseHandle(self._iocp) in IocpProactor.close() works 
around the bug. The bug looks to be an expected call to PostToQueueCallback() 
which calls PostQueuedCompletionStatus() on an IOCP. Not closing the IOCP means 
using a different IOCP for each test, so the unexpected call to 
PostQueuedCompletionStatus() has no effect on following tests.

--

I rewrote some parts of the IOCP code in asyncio. Maybe I introduced this issue 
during the refactoring. Maybe it already existed before but nobody noticed it, 
asyncio had fewer unit tests before.

At the beginning, I wanted to fix this crash:
https://code.google.com/p/tulip/issues/detail?id=195
_WaitHandleFuture.cancel() crash if the wait event was already unregistered

Later, I tried to make the code more reliable in this issue:
https://code.google.com/p/tulip/issues/detail?id=196
_OverlappedFuture.set_result() should clear the its reference to the 
overlapped object

Read Trollius 1.0.1 changelog which lists these changes:
http://trollius.readthedocs.org/changelog.html#version-1-0-1

--

Note: The IOCP code still has code which can be enhanced:

- Investigate IocpProactor.accept_pipe() special case (don't register 
overlapped)
  https://code.google.com/p/tulip/issues/detail?id=204

- Rewrite IocpProactor.connect_pipe() with non-blocking calls to avoid non 
interruptible QueueUserWorkItem()
  https://code.google.com/p/tulip/issues/detail?id=197

--
components: Windows, asyncio
messages: 232987
nosy: gvanrossum, haypo, steve.dower, tim.golden, yselivanov, zach.ware
priority: normal
severity: normal
status: open
title: asyncio: race condition in the IOCP code (proactor event loop)
versions: Python 3.4, Python 3.5

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



[issue23095] asyncio: race condition in IocpProactor.wait_for_handle()

2014-12-20 Thread STINNER Victor

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


--
title: asyncio: race condition in the IOCP code (proactor event loop) - 
asyncio: race condition in IocpProactor.wait_for_handle()

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



[issue12600] Add example of using load_tests to parameterise Test Cases

2014-12-20 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue7897] Support parametrized tests in unittest

2014-12-20 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue22673] document the special features (eg: fdclose=False) of the standard streams

2014-12-20 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue23095] asyncio: race condition in IocpProactor.wait_for_handle()

2014-12-20 Thread Antoine Pitrou

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


--
nosy: +sbt

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



[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the report. Do you have actual data that can exhibit the problem?

--
nosy: +pitrou, serhiy.storchaka
versions: +Python 3.5

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




[issue19051] Unify buffered readers

2014-12-20 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue12053] Add prefetch() for Buffered IO (experiment)

2014-12-20 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue22854] Documentation/implementation out of sync for IO

2014-12-20 Thread Martin Panter

Martin Panter added the comment:

Some of the docstrings already mention UnsupportedOperation. This patch updates 
the rest of the documentation. Also adds some tests to verify this on all the 
concrete classes I could think of. Some discoveries in the process:

* BufferedWriter.readable() and BufferedReader.writable() could return True 
depending on the underlying raw stream. Fixed to always return False.
* Removed a branch in a test case that assumed BufferedReader.close() did not 
call flush(), but never activated due to the above writable() bug
* seek(), tell() and truncate() do not raise UnsupportedOperation, despite 
seekable() == False, at least for a pipe. Adjusted doc strings.

--
keywords: +patch
Added file: http://bugs.python.org/file37520/UnsupportedOperation.patch

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



[issue18590] Found text not always highlighted by Replace dialog on Windows

2014-12-20 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

I tested for the behaviour described in msg193895 before and after your patch. 
Everything remains same except as what you mentioned.

Currently, Replace dialog Find hits are tagged with both the 'hit' and the 
'sel' tag, which does not show on Windows as long as the dialog is the active 
window, but apparently does on other systems.  Raising the hit tag to the top 
(either patch) means that the visible highlight on other systems will change 
from 'selected' to 'found' (which are independently configurable in Idle 
preferences).

If this not desired, the patch could be altered to use tag 'hit' on Windows 
and 'sel' elsewhere; change 'hit' (on Windows) to 'sel' when the dialog is 
closed; and configure 'hit' to look like 'sel' (so there is no visible change 
when closing, as on other systems).

It would be better to ensure that there is no visible change when closing.

--

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



[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

readline() is used only when unpickle opcodes PERSID, INT, LONG, FLOAT, STRING, 
UNICODE, INST, GLOBAL, GET, PUT. These opcodes are not used with protocol 4 
(all opcodes except GLOBAL is used only with protocol 0, and GLOBAL is used 
with protocol = 3). Frames are used only with protocol 4. So there is very 
small chance to meet this bug in real data. But it is not zero, artificial 
pickled data which mixes FRAME with protocol 0 opcodes can be constructed by 
third-party software for some reasons.

Artificial example:

 pickletools.dis(b\x80\x04\x95\x05\x00\x00\x00\x00\x00\x00\x00I42\n.)
0: \x80 PROTO  4
2: \x95 FRAME  5
   11: IINT42
   15: .STOP
highest protocol among opcodes = 4

--
components: +Library (Lib)
stage:  - needs patch

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