[issue21666] Argparse exceptions should include which argument has a problem
paul j3 added the comment: In http://bugs.python.org/file30010/nargswarn.patch adding the '_expand_help(action)' line should test the help string (during add_argument). def _check_argument(self, action): # check action arguments # focus on the arguments that the parent container does not know about # check nargs and metavar tuple try: self._get_formatter()._format_args(action, None) except ValueError as e: raise ArgumentError(action, str(e)) except TypeError: #raise ValueError(length of metavar tuple does not match nargs) raise ArgumentError(action, length of metavar tuple does not match nargs) # check the 'help' string try: self._get_formatter()._expand_help(action) except (ValueError, TypeError, KeyError) as e: raise ArgumentError(action, 'badly formed help string') The 'except' clause may need to be changed to capture all (or just most?) of the possible errors in the format string. Besides your error I can imagine '%(error)s` (a KeyError). We also need to pay attention to the differences between Py2 and Py3 errors. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21666 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9849] Argparse needs better error handling for nargs
paul j3 added the comment: http://bugs.python.org/issue21666 raises the possibility of testing the 'help' parameter in the same way. By adding (to _check_argument): # check the 'help' string try: self._get_formatter()._expand_help(action) except (ValueError, TypeError, KeyError) as e: raise ArgumentError(action, 'badly formed help string') -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20578] BufferedIOBase.readinto1 is missing
Roundup Robot added the comment: New changeset b1e99b4ec374 by Benjamin Peterson in branch 'default': backout 0fb7789b5eeb for test breakage (#20578) http://hg.python.org/cpython/rev/b1e99b4ec374 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20578 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20699] Behavior of ZipFile with file-like object and BufferedWriter.
Martin Panter added the comment: I have a related issue in Python 3.4. I suspect it is the same underlying problem as Henning’s. BufferedWriter is trying to write memoryview() objects, but the documentation for RawIOBase.write() implies it only has to accept bytes() and bytearray() objects. from io import BufferedWriter, RawIOBase class Raw(RawIOBase): ... def writable(self): return True ... def write(self, b): print(b.startswith(b\n)) ... b = BufferedWriter(Raw()) b.write(babc) 3 b.close() Traceback (most recent call last): File stdin, line 1, in module File stdin, line 3, in write AttributeError: 'memoryview' object has no attribute 'startswith' -- nosy: +vadmium versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20699 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20578] BufferedIOBase.readinto1 is missing
Changes by Benjamin Peterson benja...@python.org: -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20578 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1559298] test_popen fails on Windows if installed to Program Files
eryksun added the comment: This is fixed for subprocess.Popen in 2.7, 3.1, and 3.2; see issue 2304. In 2.7, nt.popen still has this problem. As mentioned above, it can be worked around by using subprocess.Popen as described here: https://docs.python.org/2/library/subprocess.html#replacing-os-popen-os-popen2-os-popen3 -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559298 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21691] set() returns random output with Python 3.4.1, in non-interactive mode
New submission from Jackson Cooper: The set() built-in returns random output, only when Python 3 is being used, and in non-interactive mode (executing a file). Steps to reproduce: 1. Create file with only print(set(['A', 'B'])) inside it. 2. Execute file with Python 3.4.1 numerous times (10+) over 10+ seconds. The output will vary (randomly?) between {'B', 'A'} and {'A', 'B'}. I can only reproduce this with Python 3.4.1 (have not tried 3.5). It cannot be reproduced in Python 2 (2.7.6) interactive or non-interactive mode, or Python 3.4.1 in interactive mode. Only in Python 3 when executing a file. Tested on OS X 10.9.3, Python installed via Homebrew. -- components: Interpreter Core messages: 220021 nosy: Jackson.Cooper priority: normal severity: normal status: open title: set() returns random output with Python 3.4.1, in non-interactive mode type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21691] set() returns random output with Python 3.4.1, in non-interactive mode
Benjamin Peterson added the comment: Yep, set order like dictionary order is arbitrary. -- nosy: +benjamin.peterson resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21691] set() returns random output with Python 3.4.1, in non-interactive mode
Ned Deily added the comment: To expand a bit, this is by design, a consequence of the hash randomization feature; see https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED As noted there, if necessary, it is possible to disable hash randomization. But tests with set values or dict keys should not depend on a particular order as even disabling hash randomization would not guarantee the same results on different platforms or builds of Pythons. $ python3.4 -c print(set(['A', 'B'])) {'B', 'A'} $ python3.4 -c print(set(['A', 'B'])) {'A', 'B'} $ python3.4 -c print(set(['A', 'B'])) {'B', 'A'} $ PYTHONHASHSEED=0 python3.4 -c print(set(['A', 'B'])) {'B', 'A'} $ PYTHONHASHSEED=0 python3.4 -c print(set(['A', 'B'])) {'B', 'A'} $ PYTHONHASHSEED=0 python3.4 -c print(set(['A', 'B'])) {'B', 'A'} -- nosy: +ned.deily stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21691] set() returns random output with Python 3.4.1, in non-interactive mode
Jackson Cooper added the comment: Ah, gotcha. I was assuming the output was consistent across environments, even though ordering of set() is arbitrary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21692] Wrong order of expected/actual for assert_called_once_with
New submission from Fei Long Wang: m=mock.Mock() m.some_method('foo', 'bar') Mock name='mock.some_method()' id='140353787504656' m.some_method.assert_called_once_with('foo', 'bar') m.some_method.assert_called_once_with('foo', 'baz') Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python2.7/dist-packages/mock.py, line 846, in assert_called_once_with return self.assert_called_with(*args, **kwargs) File /usr/local/lib/python2.7/dist-packages/mock.py, line 835, in assert_called_with raise AssertionError(msg) AssertionError: Expected call: some_method('foo', 'baz') # Actual call: some_method('foo', 'bar') # -- components: Tests messages: 220025 nosy: flwang priority: normal severity: normal status: open title: Wrong order of expected/actual for assert_called_once_with versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21692] Wrong order of expected/actual for assert_called_once_with
Changes by Ned Deily n...@acm.org: -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21685] zipfile module doesn't properly compress odt documents
SilentGhost added the comment: Whether for reasons of slightly different setup or due to something else, I'm not able to reproduce the issue. What I do see, is that the field is not automatically updated, so on opening of the document I have to hit F9 to get the answer field updated. That doesn't, however, seem at all related to the compression method (that is I do get the same behaviour for any combination of compression level values). Perhaps someone else would have a better idea. -- nosy: +alanmcintyre ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21693] Broken link to Pylons in the HOWTO TurboGears documentation
New submission from Yann Lebel: The link to the Pylons framework present at the end of theHOWTO - HOWTO Use Python in the web - TurboGears documentation section redirect to a domain that does not exists anymore. I believe it should be replaced by http://www.pylonsproject.org/ Here is the link to the documentation section https://docs.python.org/3/howto/webservers.html#turbogears -- assignee: docs@python components: Documentation messages: 220027 nosy: Yann.Lebel, docs@python priority: normal severity: normal status: open title: Broken link to Pylons in the HOWTO TurboGears documentation type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21693 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21693] Broken link to Pylons in the HOWTO TurboGears documentation
Yann Lebel added the comment: I just noticed that the same broken link exists in the Other notable frameworks as well. Here is the link to the section https://docs.python.org/3/howto/webservers.html#other-notable-frameworks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21693 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21692] Wrong order of expected/actual for assert_called_once_with
Michael Foord added the comment: What specifically are you saying is in the wrong order? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules
Michael Foord added the comment: That looks great - thanks! I'll get it committed shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21600 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15286] normpath does not work with local literal paths
Mark Lawrence added the comment: As Antoine's pathlib made it into 3.4 is the patch here now obsolete or what? Also note the reference to issue15275. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15286 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18141] tkinter.Image.__del__ can throw an exception if module globals are destroyed in the wrong order
Jan Kanis added the comment: I tested 2.7 tip (6dfbe504f659), which does not show the problem, as expected. I think there was a real bug in that the tkinter.TclError global was being set to None on exit, but a TclError being raised is expected if I go by the comment in tkinter. The bug was fixed in commit 79e2f5bbc30c. -- resolution: - out of date status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18141 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15275] isinstance is called a more times that needed in ntpath
Mark Lawrence added the comment: @Manuel do you intend picking this up? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15275 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21694] IDLE - Test ParenMatch
New submission from Saimadhav Heblikar: Adding test for idlelib.ParenMatch for 3.4 Will backport to 2.7 when this patch is OK. 3 lines could not be tested in this patch. -- components: IDLE files: test-parenmatch.diff keywords: patch messages: 220034 nosy: jesstess, sahutd, terry.reedy priority: normal severity: normal status: open title: IDLE - Test ParenMatch versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35536/test-parenmatch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21694 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17822] Save on Close windows (IDLE)
Mark Lawrence added the comment: Using 3.4.1 on Windows I can't reproduce the AttributErrors given in msg187674 -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12274] Print window menu on IDLE aborts whole application
Mark Lawrence added the comment: Can this be closed as a patch has been committed and the unittest framework was created on issue15392 ? -- nosy: +BreamoreBoy, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?
Arfrever Frehtes Taifersar Arahesis added the comment: Minor inconsistency in Lib/tempfile.py: # Set flag to None to not try again. _O_TMPFILE_WORKS = False s/None/False/ -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21515 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse
Vajrasky Kok added the comment: Here is the patch based on R. David Murray's nitpick. -- Added file: http://bugs.python.org/file35537/bytes_parser_dont_close_file_v5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21476 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4765] IDLE fails to Delete Custom Key Set properly
Mark Lawrence added the comment: This is still a problem on Windows 7 with 3.4.1 but the patch file fixes it. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4765 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4765] IDLE fails to Delete Custom Key Set properly
Changes by Nicholas Allevato nicholas.allev...@gmail.com: -- nosy: +nicholas.allevato ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4765 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17822] Save on Close windows (IDLE)
Terry J. Reedy added the comment: When writing the human-verified tests in idle_test.htest.py, we discovered that there is a different between Windows and Linux in focus shifting when opening an editor window from a visible root window. On Widows, I have to click on the editor window to enter anything. Saimadhav reports that on Linux, the editor already has the focus and is live. Similarly, when I open Idle from console interpreter with import idlelib.idle the focus stay with the console and I have to click on the shell to enter code there. I suspect that this is also different on *nix. Can someone check? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18910] IDle: test textView.py
Zachary Ware added the comment: The changeset Benjamin backed out is pretty much fine, just needs the requires('gui') to be at the top of setUpModule instead of at toplevel. That does mean the whole module is constructed and then thrown away without doing anything, but it at least runs properly even with no Tk available. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18910 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21682] Refleak in idle_test test_autocomplete
Zachary Ware added the comment: Terry, did you mean to push Saimadhav's patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21682 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21671] CVE-2014-0224: OpenSSL upgrade to 1.0.1h on Windows required
Zachary Ware added the comment: So installers are out for 3.1-3.3; should we still update the externals script and pyproject properties for those branches anyway? If not, this issue should be ready to close. -- stage: - commit review status: open - pending type: - security ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21671 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21682] Refleak in idle_test test_autocomplete
Roundup Robot added the comment: New changeset b8f33440cd5e by Terry Jan Reedy in branch '2.7': Issue #21682: Replace EditorWindow with mock to eliminate memory leaks. http://hg.python.org/cpython/rev/b8f33440cd5e New changeset e6cc02d32957 by Terry Jan Reedy in branch '3.4': Issue #21682: Replace EditorWindow with mock to eliminate memory leaks. http://hg.python.org/cpython/rev/e6cc02d32957 New changeset 30c2f65a6346 by Terry Jan Reedy in branch '2.7': Issue #21682: Replace EditorWindow with mock to eliminate memory leaks. http://hg.python.org/cpython/rev/30c2f65a6346 New changeset 7f14a2c10c09 by Terry Jan Reedy in branch '3.4': Issue #21682: Replace EditorWindow with mock to eliminate memory leaks. http://hg.python.org/cpython/rev/7f14a2c10c09 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21682 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21671] CVE-2014-0224: OpenSSL upgrade to 1.0.1h on Windows required
Steve Dower added the comment: The only reason to do it is to help out those who build from source, which I suspect is an incredibly small group on Windows. We'd also be signing up to keep doing it, and implying that it's been tested. I say don't bother. From: Zachary Waremailto:rep...@bugs.python.org Sent: 6/8/2014 11:57 To: Steve Dowermailto:steve.do...@microsoft.com Subject: [issue21671] CVE-2014-0224: OpenSSL upgrade to 1.0.1h on Windows required Zachary Ware added the comment: So installers are out for 3.1-3.3; should we still update the externals script and pyproject properties for those branches anyway? If not, this issue should be ready to close. -- stage: - commit review status: open - pending type: - security ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21671 ___ -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21671 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21671] CVE-2014-0224: OpenSSL upgrade to 1.0.1h on Windows required
Zachary Ware added the comment: Good enough for me. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21671 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17822] Save on Close windows (IDLE)
Mark Lawrence added the comment: Using 3.4.1 and 3.5.0 on Windows 7 I always get the focus set to the edit window or shell as appropriate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21683] Add Tix to the Windows buildbot scripts
Changes by Zachary Ware zachary.w...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35538/issue21683.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21683 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21669] Custom error messages when print exec are used as statements
Glyph Lefkowitz added the comment: Just my 2¢ here: rather than debating cases in the abstract, it would be interesting to 'pip install' a couple of popular 2.x-only packages and see if the error message is an improvement. My experience is that learners don't hit this so much by writing their own code wrong, but by loading a dependency with incorrect metadata on the wrong Python. (Which suggests to me that a URL in the error message telling you how to download a different version of Python would be very helpful as well.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21669 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21683] Add Tix to the Windows buildbot scripts
New submission from Roundup Robot: New changeset 31dbdd7596aa by Zachary Ware in branch '3.4': Issue #21683: Add Tix build to the Windows buildbot scripts. http://hg.python.org/cpython/rev/31dbdd7596aa New changeset 8bafb707d549 by Zachary Ware in branch '2.7': Issue #21683: Add Tix build to the Windows buildbot scripts. http://hg.python.org/cpython/rev/8bafb707d549 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21683 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21683] Add Tix to the Windows buildbot scripts
Zachary Ware added the comment: Tix should be built on the 2.7 and 3.4 buildbots now; it already has been on 3.x. -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21683 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21569] PEP 466: Python 2.7 What's New preamble changes
Arfrever Frehtes Taifersar Arahesis added the comment: These changes caused this warning (at least on default branch) from Sphinx: ${cpython_working_copy}/Doc/whatsnew/2.7.rst:442: WARNING: undefined label: argparse-from-optparse (if the link has no caption the label must precede a section header) -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21569 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21695] Idle 3.4.1-: closing Find in Files while in progress closes Idle
New submission from Terry J. Reedy: Reproducer: On Windows, Open Idle and editor. In editor grep (alt-f3), for instance, 'print' in /Lib/*.py. While hits are flashing by, close the output window with [x] 2.7.6 or .7: Output window closes, Idle continues as desired. 3.3.5 or 3.4.1: All Idle windows - shell, editor, output 3.4.1+, 3.5.0a, debug builds run from console interpreter: Output window closes, Idle continues, as desired. console window displays exception ending with File F:\Python\dev\5\py35\lib\idlelib\GrepDialog.py, line 90, in grep_it (fn, lineno, line)) File F:\Python\dev\5\py35\lib\idlelib\OutputWindow.py, line 40, in write self.text.insert(mark, s, tags) AttributeError: 'NoneType' object has no attribute 'insert' The specific fix is to wrap the text insert with try: except: break. The immediate mystery is why 2.7 did not shutdown with nowhere to print the traceback. -- assignee: terry.reedy messages: 220052 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Idle 3.4.1-: closing Find in Files while in progress closes Idle type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21695 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21696] Idle: test syntax of configuration files
New submission from Terry J. Reedy: Spinoff of #12274 and a dependency thereof: new test_configurations.py should statically test that configparser, called from idlelib.configHandler, can process all the configuration.def files without error. -- assignee: terry.reedy messages: 220053 nosy: sahutd, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Idle: test syntax of configuration files type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21696 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available
Changes by Richard Oudkerk shibt...@gmail.com: -- assignee: - sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20147 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12274] Print window menu on IDLE aborts whole application
Terry J. Reedy added the comment: This issue needs a unittest test added within the framework. I opened #21696 as a dependency. Since configx.def files can be edited, and, I believe, at least one is intended to be edited, configHandler should perhaps catch exceptions and display in a messagebox. But unless Idle could continue after that, that might wait for the general fix, which is another issue. -- dependencies: +Idle: test syntax of configuration files ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15780] IDLE (windows) with PYTHONPATH and multiple python versions
Mark Lawrence added the comment: Something on Windows configuration here https://docs.python.org/3/using/windows.html#excursus-setting-environment-variables -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15780 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21372] multiprocessing.util.register_after_fork inconsistency
Richard Oudkerk added the comment: register_after_fork() is intentionally undocumented and for internal use. It is only run when starting a new process using the fork start method whether on Windows or not -- the fork in its name is a hint. -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21372 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4765] IDLE fails to Delete Custom Key Set properly
Terry J. Reedy added the comment: Add to my list of patches to review. -- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4765 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?
Roundup Robot added the comment: New changeset 8b93cdccd872 by Victor Stinner in branch 'default': Issue #21515: Fix typo in a comment, thanks Arfrever for the report http://hg.python.org/cpython/rev/8b93cdccd872 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21515 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17822] Save on Close windows (IDLE)
Terry J. Reedy added the comment: I am on Windows 7 also. Did you open the shell from the console interpreter with import? Run python -m idlelib.idle_test.htest and for me the tests that open a separate editor window show the same problem of no cursor or focus in the editor. Perhaps you ran the tcl/tk compilation after the recent change in compile flags. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7932] print statement delayed IOError when stdout has been closed
tholzer added the comment: It's still a problem in Python 2.7: python -c 'import sys; print sys.stdout, x' 1- ; echo $? close failed in file object destructor: sys.excepthook is missing lost sys.stderr 0 But feel free to close as won't fix, as this seems to be an edge case which might not be worth fixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7932 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20578] BufferedIOBase.readinto1 is missing
Nikolaus Rath added the comment: Thanks for taking the time, and apologies about the test failure. I was probably too eager and ran only the test_io suite instead of everything. I looked at the failure, and the problem is that the default Python BufferedIOBase.readinto implementation is semi-broken. It should work with any object implementing the memoryview protocol (like the C implementation), but it really only works with bytearray objects. The testIteration test only worked (prior to the patch) because there is a special case for array objects with format 'b': try: b[:n] = data except TypeError as err: import array if not isinstance(b, array.array): raise err b[:n] = array.array('b', data) In other words, trying to read into any other object has always failed. In particular, even format code 'B' fails: import _pyio from array import array buf = array('b', b'x' * 10) _pyio.open('/dev/zero', 'rb').readinto(buf) 10 buf = array('B', b'x' * 10) _pyio.open('/dev/zero', 'rb').readinto(buf) Traceback (most recent call last): File stdin, line 1, in module File /home/nikratio/clones/cpython/Lib/_pyio.py, line 1096, in readinto buf[:len_] = array.array('b', buf2) TypeError: bad argument type for built-in operation The readline implementation that my patch adds for BufferedReader does not contain this special case, and therefore with the patch even the test with a 'b'-array fails. For now, I've added the same special casing of 'b'-type arrays to the _readline() implementation in BufferedReader. This fixes the immediate problem (and this time I definitely ran the entire testsuite). However, the fix is certainly not what I would consider a good solution.. but I guess that would better be addressed by a separate patch that also fixes the same issue in BufferedIOBase? -- Added file: http://bugs.python.org/file35539/issue20578_r4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20578 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11681] -b option undocumented
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11681 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20578] BufferedIOBase.readinto1 is missing
Nikolaus Rath added the comment: I used the wrong interpreter when cutting and pasting the example above, here's the correct version to avoid confusion with the traceback: import _pyio from array import array buf = array('b', b'x' * 10) _pyio.open('/dev/zero', 'rb').readinto(buf) 10 buf = array('B', b'x' * 10) _pyio.open('/dev/zero', 'rb').readinto(buf) Traceback (most recent call last): File /home/nikratio/clones/cpython/Lib/_pyio.py, line 662, in readinto b[:n] = data TypeError: can only assign array (not bytes) to array slice During handling of the above exception, another exception occurred: Traceback (most recent call last): File stdin, line 1, in module File /home/nikratio/clones/cpython/Lib/_pyio.py, line 667, in readinto b[:n] = array.array('b', data) TypeError: bad argument type for built-in operation -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20578 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21692] Wrong order of expected/actual for assert_called_once_with
Fei Long Wang added the comment: IMHO, the trace should be: AssertionError: Expected call: some_method('foo', 'bar') Actual call: some_method('foo', 'baz') instead of below: AssertionError: Expected call: some_method('foo', 'baz') Actual call: some_method('foo', 'bar') -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9012] Separate compilation of time and datetime modules
R. David Murray added the comment: No. The problem has nothing to do with the VS version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9012 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17822] Save on Close windows (IDLE)
Mark Lawrence added the comment: My 3.4.1 is the released version, 3.5.0 built from source that was synchronised earlier today as in :- c:\cpython\PCbuild\python_d.exe Python 3.5.0a0 (default:b1e99b4ec374, Jun 8 2014, 18:29:24) [MSC v.1600 32 bit (Intel)] on win32 Running the console interpreter then import idlelib.idle works fine for both versions. python -m idlelib.idle_test.htest doesn't work for either version, on numerous occasions for different windows there was no focus or cursor. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17822] Save on Close windows (IDLE)
R. David Murray added the comment: On Linux I believe that what happens to the keyboard focus depends on the window manager in use and how that window manager is configured to behave. For instance, some window managers have a 'focus follows mouse' setting, but I always hated that so I would disable it, meaning I'd have to click in a window for it to acquire focus. (Or, in my case, use the keyboard to select the window to focus). I believe many window managers also allow you to control what happens to keyboard focus when a new window is opened and you aren't using 'focus follows mouse', but it's been a while since I've played with a window manager that uses floating windows, so I could be misremembering. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21688] Improved error msg for make.bat htmlhelp
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21688 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21692] Wrong order of expected/actual for assert_called_once_with
R. David Murray added the comment: But the actual call that you made in your example was some_method('foo', 'bar'). Given that we conventionally write unittest assertions with the actual result first and the expected result second (assertEqual(actual, expected), it might be less confusing if the message was: AssertionError: Actual call: some_method('foo', 'bar') Expected call: some_method('foo', 'baz') But since the actual call does appear in the assert call that generates the assertionError, it is not obvious that this would actually be a better order. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15780] IDLE (windows) with PYTHONPATH and multiple python versions
Terry J. Reedy added the comment: There already is an idlelib/idle.bat that starts the corresponding python with set CURRDIR=%~dp0 start IDLE %CURRDIR%..\..\pythonw.exe %CURRDIR%idle.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9 Arguments added to the .bat command are passed on. So the enhancement requested already exists. C:\Programspython34\lib\idlelib\idle.bat, for instance, starts 3.4, and changing '34' to '33' or '27' starts 3.3 or 2.7. python -E ignores PYTHON* environment variables. Unfortunately, this seems to prevent python from running idle. Adding -E to the above or directly to C:\Programs\Python34pythonw.exe Lib/idlelib/idle.pyw -E results in a new prompts with no visible action. Since I do not have any PYTHON* vars to ignore, this puzzle me. Does this indicate a bug in the startup handling of -E? (Nick?) Except for this puzzle, I would close this as a third party issue. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15780 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21616] argparse explodes with nargs='*' and a tuple metavar
Vasilis Vasaitis added the comment: Ah, I did come across that issue when I was searching for prior reports, but somehow it didn't register in my head as being the same thing. Does the fix for that address the behaviour I'm seeing too? If so, feel free to close as a duplicate. Additionally, if that fix is indeed relevant, is there an ETA for it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21616 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18910] IDle: test textView.py
Terry J. Reedy added the comment: Yes, early skipping was the reason I put the test where I did. The simple change occurred to me today. I have not decided yet whether to also change the 3.4/5 files to match and how to edit the testing README. For one test, I would not care either way. But I expect there to be more files with the same issue, So I wonder what is the best way to avoid hitting the same booby trap again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18910 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21624] Idle: polish htests
Terry J. Reedy added the comment: Another issue for sometests, but which might be fixed in htest.run, is to force focus to the new widget window opened by the Test_xyz button. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21624 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17822] Save on Close windows (IDLE)
Terry J. Reedy added the comment: It seems that I have been over-optimistic about uniformity of behavior. With the focus issue different for opening Idle and opening subwindows in htest, I added it to the issue about refining htest #21624. Given Mark's report, I must rebuild tcl/tk and make sure I am running with new .dlls before retesting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21682] Refleak in idle_test test_autocomplete
Terry J. Reedy added the comment: Checking the buildbot just now, there is some other stuff after test_tk on X86 Windows 7, but I ran the command you gave (but with python_d) and it passed ok. So I presume this is really fixed and should stay closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21682 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21669] Custom error messages when print exec are used as statements
Nick Coghlan added the comment: My main aim here is to offer a custom error message that can be looked up in an internet search (likely ending up at a Stack Overflow answer - which we could create in advance of the 3.4.x release that includes this change). That answer can then explain the various reasons this error can come up, like: * following a Python 2 tutorial in Python 3 * running a Python 2 script in Python 3 * attempting to install a Python 2 only dependency on Python 3 And possible solutions like: * if it's your own code, changing the print statements to be compatible with both Python 2 3 by using string formatting and surrounding parentheses ( print() for blank lines) * looking for a Python 3 tutorial instead * using Python 2 instead of Python 3 * looking for an alternative package that runs on Python 3 It's never going to be possible to fit all that into an error message, hence why I consider can be looked up in an internet search more easily than the generic 'invalid syntax' error message to be the most important characteristic of the custom error message. I don't expect the exact wording to really matter all that much. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21669 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21569] PEP 466: Python 2.7 What's New preamble changes
Nick Coghlan added the comment: Huh, I thought I fixed that before pushing. Maybe I missed a commit after editing... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21569 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21569] PEP 466: Python 2.7 What's New preamble changes
Roundup Robot added the comment: New changeset 454d4a9a3088 by Nick Coghlan in branch '3.4': Issue #21569: Fix incorrect cross reference http://hg.python.org/cpython/rev/454d4a9a3088 New changeset 524d73b8f29e by Nick Coghlan in branch 'default': Issue #21569: merge from 3.4 http://hg.python.org/cpython/rev/524d73b8f29e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21569 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15780] IDLE (windows) with PYTHONPATH and multiple python versions
eryksun added the comment: `idle.pyw -E` passes an invalid argument, and pythonw.exe doesn't inherit the console to print the usage text to stderr. The -E option needs to be passed to the interpreter: C:\Python34pythonw.exe -E Lib/idlelib/idle.pyw Or run idlelib as a script: pyw -3 -Em idlelib -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15780 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15780] IDLE (windows) with PYTHONPATH and multiple python versions
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - works for me stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15780 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15780] IDLE (windows) with PYTHONPATH and multiple python versions
Terry J. Reedy added the comment: Thanks for the correction. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15780 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules
fumihiko kakuma added the comment: Thank you in advance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21600 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com