[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-12 Thread Alexander Mohr
Alexander Mohr added the comment: btw want to thank you guys for actively looking into this, I'm very grateful! -- ___ Python tracker ___

[issue8426] multiprocessing.Queue fails to get() very large objects

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with Charles-François and think this issue should be closed. There is no a bug, and the behavior is documented. -- nosy: +serhiy.storchaka status: open -> pending ___ Python tracker

[issue25611] test_deque failure on Gentu and OpenIndiana buildbots on 2.7

2015-11-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: http://buildbot.python.org/all/builders/x86%20OpenIndiana%202.7/builds/3104/steps/test/logs/stdio http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%202.7/builds/107/steps/test/logs/stdio

[issue25611] test_deque failure on Gentoo and OpenIndiana buildbots on 2.7

2015-11-12 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +zach.ware title: test_deque failure on Gentu and OpenIndiana buildbots on 2.7 -> test_deque failure on Gentoo and OpenIndiana buildbots on 2.7 ___ Python tracker

[issue25608] ascynio readexactly() should raise ValueError if passed length <= 0 in argument

2015-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: I'm okay with raising ValueError for length<0; but for length==0 the behavior is very much intentional -- reading zero bytes is sometimes a useful end case that otherwise you would have to work around in the caller. --

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread Yury Selivanov
New submission from Yury Selivanov: Nested try..except statements with yields can loose reference to the current exception. The following code: class MainError(Exception): pass class SubError(Exception): pass def main(): try: raise MainError()

[issue21748] glob.glob does not sort its results

2015-11-12 Thread Dave Jones
Dave Jones added the comment: >From the bash man-page: "... If one of these characters appears, then the word >is regarded as a pattern, and replaced with an *alphabetically sorted* list of >filenames matching the pattern". I would agree that glob.glob shouldn't sort its results (the overhead

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread STINNER Victor
STINNER Victor added the comment: Is this issue related to the issue #23353? -- ___ Python tracker ___ ___

[issue25313] IDLE: gracefully handle themes (or keysets, or ...) not present

2015-11-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch applied leaves 'name = IDLE New' alone so older IDLEs can use that instead of IDLE Classic as an alternative to IDLE Dark. I will open an issue to revise IDLE New slightly. I also added type='bool' when getting 'default' (the lack thereof lead to

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- versions: +Python 2.7 ___ Python tracker ___ ___

[issue25580] async and await missing from token list

2015-11-12 Thread Martin Panter
Martin Panter added the comment: Do you have a new version of the patch? -- ___ Python tracker ___ ___

[issue24421] Race condition compiling Modules/_math.c

2015-11-12 Thread Martin Panter
Martin Panter added the comment: Ideally, I think the solution would be to compile _math.c once, as a dependency shared between both extension modules (perhaps like a static library if necessary). Does anyone know if the build system supports this, or how to do it? Another semi-favourable

[issue16394] Reducing tee() memory footprint

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raymond, do you want to add a clarification to the documentation, or prefer just to close this issue? -- nosy: +serhiy.storchaka ___ Python tracker

[issue25606] asyncio doc: 'socket' transport extra info is not mandatory

2015-11-12 Thread STINNER Victor
STINNER Victor added the comment: Guido van Rossum added the comment: > The word 'optional' is literally the second word of the description of > get_extra_info(). WHat more do you want? Hum, it can be surprising for users that an application works on "asyncio" but doesn't work on "libuv

[issue25606] asyncio doc: 'socket' transport extra info is not mandatory

2015-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Well I don't know how adding a note to the doc is going to change that much (those users probably don't read the docs but copy some example), but go ahead and add something. -- ___ Python tracker

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou ___ Python tracker ___ ___

[issue22995] Restrict default pickleability

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Was committed the restriction for tp_new == NULL. New patch uses more complex condition for types that doesn't define any reduce-related methods. This case covers _csv.Dialect and memoryview (and buffer in 2.7, issue8323). -- Added file:

[issue25604] [Minor] bug in integer true division algorithm

2015-11-12 Thread Mark Dickinson
New submission from Mark Dickinson: There's a harmless but annoying (for code readers) bug in the code for true division of (long) integers. In `long_true_divide` in `Objects/longobject.c`, we have the following code for manipulating the bits of a 55- or 56-bit long to get something that

[issue25604] [Minor] bug in integer true division algorithm

2015-11-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue25606] asyncio doc: 'socket' transport extra info is not mandatory

