[issue23591] Add IntFlags

2015-07-21 Thread R. David Murray
R. David Murray added the comment: Ethan: to clarify...based on my years of watching this tracker, the way we normally handle an issue like this is to leave the issue open until it is resolved, sometimes with people proposing competing patches. (There might be reasons to change that tradition

[issue24619] async/await parser issues

2015-07-21 Thread Yury Selivanov
Yury Selivanov added the comment: Sorry for not responding earlier, I'm on vacation and don't check email too often. While investigating what can be done in tokenizer.c to fix some of the bugs that Stefan pointed out, I discovered a simpler approach: instead of checking what kind of function

[issue24619] async/await parser issues

2015-07-21 Thread Guido van Rossum
Guido van Rossum added the comment: Haven't reviewed the patch, but this approach sounds great (in fact I had assumed you were doing this already, and I was a bit surprised by some of the problems you encountered :-). -- ___ Python tracker

[issue23883] __all__ lists are incomplete

2015-07-21 Thread Martin Panter
Martin Panter added the comment: raiseExecptions typo: Might be best to get the typo fixed first (maybe open a separate issue, since it should probably be fixed starting from the 3.4 branch). Regarding OpcodeInfo, it is probably up to your judgement. -- ___

[issue24619] async/await parser issues

2015-07-21 Thread Martin Panter
Martin Panter added the comment: Good news :) I guess this means we can also remove the sentence I added at . -- nosy: +vadmium ___ Python tracker

[issue24619] async/await parser issues

2015-07-21 Thread Yury Selivanov
Yury Selivanov added the comment: An updated patch is attached. I had to implement a little bit more sophisticated tracking of one-line functions to fix parsing of things like def foo(): async def f(): pass async def f(): pass async = 1 I hope that test_coroutine.p

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-21 Thread Fabian
Fabian added the comment: It is consistent as in it happens on every run of the test suite. But unfortunately I haven't checked if it's always happening at the same place. Luckily we have 4 builds on Travis with 3.6 and in all it happened from the beginning and got > 100 matches for “KeyError:

[issue23591] Add IntFlags

2015-07-21 Thread Ethan Furman
Ethan Furman added the comment: My experience is that a module maintainer, or somebody claiming to speak for the module maintainer, can close any issue in their area at any time regardless of the number of core devs in favor of a change. Whatever. I'll leave this open and write up a spec of w

[issue24485] Function source inspection fails on closures

2015-07-21 Thread Yury Selivanov
Yury Selivanov added the comment: Meador, the patch looks OK. Could you please commit it yourself? -- assignee: -> meador.inge ___ Python tracker ___ __

[issue24669] inspect.getsource() returns the wrong lines for coroutine functions

2015-07-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset f02c5bf59fbb by Yury Selivanov in branch '3.5': Issue #24669: Fix inspect.getsource() for 'async def' functions. https://hg.python.org/cpython/rev/f02c5bf59fbb New changeset 6629773fef63 by Yury Selivanov in branch 'default': Merge 3.5 (Issue #24669

[issue24669] inspect.getsource() returns the wrong lines for coroutine functions

2015-07-21 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, Kai! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker ___ __

[issue24653] Mock.assert_has_calls([]) is surprising for users

2015-07-21 Thread Robert Collins
Robert Collins added the comment: Ok, so as a doc bug this should still be tracked here - I'm going to reopen it to reflect that, hope thats ok. -- assignee: -> docs@python components: +Documentation nosy: +docs@python resolution: not a bug -> status: closed -> open title: Mock.assert

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Carl Meyer
Carl Meyer added the comment: As a frequent and long-time user of mock, the `assert_*` methods being on the mock object itself has always struck me as an unfortunate wart on an otherwise great library. The change to raise `AssertionError` on `assert_*` and `assret_*` feels like piling an ugly

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Carl Meyer
Carl Meyer added the comment: Er, I meant `AttributeError`, of course... -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue22123] Provide a direct function for types.SimpleNamespace()

2015-07-21 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24678] raiseExceptions typo fix in logging tests

2015-07-21 Thread Jacek Kołodziej
New submission from Jacek Kołodziej: The typo in test_logging was discovered while working on #23883: in two tests the addCleanup call reverts the raiseEx*ec*ptions value (instead of raiseExceptions) in logging module and apparently that didn't manifest itself in any way. Patch attached. ---

