[issue22047] argparse improperly prints mutually exclusive options when they are in a group
paul j3 added the comment: This patch adds a class TestMutuallyExclusiveGroupErrors test_invalid_add_group() test, closely modeled on test_invalid_add_argument() I'm using ValueError in group add methods (maintaining the similarity with add_argument errors). I haven't changed the documentation. add_argument_group and add_mutually_exclusive_group methods are described as belonging to an ArgumentParser, and the examples are consistent with that. An admonition against nesting groups would not fit with the current flow. However to be accurate, these methods belong to _ActionsContainer, the parent class for both the parser and groups. The documentation glosses over this detail. So an alternative way of addressing this issue is to move these 2 methods to the ArgumentParser class. -- Added file: http://bugs.python.org/file36100/issue22047_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22047 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22068] test_gc fails after test_idle
Terry J. Reedy added the comment: ConfigDialog is a good guess as I added a minimal test this month. I will try to revise to not create loops in the first place. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3982] support .format for bytes
Terry J. Reedy added the comment: http://legacy.python.org/dev/peps/pep-0461/ adds % formatting for bytes and bytes array. Nick, I have the impression that there was a decision to not add bytes.format. Correct? If so, this issue should be closed. If not, what, if anything, has been decided? -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3982 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3982] support .format for bytes
Nick Coghlan added the comment: Right, bytes.format was considered as part of the PEP 461 discussions, and rejected as an operation that only made sense in the text domain: http://www.python.org/dev/peps/pep-0461/#proposed-variations With PEP 461 accepted, and PEP 460 withdrawn, that means we won't be adding bytes.format and bytearray.format. Issue 20284 covers the implementation of PEP 461. -- resolution: - wont fix stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3982 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20284] patch to implement PEP 461 (%-interpolation for bytes)
Nick Coghlan added the comment: Just noting I'm working on some significant updates to the bytes and bytearray docs in issue 21777. I'll try to get that ready for review and merged relatively soon, so the docs for this can build on top of those changes. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20284 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21777] Separate out documentation of binary sequence methods
Nick Coghlan added the comment: OK, I've completed the initial pass through all the methods. Remaining items: * add back the guarantees where str will return the same object, add those guarantees for bytes where applicable * address the review comments from Zach and Ezio There are a couple of review comments about removing duplication that I'd like to skip addressing for now. I think they're reasonable ideas, but I also think it's a lot easier to go wrong with DRY in docs than it is in code. Indeed, this whole matter of not documenting the bytes behaviour in the first place was a matter of assuming folks could just infer the binary behaviour from the text behaviour. -- Added file: http://bugs.python.org/file36101/separate_binary_sequence_docs_v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21777 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17172] Add turtledemo to IDLE menu
Ned Deily added the comment: Here are some review comments on turtle_demo_v2.patch. First, the subprocess call to start turtledemo may work ok in your build directory but it will not work in general. Using the standard idiom for invoking a new process running the current instance of python, the call should look something like: cmd = [sys.executable, '-c', 'from turtledemo.__main__ import main; main()'] p = subprocess.Popen(cmd) Also, note that the imp module is deprecated in 3.4 in favor of importlib: https://docs.python.org/dev/library/imp.html#imp.find_module I'm not sure there is much point in having this test, though. The only thing it would catch is if some third-party distributor decided to move turtledemo into a separate package or not ship it altogether. It would not work for 2.7, even if Demo/turtle was shipped, since, in 2.7, turtledemo is not structured as an importable package. (And, to answer Terry's earlier question: no, the Demo directory is also not shipped with the python.org OS X installers for 2.7. I expect that the standard practice among Unix distributors would also be not to ship it by default; for one thing, they have to figure out where to install it since we don't provide a standard location to do so. I see that Debian does package up Demo into an optional python2.7-examples Debian package. So there seems to be no point in applying this change to 2.7 without also backporting the turtledemo repackaging done in 3.x and that would be a larger undertaking needing discussion and approval.) (Ah, but looking at current Debian and Ubuntu, for Python 3.4 I see that they have packaged turtledemo as part of their optional 'libpython3.4-testsuite' source package. Plus, they have long packaged IDLE separately ('idle-python3.4'). That means end users will need to ensure both packages are installed to be able to use turtledemo with IDLE. So I guess that says that there *is* a point to the import test. Ugh. I'm not sure what other popular distributions do.) Then there is a specific and serious usability problem with this feature on OS X. The subprocess call starts a new process with a second Python interpreter to run a second Tcl/Tk instance to run turtledemo next to IDLE. The turtledemo appears *but* the keyboard and mouse focus remains on IDLE which also means that the IDLE menu remains active (recall that there is only one menu bar on OS X and it shows only the menus from the currently focused GUI application). Especially with the proposed menu changes in Issue22065, it would be very confusing to the novice user to see the turtledemo window appear, possibly covering any IDLE windows, but with the IDLE menu still active and keyboard/mouse focus still on IDLE. It turns out to be a bit tricky to reliably activate tbe turtledemo application programmatically from Python code without resorting to some hacks. Here is one hack, making use of a bit of AppleScript, that seems to work. It would need to be tested in non-English OS X en vironments to make sure it works there also. diff Lib/turtledemo/__main__.py --- a/Lib/turtledemo/__main__.pyFri Jul 25 15:01:18 2014 -0700 +++ b/Lib/turtledemo/__main__.pyFri Jul 25 22:43:58 2014 -0700 @@ -69,6 +69,7 @@ import sys import os +import subprocess from tkinter import * from idlelib.Percolator import Percolator @@ -111,6 +112,20 @@ self.root = root = turtle._root = Tk() root.title('Python turtle-graphics examples') root.wm_protocol(WM_DELETE_WINDOW, self._destroy) +if sys.platform == 'darwin': +# Make sure we are the currently activated OS X application +# so that our menu bar appears. +p = subprocess.Popen( +[ +'osascript', +'-e', 'tell application System Events', +'-e', 'set frontmost of the first process whose ' + 'unix id is {} to true'.format(os.getpid()), +'-e', 'end tell', +], +stderr=subprocess.DEVNULL, +stdout=subprocess.DEVNULL, +) root.grid_rowconfigure(0, weight=1) root.grid_columnconfigure(0, weight=1) There are deprecated OS X Carbon interfaces to do the equivalent, as was used in the third-party package appscript. I'm noseying Ronald to see if he has any better suggestions for a non-deprecated way to do this (via Cocoa perhaps) and that could possibly be made available more generally: IDLE itself could benefit from it and would be a better solution than what was used in Issue11571. I have not tried the patch on Windows or X11 Tk to see if there are similar usability issues. If so, it's possible the wm attribtues . -topmost dance, as in Issue11571, might help. And last, Lita, please don't forget to run make patchcheck before uploading a
[issue19776] Provide expanduser() on Path objects
Claudiu Popa added the comment: Here's a version of the patch which raises ValueError when the path can't be expanded. Hopefully, the used approach is good enough. -- Added file: http://bugs.python.org/file36102/issue19776_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16535] json encoder unable to handle decimal
Changes by Ralph Heinkel r...@ralph-heinkel.com: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16535 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Add support for reading records with arbitrary separators to the standard IO stack
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22076] csv module bad grammar in exception message
New submission from Martin Matusiak: The csv module has an exception message with bad grammar: - delimiter must be an 1-character string an should be a -- components: Library (Lib) files: csv_grammar_fix.diff keywords: patch messages: 224028 nosy: haypo, numerodix, serhiy.storchaka priority: normal severity: normal status: open title: csv module bad grammar in exception message type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file36103/csv_grammar_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22076 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22077] Improve the error message for various sequences
New submission from Claudiu Popa: For a couple of sequences (bytes, list, tuple, bytearray), the error when using an invalid sequence index is misleading, because it says that only integers are allowed, while slices are allowed too. a = [] a['python'] Traceback (most recent call last): File stdin, line 1, in module TypeError: list indices must be integers, not str For instance, here's how range does it: range(1)['a'] Traceback (most recent call last): File stdin, line 1, in module TypeError: range indices must be integers or slices, not str The attached patch improves these error messages. -- files: proper_error.patch keywords: patch messages: 224029 nosy: Claudiu.Popa priority: normal severity: normal status: open title: Improve the error message for various sequences type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file36104/proper_error.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22077 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX
Ronald Oussoren added the comment: Does anyone have feedback for my proposed patch (other the bug in test code when sizeof(bool) != 1, the test values for big and little endian are in the wrong order)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22012 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15730] Silence unused value warnings under Mac OS X 10.8/clang
Changes by Ronald Oussoren ronaldousso...@mac.com: -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15730 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21308] PEP 466: backport ssl changes
Christian Heimes added the comment: Awesome! :) I'll try to find some time to check your work when I'm back from EuroPython. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21308 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16535] json encoder unable to handle decimal
Christian Heimes added the comment: I'm EuroPython 2014 in Berlin. Ralph has approached me and asked me about progress on the progress of this patch. I'm reluctant to implement a special case for decimals for two reasons: 1) JSON just support floats and decimals are IMHO incompatible with floats. The conversion of decial to JSON floats is a loosely operation. 2) Rather than having a special case I would rather go with a general implementation that uses an ABC to JSON dump some float-like objects. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16535 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22068] test_gc fails after test_idle
Serhiy Storchaka added the comment: Here is a patch against 2.7 which get rid of reference loops in Tk variables and Font. This will fix not only ConfigDialog, but any similar user code. In 3.4+ such reference loops are successfully resolved, but I think we should foreport this path to 3.4+ because it also fixes other minor bug: callbacks registered to trace variable now live while the variable lives, not while widget lives. -- assignee: - serhiy.storchaka components: +Tkinter stage: - patch review Added file: http://bugs.python.org/file36105/tkinter_refloops-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19325] _osx_support imports many modules
Ronald Oussoren added the comment: The use of context lib in _read_output should not be necessary anymore as file objects and NamedTemporaryFile objects already are context managers with the right semantics. I'm not sure how to avoid the import of tempfile other than adding a minimal implementation of tempfile.mkstemp to _osx_support, in particular because the fallback code in _osx_support is insecure: It uses a named temporary file in /tmp with builtin.open and because the name of the file is predictable there is a small risk of overwriting arbitrary files when an attacker has access to /tmp. I guess the fallback is there to use during bootstrap, it should really be avoided afterwards. BTW. A small unscientific test on my laptop didn't see any differences between the regular _osx_support and a version where import re was moved inside the functions that use that module. But: that's on a fast laptop with SSD for storage, there could easily be a difference on systems with slower storage. Ned: do you remember what your idea was w.r.t. avoid the use of re? I guess its easy enough to replace the current re-using code by code that only uses str methods, but your phrasing seems to indicate another plan. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19325 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X
Ronald Oussoren added the comment: I'd be in favour of closing this issue, I haven't seen the problem in a while and it is almost certainly due to a platform bug on OSX 10.6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15398 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10964] Mac installer need not add things to /usr/local
Ronald Oussoren added the comment: There'd still need to be some way to update the shell environment, but I agree that there needs to be something better than we have now. One option is to add a small shell script that can be sourced from the shell profile and adds the various python frameworks at the right place in sys.path (dynamically checks what's there instead of hardcoding a version in the command file we now use). A nice option to add is to optionally use a configuration file in ~/Library/Python to control the order in which directories are added to have some control on which version of python is used when starting it without a full version. There would then also need to be a script that manages that configuration file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10964 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19776] Provide expanduser() on Path objects
Serhiy Storchaka added the comment: Here is alternative patch which doesn't use os.path.expanduser() and reimplement it's logic. Differences: * expanduser() is part of concrete path API. This method access environment. * RuntimeError is raised when user home can't be determined. * Currently ntpath.expanduser() uses heuristic to expand path with specified username. This works with default homedirs but can return wrong result when homedirs was moved to different locations. WindowsPath.expanduser() also uses heuristic, but more robust. Of course it would be better to get other users homedirs from Windows API, and perhaps we should defer this issue until implementing pwd or like on Windows. * Expanded tests. Interesting, common idiom to escape tilda in relative path (adding ./ prefix) doesn't work with pathlib, because . components are ignored. -- Added file: http://bugs.python.org/file36106/pathlib_expanduser.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22076] csv module bad grammar in exception message
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: -serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22076 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12243] getpass.getuser works on OSX
Ronald Oussoren added the comment: The issue still is present, wouldn't it be better to just remove the availability annotation from the docs (2.7, 3.4 and trunk) while waiting for a better solution? That would at least remove confusion for these docs. At the very least the Macintosh availability note should be removed, that was used to document that a function is available on MacOS 9, which hasn't been supported in a long time now. -- nosy: +ronaldoussoren versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12243 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19776] Provide expanduser() on Path objects
Claudiu Popa added the comment: Looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22078] io.BufferedReader hides ResourceWarnings when garbage collected
New submission from Claudiu Popa: Given the following example, Python 3.5 doesn't emit any resource warning: import io, gc f = open(a) bufio = io.BufferedReader(f) gc.collect() Here's a small patch that enables this. -- components: IO files: buffered_io_resource_warning.patch keywords: patch messages: 224040 nosy: Claudiu.Popa priority: normal severity: normal status: open title: io.BufferedReader hides ResourceWarnings when garbage collected type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file36107/buffered_io_resource_warning.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22078] io.BufferedReader hides ResourceWarnings when garbage collected
Serhiy Storchaka added the comment: All works to me. $ ./python -Wall -c open('/dev/null', 'rb') -c:1: ResourceWarning: unclosed file _io.BufferedReader name='/dev/null' -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22068] test_gc fails after test_idle
STINNER Victor added the comment: I agree that the patch shoukd also br applied to 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22078] io.BufferedReader hides ResourceWarnings when garbage collected
Claudiu Popa added the comment: That's not the same, try with my example. open(a) will be a TextIOWrapper. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21308] PEP 466: backport ssl changes
Nick Coghlan added the comment: Thanks for working through this! I've kicked it in the direction of the Fedora Python SIG folks (https://lists.fedoraproject.org/pipermail/python-devel/2014-July/000611.html), since it would be good if we could get it tested before it makes its way into an upstream release. -- nosy: +bkabrda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21308 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22078] io.BufferedReader hides ResourceWarnings when garbage collected
Claudiu Popa added the comment: I mean this one: $ python_d -Wall -c f=open('a', 'r'); import io; io.BufferedReader(f) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22078] io.BufferedReader hides ResourceWarnings when garbage collected
Serhiy Storchaka added the comment: This example is not correct. 1) Argument of BufferedReader should be binary stream. import io, gc f = open('/dev/null') bufio = io.BufferedReader(f) bufio.read(1) Traceback (most recent call last): File stdin, line 1, in module AttributeError: '_io.TextIOWrapper' object has no attribute 'readinto' 2) gc.collect() doesn't collect file streams because references to them are saved in local variables. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22078] io.BufferedReader hides ResourceWarnings when garbage collected
Claudiu Popa added the comment: You're right, thanks for the new information. You can close the issue then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22078] io.BufferedReader hides ResourceWarnings when garbage collected
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19875] test_getsockaddrarg occasional failure
koobs added the comment: Thank you for taking care of this Charles-François :) Requesting backport to 3.3 and 2.7 too please, both are open for fixes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19875 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22079] Ensure in PyType_Ready() that base class of static type is static
New submission from Serhiy Storchaka: It would be good if PyType_Ready() will check that base class of static type is static. -- components: Interpreter Core messages: 224049 nosy: alex, haypo, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Ensure in PyType_Ready() that base class of static type is static type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22080] Add windows_helper module helper
New submission from Claudiu Popa: Hi. This patch adds a new test helper module, initially added in issue21518, for controlling various aspects on Windows platform, like acquiring / releasing privileges etc. At the same time, it contains a modification in test.support.skip_unless_symlink, so that it tries to acquire the privilege, failing otherwise. The only downside is that acquiring SeCreateSymbolicLinkPrivilege is only possible for admins and it seems to be that they have the privilege by default. On the other hand, for SeBackupPrivilege must be explicitly acquired, so the purpose of this module isn't redundant. The part of acquiring a privilege using ctypes is based on similar code by Jason R. Coombs. -- components: Tests files: windows_helper.patch keywords: patch messages: 224050 nosy: Claudiu.Popa, zach.ware priority: normal severity: normal status: open title: Add windows_helper module helper type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file36108/windows_helper.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21518] Expose RegUnloadKey in winreg
Changes by Claudiu Popa pcmantic...@gmail.com: -- dependencies: +Add windows_helper module helper ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19875] test_getsockaddrarg occasional failure
Roundup Robot added the comment: New changeset 57e3c4ae37ea by Charles-François Natali in branch '2.7': Issue #19875: Fix random test_getsockaddrarg() failure. http://hg.python.org/cpython/rev/57e3c4ae37ea -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19875 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19875] test_getsockaddrarg occasional failure
Charles-François Natali added the comment: Backported to 2.7 (don't know how Iforgot it). 3.3 is only open for security issues, so not backporting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19875 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
New submission from STINNER Victor: Currently, the C module _socket has an useful representation of socket: it gives the file descriptor, family, type, etc. The Python socket module only shows the memory address. Example: $ ./python -c 'import _socket; s=_socket.socket(); print(repr(s));' socket object, fd=3, family=2, type=1, protocol=0 $ ./python -c 'import socket; s=socket.socket(); print(repr(s));' socket._socketobject object at 0x7fad1fdcbba0 I propose to backport repr(socket.socket) from Python 3.5 to Python 2.7. With the patch, the Python socket even contains *more* information than the C module (laddr and raddr). Example with the patch applied: $ ./python -c 'import socket; s=socket.socket(); print(repr(s));' socket._socketobject fd=3, family=2, type=1, proto=0, laddr=('0.0.0.0', 0) In Python 2.7, when a socket is closed, it drops the underlying C _socket object. So it's not possible to provide a better representation than: $ ./python -c 'import socket; s=socket.socket(); s.close(); print(repr(s));' socket._socketobject[closed] I don't want to change the design of the Python module, Python 2.7 is very stable. I don't want to take the risk of breaking anything. -- files: socket_repr.patch keywords: patch messages: 224053 nosy: haypo priority: normal severity: normal status: open title: Backport repr(socket.socket) from Python 3.5 to Python 2.7 type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file36109/socket_repr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
STINNER Victor added the comment: I also fixed repr(_socket.socket) on Windows 64-bit for closed sockets (on Python 2.7, 3.4 and 3.5): changeset: 91881:04c916a1e82f branch: 2.7 tag: tip user:Victor Stinner victor.stin...@gmail.com date:Sat Jul 26 14:52:55 2014 +0200 files: Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c description: Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError on closed socket. changeset: 91880:a86c273a1270 branch: 2.7 user:Victor Stinner victor.stin...@gmail.com date:Sat Jul 26 14:47:56 2014 +0200 files: Modules/socketmodule.c description: socketmodule.c: backport INVALID_SOCKET from Python 3.5 to simplify the code -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19875] test_getsockaddrarg occasional failure
koobs added the comment: Updating versions to reflect branch changes. Will come in handy for those tracking for manual packaging backports -- versions: +Python 2.7, Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19875 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS
Larry Hastings added the comment: This test also fails on Linux when using ZFS. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8232] webbrowser.open incomplete on Windows
Brandon Milam added the comment: In order to fix the issue I added on to the WindowsDefault class so that it is the main browser class for windows platforms as opposed to being a default when no other browser is given. I gave the class an init where it specifies specific flags for firefox, chrome, and internet explorer (from what I could find there aren't really new window or new tab flags for internet explorer). If the flags for other browsers are known they should be easy to add to this section. def __init__(self,browser = windows-default): # Grab the different flags for the different browser types browser.lower() self.browsername = browser # If get() is used without arguments browser will be passed None if browser == windows_default or browser == None: self.cmd = start elif browser == 'iexplore' or browser == 'internet explorer': self.cmd = start iexplore self.newwindow = self.newtab = elif browser == chrome: self.cmd = start chrome.exe self.newwindow = -new-window self.newtab = -new-tab elif browser == firefox: self.cmd = start firefox.exe self.newwindow = -new-window self.newtab = -new-tab else: raise Error('The browser you entered (%s) is not currently supported on windows' % browser) In the open method of the WindowsDefault class I changed how the browser is opened by building a command from the flags and the cmd for the specific browser and used subprocess,call. # Format the command for optional arguments and add the url if new == 1: self.cmd += + self.newwindow elif new == 2: self.cmd += + self.newtab self.cmd += + url subprocess.call(self.cmd,shell = True) This allows the user to input different new arguments to open a new window or new tab like the documentation says they should be able to do. I added a little bit to the beginning of the get function so that it passes its argument to the WindowsDefault class and returns that object on Windows systems. # Let the windows default class handle different browsers on windows if sys.platform[:3] == win: return WindowsDefault(using) This adds some of the desired compatibility but does not completely address the module's issues. I did not see a way to open a web page in a currently open page on any of the browsers, just new windows and new tabs (when no flags are passed the browsers default to one of these two options). Also the _isexecutable function's attempt at windows compatibility is still not working because I was unsure of how to use just a string of a browser name like 'chrome' to determine if a file is on a system. This leaves _tryorder not properly containing the browsers on the system. This leaves the module's open, open_new and open_new_tab not properly working either just the WindowsDefault open method. Any feed back and direction from here is most welcome. -- nosy: +jbmilam Added file: http://bugs.python.org/file36110/webbrowserdebug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22082] Clear interned strings listed in slotdefs
New submission from Martin v. Löwis: I'm chasing objects left at shutdown. I found that the string objects in slotdefs are still around at the end; this patch removes them. -- files: type.diff keywords: patch messages: 224058 nosy: loewis priority: normal severity: normal status: open title: Clear interned strings listed in slotdefs Added file: http://bugs.python.org/file36111/type.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22082 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22082] Clear interned strings listed in slotdefs
Roundup Robot added the comment: New changeset c55300337932 by Martin v. Löwis in branch 'default': Issue #22082: Clear interned strings in slotdefs. http://hg.python.org/cpython/rev/c55300337932 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22082 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8232] webbrowser.open incomplete on Windows
Brandon Milam added the comment: How the _isexecutable function is set up now it would require a full path name in order to be able to tell if a specific browser is on the system. The area under platform support for windows checks for multiple browsers using this function but only passes it browser names and so it always returns false and does not add any browsers to _tryorder. I found a way to fix this using os.walk so that the simple strings of the browser names like firefox.exe is able to actually able to be found on the system. This method is rather slow though and the module wants to check for 8 browsers when imported. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Guido van Rossum added the comment: Antoine, what do you want me to do? I think improving __repr__ of a socket sounds fine for some Python 2.7 bugfix release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22083] Refactor PyShell's breakpoint related methods
New submission from Saimadhav Heblikar: This refactoring is required to enable setting/clearing breakpoints, using linenumbering( whether using a Canvas implementation or a Text implementation http://bugs.python.org/issue17535) The patch ensures consistency between the set_breakpoint(_here) and clear_breakpoint(_here) methods. The clear_breakpoint_here, which is not present currently has been added. No functionality has been added or removed, so I think it should be safe to go forward. -- components: IDLE files: pyshell-breakpoint-refactor.diff keywords: patch messages: 224062 nosy: jesstess, sahutd, taleinat, terry.reedy priority: normal severity: normal status: open title: Refactor PyShell's breakpoint related methods versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file36112/pyshell-breakpoint-refactor.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS
Larry Hastings added the comment: Sorry to have such an awful configuration, but this approach won't fix the problem for me. I use a Linux encrypted home directory, which uses crazy loopback mount logic to create an on-the-fly decrypted representation of my home directory. So my home directory is actually on an ecryptfs device: % df -T FilesystemType Mounted on ... home zfs /home /home/larry/.Private ecryptfs /home/larry Maybe we could ignore deltas below a certain race-condition threshold? Perhaps a millisecond? I think there are already tests like that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Serhiy Storchaka added the comment: I afraid this can break doctests. Isn't this against policy? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS
Antoine Pitrou added the comment: So, I'm not against the patch, but it would be nice to diagnose where exactly the issue comes from. -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS
Larry Hastings added the comment: (By this approach I meant the approach employed in the first patch posted. Sorry for the ambiguity.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22074] Lib/test/make_ssl_certs.py fails with NameError
Roundup Robot added the comment: New changeset 83628d9e1035 by Antoine Pitrou in branch '3.4': Issue #22074: Fix Lib/test/make_ssl_certs.py http://hg.python.org/cpython/rev/83628d9e1035 New changeset 17f46a7b1125 by Antoine Pitrou in branch 'default': Issue #22074: Fix Lib/test/make_ssl_certs.py http://hg.python.org/cpython/rev/17f46a7b1125 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22074 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22074] Lib/test/make_ssl_certs.py fails with NameError
Antoine Pitrou added the comment: Good catch, this is now solved. -- resolution: - fixed stage: - resolved status: open - closed type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22074 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Guido van Rossum added the comment: I don't think it's against policy. Do doctests even work for objects that have an address as part of their repr()? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Serhiy Storchaka added the comment: See for example test_generators, test_genexps, test_xml_etree or ctypes.test.test_objects. dict(a = (i for i in xrange(10))) #doctest: +ELLIPSIS {'a': generator object genexpr at ...} repr(element) # doctest: +ELLIPSIS Element 't\\xe4g' at 0x... But unit tests can be broken too. When I enhanced reprs this week (issue22031, issue22032), I needed to correct failed tests. Due to this facts I applied patches only to 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22084] Mutating while iterating
New submission from Aaron Brady: Hi, I asked about the inconsistency of the RuntimeError being raised when mutating a container while iterating over it here [1], set and dict iteration on Aug 16, 2012. [1] http://www.gossamer-threads.com/lists/python/python/1004659 I posted a patch on the ML but never submitted it. People's reaction seemed ambivalent. Now I have an idea for a different implementation. I'd like to take another shot at it. It's one of the worst silent errors, since there's an error in the *iterator* when we call a *set* method. We're going to add something to make it safer, at least in the sense of getting a clear failure, if the programmer does something that's always been ill-advised. We have a number of options for the implementation. We still have the option to introduce IterationError, possibly a subclass of RuntimeError. These options are still applicable: 1) Collection of iterators . Invalidate all open iterators on mutating . a) Linked list .. i) Uncounted references .. ii) Counted references .. iii) Weak references . b) Weak set 2) Version index / timestamp / memo . Iterators check whether the container has been mutated since they were created . a) No overflow - Python longs .. i) Reset index if no iterators left . b) Overflow - C ints / shorts (silent error) 3) Iterator count . Raise exception on mutation, not iteration The new option is: 2d) Use a dedicated empty *object* for a timestamp or memo. A new memo is created on every mutation. Before advancing, the iterator checks whether the current memo is a different object than it was when it was created. Costs: The existing silent error is fairly rare. The container gains a pointer to its current memo. The iterator loses the cached length but gains a pointer to a memo. The memos are blank objects: a Py ssize t and a pointer with certain flags at time of writing. Speed is the same: comparing the lengths is replaced with comparing the memos. Some caveats: The memory manager is used to obtain perpetually unique IDs. A unique algorithm could be used instead of the memory manager, though the memo needs to contain a reference count more or less regardless. There can at most be one memo per iterator. The approach is outlined in pseudocode here [2]. Implementation could be optimized slightly by only creating new memos if iterators have been opened, shown here [3]. [2] http://home.comcast.net/~castironpi-misc/irc-0168%20mutating%20while%20iterating%20markup.html [3] http://home.comcast.net/~castironpi-misc/irc-0168%20mutating%20while%20iterating%202%20markup.html -- components: Library (Lib) messages: 224071 nosy: castironpi priority: normal severity: normal status: open title: Mutating while iterating type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20093] Wrong OSError message from os.rename() when dst is a non-empty directory
Matthias Klose added the comment: 3.4.0 has this fixed. resolutions in http://bugs.python.org/issue16074 and http://bugs.python.org/issue20517 -- nosy: +doko resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20093 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22084] Mutating while iterating
Serhiy Storchaka added the comment: It would be better discuss such ideas on python-ideas mailing list (http://mail.python.org/mailman/listinfo/python-ideas). Option 3 breaks existing code such as for k, v in d.items(): if pred(k, v): d[k] = newvalue break Option 1 is memory inefficient. It requires a list of iterators in every dict (well, in almost every dict). And it doesn't look more time efficient than option 2. Implementation of option 2 was provided and rejected in issue19332. -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Guido van Rossum added the comment: OK, I'm convinced. Sorry Victor. On Saturday, July 26, 2014, Serhiy Storchaka rep...@bugs.python.org wrote: Serhiy Storchaka added the comment: See for example test_generators, test_genexps, test_xml_etree or ctypes.test.test_objects. dict(a = (i for i in xrange(10))) #doctest: +ELLIPSIS {'a': generator object genexpr at ...} repr(element) # doctest: +ELLIPSIS Element 't\\xe4g' at 0x... But unit tests can be broken too. When I enhanced reprs this week (issue22031, issue22032), I needed to correct failed tests. Due to this facts I applied patches only to 3.5. -- ___ Python tracker rep...@bugs.python.org javascript:; http://bugs.python.org/issue22081 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
Alex Gaynor added the comment: Personally I don't think it is (or should) be against policy to change reprs, there's not really any way to improve them otherwise. That said, my excitement level about this issue is pretty low, so I won't argue more than this :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21308] PEP 466: backport ssl changes
Alex Gaynor added the comment: New patch cherry pick's the fix from issue22074. -- Added file: http://bugs.python.org/file36113/ssl-backport.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21308 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22069] TextIOWrapper(newline=\n, line_buffering=True) mistakenly treat \r as a newline
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22069 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Add support for reading records with arbitrary separators to the standard IO stack
Akira Li added the comment: As a side-effect it also fixes the bug in line_buffering=True behavior, see issue22069O. It should be issue22069 TextIOWrapper(newline=\n, line_buffering=True) mistakenly treat \r as a newline Reuploaded the patch so that it applies cleanly on the current tip. -- Added file: http://bugs.python.org/file36114/io-newline-issue1152248-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22069] TextIOWrapper(newline=\n, line_buffering=True) mistakenly treat \r as a newline
Serhiy Storchaka added the comment: Looks as this behavior is intentional. Documentation should be corrected. -- assignee: - docs@python components: +Documentation nosy: +benjamin.peterson, docs@python, hynek, pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22069 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22085] Update deprecated Tcl commands in Tkinter
New submission from Serhiy Storchaka: Command used to monitor Tcl variable access (trace variable, trace vdelete, trace vinfo) are deprecated and will likely be removed in a future version of Tcl. Proposed patch replaces them to modern equivalents. The problem is that new commands was introduced in Tcl 8.4, but minimal supported by Tkinter version is 8.3. This patch should wait until dropping support of Tcl 8.3. -- components: Tkinter messages: 224080 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Update deprecated Tcl commands in Tkinter type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22081] Backport repr(socket.socket) from Python 3.5 to Python 2.7
STINNER Victor added the comment: I afraid this can break doctests. Isn't this against policy? Ok, I close the issue. A workaround is to use repr(sock._sock) to use repr(_socket.socket) which contains a lot of information. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22085] Update deprecated Tcl commands in Tkinter
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file36115/tkinter_trace_variable.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22086] Tab indent no longer works in interpreter
New submission from Erik Andersen: Please see http://bugs.python.org/issue5845, especially the last two comments: http://bugs.python.org/issue5845#msg215784, which requested that a new bug report be opened for this issue. To summarize, the previous bug was to enable tab completion in the interpreter. There was discussion and it was figured out that it could be arranged that tab indentation and completion could work at the same time. (If you are at the start of a line, possibly a ... prompt line, tab should indent. If you are to the right of any non-whitespace character, then you should tab complete). From the other bug: This issue [tab indent] should have gone back to being a release blocker after the alpha release to fix the tab-as-indent issue, but obviously that didn't happen (I forgot about it myself). Please open a new issue requesting a fix for this bug (that tab doesn't work as indent at the ... prompt), referencing the discussion in this issue. -- components: Library (Lib) messages: 224081 nosy: Azendale priority: normal severity: normal status: open title: Tab indent no longer works in interpreter type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22086 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoop policy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
New submission from Dan O'Reilly: On non-Windows platforms, if a user attempts to use asyncio.get_event_loop() in a child process created by multiprocessing.Process using the fork context, and an asyncio event loop is also being used in the main process, the same _UnixSelectorEventLoop object will be used by both processes. This, of course, won't work properly; the child will raise a RuntimeError: Event loop is running exception as soon as it tries using the loop object. However, this may or may not actually make it back to the parent: If the parent is expecting to get items from a queue from that child publishes to, rather than yielding from it immediately, the program will deadlock. Even if the child is yielded from, it may not be immediately obvious why Event loop is running was raised, and the behavior is inconsistent with the behavior if a method other than os.fork is used to create the child process, since the child will get a new event loop in that case. So, it'd be better if _UnixDefaultEventLoopPolicy detected that get_event_loop was being called in a child process, and either 1) Created a new loop for the child (this would make the behavior appear consistent no matter what platform/method for launching children is used) 2) Raised an exception stating that no default event loop exists for this process, similar to the assert used for threads currently. I've attached a test script that demonstrates the different between forked/spawned processes, and a patch that implements #1 above. -- components: asyncio files: handle_mp_unix.diff keywords: patch messages: 224082 nosy: dan.oreilly, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: _UnixDefaultEventLoop policy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file36116/handle_mp_unix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoop policy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
Changes by Dan O'Reilly oreil...@gmail.com: Added file: http://bugs.python.org/file36117/test_loop.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoop policy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
Changes by Dan O'Reilly oreil...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
Changes by Dan O'Reilly oreil...@gmail.com: -- title: _UnixDefaultEventLoop policy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process - _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
Changes by Dan O'Reilly oreil...@gmail.com: Removed file: http://bugs.python.org/file36116/handle_mp_unix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
Changes by Dan O'Reilly oreil...@gmail.com: Added file: http://bugs.python.org/file36118/handle_mp_unix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22014] Add summary table for OS exception - errno mapping
Éric Araujo added the comment: literalinclude lets you select only some lines of the file: http://sphinx-doc.org/markup/code.html#includes -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X
Changes by Ned Deily n...@acm.org: -- resolution: - third party stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15398 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
Guido van Rossum added the comment: Good point. Asyncio definitely should not share event loops across forked processes. However, I don't like the dependency on multiprocessing (even though it's in the stdlib) -- can't the policy just use os.getpid()? Also, I've got a feeling that maybe the pid should be part of the policy state instead of the loop state? The policy could just reset self._local when the pid doesn't match. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by Drekin dre...@gmail.com: Removed file: http://bugs.python.org/file27261/win_unicode_console_2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by Drekin dre...@gmail.com: Removed file: http://bugs.python.org/file29563/i.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by Drekin dre...@gmail.com: Removed file: http://bugs.python.org/file29564/win_unicode_console_3.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by Drekin dre...@gmail.com: Removed file: http://bugs.python.org/file31756/streams.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by Drekin dre...@gmail.com: Removed file: http://bugs.python.org/file31770/win_unicode_console.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Changes by Drekin dre...@gmail.com: Removed file: http://bugs.python.org/file35990/win_unicode_console.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22087] _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process
Dan O'Reilly added the comment: Yep, agreed on both points. The latter suggestion also has the benefit of not requiring any test changes. Here's an updated patch. -- Added file: http://bugs.python.org/file36119/map_chunksize2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Drekin added the comment: I have deleted all my old files and added only my current implementation of the stream objects as the only relevant part to this issue. @Mark Summerfield: I have added __init__.py to the new version of win_unicode_console. If there is any problem, you can start an issue on project GitHub site or contact me. @Victor Stinner, @Nick Coghlan: What's wrong with looking on Windows wide strings as on UTF-16-LE encoded bytes and building the raw stream objects around this? -- Added file: http://bugs.python.org/file36120/streams.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22085] Update deprecated Tcl commands in Tkinter
Ned Deily added the comment: Is there any reason to not drop support for Tk 8.3? It appears that the last release of it, 8.3.5, was in 2002. Is anyone aware of any use of it on currently supported platforms? The final planned release of 8.4 (8.4.20) was just a year ago and 8.4 is still being shipped on some platforms, i.e. OS X, so we should keep supporting it for the time being. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16005] smtplib.SMTP().sendmail() and rset()
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - error responses from server are masked in smtplib when server closes connection ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16005 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell
R. David Murray added the comment: Test passes for me now, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21901 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22088] base64 module still ignores non-alphabet characters
New submission from Julian Berman: The base64 module documentation claims that decode methods raise exceptions for non-base64 input, but they do not. There was a patch for Py3 done in issue1466065, but the documentation was not updated for Py2. I have not read that ticket carefully enough to be able to tell what the expected resolution was for Py2 (fixing the bug or just updating the docs). -- assignee: docs@python components: Documentation, Library (Lib) messages: 224089 nosy: Julian, docs@python, r.david.murray priority: normal severity: normal status: open title: base64 module still ignores non-alphabet characters type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1466065] base64 module ignores non-alphabet characters
Julian Berman added the comment: Created issue22088 to address not having fixed Py2 here. -- nosy: +Julian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1466065 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17172] Add turtledemo to IDLE menu
Lita Cho added the comment: I wasn't aware of make patchcheck. I will run this script when submitting patches in the future. Thanks, Ned! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17172 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22068] test_gc fails after test_idle
Terry J. Reedy added the comment: F:\Python\dev2\py27\pcbuild\python_d.exe -m test.regrtest -R :: -uall test_idle test_idle leaked [1945, 1945, 1945, 1945] references, sum=7780 There are none with 3.4, so the new gc is doing its job. There are also none with test_configdialog renamed xtest... , GetCfgSectionNameDialog.__init__ in configSectionNameDialog.py saves self.parent for later use as the parent for XyxVars. I am looking at doing the same for config dialog. -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21933] Allow the user to change font sizes with the text pane of turtledemo
Lita Cho added the comment: I was going to add a dropdown menu to change the font size as well, but I am going to wait till Serhiy's patch gets committed in issue22065 before I submit my patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21933 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22014] Add summary table for OS exception - errno mapping
Nick Coghlan added the comment: Oh, nice - the start-after and end-before options look like they might be the way to go. If I'm reading the docs right, a block like the following would include the OSError section of the tree: .. literalinclude exceptions.txt :start-after: OSError :end-before: ReferenceError :prepend: I think that's really the section that could most benefit from showing the structure inline. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Nick Coghlan added the comment: Drekin, you're right, that's a much better way to go, I just didn't think it through :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22082] Clear interned strings listed in slotdefs
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22082 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com