2015-11-12 Thread STINNER Victor
New submission from STINNER Victor: Not all implementations of asyncio event loops can provide the "socket" transport extra info. See for example this discussion on libuv: https://github.com/python/asyncio/issues/286 The information should be marked as "optional", or at least we should

[issue22995] Restrict default pickleability

2015-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8841db9433d by Serhiy Storchaka in branch '3.4': Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now https://hg.python.org/cpython/rev/c8841db9433d New changeset 4c05e7c195ac by Serhiy Storchaka in branch '3.5': Issue #22995:

[issue22995] Restrict default pickleability

2015-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94664fb4354e by Serhiy Storchaka in branch '2.7': Issue #22995: Backported additional tests for non-pickleable types. https://hg.python.org/cpython/rev/94664fb4354e -- ___ Python tracker

[issue14350] Strange Exception from copying an iterator

2015-11-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: -Restrict default pickleability resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Restrict default pickleability ___ Python tracker

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-12 Thread STINNER Victor
STINNER Victor added the comment: I'm not a big fan of "may" in documentation. I would prefer to rephrase it as an advice. Example: "Considering the loss of information, it's better to not retry sending data to the socket anymore." -- ___ Python

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-12 Thread STINNER Victor
STINNER Victor added the comment: Note: socket-docs.patch file is strange, it looks like you removed the first line starting with "diff", and so we don't get the [Review] button. -- ___ Python tracker

[issue25605] fcntl doc: document exceptions raised on error for ioctl() and flock()

2015-11-12 Thread STINNER Victor
New submission from STINNER Victor: Attached patch documents the exception raised when ioctl() or flock() functions fail. Note: flock() can also raises a ValueError if the second parameter (op) is unknown. If the patch is approved, I will write a similar patch for Python 3 (just replace

[issue22995] Restrict default pickleability

2015-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2b950eba9792 by Serhiy Storchaka in branch '2.7': Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now https://hg.python.org/cpython/rev/2b950eba9792 -- ___ Python tracker

[issue21748] glob.glob does not sort its results

2015-11-12 Thread Eric V. Smith
Eric V. Smith added the comment: Assuming David means "it wouldn't be unreasonable to insert a disclaimer", I agree. -- ___ Python tracker ___

[issue25605] fcntl doc: document exceptions raised on error for ioctl() and flock()

2015-11-12 Thread Martin Panter
Martin Panter added the comment: This looks good for Python 2 and the equivalent for Python 3. FWIW the ValueError case is platform-dependent. On Linux, I see EINVAL (the IOError version of ValueError): >>> flock(0, LOCK_UN) >>> flock(0, 0) Traceback (most recent call last): File "", line

[issue21748] glob.glob does not sort its results

2015-11-12 Thread R. David Murray
R. David Murray added the comment: You mean my old English teachers were wrong when they said a positive statement was to be preferred to a double negative? :) :) -- ___ Python tracker

[issue25614] Lib/code.py: InteractiveConsole.raw_input writes prompt to stdout

2015-11-12 Thread Yclept Nemo
New submission from Yclept Nemo: Just like InteractiveInterpreter.write and the actual python interpreter, the console's prompt should be written to stderr. Something like: self.write(prompt) return input() -- components: Library (Lib) messages: 254575 nosy: Yclept.Nemo priority:

[issue25498] Python 3.4.3 core dump with simple sample code