[issue24678] raiseExceptions typo fix in logging tests

2015-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would use test.support.swapattr(). -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: Fixup patch. I've tested this with the reported failures and they all work. -- Added file: http://bugs.python.org/file39967/issue-21750-2.patch ___ Python tracker _

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: But - its worth discussing. Perhaps we should roll this all back, and just say 'use a vfs layer for tests like this'. The problem in doing that, is that the @patch def test_foo... use case is actually pretty common IME, and this conflicts with the @patch ... A

[issue24613] array.fromstring Use After Free

2015-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Minimal example: import array a = array.array("B") a.fromstring(b'x'*0x1) a.fromstring(a) a.fromstring(a) In 3.x it doesn't work. An exception is raised: Traceback (most recent call last): File "", line 1, in BufferError: cannot resize an array that i

[issue24678] raiseExceptions typo fix in logging tests

2015-07-21 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: s/swapattr/swap_attr/g :) Done. -- Added file: http://bugs.python.org/file39968/test_logging_typo.v2.patch ___ Python tracker ___ _

[issue24678] raiseExceptions typo fix in logging tests

2015-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka stage: -> commit review type: -> behavior ___ Python tracker ___ ___

[issue24678] raiseExceptions typo fix in logging tests

2015-07-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 20e2b980bb87 by Serhiy Storchaka in branch '3.4': Issue #24678: Fixed raiseExceptions typo in logging tests. https://hg.python.org/cpython/rev/20e2b980bb87 New changeset 7a54e400155f by Serhiy Storchaka in branch '3.5': Issue #24678: Fixed raiseExce

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-21 Thread Eric Snow
Eric Snow added the comment: Thanks for the extra info. I'm going to see if I can reproduce the issue by running the pywikibot test suite locally. What's the best way to set that up? Are there instructions somewhere? As to the C implementation, it was first released (as a special exception)

[issue24678] raiseExceptions typo fix in logging tests

2015-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Jacek. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue14373] C implementation of functools.lru_cache

2015-07-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-21 Thread Fabian
Fabian added the comment: Yes see the tests/README.rst. And afaik do you only need to have requests and six installed. -- ___ Python tracker ___

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Paul Koning
Paul Koning added the comment: Sure, you can use a vfs. That's true for a lot of mock functions; the benefit of mock, including mock_open, is that it provides an easier and better packaged way. The behavior expected is "be like a file". So in that last example, if you open it twice, you've

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Patrick Westerhoff
Changes by Patrick Westerhoff : -- nosy: +poke ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Antti Haapala
Changes by Antti Haapala : -- nosy: +ztane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue24653] Mock.assert_has_calls([]) is surprising for users

2015-07-21 Thread Antti Haapala
Changes by Antti Haapala : -- nosy: +ztane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue23574] datetime: support leap seconds

2015-07-21 Thread dlroo
dlroo added the comment: If you are using mx.DateTime make certain you do not use the .strftime method. If you use .strftime method and have a 60th second in your DateTime object it will crash python with no error message. This occurs because the .strftime method is fully inherited from Pyth

[issue24485] Function source inspection fails on closures

2015-07-21 Thread Meador Inge
Meador Inge added the comment: Will do. Thanks for the review. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: @pkoning in Python3.3 == mock 1.0.1, >>> m = mock_open(read_data='f') >>> m().read() 'f' >>> m().read() 'f' >>> x = m() >>> x.read() 'f' >>> x.read() 'f' >>> x = m() >>> y = m() >>> x.read() 'f' >>> y.read() 'f' in 3.4 == mock 1.1.{0,1,2,3}, and 1.2.0 >>> m = m

[issue23287] ctypes.util.find_library needlessly call crle on Solaris

2015-07-21 Thread Jeff Quast
Jeff Quast added the comment: John, What do you think of the patches attached to http://bugs.python.org/issue20664 ? "crle is not needed at all because the default library path is a constant on Solaris" I don't believe this to be true, source? crle is absolutely needed to add additional libra

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Cody Piersall
New submission from Cody Piersall: Whenever I tried to run the embeddable zip file from https://www.python.org/downloads/windows/ for Python 3.5.0b3, the program crashes with the message > The program can't start because api-ms-win-crt-math-l1-1-0.dll is missing > from your computer. Try rein

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread R. David Murray
R. David Murray added the comment: Woops, I see you already said and I missed it. We'll have to wait for Steve to take a look. -- ___ Python tracker ___ ___

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread R. David Murray
R. David Murray added the comment: You shouldn't need visual studio to install python using the installer. What verison of windows are you using? -- nosy: +r.david.murray ___ Python tracker ___

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Cody Piersall
Changes by Cody Piersall : -- components: +Windows nosy: +paul.moore, tim.golden, zach.ware type: -> crash ___ Python tracker ___ ___

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Steve Dower
Steve Dower added the comment: Yeah, I need to clearly document that you are responsible for installing the C Runtime yourself. My current theory is that embedding applications will also require the CRT (at least those that intend to load python3.dll or python35.dll directly), and so it's bet

