[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: The patch looks good to me, and the relevant contributor licensing is in place, so I'll be applying this shortly :) -- stage: -> commit review ___ Python tracker

[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2016-08-20 Thread Xiang Zhang
Xiang Zhang added the comment: Valgrind can also complain: valgrind --leak-check=yes --suppressions=Misc/valgrind-python.supp Parser/pgen ./Grammar/Grammar Include/graminit.h Python/graminit.c ==6836== Memcheck, a memory error detector ==6836== Copyright (C) 2002-2015, and GNU GPL'd, by Julian

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-20 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Martin! Closing this as fixed, since the new warning should help nudge folks towards staying within the supported subset of the import system behaviour when it comes to interactions between package.__init__ and package.__main__. -- resolution:

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-20 Thread R. David Murray
Changes by R. David Murray : -- components: +email nosy: +barry, r.david.murray ___ Python tracker ___

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 43ae044eaccc by Martin Panter in branch '3.5': Issue #27487: Warn if submodule already imported before runpy execution https://hg.python.org/cpython/rev/43ae044eaccc New changeset fccd733aa78b by Martin Panter in branch 'default': Issue #27487:

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: An alternative approach would be to change inspect.unwrap() to use getattr_static() rather than the usual getattr(). The downside of that would be potentially breaking true object proxies, like the 3rd party wrapt module and weakref.proxy. However, what if

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fixed twice in all 3 versions. Thanks for the heads-up. -- ___ Python tracker ___

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Terry, in revision 6c8dd4cb4ee7 you wrote “Fix warning tom test_config.” Perhaps this is meant to say “. . . from test_config_key” (taken from b10a312f6d00)? -- nosy: +martin.panter ___ Python tracker

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Handling ESPIPE for append mode seems reasonable to me, even as a bug fix for existing versions. But there is a similar problem with "r+" and "w+" modes and unseekable files (unless buffering=0). See Issue 20074. So we can’t say in general that Python 3

[issue27819] Always distribute sdist packages as gztar.

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: This one would be worth a note in What's New as well - both in the "changed modules" section under distutils, and in the "Porting to Python 3.6" section While it doesn't affect Python code per se, it may affect folks doing Windows-specific workflow automation,

[issue16968] Fix test discovery for test_concurrent_futures.py

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I don’t know much about the concurrent.futures testing, but in general IMO it makes more sense to call thread.join(), or at least @reap_threads, in each individual test case that needs it. If appropriate, you can call join() with a one-second timeout, which

[issue14853] test_file.py depends on sys.stdin being unseekable

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Long story short: Don’t change Python 2, and just restore the seek(-1) test in 3. I agree in general it is better to skip a test than completely remove it. However, in Python 2, the test that Victor proposes to restore is redundant with test_file2k. Sys.stdin

[issue20074] open() of read-write non-seekable streams broken

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Currently, the documentation for TextIOWrapper says it is “a buffered text stream over a BufferedIOBase binary stream.” If passing a RawIOBase (buffering=0) file works, that seems like an undocumented accident. This is also explicitly disallowed with open().

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c4cb01723a0 by Terry Jan Reedy in branch '2.7': Issue #27714: Remove unneeded non-idempotent call that fails on retest. https://hg.python.org/cpython/rev/1c4cb01723a0 New changeset 0e4bea7c8c00 by Terry Jan Reedy in branch '3.5': Issue #27714:

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-20 Thread Dario D'Amico
Dario D'Amico added the comment: I have reasons to believe that smtlib.py does not support AUTH LOGIN well. My guts feeling are that the auth_login method should be changed into: def auth_login(self, challenge=None): print("auth_login", challenge) """ Authobject to use with

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-20 Thread Dario D'Amico
New submission from Dario D'Amico: oo -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2016-08-20 Thread Hugo Geoffroy
Hugo Geoffroy added the comment: This patch blacklists `__wrapped__` (using the same form as the first comment, with a more explicit exception message) in `unittest.mock._Call.__getattr__`. I also documented the change and added a tests that checks `assertFalse(hasattr(call,

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-20 Thread Dario D'Amico
Changes by Dario D'Amico : Removed file: http://bugs.python.org/file44177/SmtplibBugReport.txt ___ Python tracker ___

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-20 Thread Dario D'Amico
Changes by Dario D'Amico : Added file: http://bugs.python.org/file44177/SmtplibBugReport.txt ___ Python tracker ___

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-20 Thread Dario D'Amico
Changes by Dario D'Amico : -- components: Library (Lib) nosy: Dario D'Amico priority: normal severity: normal status: open title: Possible bug in smtplib when initial_response_ok=False type: crash versions: Python 3.5 ___

[issue12594] Docs for "Using Python on a Macintosh" needs to be updated

2016-08-20 Thread Scott Macpherson
Scott Macpherson added the comment: I'd like to help out with this issue if I can. This page in the documentation is really showing it's age now. * I think referring to "OS X" (soon to be "MacOS") instead of "Mac" or "Macintosh" would more accurate. * The opening paragraph of section 4.1 only

[issue12594] Docs for "Using Python on a Macintosh" needs to be updated

2016-08-20 Thread Scott Macpherson
Changes by Scott Macpherson : -- nosy: +macpherson.scott ___ Python tracker ___ ___

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-08-20 Thread Scott Macpherson
Changes by Scott Macpherson : -- nosy: +macpherson.scott ___ Python tracker ___ ___

[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-08-20 Thread Christian Heimes
Christian Heimes added the comment: Patch 3 addresses GPS' code review. -- Added file: http://bugs.python.org/file44176/SHA3-and-SHAKE-support-for-Python-3.patch ___ Python tracker

[issue26907] Add missing getsockopt constants

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Patch looks fine to me. -- stage: -> commit review ___ Python tracker ___

[issue27816] sock.proto does not reflect actual protocol

2016-08-20 Thread Martin Panter
Martin Panter added the comment: The documentation already says “Socket objects also have these (read-only) attributes that correspond to the values given to the socket constructor. . . . socket.proto”. For existing versions of Python, I’m not sure there is much else we can do. In Issue

[issue26798] add BLAKE2 to hashlib

2016-08-20 Thread Christian Heimes
Christian Heimes added the comment: Patch 4 uses the latest revision of the reference implementation. -- Added file: http://bugs.python.org/file44175/BLAKE2-hash-algorithm-for-CPython-4.patch ___ Python tracker

[issue27666] "stack smashing detected" in PyCursesWindow_Box

2016-08-20 Thread Steve Fink
Steve Fink added the comment: I'm running now (successfully) with a simpler patch, just changing it to parse format 'i', but this patch is probably a bit safer. -- keywords: +patch Added file: http://bugs.python.org/file44174/python-2.7.12-curses-argparse.patch

[issue27819] Always distribute sdist packages as gztar.

2016-08-20 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue27643] test_ctypes fails on AIX with xlc

2016-08-20 Thread Eric N. Vander Weele
Changes by Eric N. Vander Weele : -- nosy: +ericvw ___ Python tracker ___ ___

[issue25825] AIX shared library extension modules installation broken

2016-08-20 Thread Eric N. Vander Weele
Changes by Eric N. Vander Weele : -- nosy: +ericvw ___ Python tracker ___ ___

[issue27819] Always distribute sdist packages as gztar.

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d09ec0ee934 by Jason R. Coombs in branch 'default': Issue #27819: Simply default to gztar for sdist formats by default on all platforms. https://hg.python.org/cpython/rev/8d09ec0ee934 -- nosy: +python-dev

[issue27818] Speed up number format spec parsing

2016-08-20 Thread Stefan Behnel
Stefan Behnel added the comment: You can easily see it by running timeit on fstrings, e.g. patched: $ ./python -m timeit 'f"{34276394612:15}"' 100 loops, best of 3: 0.352 usec per loop $ ./python -m timeit 'f"{34.276394612:8.6f}"' 100 loops, best of 3: 0.497 usec per loop and original

[issue27819] Always distribute sdist packages as gztar.

2016-08-20 Thread Jason R. Coombs
New submission from Jason R. Coombs: Per https://github.com/pypa/setuptools/pull/748#issuecomment-241212548, distutils should by default produce gztar formats on all platforms. -- assignee: jason.coombs components: Distutils messages: 273245 nosy: dstufft, eric.araujo, jason.coombs

[issue27818] Speed up number format spec parsing

2016-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What benchmarks you used? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue27818] Speed up number format spec parsing

2016-08-20 Thread Ned Deily
Changes by Ned Deily : -- nosy: +eric.smith stage: -> patch review ___ Python tracker ___

[issue27818] Speed up number format spec parsing

2016-08-20 Thread Stefan Behnel
New submission from Stefan Behnel: I noticed that quite some time during number formatting is spent parsing the format spec. The attached patch speeds up float formatting by 5-15% and integer formatting by 20-30% for me overall when using f-strings (Ubuntu 16.04, 64bit). --

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: contextlib.suppress provides a contextmanager spelling for the following pattern: try: except : pass That's a very common pattern worth having in the standard library, even though it's only a 5 line context manager. The proposed API

[issue26907] Add missing getsockopt constants

2016-08-20 Thread Christian Heimes
Christian Heimes added the comment: The attached patch adds SO_DOMAIN, SO_PROTOCOL, SO_PEERSEC and SO_PASSSEC. I'd like to get the constants into the stdlib in case Neil's patch won't make it into 3.6. -- keywords: +patch Added file:

[issue27691] X509 cert with GEN_RID subject alt name causes SytemError

2016-08-20 Thread Christian Heimes
Christian Heimes added the comment: ping -- nosy: +Lukasa, haypo type: behavior -> security ___ Python tracker ___

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Michael Büsch
Michael Büsch added the comment: >when particular instances of "catch this exception, but not these ones" become >common, we tend to *change the standard exception hierarchy* to eliminate them >(e.g. StopIteration, KeyboardError, GeneratorExit no longer inheriting from >Exception). But my

[issue27323] ncurses putwin() fails in test_module_funcs

2016-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks again for estimation. -- ___ Python tracker ___ ___

[issue27692] Clean serveral unnecessary NULL checks in exceptions.c

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6e6aa2054824 by Serhiy Storchaka in branch 'default': Issue #27692: Removed unnecessary NULL checks in exceptions.c. https://hg.python.org/cpython/rev/6e6aa2054824 -- nosy: +python-dev ___ Python tracker

[issue27692] Clean serveral unnecessary NULL checks in exceptions.c

2016-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I missed this issue. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27323] ncurses putwin() fails in test_module_funcs

2016-08-20 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: NCURSES_OPAQUE is enabled if --with-reentrant is used. From Xavier's log I guess it's on Arch Linux. Arch Linux does not use --with-reentrant in ncurses [1] and it seems OpenSUSE does [2]. [1]

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: It's the "really common problem" assertion that I'm disputing - when particular instances of "catch this exception, but not these ones" become common, we tend to *change the standard exception hierarchy* to eliminate them (e.g. StopIteration, KeyboardError,

[issue27323] ncurses putwin() fails in test_module_funcs

2016-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Chi Hsuan Yen. Just wondering, how you built Python with ncurses 6.0 Xavier? There is an issue with compiling with ncurses 6.0 (issue25720). -- resolution: -> third party stage: -> resolved status: open -> closed

[issue27776] PEP 524: Make os.urandom() blocking on Linux

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for a fallback in the SIPHash initialisation as well. That's the case where Nathaniel Smith suggested we may want to issue a warning that the process shouldn't be used to handle untrusted inputs (since that particular remote DoS defence won't be working

[issue27817] tkinter string variable misinterpreted as boolean

2016-08-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka stage: -> test needed ___ Python tracker ___

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Michael Büsch
Michael Büsch added the comment: >and instead point you towards https://bugs.python.org/issue12029 Fair enough. But how would a 'suppress OSError, but catch FileNotFoundError' look like with this for example? (Note that I can't subclass the exception) >I'm also not sure it's an idiom we

[issue27817] tkinter string variable misinterpreted as boolean

2016-08-20 Thread R. David Murray
R. David Murray added the comment: Any chance you could provide a simple reproducer? We'll need something for a unit test. -- nosy: +r.david.murray title: String variable misinterpreted as boolean -> tkinter string variable misinterpreted as boolean

[issue27323] ncurses putwin() fails in test_module_funcs

2016-08-20 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: This is actually a ncurses bug: http://lists.gnu.org/archive/html/bug-ncurses/2016-05/msg0.html -- ___ Python tracker

[issue27598] Add SizedIterable to collections.abc and typing

2016-08-20 Thread Guido van Rossum
Guido van Rossum added the comment: No on adding __eq__. If another core dev is available please go ahead and commit. -- title: Add Collection to collections.abc and typing -> Add SizedIterable to collections.abc and typing ___ Python tracker

[issue27283] Add a "What's New" entry for PEP 519

2016-08-20 Thread Brett Cannon
Brett Cannon added the comment: Here is an updated patch to address SilentGhost's review comments and a couple of examples as Berker suggested. -- Added file: http://bugs.python.org/file44171/pep_519_whatsnew.diff ___ Python tracker

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Nick Coghlan
Nick Coghlan added the comment: Michael, first of all, thanks for taking the time to propose this idea, and put together a patch for it. Unfortunately, I'm going to have to decline the proposal for API design reasons (which I'll explain below), and instead point you towards

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread R. David Murray
Changes by R. David Murray : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread R. David Murray
R. David Murray added the comment: And the fact that python deviates from posix in this regard seems like a bug to me, since the posix behavior is, as noted, very useful. Can't we handle ESPIPE like the C library does, instead of forcing users to learn that arcane incantation? --

[issue27817] String variable misinterpreted as boolean

2016-08-20 Thread Andreas Bolsch
New submission from Andreas Bolsch: Applies to 2.7.10 and 2.7.12: Installed LinuxCNC from source at https://github.com/LinuxCNC/linuxcnc : ./configure --with-realtime=uspace --enable-simulator --enable-non-distributable=yes --prefix=/usr --libdir=/usr/lib64 make make install Configured device

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread Shane Hathaway
Shane Hathaway added the comment: Thanks for the analysis. I have already started a pull request to fix this in Supervisor, but I also thought this change to Python might be gratuitous and accidental. It seems like open('/dev/stdout', 'a') ought to work the same as Python 2. If not, the

[issue27816] sock.proto does not reflect actual protocol

2016-08-20 Thread Christian Heimes
New submission from Christian Heimes: The proto property of a socket object does not reflect the actual protocol of the socket file descriptor: >>> import socket >>> SO_PROTOCOL = getattr(socket, 'SO_PROTOCOL', 38) >>> tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> tcp.proto 0 >>>

[issue26981] add compatibility shim for enum34 backport

2016-08-20 Thread Ethan Furman
Ethan Furman added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26981] add compatibility shim for enum34 backport

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset bdfd4c8384de by Ethan Furman in branch 'default': issue26981: fix typo https://hg.python.org/cpython/rev/bdfd4c8384de -- ___ Python tracker

[issue27323] ncurses putwin() fails in test_module_funcs

2016-08-20 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue27692] Clean serveral unnecessary NULL checks in exceptions.c

2016-08-20 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread ZHY
Changes by ZHY : -- nosy: -anngg2008 ___ Python tracker ___ ___ Python-bugs-list

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread ZHY
ZHY added the comment: Sorry, it's my mistake. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread ZHY
Changes by ZHY : Removed file: http://bugs.python.org/file44167/a.png ___ Python tracker ___ ___

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Michael Büsch
Michael Büsch added the comment: Thanks for your comments. Here's version 2 of the patch. Changes: - A typo in the docstring was fixed. - Space was removed in keyword assignments. - Documentation was added. (Note that I signed and sent the contributor agreement. It should arrive soon.)

[issue26981] add compatibility shim for enum34 backport

2016-08-20 Thread SilentGhost
SilentGhost added the comment: Ethan, in Misc/NEWS it says "compatibility ship" -- nosy: +SilentGhost ___ Python tracker ___

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread SilentGhost
SilentGhost added the comment: Spaces around '=' sign in function definitions/calls. -- ___ Python tracker ___

[issue26981] add compatibility shim for enum34 backport

2016-08-20 Thread Ethan Furman
Changes by Ethan Furman : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue26981] add compatibility shim for enum34 backport

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 10830e1b2966 by Ethan Furman in branch 'default': issue26981: add _order_ compatibility shim to enum.Enum https://hg.python.org/cpython/rev/10830e1b2966 -- nosy: +python-dev ___ Python tracker

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Michael Büsch
Michael Büsch added the comment: >Could you please produce a patch that conforms to PEP-8. I tried hard to do so. Could you please tell me what parts are not compliant, so I can fix them? -- ___ Python tracker

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread SilentGhost
SilentGhost added the comment: Also, these would need documentation changes. -- ___ Python tracker ___ ___

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread SilentGhost
SilentGhost added the comment: Could you please produce a patch that conforms to PEP-8. -- nosy: +SilentGhost stage: -> patch review versions: +Python 3.6 ___ Python tracker

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue25746] test_unittest failure in leaks searching mode

2016-08-20 Thread Xiang Zhang
Xiang Zhang added the comment: Simple reproduction: >>> pickle.dumps(unittest.loader._make_skipped_test('hello', RuntimeError, >>> unittest.suite.TestSuite)) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute lookup ModuleSkipped on

[issue1223] httplib does not handle ssl end of file properly

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I think the default of suppress_ragged_eofs=True was a bad idea because by default you cannot tell a secure EOF signal from an insecure error; see Issue 27815. -- nosy: +martin.panter ___ Python tracker

[issue27815] Make SSL suppress_ragged_eofs default more secure

2016-08-20 Thread Martin Panter
New submission from Martin Panter: In the SSL module, the wrap_socket() function (and corresponding SSLContext method) take a flag called “suppress_ragged_eofs”. It defaults to True, which makes me uncomfortable. The documentation says: ''' The parameter “suppress_ragged_eofs” specifies how

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Michael Büsch
Changes by Michael Büsch : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread STINNER Victor
STINNER Victor added the comment: Antti Haapala added the comment: > Presumably the case was that a *named* log file is opened with 'a' mode, and > one could pass '/dev/stdout' just like any other name of a file, and it did > work, but not in Python 3.5. Oh ok, in this case, you need

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Michael Büsch
New submission from Michael Büsch: This adds a whitelist parameter with the name 'unless' to contextlib.suppress, so one can specify exceptions that will not be suppressed. This is useful for specifying single sub-exceptions that we still want to catch, even of we want to suppress all other

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: For future reference, don't post screen shots. Copy and paste the text of your code and its output. You don't program with Photoshop, you program with a text editor. Screen shots make it impossible to copy the code, search for the text, and make it

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread Antti Haapala
Antti Haapala added the comment: Presumably the case was that a *named* log file is opened with 'a' mode, and one could pass '/dev/stdout' just like any other name of a file, and it did work, but not in Python 3.5. -- nosy: +ztane ___ Python

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > it might be simpler to document that Agreed. -- assignee: serhiy.storchaka -> martin.panter nosy: +r.david.murray ___ Python tracker

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core -Windows stage: -> resolved ___ Python tracker ___

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Original post: “When I assign for a item which list of single item, it seems can't set a value for item which I want to.” See the FAQ entry . When you multiply a list,

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread ZHY
New submission from ZHY: it seems can't set a value for item which I want to. -- components: Windows files: 无标题.png messages: 273201 nosy: anngg2008, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: When I assign for a item which list

[issue27812] PyFrameObject.f_gen can be left pointing to a dangling generator

2016-08-20 Thread Armin Rigo
New submission from Armin Rigo: PyFrameObject.f_gen is a pointer (not a reference) to a generator/coroutine object. But the latter doesn't always correctly clean it up when it dies. This pointer is used by frame.clear(). Here is an example I made, which ends in a segfault. This example

[issue27811] _PyGen_Finalize() should not fail with an exception

2016-08-20 Thread Armin Rigo
New submission from Armin Rigo: _PyGen_Finalize() should not fail with an exception. Doing so can cause various SystemErrors or even fatal errors. For example, run this with "python -Werror": import gc async def f(): pass f() gc.collect() # RuntimeWarning, but with

[issue27614] Race in test_docxmlrpc.py

2016-08-20 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Here is my documentation proposal. -- components: +Documentation -Library (Lib) stage: -> patch review versions: +Python 3.5 Added file: http://bugs.python.org/file44164/iter-unsupported.patch ___ Python tracker

[issue27698] socketpair not in socket.__all__ on Windows

2016-08-20 Thread Berker Peksag
Changes by Berker Peksag : -- stage: needs patch -> resolved ___ Python tracker ___

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I committed the gc_collect() change to 3.5 as well, because it helped me with a separate test case. Here is the remaining change, for 3.6 only. I added a timeout to the join() call. This matches the @reap_threads decorator, which times out after 1 s.

[issue12982] Document that importing .pyo files needs python -O

2016-08-20 Thread Berker Peksag
Berker Peksag added the comment: Yes, this can be closed as 'out of date'. I've just updated -O documentation to remove the mention of .pyo extension. Thanks! -- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed

[issue12982] Document that importing .pyo files needs python -O

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e9dc3e4ea91 by Berker Peksag in branch '3.5': Issue #12982: Thanks to PEP 488, Python no longer creates .pyo files https://hg.python.org/cpython/rev/8e9dc3e4ea91 New changeset 1455851e7332 by Berker Peksag in branch 'default': Issue #12982: Merge

[issue27698] socketpair not in socket.__all__ on Windows

2016-08-20 Thread Vedran Čačić
Vedran Čačić added the comment: No problem. Thank you for fixing it. :-) -- ___ Python tracker ___ ___

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ddbc2263943 by Martin Panter in branch '3.5': Issue #27787: Clean up weak references before checking for dangling threads https://hg.python.org/cpython/rev/7ddbc2263943 New changeset e5777c5d108c by Martin Panter in branch 'default': Issue #27787:

  1   2   >