[issue16991] Add OrderedDict written in C

2013-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I just looked at the test-collections patch and don't want it committed. It is full of trivial edits that make it hard to review and doesn't make the test suite better. It is okay to add some new tests, but I don't want to rearrange the existing code with

[issue17502] unittest.mock: side_effect iterators ignore DEFAULT

2013-03-20 Thread Michael Foord
New submission from Michael Foord: An iterator set as a mock side_effect should be able to include mock.DEFAULT to use the standard return value. def test_side_effect_iterator_default(self): mock = Mock(return_value=2) mock.side_effect = [1, DEFAULT] result = mock()

[issue9506] sqlite3 mogrify - return query string

2013-03-20 Thread R. David Murray
R. David Murray added the comment: Given what you have determined, I don't think there would be any benefit to such a method. Furthermore, I have now remembered that as of Python 3.3 the sqlite3 module/sqlite3 has a set_trace_callback function that allows you to capture the commands that are

[issue10224] Build 3.x documentation using python3.x

2013-03-20 Thread Cherniavsky Beni
Cherniavsky Beni added the comment: After a lot of experimentation, this worked for me to build AND doctest using the local python: cd Doc/ ../python -m venv toolsenv curl http://python-distribute.org/distribute_setup.py | toolsenv/bin/python toolsenv/bin/easy_install pip toolsenv/bin/pip insta

[issue17490] Use converter functions to implement ast.literal_eval

2013-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I like the current version of the code and find it easily to understand what it does and how it does it. The new code is longer and full of indirections. I question whether it is a real improvement. -- nosy: +rhettinger __

[issue17492] Increase test coverage for random (up to 99%)

2013-03-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue17489] random.Random implements __getstate__() and __reduce__()

2013-03-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)

2013-03-20 Thread Roger Serwy
Roger Serwy added the comment: Serhiy, I applied your patch but I still get the same error. >From what I have found so far, the FromObj function in Modules/_tkinter.c >relies on cached values for different Tcl_ObjType, as given in the TkappObject >struct. From the comment: /* We cannot i

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-20 Thread Trent Nelson
Changes by Trent Nelson : -- nosy: +trent ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset d068fcbe5009 by R David Murray in branch '3.3': #5713: One more test_smtplib timing fix. http://hg.python.org/cpython/rev/d068fcbe5009 New changeset fcef6a33de17 by R David Murray in branch 'default': Merge: #5713: One more test_smtplib timing fix.

[issue17490] Use converter functions to implement ast.literal_eval

2013-03-20 Thread Larry Hastings
Larry Hastings added the comment: For what it's worth, here's what we're doing. The new Argument Clinic "parameter" line looks a great deal like the middle bit of a Python function declaration. So much so that we can do this: ast_string = "def x({}): pass".format(parameter_line) root

[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Ned Deily
Ned Deily added the comment: The test for the condition was added to solve the problem reported in Issue8716. The Tk crash for test_ttk_guionly reported there still occurs on a current 10.8 system with the Apple-supplied Cocoa Tk under the same conditions, that is, when running the tests from

[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: Hi Ned, It seems from your comment that you didn't read the patch. Alex added a simpler check via launchctl, rather than by framework symbol groveling :). He didn't remove the check. It should be functionally identical to what's there now, but much shorter

[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Ned Deily
Ned Deily added the comment: Um, yes, my tired eyes did skip over those added lines. Thanks, Glyph, and sorry, Alex. While the suggested change solves the issue for the non-framework build case, it appears to introduce new problems. For one, with the current skip test, it is possible to run

[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Ned Deily
Ned Deily added the comment: Granted, the current test is a kludge. We could make it a bigger kludge by trying launchctl first and if it fails move on to the current ctypes-based tests. Any better options? -- ___ Python tracker

[issue17494] References to stack bottom are confusing

2013-03-20 Thread Georg Brandl
Georg Brandl added the comment: Sorry, I find your suggested termini more confusing. * first/last: the first that was put onto the stack (i.e. bottom) or the first to be popped off (i.e. top)? * root/terminal: that makes you think of trees, but a stack is not a tree. top/bottom is the establi

[issue17503] replace mode is always on in console

2013-03-20 Thread anatoly techtonik
New submission from anatoly techtonik: It is very annoying behavior of Python 3.3.0 that when you type in the console, replace mode is always on, and even after you press insert to go insert mode, it resets after every executed line. Windows Vista 32. Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29

[issue17504] Dropping duplicated docstring explanation of what Mocks' side_effect does.

2013-03-20 Thread Radu Voicilas
New submission from Radu Voicilas: Seems like there's a duplicated explanation in unittest.mock.Mock's docstring of what side_effect does. The attached patch should take care of that, if I'm not interpreting it wrong and it's actually on purpose there. -- components: Library (Lib) file

[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: A small helper program that does the equavalent of this should also work: import Cocoa Cocoa.NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(((10, 10), (100, 100)), 0, 0, 0) If this code raises an exception you cannot create windows, if it doesn

[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: Wouldn't it be better to check for the actual problem, that is use subprocess to start a small Tcl script that creates a window and check if that crashes? That way the code for disabling the test doesn't have to try to guess whether or not Tk will crash in th

<    1   2