[issue23287] ctypes.util.find_library needlessly call crle on Solaris

2015-07-21 Thread John Beck
John Beck added the comment: First, there are two related but somewhat separate issues here. Regarding the patches attached to http://bugs.python.org/issue20664 they seem fine. In theory, they should not be needed, as though it is true that dump(1) moved from /usr/ccs/bin to /usr/bin in Solaris

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Cody Piersall
Cody Piersall added the comment: Ah! That makes sense. I still think the embeddable Python could be useful, but I don't actually have a vested interest in it at the moment. Mostly I feel like it would be useful if Python is an implementation detail of an application, and you want to make sure

[issue23287] ctypes.util.find_library needlessly call crle on Solaris

2015-07-21 Thread Jeff Quast
Jeff Quast added the comment: I looked over the focus on "default" path, thank you for clarifying! Sadly, I can't help you move either of these patches forward, best wishes! -- ___ Python tracker _

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Steve Dower
Steve Dower added the comment: That's exactly the use case, and I might "borrow" your summary for the docs that I'll eventually write for it because you've summed it up really well. My biggest worry right now is that people will treat it as a portable install and run into exactly the issue tha

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Cody Piersall
Cody Piersall added the comment: Yeah, having "embeddable" in the name is a good hint, I think. It was almost enough for me to not even try downloading it. Is it possible / even worth the time to give a more helpful error message? I'm not sure that it's possible, based on when the dll is lao

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Steve Dower
Steve Dower added the comment: Afraid it's not possible - that error comes from the loader, so we haven't had a chance to run anything yet. One option would be to put some sort of readme into the zip, but that seems to be optimising for the wrong behavior. If I were legitimately embedding this

[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)

2015-07-21 Thread Cody Piersall
Cody Piersall added the comment: Agreed. "An ounce of data is worth a pound of theory" as the saying goes. -- ___ Python tracker ___ _

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-21 Thread Fabian
Fabian added the comment: Okay I did a test run on all three 3.5 betas available to me through pyenv. The beta 3 failed as Python 3.6 does that popitem() raises a KeyError. The beta 2 had the bug that popitem() does not support keyword arguments so I wasn't able to test it there. And the beta

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-21 Thread Eric Snow
Eric Snow added the comment: I've thus far been unsuccessful in running the pywikibot test suite. I'm guessing there are some prerequisites (e.g. an account on some wiki site). Is there a way to run the tests without network access? Also, I ran into some trouble with i18n.__file__, but hack

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Ben Finney
Changes by Ben Finney : -- nosy: +bignose ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Paul Koning
Paul Koning added the comment: So if I understand right, it seems to me the 3.5/mock 1.1.4 behavior is correct. mock_open(read_data="f") acts like a file that contains f, and m() acts like an open() of that file. So if I call open once, I should read the f, then EOF. If I open twice, then e

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Kevin Benton
Kevin Benton added the comment: What about other methods/properties like called, call_count, and reset_mock? It seems that they should be removed as well to be consistent with the reason for this change. -- nosy: +kevinbenton ___ Python tracker

[issue24619] async/await parser issues

2015-07-21 Thread Nick Coghlan
Nick Coghlan added the comment: Patch & test cases look good to me. I'm so used to thinking of the tokenisation phase as a linear token stream that it never occurred to me to just count the function nesting directly to determine if the "async def" tokenisation rules are in effect - it's a very n

[issue12067] Doc: remove errors about mixed-type comparisons.

2015-07-21 Thread Martin Panter
Martin Panter added the comment: Patch v15. No doc changes, but I refactored the test code: * Manually merged with recent changes * Separate assert_equality_only() and assert_total_order() test methods. Hopefully this is a bit simpler for people to understand and review, and avoids suggesting

