[issue18808] Thread.join returns before PyThreadState is destroyed
Antoine Pitrou added the comment: Le vendredi 06 septembre 2013 à 00:19 +, Tim Peters a écrit : Tim Peters added the comment: So you're not concerned about a now-private API (which used to be advertised), but are concerned about a user mucking with a new private lock in an exceedingly unlikely (in the absence of malice) way. That clarifies things ;-) :-) The only reason I'm concerned about the user mucking with the private lock is that it's a new opportunity that's opened. But, yeah, I could remove the weakref and only keep the lock. The code would only be ~10 lines shorter, though. What do other people think? in its end-of-life code. Essentially rolling their own clumsy variant of a Semaphore. I guess they spell it like: import clumsy_threading as threading I've seen code like that in the wild. Well, I've sure seen my share of sleep() calls as a synchronization measure too (and removed a number of them)... :-) That's one of the reasons I added the timeout arguments, actually. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18934] multiprocessing: use selectors module
Charles-François Natali added the comment: Richard Oudkerk added the comment: I remember wondering at one time why EPOLLNVAL did not exist, and realizing that closed fds are just silently unregistered by epoll(). Exactly. I guess the issue is that some of the selectors indicate a bad fd on registration, and others do it when polled. On registration On poll SelectSelector No Raises OSError PollSelectorNo No (EVENT_READ or EVENT_WRITE) EpollSelector Raises OSError No KqueueSelector ?? Kqueue raises OSError upon registration. Not sure about poll(). It would be easiest to relax the test, perhaps by just checking that conn.poll(0) raises or returns True. That's what I think too. Apparently, the test was added for this issue: http://bugs.python.org/issue3321 Basically, the goal was to check that conn.poll() wouldn't crash if passed an invalid FD (which can happen if you register a FD greater than FD_SETSIZE in a fd_set). So relaxing the check would still make sense. Or maybe PollSelector.select() should raise OSError if POLLNVAL is indicated. That would match the behaviour of SelectSelector.select(). Yes, that would be a possibility. I'll have to give it some more thought. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18934 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1584] Mac OS X: building with X11 Tkinter
Roundup Robot added the comment: New changeset 0986e4f5750d by Ned Deily in branch 'default': Issue #1584: Provide options to override default search paths for Tcl and Tk http://hg.python.org/cpython/rev/0986e4f5750d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1584 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers
Roundup Robot added the comment: New changeset 985384cd6365 by Ned Deily in branch 'default': Issue #15663: Tcl/Tk 8.5.14 is now included with the OS X 10.6+ http://hg.python.org/cpython/rev/985384cd6365 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15663 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18939] Venv docs regarding original python install
Vinay Sajip added the comment: The venv documentation does assume that the reader knows what virtual environments are and how they work. More details are available in PEP 405, which is not referenced in this documentation - I will rectify that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers
Changes by Ned Deily n...@acm.org: -- dependencies: +Mac OS X: building with X11 Tkinter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15663 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18939] Venv docs regarding original python install
Roundup Robot added the comment: New changeset ad09332f856f by Vinay Sajip in branch '3.3': Issue #18939: Updated venv documentation with some clarifications. http://hg.python.org/cpython/rev/ad09332f856f New changeset 408b6b3dcf9a by Vinay Sajip in branch 'default': Closes #18939: Merged documentation update from 3.3. http://hg.python.org/cpython/rev/408b6b3dcf9a -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18943] argparse: default args in mutually exclusive groups
New submission from Armin Rigo: In argparse, default arguments have a strange behavior that shows up in mutually exclusive groups: specifying explicitly on the command-line an argument, but giving it its default value, is sometimes equivalent to not specifying the argument at all, and sometimes not. See the attached test diff: it contains two apparently equivalent pieces of code, but one passes and one fails. The difference is that, in CPython, int(42) is 42 but int(4200) is not 4200 (in the sense of the operator is). The line that uses is in this way is this line in argparse.py (line 1783 in 2.7 head): if argument_values is not action.default: -- files: test_argparse.diff keywords: patch messages: 197058 nosy: arigo priority: normal severity: normal status: open title: argparse: default args in mutually exclusive groups versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file31626/test_argparse.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18943] argparse: default args in mutually exclusive groups
Changes by Armin Rigo ar...@users.sourceforge.net: -- keywords: -patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18943] argparse: default args in mutually exclusive groups
Changes by Armin Rigo ar...@users.sourceforge.net: -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18940] TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time.
Roundup Robot added the comment: New changeset 6a591870017c by Vinay Sajip in branch '2.7': Issue #18940: Handled low-volume logging when delay is True. http://hg.python.org/cpython/rev/6a591870017c New changeset 324774a59256 by Vinay Sajip in branch '3.3': Issue #18940: Handled low-volume logging when delay is True. http://hg.python.org/cpython/rev/324774a59256 New changeset 8002aee72837 by Vinay Sajip in branch 'default': Closes #18940: Merged fix from 3.3. http://hg.python.org/cpython/rev/8002aee72837 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18940 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
New submission from Armin Rigo: Found a minor mistake in test_set.py. Patch attached. -- components: Interpreter Core files: test_set.diff keywords: patch messages: 197060 nosy: arigo priority: normal severity: normal status: open title: Minor mistake in test_set.py versions: Python 3.5 Added file: http://bugs.python.org/file31627/test_set.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover
Roundup Robot added the comment: New changeset 4d45f1ed1179 by Vinay Sajip in branch '2.7': Issue #18941: Respected delay when doing rollover. http://hg.python.org/cpython/rev/4d45f1ed1179 New changeset 0577c9a82c0a by Vinay Sajip in branch '3.3': Issue #18941: Respected delay when doing rollover. http://hg.python.org/cpython/rev/0577c9a82c0a New changeset 7627fea85a6d by Vinay Sajip in branch 'default': Closes #18941: Merged fix from 3.3. http://hg.python.org/cpython/rev/7627fea85a6d -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18941 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18945] Name collision handling in tempfile is not covered by tests
New submission from Vlad Shcherbina: I intend to add test for (existing dir)-(new file) collision in http://bugs.python.org/issue18849, but file-file, file-dir and dir-dir collisions are yet to be covered. -- components: Tests messages: 197062 nosy: vlad priority: normal severity: normal status: open title: Name collision handling in tempfile is not covered by tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18945 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18876] Problems with files opened in append mode with io module
Antoine Pitrou added the comment: Erik Bray added the comment: Thank you! Has there been a separate issue opened for the BufferedWriter bug or can that be covered by this issue as well? No other issue has been opened as I know of, but indeed it would be clearer to open a separate one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers
Ronald Oussoren added the comment: Great work. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15663 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows
Roundup Robot added the comment: New changeset 7611e7244bdd by Eli Bendersky in branch '3.3': Issue #18849: Fixed a Windows-specific tempfile bug where collision with an http://hg.python.org/cpython/rev/7611e7244bdd New changeset 035b61b52caa by Eli Bendersky in branch 'default': Issue #18849: Fixed a Windows-specific tempfile bug where collision with an http://hg.python.org/cpython/rev/035b61b52caa -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows
Roundup Robot added the comment: New changeset e0037f266d45 by Eli Bendersky in branch '2.7': Close #18849: Fixed a Windows-specific tempfile bug where collision with an http://hg.python.org/cpython/rev/e0037f266d45 -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18852] site.py does not handle readline.__doc__ being None
Thomas Heller added the comment: I suggest to remove the comment part from the patch and then apply it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18852 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Roundup Robot added the comment: New changeset ec9a4b77f37b by Eli Bendersky in branch 'default': Issue #18920: argparse's default version action (for -v, --version) should http://hg.python.org/cpython/rev/ec9a4b77f37b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Eli Bendersky added the comment: Thanks, I moved the NEWS entry to the right place. Yes, all tests pass. I'll update whatsnew separately. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18922] Output versions of scripts to stdout
Roundup Robot added the comment: New changeset 587bdb940524 by Eli Bendersky in branch 'default': Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922 http://hg.python.org/cpython/rev/587bdb940524 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Roundup Robot added the comment: New changeset 587bdb940524 by Eli Bendersky in branch 'default': Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922 http://hg.python.org/cpython/rev/587bdb940524 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18338] python --version should send output to STDOUT
Roundup Robot added the comment: New changeset 587bdb940524 by Eli Bendersky in branch 'default': Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922 http://hg.python.org/cpython/rev/587bdb940524 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18338 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue917120] imaplib: incorrect quoting in commands
Changes by Daniël van Eeden launch...@myname.nl: -- nosy: +dveeden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue917120 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18945] Name collision handling in tempfile is not covered by tests
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18945 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Ethan Furman added the comment: In retrospect the read-only properties would not be any more difficult to get around than the __setattr__ solution, and it would conflict with our use of _RouteClassAttributeToGetattr. To properly replace an enum member one has to change two internal data structures: _member_map_ - 'enum_name' : member _member2value_map - enum_value : member # if hashable To actually create a real (non-mock) member is even more work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Roundup Robot added the comment: New changeset 1d88d04aade2 by Ethan Furman in branch 'default': Close #18924: Block naive attempts to change an Enum member. http://hg.python.org/cpython/rev/1d88d04aade2 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16938] pydoc confused by __dir__
Armin Rigo added the comment: I believe that this describes a problem more general than the problem of Enums from Issue18693: help(x) shouldn't crash in the presence of a __dir__() method that returns unexpected names. -- nosy: +arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16938 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Steve Dower added the comment: I believe that is all that is missing from the patches I posted, though I'd have thought that having Visual C++ 2010 Express installed would be sufficient without the patch (though you didn't mention C++, so maybe you have a different one?). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18946] HTMLParser should ignore errors when parsing text in script tags
New submission from James Lu: It will show invalid html inside of script tags, for example, at the learners dictionary: function output_creative (id) { document.write (div id=' + id + ' + scr + ipt type='text/javascript'\r\n + googletag.cmd.push(function() { googletag.display(' + id + '); });\r\n + /sc + ript + invalid end tag /div); }; it thinks /sc + ript is an actual end tag. -- messages: 197077 nosy: James.Lu priority: normal severity: normal status: open title: HTMLParser should ignore errors when parsing text in script tags ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18946] HTMLParser should ignore errors when parsing text in script tags
Ezio Melotti added the comment: This should be fixed in 2.7 and 3.2+. Try with a more recent version of Python and if you still have problems feel free to reopen the issue. -- components: +Library (Lib) resolution: - out of date stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18946] HTMLParser should ignore errors when parsing text in script tags
Ezio Melotti added the comment: What version of Python are you using? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18946] HTMLParser should ignore errors when parsing text in script tags
James Lu added the comment: 2.5, but I don't think the library has changed since. james On Fri, Sep 6, 2013 at 12:29 PM, Ezio Melotti rep...@bugs.python.orgwrote: Ezio Melotti added the comment: What version of Python are you using? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18946 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18852] site.py does not handle readline.__doc__ being None
Roundup Robot added the comment: New changeset 3070fdd58645 by R David Murray in branch 'default': #18852: Handle readline.__doc__ being None in site.py readline activation. http://hg.python.org/cpython/rev/3070fdd58645 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18852 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18852] site.py does not handle readline.__doc__ being None
R. David Murray added the comment: Done. Thanks, Berker. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18852 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Terry J. Reedy added the comment: The typo causes 1 test to run 5 times instead of 5 tests 1 each. After fix, all pass on Win7, 3.4.0a1 (where fix is on line 1675 instead of 1618). -- nosy: +rhettinger, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18917] python won't display greek characters in apache under windows
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - works for me stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18917 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18623] Factor out the _SuppressCoreFiles context manager
Roundup Robot added the comment: New changeset 28a1843c0fc1 by Antoine Pitrou in branch 'default': Issue #18623: Factor out the _SuppressCoreFiles context manager into test.support. http://hg.python.org/cpython/rev/28a1843c0fc1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18949] codeop possible flow error
R. David Murray added the comment: Why do you think that? Can you provide a test case that fails? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18903] IDLE file-completion is case-sensitive in Windows
Terry J. Reedy added the comment: This strikes me a sort-of a bug. However, feature vs. bug does not matter for small changes (see PEP434). Is Windows the only case preserving, case insensitive OS? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18903 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18934] multiprocessing: use selectors module
Roundup Robot added the comment: New changeset 14972c999e80 by Charles-François Natali in branch 'default': Issue #18934: Relax test_multiprocessing.test_invalid_handles a bit: we just http://hg.python.org/cpython/rev/14972c999e80 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18934 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18623] Factor out the _SuppressCoreFiles context manager
Antoine Pitrou added the comment: The explicit 'object' superclass is old-school ;-) Ha. Ok, I've fixed it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18623] Factor out the _SuppressCoreFiles context manager
Antoine Pitrou added the comment: Patch committed, thanks! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
Darko Veberic added the comment: It is interesting, this issue was fixed in boost 4 years ago: https://svn.boost.org/trac/boost/ticket/3853 and a comment from the pbzip2 author suggests that not supporting multiple streams is in violation of the bz2 file format spec. -- nosy: +Darko.Veberic versions: +Python 2.7 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1625 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18947] Bug in module netaddr
R. David Murray added the comment: Netaddr is not an stdlib module. Please report the bug to the netaddr maintainers. -- nosy: +r.david.murray resolution: - invalid stage: - committed/rejected status: open - closed versions: +3rd party -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18947 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18948] deliberately crashing tests should prevent core dumps
New submission from Antoine Pitrou: Here is a (exhaustive?) list of tests which deliberately crash the interpreter: - test_daemon_threads_fatal_error() in test_threading - several fatal error tests in test_faulthandler - test_recursionlimit_fatalerror() in test_sys - test_no_FatalError_infinite_loop() in test_capi They should reuse the new SuppressCoreFiles facility from test.support. -- components: Tests keywords: easy messages: 197090 nosy: lambertv, neologix, pitrou priority: low severity: normal stage: needs patch status: open title: deliberately crashing tests should prevent core dumps type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18948 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18917] python won't display greek characters in apache under windows
Terry J. Reedy added the comment: I believe that this is *the* answer to the issue, so the issue should be closed. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18917 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18949] codeop possible flow erro
New submission from Wilberto Morales: I think the way this loop in /Lib/codeop.py is wrong def _maybe_compile(compiler, source, filename, symbol): # Check for source consisting of only blank lines and comments for line in source.split(\n): line = line.strip() if line and line[0] != '#': break # Leave it alone else: if symbol != eval: source = pass # Replace it with a 'pass' statement I think the else statement shouldn't be there. -- messages: 197091 nosy: Wilberto priority: normal severity: normal status: open title: codeop possible flow erro type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18934] multiprocessing: use selectors module
Charles-François Natali added the comment: I just realized that using DefaultSelector isn't optimal for Connection: It's fine for forkserver, since it's a long lived process, but for Connection.poll(), this means that it'll use epoll or kqueue: which means allocating a new epoll/kqueue object for each conn.poll(). That's a couple syscalls more (epoll_create()/epoll_ctl()/close()), but most important it uses an extra FD per connection. The attached patch uses PollSelector if available, otherwise SelectSelector. -- Added file: http://bugs.python.org/file31629/connection_selector.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18934 ___diff -r 3070fdd58645 Lib/multiprocessing/connection.py --- a/Lib/multiprocessing/connection.py Fri Sep 06 13:08:08 2013 -0400 +++ b/Lib/multiprocessing/connection.py Fri Sep 06 20:45:04 2013 +0200 @@ -878,13 +878,21 @@ import selectors +# poll/select have the advantage of not requiring any extra file +# descriptor, contrarily to epoll/kqueue. Also, they're a bit faster for +# short-lived polling, since they require a single syscall. +if hasattr(selectors, 'PollSelector'): +_WaitSelector = selectors.PollSelector +else: +_WaitSelector = selectors.SelectSelector + def wait(object_list, timeout=None): ''' Wait till an object in object_list is ready/readable. Returns list of those objects in object_list which are ready/readable. ''' -with selectors.DefaultSelector() as selector: +with _WaitSelector() as selector: for obj in object_list: selector.register(obj, selectors.EVENT_READ) ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Changes by Tim Peters t...@python.org: -- components: +Tests -Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18623] Factor out the _SuppressCoreFiles context manager
Charles-François Natali added the comment: Is there anything else that this patch should address? I hoped Charles-François would answer this one, but no, I don't think there's anything left :) Sorry, I had completely forgotten this issue. The only comment I have is this: class SuppressCoreFiles(object): The explicit 'object' superclass is old-school ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18852] site.py does not handle readline.__doc__ being None
Antoine Pitrou added the comment: Thanks David! I had forgotten about the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18852 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18949] codeop possible flow error
Changes by Wilberto Morales wilbertomorales...@gmail.com: -- title: codeop possible flow erro - codeop possible flow error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18873] Encoding detected in non-comment lines
Sergey Vishnikin added the comment: -cookie_re = re.compile(coding[:=]\s*([-\w.]+)) +cookie_re = re.compile(#[^\r\n]*coding[:=]\s*([-\w.]+)) Regex matches only if the encoding expression is preceded by a comment. -- keywords: +patch nosy: +armicron Added file: http://bugs.python.org/file31628/tokenizer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18873 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18949] codeop possible flow error
Wilberto Morales added the comment: I can't provide a example but reading the source comments it seems wrong. 'First, check if the source consists entirely of blank lines and comments; if so, replace it with 'pass', because the built-in parser doesn't always do the right thing for these.' So the way I understand this is. pure_comments_or_blank = True for line in source: line = line.strip() if line and line[0] != '#': pure_comments_or_blank = False break if pure_comments_or_blank: if symbol != eval: source = pass So check that atleast one line is actual code and not comments or blank. If none is then replace it with a 'pass' Instead the loop seems a little weird. for line in source.split(\n): line = line.strip() if line and line[0] != '#': break # Leave it alone else: if symbol != eval: source = pass If it finds a something that is not a comment in a line it breaks. But then right after the for loop it contains an else statement. I'm not even sure when this else statement is executed. I'm sorry if I'm misinterpreting this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Changes by Armin Rigo ar...@users.sourceforge.net: -- assignee: - tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Roundup Robot added the comment: New changeset b6059bac8a9c by Tim Peters in branch '3.3': Issue 18944: fix a 1-character typo in test_set.py. http://hg.python.org/cpython/rev/b6059bac8a9c New changeset 4b64166d5abb by Tim Peters in branch 'default': Merge 3.3 into default. http://hg.python.org/cpython/rev/4b64166d5abb -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Changes by Tim Peters t...@python.org: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18947] Bug in module netaddr
New submission from Mikael Ryding: I found this in the netaddr module when I was trying to get the CIDR from a number of ip/netmask combinations. The expected cidr in the example below should be: 192.1.0.0/23. ip = netaddr.IPNetwork(192.1.1.128, 255.255.254.0) ip.netmask IPAddress('255.255.255.0') ip.cidr IPNetwork('192.1.1.0/24') -- messages: 197085 nosy: mryding priority: normal severity: normal status: open title: Bug in module netaddr type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18947 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18917] python won't display greek characters in apache under windows
Changes by Nick low...@yahoo.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18917 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18937] add unittest assertion for logging
Antoine Pitrou added the comment: Proposed patch with an assertLogs() method. -- keywords: +patch Added file: http://bugs.python.org/file31630/assertlogs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18950] Miscellaneous fixes for the sunau module
New submission from Serhiy Storchaka: The proposed patch fixes followed bugs in the sunau module: 1. Au_read.readframes() reads wrong number of frames from multichannel stream. 2. Au_read.readframes() doesn't change current file position. 3. Au_write.writeframesraw() incorrectly updates current file position in a stream with u-Law compression. 4. Au_read.getnframes() returns a float (underporting from Python 2). 5. Au_write incorrectly updates header when it was opened with existing non-empty file object. New tests proposed in issue18919 expose all these bugs. -- assignee: serhiy.storchaka components: Library (Lib) files: sunau.patch keywords: patch messages: 197109 nosy: r.david.murray, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Miscellaneous fixes for the sunau module type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31631/sunau.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18950 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18919] Unify audio modules tests
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Miscellaneous fixes for the sunau module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18939] Venv docs regarding original python install
Graham Wideman added the comment: @Vinay Sajip Thanks for looking at this issue and adding the link to PEP 405, and your explanation When working... with helpful shebang comments. That said, the combination of PEP 405 and this updated page doesn't clear things up completely. Vinay remarks The venv documentation does assume that the reader knows what virtual environments are and how they work. If so, let's have a link to where the reader can get up to speed on how they work. PEP 405 is a help, but doesn't detail the topics I raised in earlier thread messages. Also, different legacy virtual environment schemes work differently, so prior knowledge doesn't necessarily help. But the article already has a link to virtual environments... to a box in the same article, which is at the heart of not bringing clarity to the topics at hand. One problem is lack of clarity about what active and activate means. Here is what I currently believe: In connection with venv, the term active is used in two relatively trivial but subtly different ways. (1) First on PATH: The phrase active environment may be used to simply indicate the python environment which will be found first via the user's shell PATH. Further, each venv-configured python virtual environment installation includes an activate script whose main effect is just to add that environment's bin or Scripts directory to the beginning of the user's PATH. This makes the selected python environment the default when the user types the 'python' command. This use of active or activate might better be termed default or make default. (2) Actually running: A second meaning of active refers to an actually running instance of a python interpreter and its associated environment, whether or not it is first in the user's PATH. Any installed python (virtual or not) may be launched by explicitly invoking the complete path to its executable (eg: C:\python33\python.exe), whereupon that version of python will run, with its associated sys.path and so on. These two meanings are obviously related. The particular python environment (virtual or not) that is active in the first sense, when invoked by a plain python command, will become active in the second sense. But a running python (active in the second sense) will not necessarily be the active one in the first sense. Implications for installers: A library installer invoked from the command line, unless told otherwise, will presumably install its payload into the python environment found via PATH. Consequently, in preparation, the intended target python should be made active in the first sense. I have not elaborated here on my other concern (since I don't understand the details) -- clarification of different degrees of isolation/autonomy which can be established for each virtual environment. I still believe that's important to understand, and the current article and PEP 405 don't cover it successfully, in my view. -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18919] Unify audio modules tests
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file31632/audiotests_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16938] pydoc confused by __dir__
Ethan Furman added the comment: Crash is probably too strong. help() runs, but doesn't return anything useful. Metaclasses aside, I think the real issue here is objects that don't have __objclass__ defined. __objclass__ has been around for over a decade (see PEP-0252), and with that `inspect` works fine (aside from metaclasses ;) . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16938 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4709] Mingw-w64 and python on windows x64
Alex added the comment: I want to add that this bug led to bizarre behavior (described here: http://stackoverflow.com/questions/18646694/pass-pointer-from-c-to-python-w-boost-python) when using 64-bit Boost-Python compiled with Mingw-w64 in Windows 7. Boost-Python and programs linked to it compiled, but failed at run-time with segfaults. The solution described by jdpipe worked for me, but I only found it after a day of fruitless debugging attempts. -- nosy: +arbitraryvalue ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4709 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
Serhiy Storchaka added the comment: Oh, I forgot attach a patch. In any case it already slightly outdated. After looking at other audio modules I think David's approach is better. It is also used in the chunk module. Here is updated patch with tests (tests are not final, issue18919 provides better tests). -- dependencies: +Unify audio modules tests ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
Serhiy Storchaka added the comment: Oh, I forgot attach a patch. In any case it already slightly outdated. After looking at other audio modules I think David's approach is better. It is also used in the chunk module. Here is updated patch with tests (tests are not final, issue18919 provides better tests). -- Added file: http://bugs.python.org/file31633/wave_write_unseekable.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18919] Unify audio modules tests
Serhiy Storchaka added the comment: Patch updated. It now contains tests for all supported encoding formats (PCM8-32, u-Law, A-Law). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5202] wave.py cannot write wave files into a shell pipeline
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5202 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18458] libedit history offset workaround
Ned Deily added the comment: The original patch missed one spot. Here's an updated version. I'm going to apply this to default (for the imminent 3.4.0a2) in case people start running into this on new versions of OS X. It needs to be backported to 2.7 and 3.3; a test would be nice and it could be simplified a bit as part of the generalized support for libedit (Issue13501). -- Added file: http://bugs.python.org/file31634/issue18458.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18458 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18939] Venv docs regarding original python install
R. David Murray added the comment: You have understood correctly, after reading the now-existing documentation. Do you have a suggestion for how they could be further improved, given that they currently seem to convey accurate information? For the autonomy question, as far as I know the only option that affects that is whether or not the installed Python's site-packages is included in sys.path or not, and I'm sure that is documented. Perhaps you were confused by how trivial indeed activation is? If there are other things you still don't understand, it would help if you could pose specific questions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18873] Encoding detected in non-comment lines
Serhiy Storchaka added the comment: It will fail on: #coding=0 I'm wondering why findall() is used to match this regexp. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18873 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16938] pydoc confused by __dir__
Armin Rigo added the comment: The __objclass__ is a workaround. I don't understand your point. I think the original poster is saying that simply putting a __dir__() method on a class can confuse help() more than would be necessary, and if he's correct I agree with him. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16938 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18949] codeop possible flow error
Serhiy Storchaka added the comment: I'm not even sure when this else statement is executed. It executed when no breaks were happen. I.e. both variants of code are equivalent besides the fact that variant with else doesn't require named boolean variable. It is a feature of Python syntax. -- nosy: +serhiy.storchaka resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16938] pydoc confused by __dir__
Ethan Furman added the comment: Ronald said: One possible workaround: assume that the class is the inspected class when a name returned by dir(cls) cannot be found in one of the classes on the mro. At some point will this cause help to display an attribute on the wrong class? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16938 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18458] libedit history offset workaround
Roundup Robot added the comment: New changeset b6b8a2171aa3 by Ned Deily in branch 'default': Issue #18458: Prevent crashes with newer versions of libedit. Its readline http://hg.python.org/cpython/rev/b6b8a2171aa3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18458 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16938] pydoc confused by __dir__
Ethan Furman added the comment: dir(obj) is only confused if it returns attributes that are not found in obj.__dict__ (aka virtual attributes). For these virtual attributes, setting __objclass__ solves the problem. Armin, when you say it's a workaround do you mean __objclass__ itself, or the way Ronald and I are using it? It looks like Ronald is using it the way it was intended (on a descriptor), although I may be abusing it by putting it on an Enum member. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16938 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18937] add unittest assertion for logging
Michael Foord added the comment: So making assertions about logging is very common, but I *always* do this by just mocking out the logger and making an assertion about the call. It's trivially easy to do. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18623] Factor out the _SuppressCoreFiles context manager
Antoine Pitrou added the comment: Is there anything else that this patch should address? I hoped Charles-François would answer this one, but no, I don't think there's anything left :) Next step (for another issue perhaps) is to actually re-use this context manager in the other tests which deliberately crash the interpreter. -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18943] argparse: default args in mutually exclusive groups
paul j3 added the comment: The patch isn't a good unittest case because it produces an Error, not a Failure. It does, though, raise a valid question about how a Mutually_exclusive_group tests for the use of its arguments. As you note, argparse does use the `is` test: `argument_values is not action.default`. argument_values is the result of passing an argument_string through its 'type' function. This reworks your test case a bit: group = parser.add_mutually_exclusive_group() group.add_argument('--foo', default='test') group.add_argument('--bar', type=int, default=256) group.add_argument('--baz', type=int, default=257) '--foo test --baz 257' will give the `argument --foo: not allowed with argument --baz` error message, but '--foo test --baz 256' does not. So which is right? Should it complain because 2 exclusive arguments are being used? Or should it be excused from complaining because the values match their defaults? The other issue is whether the values really match the defaults or not. With an `is` test, the `id`s must match. The ids for small integers match all the time, while ones 256 differ. Strings might have the same id or not, depending on how they are created. If I create `x='test'`, and `y='--foo test'.split()[1]`. `x==y` is True, but `x is y` is False. So '--foo test' argument_value does not match the 'foo.default'. So large integers (256) behave like strings when used as defaults in this situation. It's the small integers that have unique ids, and hence don't trigger mutually_exclusive_group errors when they should. This mutually_exclusive_group 'is' test might not be ideal (free from all ambiguities), but I'm not sure it needs to be changed. Maybe there needs to be a warning in the docs about mutually_exclusive_groups and defaults other than None. -- nosy: +paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18937] add unittest assertion for logging
Antoine Pitrou added the comment: So making assertions about logging is very common, but I *always* do this by just mocking out the logger and making an assertion about the call. It's trivially easy to do. Only works if you test the exact logger that will be triggered, rather than e.g. a child in the hierarchy (and the exact logging method, for that matter, too). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18937] add unittest assertion for logging
Michael Foord added the comment: Do you have a lot of circumstances where you want to test logging but you don't know the specific logger and method called? That's not a situation I've been in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18937] add unittest assertion for logging
Antoine Pitrou added the comment: Do you have a lot of circumstances where you want to test logging but you don't know the specific logger and method called? That's not a situation I've been in. I have a lot of circumstances where I do not *care* about the specific logger (as long as it's somewhere in a subhierarchy) and the specific level (as long as it's e.g. a warning or above). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Tim Peters added the comment: The fix is obviously correct ;-) - so what next? Armin Terry, I don't know whether you have commit privileges. If you don't, assign it to me and I'll commit it. Removed 3.5 from the Versions list and added 3.3 and 3.4. -- nosy: +tim.peters versions: +Python 3.3, Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18808] Thread.join returns before PyThreadState is destroyed
Tim Peters added the comment: All the timeout args are great! I wish Python had always had them :-) Back to the pain at hand, it's not the number of lines of code that rubs me the wrong way, but the sheer obscurity of it all. This handful of lines is - of necessity - sprayed across two C code files, a C header file, and a Python module. That makes it very hard (for anyone but you - LOL) to reconstruct the _intent_ of it all. I'm adding another patch, which is your threadstate_join_2.patch but with a new comment block (in pystate.h) spelling out the rationale behind it all. I can live with that ;-) -- Added file: http://bugs.python.org/file31635/threadstate_join_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Terry J. Reedy added the comment: Just to answer, anyone with Python snake has commit privileges of some sort but may not be setup to commit to cpython. I suspect Armin found this while review the test for pypy. I focus mostly on Idle, but on better days, will do little commits like this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18944] Minor mistake in test_set.py
Tim Peters added the comment: Right, I should have asked specifically about cpython commit privs ;-) Thanks for expounding! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18943] argparse: default args in mutually exclusive groups
paul j3 added the comment: A further complication on this. With the arguments I defined in the previous post p.parse_args('--foo test --baz 257'.split()) gives the mutually exclusive error message. `sys.argv` does the same. p.parse_args(['--foo', 'test', '--baz', '257']) does not give an error, because here the 'test' argument string is the same as the default 'test'. So the m_x_g test thinks `--foo' is the default, and does not count as an input. Usually in testing an argparse setup I use the list and split arguments interchangeably, but this shows they are not equivalent. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18937] add unittest assertion for logging
R. David Murray added the comment: Exactly. It is the difference between black box testing and white box testing. IMO mock, while a great tool, should be used with caution, because it tends to lead to white box testing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18951] In unittest.TestCase.assertRegex change re and regex to r
New submission from py.user: there is no direct link to table look under link http://docs.python.org/3/library/unittest.html#unittest.TestCase.assertWarnsRegex -- assignee: docs@python components: Documentation files: issue.diff keywords: patch messages: 197130 nosy: docs@python, py.user priority: normal severity: normal status: open title: In unittest.TestCase.assertRegex change re and regex to r type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31636/issue.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18951 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18908] Enum docs: sections leak out
Roundup Robot added the comment: New changeset a55cbaf9a581 by Ethan Furman in branch 'default': Close #18908: Keep Enum docs in their own section. Patch by Elazar Gershuni. http://hg.python.org/cpython/rev/a55cbaf9a581 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18908 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18952] Fix test.support.open_urlresource (support package regression)
New submission from Zachary Ware: Since test.support was moved into its own package, support.open_urlresource has been unable to work. It expects __file__ dir/data to exist, but since __file__ dir is now Lib/test/support instead of Lib/test, it doesn't unless someone creates it manually. Since open_urlresource turns all exceptions into SkipTest, this means that all test runs have been silently skipping test_codecmaps_* and a couple others since support became a package. Here's a patch with my preferred fix, which is to move Lib/test/data to Lib/test/support/data. This dir is only used by support.open_urlresource, and moving it does just a tiny bit to de-clutter Lib/test. -- components: Tests files: move_test_data.diff keywords: patch messages: 197132 nosy: ezio.melotti, ncoghlan, zach.ware priority: normal severity: normal status: open title: Fix test.support.open_urlresource (support package regression) type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31637/move_test_data.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18952 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18952] Fix test.support.open_urlresource (support package regression)
Zachary Ware added the comment: Here's an alternative fix, which just makes open_urlresource look one directory higher than where __file__ lives. -- Added file: http://bugs.python.org/file31638/fix_support_open_urlresource.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18952 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18953] Typo in NEWS about fixed format specifiers for Py_ssize_t in debugging output in the _sre module
New submission from Vajrasky Kok: File Misc/NEWS, line 65 66: - Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in the _sre moduel. moduel = module Related commit: http://hg.python.org/cpython/rev/c41c68a18bb6 -- assignee: docs@python components: Documentation messages: 197134 nosy: docs@python, serhiy.storchaka, vajrasky priority: normal severity: normal status: open title: Typo in NEWS about fixed format specifiers for Py_ssize_t in debugging output in the _sre module versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18953 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18954] Grammatically incorrect sentences in Python/fileutils.c
New submission from Vajrasky Kok: In commit about implementation of the PEP 446: file descriptors and file handles are now created non-inheritable, there are some grammatically incorrect sentences in Python/fileutils.c. Please see the patch for details. Related commit: http://hg.python.org/cpython/rev/ef889c3d5dc6?revcount=240 -- assignee: docs@python components: Documentation files: fix_typo_in_fileutils.patch keywords: patch messages: 197135 nosy: docs@python, haypo, vajrasky priority: normal severity: normal status: open title: Grammatically incorrect sentences in Python/fileutils.c versions: Python 3.4 Added file: http://bugs.python.org/file31639/fix_typo_in_fileutils.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18954 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18955] Confusing documentation in Lib/importlib/util.py
New submission from Vajrasky Kok: In Lib/importlib/util.py, the documentation is confusing me. Line 42 43: If an exception is raised and the decorator created the module it is subsequently removed from sys.modules. Is it supposed to be: If an exception is raised and the decorator which created the module is subsequently removed from sys.modules. ? -- assignee: docs@python components: Documentation messages: 197136 nosy: docs@python, vajrasky priority: normal severity: normal status: open title: Confusing documentation in Lib/importlib/util.py versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18955 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com