[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: assertWarns is new in 3.2 and not in 2.7. The sentence was copied from the assertRaises section but not changed. Thanks for reporting. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: enhancement -&

[issue18570] OverflowError in division: wrong message

2013-07-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, 'long int' should just be 'int' in 3.x. However, int/int (integer division) is *not* the same thing as int/float. In the latter case, the int is converted to float first and if that conversion fails, there is no result. Now th

[issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError

2013-07-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I re-ran with setUp 'raise' changed to 'pass' to see the effect of raise AssertionError or unittest.SkipTest in tearDown and indeed the test fails or skips even then. I suggest adding ', other than AssertionError or SkipTest,' ju

[issue18441] Idle: Make test.support.requires('gui') skip when it should.

2013-07-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I tried to run the currently unnecessary Mac 'darwin' check in 2.7 with if sys.platform == 'darwin': from lib-tk.test.runtktests import check_tk_availability # tkinter.test.suppport in

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Based on recent python-list posts, there is also 'break is bad' propaganda going around. Perhaps we should say that loop-and-a-half with break is preferred (or at least equally acceptable) to repeating code. while True: value = getvalue() if

[issue15415] Add temp_dir() and change_cwd() to test.support

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: -def temp_cwd(name='tempcwd', quiet=False, path=None): +def temp_cwd(name='tempcwd', quiet=False): Since this parameter removal was pushed, the Windows buildbots consistently have this new error in this Windows-only test

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Some comments on patch 6: 1. tearDownClass was omitted, resulting in boxes left on the screen, at least when running in Idle with win7. I added this to the README. I am also getting messages like "warning: callback failed in WindowList : invalid command

[issue18583] Idle: enhance FormatParagraph

2013-07-28 Thread Terry J. Reedy
New submission from Terry J. Reedy: Writing tests for FormatParagraph.py #18226 revealed that it could use some improvements. At minimum, some for format_paragraph should probably be replaced with textwrap.wrap (or the class) in order to handles double spacing after sentences

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch attached with current version. I noted in a comment that we should probably replace some of format_paragraph with textwrap.wrap. The find_paragraph test works fine with the current text mock. I split one test method and will probably do more. It could

[issue15415] Add temp_dir() and change_cwd() to test.support

2013-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: As of this moment, the test has run on one of the two Win7 machines and the xp buildbot. It also runs by itself on my win7 desktop with a fresh pull. -- ___ Python tracker <http://bugs.python.org/issue15

[issue18570] OverflowError in division: wrong message

2013-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: +-infinity and nans were created for reasons that do not apply to standard python. In Fortran, C, etcetera, float arrays can only contain floats (hence calling a non-number a float) and continuing a computation after numerical error is more difficult or

[issue18570] OverflowError in division: wrong message

2013-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I would prefer one type too, if it can be done gracefully enough. I had thought of a set-mode function (method), but anticipate objection to such modal action-at-distance behavior. A context manager, which I had not thought of, somewhat alleviates that

[issue18604] Consolidate gui available checks in test.support

2013-07-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: Current situation: test.support.requires starts with if resource == 'gui' and not _is_gui_available(): On windows, _is_gui_available() uses ctypes to determine that there really is a graphics screen. On other systems, it just returns True, ev

[issue18441] Idle: Make test.support.requires('gui') skip when it should.

2013-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is working, so closing. I opened #18604 for consolidating gui checks in test.support. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python track

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: > What about the second line? What second line? > It doesn't catch any exception It? I do not understand your point. Your example works as documented, including "any unexpected exception is an error". Actually, that should be '

[issue10878] asyncore does not react properly on close()

2013-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am re-closing as there is no defined bug to fix, and 2.7 is closed to enhancements. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tr

[issue17350] Use STAF call python script will case 1124861 issue in 2.7.2 version

2013-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: In in absence of the information needed to consider this a current Python bug, I am closing it as either out-of-date (already fixed) or invalid (a third-party problem). -- resolution: -> out of date stage: test needed -> committed/rejected

[issue18614] Enhanced \N{} escapes for Unicode strings

2013-08-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with the proposal. Some of the code seems redundant with code we already have. In Python, I would write def codepoint_from_U_notation(name, namelen): if not (4 <= namelen <= 6): raise return chr(int(name, 16)) maybe with try-except to re

[issue18628] PEP 8 and encodings

2013-08-01 Thread Terry J. Reedy
New submission from Terry J. Reedy: Three related doc change proposals. The Versions only apply to the third as the first two are for PEP 8. 1. PEP 8 has a section entitled "Encodings (PEP 263)" with a link to the verbose PEP. I think it would be better if it were "Source E

[issue11798] Test cases not garbage collected after run

2013-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: If the iterator for 'self' were de-structive, if it removed (popped) the test from whatever structure holds it before yielding it, the messiness of enumerate and the new ._removeTestAtIndex method would not be needed and 'for test in self

[issue18270] IDLE on OS X fails with Attribute Error if no initial shell and Tk out-of-date

2013-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: No, but I recreated it from my description and attached it. But see next message. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file31135/18270-27.diff ___ Python trac

[issue18270] IDLE on OS X fails with Attribute Error if no initial shell and Tk out-of-date

2013-08-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looking further at handling debug, startup, cmd, or script options. When any of these are set, enable_shell is also, so to reach here, shell must be true, so only the MAC test, the subject of this issue, needs protection. Smaller patch (fewer lines changed

[issue18570] OverflowError in division: wrong message

2013-08-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: With that fixed, I am inclined to close this. -- ___ Python tracker <http://bugs.python.org/issue18570> ___ ___ Python-bug

[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-08-03 Thread Terry J. Reedy
New submission from Terry J. Reedy: [0. On mailing lists, 'lambda expression' is used rather than 'lambda form'. Docs use both. Consistency across docs is a broader issue than this one. So leave title alone for this one.] 1. (first sentence) "By popular demand, a fe

[issue18648] FP Howto and the PEP 8 lambda guildline

2013-08-03 Thread Terry J. Reedy
New submission from Terry J. Reedy: Functional Programming HowTo, near the end, has a section Small functions and the lambda expression http://docs.python.org/3/howto/functional.html#small-functions-and-the-lambda-expression To illustrate, it starts with adder = lambda x, y: x+y

[issue18151] Idlelib: update to "with open ... except OSError" (in 2.7, leave IOError)

2013-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch looked good, so I backported to 2.7 (attached, in case there are problems) and pushed. -- assignee: -> terry.reedy resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed Added file: http://bug

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Can you add a reference for the coefficients? I believe def test_main(): test.support.run_unittest(ColorsysTest) if __name__ == "__main__": test_main has been and is being replaced in other test files with if __name__ == "__main__":

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. Go ahead and push. -- ___ Python tracker <http://bugs.python.org/issue14323> ___ ___ Python-bugs-list mailing list Unsub

[issue18472] Update PEP 8 to encourage modern conventions

2013-08-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ezio 2. Explicitly say "use 'as' instead of ','". Someone who does not know that 'as' is available since 2.6 may not understand. 3. 'byte' may be interpreted a

[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-08-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Byte 0, not byte 1, is the start byte, and it should be F0, as in output below. However, I now see "invalid continuation byte'. In 2.7.5, # -*- coding: utf-8 -*- s = b'𐒢' # output same if uncomment following lines #s = u'𐒢'.enc

[issue18583] Idle: enhance FormatParagraph

2013-08-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +IDLE Unit test for FormatParagrah.py ___ Python tracker <http://bugs.python.org/issue18583> ___ ___ Python-bug

[issue18226] IDLE Unit test for FormatParagrah.py

2013-08-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Added tests to get 100% coverage (not counting in __name__ block). More test cleanups. Some of the extra newlines come from getting to 'end' instead of 'insert'. Others are avoided by adding newline to end of test strings, which is more

[issue18606] Add statistics module to standard library

2013-08-08 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: A few small comments and nits. 1. I'm with the author on the question of a sum function in this module. The arguments that builtin sum isn't accurate enough, and neither is math.fsum for cases where all data is of infinite precision, are eno

[issue18226] IDLE Unit test for FormatParagrah.py

2013-08-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I got rid of the shutdown warning by replacing EditorWindow with a simple mock, as explained in the test file. Doing so also reduced the running time from about .40 seconds to .25 (it was 1.0+ before I reduced the redundancy of the tests). All the asserts

[issue18655] GUI apps take long to launch on Windows

2013-08-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: This tracker is for patching CPython, not Windows or 3rd-party C libraries. Ramchandra is right, Python does not display windows. In the cases you mention, this is done by 3-rd party cross-platform graphics libraries interacting with Windows' native gra

[issue18226] IDLE Unit test for FormatParagrah.py

2013-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Unless there is a buildbot problem, further enhancements of either file will be part of #18583 -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed superseder: -> Idle: enhance For

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-10 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: docs@python -> terry.reedy nosy: +terry.reedy stage: -> commit review ___ Python tracker <http://bugs.python.org/i

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Zhongyue, we merge 3.x patches forward (currently 3.3 to 3.4) so only one patch is usually needed unless the differences are non-trivial. It is easier if different version patches are tagged with the version in the filename.('-27', for instance. If

[issue18686] Tkinter focus_get on menu results in KeyError

2013-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am not able to reproduce any problem on Win 7 with either recent 2.7.6a0 (repository) or 3.3.2. Nothing happens if I click on [File] or anywhere else outside of the entry box or [_]...[X] window buttons. Please give the signin info such as "Python

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: This was the only failure on 2 of 4 buildbots when I last looked. test_os has several methods like this: def test_dup2(self): if hasattr(os, "dup2"): self.check(os.dup2, 20) Should the hasattr be moved to skipUnless for al

[issue18706] test failure in test_codeccallbacks

2013-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Failure is intermittent. The only related lines in test_codeccallbacks are 002: import html.entities 102:l.append("&%s;" % html.entities.codepoint2name[ord(c)]) -- nosy: +terry.reedy ___ Python

[issue18429] IDLE: Format Paragraph doesn't function with comment blocks

2013-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 'fix', including the test, is included with the patch for #18226. It shares with normal text the problem that selections of partial lines do not work well. I think this might be fixed in #18583 by only re-wrapping compl

[issue18702] Report skipped tests as skipped

2013-08-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch applies cleanly on my 3.4 Win 7, fresh debug build. Somewhat fortuitously, as it turns out, I have not downloaded the files needed for ssl support. For each modified file, I ran python_d -m test -v test_xxx test test_nntplib crashed -- Traceback

[issue18702] Report skipped tests as skipped

2013-08-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Applies and runs (with text_posix entirely skipped). -- ___ Python tracker <http://bugs.python.org/issue18702> ___ ___ Python-bug

[issue18583] Idle: enhance FormatParagraph

2013-08-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Based on working with the #18226 patch, I now think that rewrapping partial lines is a bug. Although I removed some problematical tests, I think there is still one that verifies buggy behavior. The outline of steps (which necessarily omits some details) would

[issue18732] IdleHistory.History: eliminate unused parameter; other cleanup.

2013-08-13 Thread Terry J. Reedy
New submission from Terry J. Reedy: idlelib.IdleHistory is only imported in PyShell.PyShell. History is only instantiated once, with output_sep defaulting to \n. This constant parameter and the consequence splitting and joining with \n in ._get_source and ._put_source are useless. After the

[issue18732] IdleHistory.History: eliminate unused parameter; other cleanup.

2013-08-13 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +IDLE Unit test for IdleHistory.py ___ Python tracker <http://bugs.python.org/issue18732> ___ ___ Python-bugs-list m

[issue18583] Idle: enhance FormatParagraph

2013-08-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Note to myself. The current test suite has one test commented out because it worked with EditorWindow but not the mock. It is possible that it is a mark-gravity issue. (I ran into this with the mock for IdleHistory

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: IdleHistory.py is identical in 2.7 and 3.3. It is only imported in PyShell.py (within class PyShell, line 852 in 3.3). History is only initialized once, with the default output_sep. See #18732 for deleting the unneeded parameter and associated cruft. The

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-13 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file31287/test_idlehistory3.diff ___ Python tracker <http://bugs.python.org/issue18425> ___ ___ Python-bug

[issue18606] Add statistics module to standard library

2013-08-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Revised patch with tests modified to pass, as described in pydev post. 1. test. added to test_statistics_approx import 2. delete test_main and change ending of both to if __name__ == '__main__': unittest.main() -- nosy: +terry.reedy Added

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Moved most initialization to method setUp to prevent cascading of test failures. Added info about History.fetch and FetchTest.fetch_test methods. Added tests for non-cyclic and special behavior and for fetch event wrappers. Coverage is essentially 100

[issue18533] Avoid error from repr() of recursive dictview

2013-08-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please visit http://www.python.org/psf/contrib/ http://www.python.org/psf/contrib/contrib-form/ and submit a Contributor Agreement. This process is complete when '*' appears after your name here, as with mine

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed superseder: -> IdleHistory.History: eliminate unused parameter; other cleanup. ___ Python tracker <http://bugs.python.org/i

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue18425> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18226] IDLE Unit test for FormatParagrah.py

2013-08-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: test.regrtest is semi-useless, at least for idle, in 2.7 -- see commit message. First run single file directly or python -m test.test_idle. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18732] IdleHistory.History: eliminate unused parameter; other cleanup.

2013-08-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-08-15 Thread Terry J. Reedy
New submission from Terry J. Reedy: It has become apparent from various discussions in recent months that chain.from_iterable is at least as useful as chain. In fact, I now think that 'chain' should have been what chain.from_iterable is, with current chain(a,b,c) done as chain((a,

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-08-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: My counter proposal #18752 is that chain.from_iterable become a deprecated alias for a new function, chain_iterable. With '@classmethod' removed, the current Python equivalent would work for chai

[issue18743] References to non-existant "StringIO" module

2013-08-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: LGTM -- nosy: +terry.reedy stage: patch review -> commit review type: -> behavior ___ Python tracker <http://bugs.python.org/i

[issue18702] Report skipped tests as skipped

2013-08-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: You changed "NNTP_CLASS = nntplib.NNTP_SSL", which could potentially fail, to "NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None)", which cannot fail. Since that was the only thing that previously could fail, the change leaves nothi

[issue10654] test_datetime sometimes fails on Python3.x windows binary

2013-08-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: test_datetime passes on current 3.3 and 3.4. datetimetest.py now gives the same answer for all 4 classes unsupported operand type(s) for +: 'SubPy' and 'int' unsupported operand type(s) for +: 'int' and 'SubPy' NotI

[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period

2013-08-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'Filename extensions' are a proper subset of 'suffixes'. https://en.wikipedia.org/wiki/Filename_extension Dan 'solutions' indicates that he thinks that the two sets are or should be the same, which they are not. The only thing t

[issue18702] Report skipped tests as skipped

2013-08-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: My original suggestion was to put the possibly failing assignment inside @classmethod def setUpClass: NNTP_CLASS = nntplib.NNTP_SSL so that failure of the assignment would be be reported, but not affect import

[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period

2013-08-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: It would be fine with me to shorten the suggestion and not repeat the defaults. They are currently in both doc and docstring, but with *more* words than I used. "The file name will begin with *prefix* and end with *suffix*. There is no automatic addition

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added the docstrings that I wish had already been present. The only 2.7-3.3 difference in SearchDialogBase is Tkinter/tkinter. -- assignee: -> terry.reedy stage: -> patch review ___ Python tracker

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: A subtle point about coverage. The target module must be imported. from idlelib import SearchDialogBase as sdb # works. import idlelib.SearchDialogBase as sdb # does not at least not as I invoke coveragepy in my batch file. With this change, the four

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ezio: grepping test/*.py for (name)'= self.assertEqual' gets 182 hits in 15 different files. If you are generically opposed to name localization, please take your case to pydev. I also found 'unless = self.assertTrue' and am sure I hav

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: As with searchdialogbase tests, I get the following in the console every time I run the test file within idle. ''' can't invoke "event" command: application has been destroyed while executing "event generate $w <>&q

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file31369/18489-test_searchengine4.diff ___ Python tracker <http://bugs.python.org/issue18489> ___ ___ Pytho

[issue18704] IDLE: PEP8 Style Check Integration

2013-08-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Summary: I am in favor of making more Python code analysis available from within Idle. I have an alternate, more generalized proposal. I am opposed to this specific proposal and think this issue should be closed. Alternatives: when and how to analyze. 1

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: For next edit -- docstring for class SearchDialogBase: > +a row of standard radiobuttons (create_option_buttons); This is wrong -- these are Checkbuttons > +a row of dialog specific radiobuttons (create_other_buttons). dialog-sp

[issue13758] compile() should not encode 'filename' (at least on Windows)

2013-08-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, do you have any opinion on this unicode filename issue? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue13

[issue16123] IDLE - deprecate running without a subprocess

2013-08-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Slight correction: While I do not believe I have seen *clipboard* contents pasted, after running a program from the editor that prints (to the shell), I *have* seen the last line reprinted when trying to enter something new as the prompt. This sometimes might

[issue18783] No more refer to Python "long"

2013-08-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: For msilib, 'int numbers' should just be 'ints' or 'integers'. --- For PC/winreg.c '''\ PyDoc_STRVAR(PyHKEY_Detach_doc, "key.Detach() -> int\n" ... "On 64 bit windows, the result of this function i

[issue18803] Fix more typos in .py files

2013-08-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Incorrect fixes. accidentaly -> accidentally occurence -> occurrence -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/i

[issue18823] Idle: use pipes instead of sockets to talk with user subprocess

2013-08-23 Thread Terry J. Reedy
New submission from Terry J. Reedy: Idle once used os.spawnv to open the user subprocess and 2.7 still does. Sockets were then used to interact with the subprocess. Since rev71746, 2011-8-3, 3.2+ use subprocess.Popen but still use sockets. A rare but continual problem is failure to make the

[issue16123] IDLE - deprecate running without a subprocess

2013-08-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I opened #18823 "Idle: use pipes instead of sockets to talk with user subprocess" I think this or a socket fix is needed before we remove -n. -- ___ Python tracker <http://bugs.python.o

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Big changes: monkey-patched module so tests of functions not using Text are non-gui; split search tests from other class tests as part of this. Several other little changes. The four lines still not covered are the bodies of if ok: start = last if wrapped and

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The attached patch works on 3.3 and just need a small addition for 100$ coverage. After that, I intend to commit after porting to 2.7 (only two lines to change, I think) and testing it there. I split the search test case into three, one for each method. The

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Adding engine.patvar.set(None) Equal(search(text), None) to test_search completed the coverage. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-29 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I have a gentoo host, but I'd like to know how did the OP get a debug Python in the first place? The ebuild for python 2.7.5-r1 doesn't say anything about debug options. "How" would preferably include information about the C comp

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: For the tutorial, I agree with presenting json rather than pickle for all the reasons given, with pickle mentioned in a paragraph at the end (more powerful, more dangerous, see warning in manual before using). -- nosy: +terry.reedy stage: -> ne

[issue18845] 2.7.5-r2: Fatal Python error: Segmentation fault

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think this should be closed as extremely likely to be a matplotlib error. -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/issue18

[issue18826] reversed() requires a sequence - Could work on any iterator?

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The two cases are not parallel. a = sorted(b) abbreviates a = list(b) a.sorted() which occurred often enough to be a nuisance. With this proposal, a = reversed(b) would abbreviate a = reversed(list(b)) which is probably less common and certainly less

[issue18855] Inconsistent README filenames

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: README.txt is also used in lib/idlelib and lib/idlelib/idle_test. In the latter case, I was told to use this. -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/issue18

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The discrepancy between doc and code should be eliminated. In this case, it seems the doc should be changed (in 3.3 as well). Would 'not' in the right place suffice? -- nosy: +terry.reedy ___ Python trac

[issue18853] Got ResourceWarning unclosed file when running Lib/shlex.py demo

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think the warning should be silenced on all versions where it occurs. There is no real problem here, but there can be with multiple opens without close on non-refcounted interpreters. Patch looks good but I have not tried it. -- nosy: +terry.reedy

[issue17224] can not open idle in python 2.7.3

2013-08-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/issue17224> ___ ___ Python-bugs-

[issue18877] tkinter askopenfilenames does not work in Windows library folder

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: There was a issue about people not being able to open windows 'library' files from Idle, but it was determined not to be an Idle problem. I cannot find it now. The outcome may have been that this was presumed to be a tk bug, but your report

[issue18875] Automatic insertion of the closing parentheses, brackets, and braces

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have thought about such a feature also. I would at least like to have patch to try it out. Possible? I suspect so. -- nosy: +terry.reedy versions: +Python 3.4 -Python 2.7 ___ Python tracker <h

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Perhaps I am confused because I did not notice the switch between builtins.__import__ and importlib.__import__ -- and I do not know the relation between the two, if indeed they are two and not one. What I read and understood is * importlib.import_module doc

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: > How about we simply add the warning from > http://docs.python.org/3/library/pickle.html#module-pickle to the beginning > (or end) of the section? That is one possibility. > The Official Python Tutorial has always assumed a certain

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Two years later, I get the exact same failure in both repository 3.3.2+ and installed 3.3.2. So eol extension and .hgignore seem irrelevant. I sometime think Python should stop generating files with \r\n. In other words, change os.linesep to '\n

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: These are due to \r in line endings, as with #12037. File "F:\Python\dev\py34\lib\test\test_sax.py", line 634, in test_expat_file self.assertEqual(result.getvalue(), xml_test_out) Assert fails because off many \rs in xml_text_out. Same in li

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: On #12037, David suggests instead the equivalent of this: with open(TEST_XMLFILE_OUT) as f: xml_test_out = f.read().encode('ascii') -- ___ Python tracker <http://bugs.python.o

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Attached patch works here too. Only the test...rfc822 part applies to 3.3, both to 3.4. The same idea works for #18889 too. -- Added file: http://bugs.python.org/file31527/12037_test_email2.diff ___ Python tracker

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Adding something like '(not builtins.__import__)' or '(different from builtins.__import__') after 'importlib.__import__' should reduce the possibility of confusing the two and expecting something that will not happen. You mig

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I said on #12037, I would rather \r was not in the file. I do not know if it is present in the master repository or added by hg when cloning. Buildbots and developer desktops are different environments. The tests must work on both. Nit 1: right, I should

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I did "emerge =dev-lang/python-2.7.5-r1" *twice* with the environment configuration described in msg196520, then *once* with it disabled because one of the cases you described was when you tried to revert to a non-debug Python. (Besides, I am

<    78   79   80   81   82   83   84   85   86   87   >