2015-11-12 Thread Martin Panter
Martin Panter added the comment: New patch with Fortran array test, and read-only and reversed memoryview() tests. -- Added file: http://bugs.python.org/file41025/ctypes_from_buffer_4.patch ___ Python tracker

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread Yury Selivanov
Yury Selivanov added the comment: Here's a patch the fixes the first problem (but __context__ bug is still open). I'm not sure that the patch is correct :( But at least I've added new unittests (one still failing) -- keywords: +patch Added file:

[issue25313] IDLE: gracefully handle themes (or keysets, or ...) not present

2015-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset b95c10cb457d by Terry Jan Reedy in branch '2.7': Issue #25313: Change the handling of new built-in text color themes to better https://hg.python.org/cpython/rev/b95c10cb457d New changeset 6185c5603eed by Terry Jan Reedy in branch '3.4': Issue

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread Yury Selivanov
Yury Selivanov added the comment: This was originally discovered here: https://github.com/python/asyncio/issues/287 -- nosy: +brett.cannon ___ Python tracker

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread STINNER Victor
STINNER Victor added the comment: I reverted the change of the issue #23353 but it doesn't fix this example, so it looks like these issues are not related. Cool. -- ___ Python tracker

[issue8323] buffer objects are picklable but result is not unpicklable

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: While buffer is only used in Python 2.x, there is a similar issue in 3.x with memoryview. The patch for issue22995 fixes this issue. -- nosy: +serhiy.storchaka ___ Python tracker

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-12 Thread Martin Panter
Martin Panter added the comment: For what it’s worth, there could be obsure cases where sending more data might be okay. I prefer the original version (but can settle for either). Here’s a third alternative: Considering this loss of information, it is generally best not to send any more data

[issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil

2015-11-12 Thread Martin Panter
Martin Panter added the comment: Remember that you probably should not mention “xztar” in the 3.4 or 2.7 docs (even though “lzma” exists in 3.4). I am not too familiar with using shutil or zipfile, but it seems like extraction of some zip files is always possible, even if zlib (for Deflate)

[issue25613] fix ssl tests with sslv3 disabled

2015-11-12 Thread Matthias Klose
New submission from Matthias Klose: Linux distributions (now starting with the Ubuntu development version for 16.04 LTS) are starting to disable SSLv3, letting at least two test_ssl tests fail. a partial fix is mentioned in https://launchpad.net/bugs/1515793 -- messages: 254573 nosy:

[issue25613] fix ssl tests with sslv3 disabled

2015-11-12 Thread Alex Gaynor
Alex Gaynor added the comment: Does this issue still occur on default? https://hg.python.org/cpython/rev/d80954d941c7 -- nosy: +alex ___ Python tracker

[issue25579] def is not a keyword with tokenize.py

2015-11-12 Thread Yury Selivanov
Yury Selivanov added the comment: Stéphane, sorry for not replying earlier, emails from bugs.python.org sometimes go to spam. [TokenInfo(type=55 (ASYNC), string='async', start=(1, 0), end=(1, 5), line='async def foo(): pass'), TokenInfo(type=1 (NAME), string='def', start=(1, 6), end=(1, 9),

[issue21748] glob.glob does not sort its results

2015-11-12 Thread R. David Murray
R. David Murray added the comment: Technically the docs are not wrong: "matches files according to the rules of the shell" does not say anything about sorting (matching is separate from what is done with the matched filenames; the shell sorts them and inserts them in place, python returns an

[issue21748] glob.glob does not sort its results

2015-11-12 Thread Eric V. Smith
Eric V. Smith added the comment: D'oh! I read your original comment as "it would be unreasonable to insert a disclaimer", and then I wondered why you'd used such a convoluted sentence and reversed your meaning. It's all my fault. Fortunately, I don't think Mrs. McKinley from 11th grade

[issue25612] nested try..excepts don't work correctly for generators

2015-11-12 Thread Yury Selivanov
Yury Selivanov added the comment: Another bug: class MainError(Exception): pass class SubError(Exception): pass def main(): try: raise MainError() except MainError: yield coro = main() coro.send(None)

[issue25607] test_distutils provokes unexpected output in test_shutil

2015-11-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: test_distutils changes global logging level for distutils. This affects test_shutil. In Python 2.7: $ ./python -m test.regrtest test_distutils test_shutil [1/2] test_distutils [2/2] test_shutil test test_shutil produced unexpected output:

[issue25607] test_distutils provokes unexpected output in test_shutil

2015-11-12 Thread STINNER Victor
STINNER Victor added the comment: Instead of a context manager, why not adding a addCleanup() in setUp() method of test cases? You might also add a "resource" test in regrtest, but this one might be overkill, since tests using distutils are known (test_distutils), no?

[issue19023] ctypes docs: Unimplemented and undocumented features

2015-11-12 Thread Martin Panter
Martin Panter added the comment: Sye van der Veen: can you sign a contributor agreement ? I think it might be needed for this patch. -- ___ Python tracker

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-11-12 Thread Berker Peksag
Berker Peksag added the comment: htmllib_deprecation_warning_3.patch looks good to me. -- stage: patch review -> commit review ___ Python tracker ___

[issue23883] __all__ lists are incomplete

2015-11-12 Thread Berker Peksag
Berker Peksag added the comment: > The reason why I prefer the current API over my support.expected_module_api() > idea is it requires the extra assertCountEqual() boilerplate at each call > site. I personally find explicit assert* calls in a test case more readable(e.g. I don't need to

[issue25580] async and await missing from token list

2015-11-12 Thread SilentGhost
SilentGhost added the comment: Hm, not sure why the file didn't get uploaded, I clearly remember attaching it. Yury, what is the implication for this issue? Are you suggesting that the note should state that these two are temporary? Or is this information available somewhere else, in What's

[issue25604] [Minor] bug in integer true division algorithm

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Correct. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25608] ascynio readexactly() should raise ValueError if passed length <= 0 in argument

2015-11-12 Thread Марк Коренберг
New submission from Марк Коренберг: ascynio readexactly() should raise ValueError if passed length <= 0 in argument. Now, it return empty string, which is just error hiding. Why not to raise ValueError ? Returning empty string is error prone. This behaviour was not changed since initial

[issue25609] Add a ContextManager ABC and type

2015-11-12 Thread Brett Cannon
New submission from Brett Cannon: There should probably be a context manager ABC in collections.abc that requires __enter__/__exit__ and a matching entry in `typing` that also takes a type argument of what the __enter__ method returns. -- components: Library (Lib) keywords: easy

[issue25610] Add typing.Awaitable

2015-11-12 Thread Brett Cannon
New submission from Brett Cannon: Probably should have a subclass of Callable in `typing` for Awaitable functions (there is already a corollary object in collections.abc). -- components: asyncio messages: 254547 nosy: brett.cannon, giampaolo.rodola, gvanrossum, haypo, pitrou,

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-11-12 Thread Martin Panter
Martin Panter added the comment: Here is a cleaned-up version of Nan’s first patch. -- Added file: http://bugs.python.org/file41027/htmllib_deprecation_warning_3.patch ___ Python tracker

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-12 Thread Neil Schemenauer
Neil Schemenauer added the comment: I don't see how that patch can be correct. The logic is now if the directory has two links inside it then skip it. The filesystems that don't count '.' and '..' will have zero links when empty and will have two links when two real files exist in them. I

[issue25609] Add a ContextManager ABC and type

2015-11-12 Thread Nan Wu
Nan Wu added the comment: Hi Brett, I'd like work on this feature. Your description here is clear. Besides that, could you give a use case of this context manager? -- nosy: +Nan Wu ___ Python tracker

[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-12 Thread Martin Panter
Martin Panter added the comment: Yeah I plan to merge the first patch (fixing conflicts) into 3.6 without any of the uncreated-property additions, and then apply that extra stuff in a separate commit. Using __slots__ would be simpler; I’ll switch it over. --

[issue23883] __all__ lists are incomplete

2015-11-12 Thread Martin Panter
Martin Panter added the comment: The reason why I prefer the current API over my support.expected_module_api() idea is it requires the extra assertCountEqual() boilerplate at each call site. Jacek’s three patches look ready to me. I propose: 1. Commit Issue23883_support_check__all__.v6.patch

[issue25607] test_distutils provokes unexpected output in test_shutil

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that just uses addCleanup() as Victor suggested. > Why do you remove captured_stdout() here? It is no longer needed. -- Added file: http://bugs.python.org/file41022/test_distutils_restore_log_level_2.patch

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-11-12 Thread Christoph Reiter
Christoph Reiter added the comment: To add some info why we hit that bug: https://bugs.python.org/issue24305 changed the warning stacklevel needed for import warnings from 8 to 2. As a result any code doing import warnings will likely hit that edge case when run with 3.5 and openafs

[issue25607] test_distutils provokes unexpected output in test_shutil

2015-11-12 Thread STINNER Victor
STINNER Victor added the comment: test_distutils_restore_log_level_2.patch looks good to me, it's simpler than the first version. I hope that it will fix the sporadic failures, thanks for working on fixing Python 2.7 buildbots! -- ___ Python

[issue25580] async and await missing from token list

2015-11-12 Thread SilentGhost
SilentGhost added the comment: I've added versionchanged, since this is what's done in os, for similar lists. -- ___ Python tracker ___

[issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock

2015-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I concede your point. It shouldn't be too hard to make asyncio.iscoroutinefunction() behave the same way as inspect.iscoroutinefunction(). Can you submit a patch? -- ___ Python tracker

[issue25607] test_distutils provokes unexpected output in test_shutil

2015-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4461613ffe78 by Serhiy Storchaka in branch '3.4': Issue #25607: Restore old distutils logging threshold after running tests that https://hg.python.org/cpython/rev/4461613ffe78 New changeset d7741afd8347 by Serhiy Storchaka in branch '2.7': Issue

[issue25607] test_distutils provokes unexpected output in test_shutil

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor for your review. It's my fault, I missed this failure when added test_zipfile_vs_zip in issue24982. Perhaps because ran only singular test test_shutil on 2.7, and on 3.x an unexpected output doesn't break tests. In any case it is more

[issue25606] asyncio doc: 'socket' transport extra info is not mandatory

2015-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: The word 'optional' is literally the second word of the description of get_extra_info(). WHat more do you want? -- ___ Python tracker

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-12 Thread Justin Mayfield
Justin Mayfield added the comment: Interesting. I was going to do an analysis what using _ready.appendleft() for adding selector events would do for that scenario. The idea being to consistently juxtapose exiting callbacks, selector events and new callbacks. However I think this just moves

[issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil

2015-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Most of issues are already fixed. Proposed patch fixes remnants: * You see a skip message when bz2 or lzma are not available, instead of silent non-testing. * Removed a code that handles zipfile import failure. Importing zipfile now is always successful.

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I've thought about changing the stop() mechanism too. It might mean that some callbacks will be executed that are currently skipped though, if your proposal is to run all callbacks in self._ready (excluding new ones) and then just exit if the stop flag

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: I thought some more about this. The problem is due to stopping and restarting the loop, and that's also something that occurs in Alexander's example code, so I retract my accusation of aiohttp (and I don't think I need more investigation of his code). I

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-12 Thread Justin Mayfield
Justin Mayfield added the comment: Yes, that's what I was suggesting. Looking at tornado they do the stop between callbacks/matured-scheduled and events. That approach seems somewhat arbitrary to me at first glance but tornado is very mature and they usually have good reasons for what they

[issue25580] async and await missing from token list

2015-11-12 Thread Yury Selivanov
Yury Selivanov added the comment: ASYNC/AWAIT tokens are temporary and will be removed in 3.7 -- ___ Python tracker ___