[issue24680] typo in documentation, section extending python

2015-07-21 Thread cdz
New submission from cdz: In section "3. Building C and C++ Extensions with distutils" there is unnecessary "\" in the middle of the line. Seems to be bulk (re)formatting issue. Simple patch fixing the issue is attached. -- assignee: docs@python components: Documentation files: extendi

[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2015-07-21 Thread Martin Panter
Martin Panter added the comment: FWIW I have wondered in the past why these constants were missing. I would be more likely to use them when checking an exit status than when setting one. I typically do “raise SystemExit()” or “raise SystemExit('Error message')”, which implicitly sets the statu

[issue24680] typo in documentation, section extending python

2015-07-21 Thread Martin Panter
Martin Panter added the comment: Nice and obvious fix, looks like it also applies to Python 2. -- nosy: +vadmium stage: -> commit review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___

[issue22000] cross type comparisons clarification

2015-07-21 Thread Martin Panter
Martin Panter added the comment: Actually, this is about a different section of the documentation. But it might still be best to update /Doc/reference/expressions.rst first in Issue 12067, and then sort out /Doc/library/stdtypes.rst to match. Why do we need a dedicated section in Built-in Type

[issue24680] typo in documentation, section extending python

2015-07-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 91b738cfdc2f by Zachary Ware in branch '2.7': Issue #24680: Remove random backslash. Patch by cdz. https://hg.python.org/cpython/rev/91b738cfdc2f New changeset cf0011b6ebbd by Zachary Ware in branch '3.4': Issue #24680: Remove random backslash. Pa

[issue24680] typo in documentation, section extending python

2015-07-21 Thread Zachary Ware
Zachary Ware added the comment: Fixed! Thanks for the report and patch, cdz, and thanks for the triage, Martin. -- nosy: +zach.ware ___ Python tracker ___ ___

[issue24681] Put most likely test first is set_add_entry()

2015-07-21 Thread Raymond Hettinger
New submission from Raymond Hettinger: Since the *found_active* exit is like the *found_error* exit in that it makes no further use of *entry*, it can be moved before the table/entry_key check whose purpose is to make sure the *entry* pointer is still valid. This change doesn't apply to lookk

[issue12067] Doc: remove errors about mixed-type comparisons.

2015-07-21 Thread Berker Peksag
Berker Peksag added the comment: I think we can commit documentation and tests separately. I just did a quick review of the test changes and I will add some review comments later (sorry, lack of time :)). -- nosy: +berker.peksag ___ Python tracker

[issue21750] mock_open data is visible only once for the life of the class

2015-07-21 Thread Robert Collins
Robert Collins added the comment: So the 1.1.4 behaviour matches that of a VFS most closely. But, see the earlier messages, it does do only and precisely because it breaks regular mock idioms. Thus I think we're better off with the new patch, which addresses the issue with reuse of the mocks i

[issue24603] Update OpenSSL to 1.0.2d in Windows and OS X installer

2015-07-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 53c0c8914ad0 by Zachary Ware in branch '2.7': Issue #24603: Update Windows build to use OpenSSL 1.0.2d https://hg.python.org/cpython/rev/53c0c8914ad0 New changeset f4cd9ac378d7 by Zachary Ware in branch '3.4': Issue #24603: Update the Windows build

[issue24682] Add Quick Start: Communications section to devguide

2015-07-21 Thread Carol Willing
New submission from Carol Willing: Add a Quick Start: Communications section to devguide (or Q S: Community Interaction) as discussed on python-dev mailing list today. The Quick Start: Communications section should be brief, link to other sections in the devguide, and give contributor's guidan

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Felipe
Felipe added the comment: Not sure it's my place to comment here, but here are my 2 cents: I think Robert's proposal to have module functions is the only way to have a user-friendly and robust API, and it solves more than just the assert typo problem. (And yes, it would require moving the mock

[issue24681] Put most likely test first in set_add_entry()

2015-07-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- title: Put most likely test first is set_add_entry() -> Put most likely test first in set_add_entry() ___ Python tracker ___ __

[issue24681] Put most likely test first in set_add_entry()

2015-07-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other change is to defer saving table=so->table until just before the rich comparison since it is only needed in that code block. This improves the generated code saving a register spill and reload on the most common code paths. -- Added file:

[issue24682] Add Quick Start: Communications section to devguide

2015-07-21 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

<    1   2