[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2016-12-02 Thread Martin Panter
Martin Panter added the comment: “the current mapping of '__builtins__' is copied into *globals* ” That sounds like we insert each individual builtin name, i.e. globals.update(builtins_mapping). But my understanding is that it is the __builtins__ global variable that is affected

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Xavier, you are welcome to propose your own version of the text, or build on Julien’s. See also Issue 22057, about copying all globals vs builtins. -- nosy: +martin.panter stage: -> patch review versions: +Python 2.7, Python 3.6, Python

[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Serhiy: The Windows buildbots are having trouble removing read-only files. Maybe restore the write mode for the end of the test, or fix support.rmtree()? See <https://docs.python.org/3/library/shutil.html#rmtree-example>. -- nosy: +martin.

[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Martin Panter
Martin Panter added the comment: http://buildbot.python.org/all/builders/AMD64%20Windows8%202.7/builds/9/steps/test/logs/stdio == ERROR: test_readonly_files (test.test_dumbdbm.DumbDBMTestCase

[issue17546] Document the circumstances where the locals() dict get updated

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Some minor tweaks to my earlier patch: * list comprehension → comprehension * time it is called → time of the call -- versions: +Python 3.6, Python 3.7 -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file45735/locals_doc.04.patch

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-03 Thread Martin Panter
Martin Panter added the comment: Fair enough, I don’t really mind if it is (lo=0, hi=None). I think I have only used bisect with both defaults anyway. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28864] Add devnull file-like object

2016-12-04 Thread Martin Panter
Martin Panter added the comment: If you only need the readable interface, use BytesIO or StringIO. I once had an implementation like Serhiy’s, called dummywriter: <https://github.com/vadmium/python-lib/blob/99ec887/streams.py#L12>. To fully implement the writable file API it shoul

[issue28875] test fails and freezes

2016-12-04 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> duplicate status: open -> closed superseder: -> test_logging fails ___ Python tracker <http://bugs.python.or

[issue28874] test_logging fails and freezes

2016-12-04 Thread Martin Panter
Changes by Martin Panter : -- title: test_logging fails -> test_logging fails and freezes type: -> behavior ___ Python tracker <http://bugs.python.org/i

[issue13886] readline-related test_builtin failure

2016-12-05 Thread Martin Panter
Martin Panter added the comment: Since people keep coming upon this bug, perhaps we should inhibit push my fix without fixing that other prompt bug (now a feature change I think). Probably have to capture stderr to avoid it coming out in the test output. -- versions: +Python 3.7

[issue28881] int no attribute 'lower' iterating email.Messasge

2016-12-05 Thread Martin Panter
Martin Panter added the comment: You just need a messsage object with one or more header fields: >>> msg = message_from_string("Name: value\r\n\r\n") >>> for m in msg: ... pass ... AttributeError: 'int' object has no attribute 'lower' Pyth

[issue28881] int no attribute 'lower' iterating email.Message

2016-12-05 Thread Martin Panter
Changes by Martin Panter : -- title: int no attribute 'lower' iterating email.Messasge -> int no attribute 'lower' iterating email.Message ___ Python tracker <http://

[issue28881] int no attribute 'lower' iterating email.Message

2016-12-05 Thread Martin Panter
Martin Panter added the comment: The __iter__() method was added by Barry in <http://svn.python.org/view/sandbox/trunk/emailpkg/5_0-exp/email/message.py?r1=57344&r2=57343&pathrev=57344>: “Added an __iter__() to email.message.Message for iterating over the message’s headers.” On

[issue3687] Popen() object stdout attribute reassignment behaviour

2016-12-05 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.6, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread Martin Panter
Martin Panter added the comment: The patch looks sensible to me. The fix is basically an extension to the first fixup (9c92352324e8), where Victor split _showwarnmsg_impl() out of _showwarnmsg(). Now, _showwarnmsg() is a helper for the C module to choose between the backwards-compatible

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-05 Thread Martin Panter
Martin Panter added the comment: Actually, I found a regression. Looks like you also need to cancel any showwarning() function set by the user: >>> import warnings >>> warnings.showwarning = print >>> with warnings.catch_warnings(record=True) as recording

[issue13886] readline-related test_builtin failure

2016-12-05 Thread Martin Panter
Martin Panter added the comment: input-readline.v2.patch sets stderr=DEVNULL so that the prompt does not come out in the test log. A disadvantage of this is that if there is a failure, any error messages, stack trace, etc is also lost. To fix this properly, we would probably have to capture

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-12-08 Thread Martin Panter
Martin Panter added the comment: Brett, what was the other bug? The bug number you posted is for this bug. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-08 Thread Martin Panter
Martin Panter added the comment: Looks like a leftover relic from Python 2. In Python 3, the prefix is “0o”, not just “0”. This matches to change in Python 2 to 3 octal literal syntax. And there is no special handling of zero in 3: >>> "%#o" % 0 '0o0'

[issue28882] Slice confusing with negative stop and strides and the 0th element.

2016-12-09 Thread Martin Panter
Martin Panter added the comment: I think Steven’s main complaint is that it is hard to make a reversed slice extend to the start of the original sequence, unless you omit (or use None as) the endpoint: >>> "01234567"[4:0:-1] # Includes index [4], stops before reach

[issue1446619] extended slice behavior inconsistent with docs

2016-12-09 Thread Martin Panter
Martin Panter added the comment: Fumihiro’s suggestion seems reasonable to me (assuming it still applies to the current text) -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue1446

[issue28882] Slice confusing with negative stop and strides and the 0th element.

2016-12-09 Thread Martin Panter
Martin Panter added the comment: See also Issue 11842 about the behaviour of slice.indices() in this situation, and Issue 1446619 about fixing the documentation for reverse slices regarding positive out-of-range indexes. -- ___ Python tracker

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-09 Thread Martin Panter
Martin Panter added the comment: Seems a reasonable feature. The documentation would also need updating. Which specific (whitespace) characters do you propose to ignore? Just ASCII ones, as in bytes.isspace(), or others like b"\xA0" (non-breaking space) and U+2028 (line separat

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-09 Thread Martin Panter
Martin Panter added the comment: The documentation for %x etc also had the same problem, and it applies to Python 2 for %x. Here is a patch for Python 3. The behaviour is already tested, but there were some quirks due to porting from Py 2 tests, and duplicate tests which I removed

[issue1446619] extended slice behavior inconsistent with docs

2016-12-09 Thread Martin Panter
Martin Panter added the comment: Patch ruling out the len(s) corner case. I use a modified version of Fumihiro’s suggestion. -- versions: +Python 3.6, Python 3.7 -Python 3.4 Added file: http://bugs.python.org/file45827/extended_slicing_docs.v2.diff

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-09 Thread Martin Panter
Martin Panter added the comment: I’m okay with this version unless anyone has any more improvements. -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issu

[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-12-09 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-09 Thread Martin Panter
Martin Panter added the comment: Patch for %x in Py 2. -- Added file: http://bugs.python.org/file45828/alt-zero.py2.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28771] Update documented signatures of tp_get/setattr

2016-12-09 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-12-09 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue25677] Syntax error caret confused by indentation

2016-12-10 Thread Martin Panter
Martin Panter added the comment: (Long story short: need to strip form feeds in print_error_text(), but I agree that this otherwise does fix a bug.) There is one minor regression that this patch causes IMO. Given the following file, where represents a form feed character ('\014'

[issue28582] Invalid backslash syntax errors are not always accurate as to the location on the line where the error occurs

2016-12-10 Thread Martin Panter
Martin Panter added the comment: I think there are actually two issues at play here: 1. The caret is not compensated for indentation removed from the code. This is what Issue 25677 was originally about. The current patch there will ensure that the behaviour is always like the second (top

[issue25677] Syntax error caret confused by indentation

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Patch v6 strips the form feed, and adds an extra test. -- Added file: http://bugs.python.org/file45844/cpython25677.v6.patch ___ Python tracker <http://bugs.python.org/issue25

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Julien, to help push these changes forward, I suggest start by rebasing and reviewing the conglomerate patch, since it seems that was almost ready. Reading through the thread, it seems the current status is: 1. _crypt module handled elsewhere by Antoine 2

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Zach’s comments on float seem to have been addressed (https://bugs.python.org/review/20185/diff2/10940:10949/Objects/floatobject.c). The comments on the resource module were about return converters: <http://bugs.python.org/review/20185/diff2/10817:10

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +resource.prlimit(int, int, str) crashs ___ Python tracker <http://bugs.python.org/issue6083> ___ ___ Python-bug

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Revision 4bac47eb444c fixed setrlimit(). Perhaps those changes can just be applied again to prlimit(). I’m not an Arg Clinic expert, but isn’t one of its purposes to imitate native Python function signatures? Since argument unpacking was dropped from Python 2

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue20191> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-11 Thread Martin Panter
Martin Panter added the comment: Looks good apart from one quirky test case, see Reitveld -- ___ Python tracker <http://bugs.python.org/issue28512> ___ ___ Pytho

[issue28960] Small typo in Thread.join docs

2016-12-13 Thread Martin Panter
Changes by Martin Panter : -- stage: -> commit review versions: +Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue28960> ___ ___ Python-

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-14 Thread Martin Panter
Martin Panter added the comment: Just a quick note for the moment: It may not be wise to drop the limit to readline(). That is undoing Issue 16040. Maybe we need a better test if this change doesn't fail the test suite. -- ___ Python tracker

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-17 Thread Martin Panter
Martin Panter added the comment: The first offending message I found is number 183465: >>> s.group("comp.lang.python") ('211 4329 179178 183507 comp.lang.python', 4329, 179178, 183507, 'comp.lang.python') >>> s._putcmd("OVER 183465&qu

[issue28987] Remove typo in whats new entry on Descriptor Protocol Enhancements

2016-12-17 Thread Martin Panter
Martin Panter added the comment: Thanks Jim -- nosy: +martin.panter resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker <http://bugs.python.or

[issue28997] test_readline.test_nonascii fails on Android

2016-12-17 Thread Martin Panter
Martin Panter added the comment: This is a breakdown of running the test script on my Linux setup (UTF-8 locale): ^A^B^B^B^B^B^B^B\t\tx\t\r\n Input echoed back (before Readline disables echo) [\xc3\xafnserted] Inserted by pre_input_hook() |t\xc3\xab[after] Inserted by the Ctrl+A

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-18 Thread Martin Panter
New submission from Martin Panter: If I had known this it would have saved me getting a separate implementation working. >>> hex(binascii.crc_hqx(b"\x01", 0)) '0x1021' https://files.stairways.com/other/binhex-40-specs-info.txt Documenting this might helped many

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-18 Thread Martin Panter
Martin Panter added the comment: As far as I know, non-ASCII newlines and whitespace are not supported in Python source code, so there is not a big need to support it in bytes.fromhex() either. But since bytes.fromhex() accepts Unicode strings, I think non-ASCII whitespace would be okay if it

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-18 Thread Martin Panter
Martin Panter added the comment: It seems I can write it without the escaped spaces. Is there a problem with this: *x*:sup:`16` + *x*:sup:`12` + *x*:sup:`5` + 1 I’m happy to add the CRC-32 polynomial if you think it would be useful, although it is a lot longer (fifteen terms instead of four

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2016-12-18 Thread Martin Panter
Martin Panter added the comment: I finished reviewing the most recent patches and left some comments. Perhaps it is worth splitting the conglomerate patch up. I don’t see any point holding back some modules while things are tweaked in unrelated files. My biggest concern is casting function

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-18 Thread Martin Panter
Martin Panter added the comment: Patch looks good to me. Although maybe you don’t need the IndexError check in the test. Won’t limit[key] already handle that for you (as long as key isn’t -1 etc). -- ___ Python tracker <http://bugs.python.

[issue25677] Syntax error caret confused by indentation

2016-12-19 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-20 Thread Martin Panter
Martin Panter added the comment: I will try to come up with something in a few days -- ___ Python tracker <http://bugs.python.org/issue28971> ___ ___ Python-bug

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Martin Panter
Martin Panter added the comment: Python 3 doesn’t have an __all__ list; it was removed in r85073 (Issue 3612). I don’t understand why it was removed. Maybe Hirokazu didn’t understand what it does. Since this is a regression, perhaps it should be added back. -- components: +Library

[issue28997] test_readline.test_nonascii fails on Android

2016-12-23 Thread Martin Panter
Martin Panter added the comment: The basic idea of your patch may be reasonable, but something is not right. Imagine the locale is something other than UTF-8. The input code will now contain mojibake print("\xC3\xAB"), although the decode() call will translate the result back to th

[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Python 2.6 is quite old and doesn’t even receive security patches any more as far as I know. I would start by trying 2.7, or failing that, try backporting the changes from Issue 6267. My guess is this is related to persistent HTTP connections being dropped. I

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Martin Panter
Martin Panter added the comment: This is a change in behaviour of the _copy() loop: it will stop as soon as EOF is read from the parent’s input, and immediately close the terminal master. Unpatched, the loop continues to read output from the child, until the child closes the terminal slave

[issue19756] test_nntplib: sporadic failures, network isses? server down?

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Multi-connect.patch is a smaller patch that changes setUpClass() → setUp(), so that each test method creates a new NNTP connection. The downside is all the reconnecting slows the test execution from 42 s down to 115 s, which is why I would like to move the

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-23 Thread Martin Panter
Martin Panter added the comment: Max_over_line.patch is my attempt: Keep the original _MAXLINES = 2048 code, but override it with _MAX_OVER_LINE = 64000 when reading OVER response lines. I also added a test case. -- Added file: http://bugs.python.org/file46019/max_over_line.patch

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-23 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file46020/max_over_line.patch ___ Python tracker <http://bugs.python.org/issue28971> ___ ___ Python-bug

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-23 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file46019/max_over_line.patch ___ Python tracker <http://bugs.python.org/issue28971> ___ ___ Python-bug

[issue28960] Small typo in Thread.join docs

2016-12-24 Thread Martin Panter
Martin Panter added the comment: I agree the second patch is more correct. This undoes the change as it was introduced in revision c4cf1b886d6b and matches the Python 2 text. -- nosy: +martin.panter resolution: -> fixed stage: commit review -> resolved status: open -&g

[issue13886] readline-related test_builtin failure

2016-12-24 Thread Martin Panter
Martin Panter added the comment: Hi Xavier, I was about to push input-readline.v2.patch, but I thought it might be good to check with you first if this causes problems with Android, based on my experience with Issue 28997. With the patch applied

[issue29004] binascii.crc_hqx() implements CRC-CCITT

2016-12-24 Thread Martin Panter
Martin Panter added the comment: Thanks for the help Serhiy -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue1446619] extended slice behavior inconsistent with docs

2016-12-24 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-24 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch versions: +Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.org/issue28978> ___ ___ Python-

[issue22942] Language Reference - optional comma

2016-12-24 Thread Martin Panter
Martin Panter added the comment: Issue 28978 covers the parameter list syntax (Bug 1 + plus another problem). -- dependencies: +a redundant right parentheses in the EBNF rules of parameter_list ___ Python tracker <http://bugs.python.org/issue22

[issue28954] Incorrect EBNF rule of keywords_arguments

2016-12-24 Thread Martin Panter
Martin Panter added the comment: Thanks for finding this Woo! -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.or

[issue28815] test_socket fails if /proc/modules is existent but not readable

2016-12-24 Thread Martin Panter
Martin Panter added the comment: That would be possible in Python 3, not Python 2 though. -- ___ Python tracker <http://bugs.python.org/issue28815> ___ ___ Pytho

[issue28864] Add devnull file-like object

2017-01-02 Thread Martin Panter
Martin Panter added the comment: Example where an implementation like Serhiy’s was not good enough: <https://bugs.python.org/issue29130#msg284437>. In that case, the lack of flush() method causes a subtle problem. -- ___ Python tracker

[issue29130] Exit code 120 returned from Python unit test testing SystemExit

2017-01-02 Thread Martin Panter
Martin Panter added the comment: David is right. The 120 code was added in Issue 5319, as a way of indicating a problem in the final stages of the interpreter exiting. The two conditions that trigger this are calling the flush() method on sys.stdout and sys.stderr. If you add a dummy flush

[issue29138] No __hash__() inheritance warning with -Werror

2017-01-02 Thread Martin Panter
New submission from Martin Panter: Normally there is a Python 3 compatibility warning emitted when a class is based on object, implements __eq__(), but does not define __hash__(): $ python -3 -c 'class C(object): __eq__ = lambda self, other: True' -c:1: DeprecationWarning: Overrid

[issue29138] No __hash__() inheritance warning with -Werror

2017-01-02 Thread Martin Panter
Martin Panter added the comment: Thanks, I will try to look at that some time -- stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2017-01-03 Thread Martin Panter
Martin Panter added the comment: Behaviour change in Free BSD as I understand. Nothing changed in Python, but perhaps older versions of Free BSD behaved like Linux and raised EIO (or another errno; it is not clear). -- ___ Python tracker <h

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-04 Thread Martin Panter
Martin Panter added the comment: Hi Cornelius and thanks for the work. Since the patch adds a significant amount of code, I think you might have to sign the contributor agreement: <http://www.python.org/psf/contrib/contrib-form/>. You can do it in a web browser. I would like to revie

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-04 Thread Martin Panter
Martin Panter added the comment: Ignore my comment about contrib agreement, that must have come through recently :) -- ___ Python tracker <http://bugs.python.org/issue29

[issue29172] blake2: Use lowest-common denominator signature of #pragma pack

2017-01-05 Thread Martin Panter
Martin Panter added the comment: FWIW Issue 28290 was also opened about this pragma directive being not recognized by a compiler called xlC on AIX. -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue29

[issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix

2017-01-06 Thread Martin Panter
Martin Panter added the comment: Regarding reopening Issue 10656, whatever you think is more appropriate. You just have to judge whether it is the same use case, the same code affected, etc. Issue 16189 and Issue 25825 were about updating to match recent changes to directory names, and I

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread Martin Panter
Martin Panter added the comment: The ResourceWarning was added by Issue 26741. I agree that there are legitimate reasons why pre-3.6 code may avoid calling Popen.wait() and equivalent. Victor opened Issue 27068 about adding a Popen.detach() method, which such code could use to opt out of the

[issue27068] Add a detach() method to subprocess.Popen

2017-01-07 Thread Martin Panter
Martin Panter added the comment: The user can access pipes and close them directly, or keep their own reference. I don’t think detach() should touch pipes, and __exit__() should probably continue to close them. Maybe call the method detach_pid() if that makes it clearer that pipes are

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-07 Thread Martin Panter
Martin Panter added the comment: The code in test.py is not realistic. It spawns children only to terminate them straight away, and you could easily reap each child after calling terminate(). You might have more influence with a realistic use case. Victor has committed a fix for the

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-07 Thread Martin Panter
Martin Panter added the comment: I would prefer to commit Chris’s fix for BSDs (Issue 26228) with a regression test. I can explain in the commit message who contributed to which part, or do two separate commits if you prefer. But the point is to add the test with the fix. I’m not going to

[issue21242] Generalize configure check for working Python executable

2017-01-07 Thread Martin Panter
Martin Panter added the comment: It is still not clear what change you were proposing. Perhaps factor out the common code for ADSLGEN and OPCODEHGEN? If so, that has been done as part of Issue 26662 in 3.5+. -- nosy: +martin.panter superseder: -> configure/Makefile doesn't

[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2017-01-07 Thread Martin Panter
Martin Panter added the comment: Other tests are skipped if libc_name is None, so your assertion is inconsistent. FTR there are reports open about problems with bootstrap files like asdl_c.py, e.g. Issue 28143 proposing to port that file to Python 3, and Issue 23404 about the future of “make

[issue28815] test_socket fails if /proc/modules is existent but not readable

2017-01-07 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28997] test_readline.test_nonascii fails on Android

2017-01-08 Thread Martin Panter
Martin Panter added the comment: . Thanks for the explanation. It sounds like the Readline library assumes an ASCII-only locale and sets its “convert-meta” variable to “on”. But Python assumes UTF-8 and inputs b"\xC3\xAB" to the terminal. Readline converts the input to two escape

[issue29204] Add code deprecations in ElementTree

2017-01-08 Thread Martin Panter
Martin Panter added the comment: Isn’t cElementTree useful and recommended in 2.7? It would be awkward to deprecate it in Python 3. But I guess the other cases should be okay to deprecate in 3.7. -- nosy: +martin.panter ___ Python tracker <h

[issue29208] BlockingIOError during system startup

2017-01-08 Thread Martin Panter
Martin Panter added the comment: It looks like the logic for handling an error seeding from urandom is reversed: <https://hg.python.org/cpython/rev/45fc0c83ed42#l6.66>. Random_seed_urandom() actually returns -1 if is an exception set, and 0 if it was successful. The result would be a

[issue29208] BlockingIOError during system startup

2017-01-08 Thread Martin Panter
Martin Panter added the comment: David you are right, thanks. Dustin: the exact patch you want is revision 0a55e039d25f. -- resolution: -> duplicate status: open -> closed superseder: -> Python 3.6 on Windows doesn't seed Random

[issue1621] Do not assume signed integer overflow behavior

2017-01-08 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +failing overflow checks in replace_* ___ Python tracker <http://bugs.python.org/issue1621> ___ ___ Python-bugs-list m

[issue29145] failing overflow checks in replace_*

2017-01-08 Thread Martin Panter
Martin Panter added the comment: FTR I thought the consensus was not to backport these fixes unless there was a demonstrated problem: <https://bugs.python.org/issue1621#msg144499>, though personally, I would be in favour of backporting in many cases. Regarding str.join() in unicode.

[issue29145] failing overflow checks in replace_*

2017-01-09 Thread Martin Panter
Martin Panter added the comment: Both fixes (join and replace) look good to me. However I don’t think it is necessary to change the exception message in 3.5 or 3.6. -- ___ Python tracker <http://bugs.python.org/issue29

[issue15657] Error in Python 3 docs for PyMethodDef

2017-01-10 Thread Martin Panter
Martin Panter added the comment: . The documentation did not get merged properly into 3.6+. And even in 3.5, under METH_KEYWORDS, I propose to change “The flag is typically combined with METH_VARARGS” to “The flag must be combined . . .”. The remaining issue15657_36.diff patch looks out of

[issue15216] Support setting the encoding on a text stream after creation

2017-01-11 Thread Martin Panter
Martin Panter added the comment: Inada, I think you messed up the positioning of bits of the patch. E.g. there are now test methods declared inside a helper function (rather than a test class). Since it seems other people are in favour of this API, I would like to expand it a bit to cover

[issue29239] Fix wrong issue number in what's new entry

2017-01-11 Thread Martin Panter
Martin Panter added the comment: Thanks Jim -- nosy: +martin.panter resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker <http://bugs.python.or

[issue17824] pty.spawn handles errors improperly

2017-01-12 Thread Martin Panter
Martin Panter added the comment: The patch for Issue 26228 proposes an improvement to the situation, although it is not perfect and does not include a test. I wonder if it is possible to replace fork() and execlp() with a subprocess.Popen invokation, at least in a new Python release

[issue29251] Class __dict__ is only a mapping proxy

2017-01-12 Thread Martin Panter
New submission from Martin Panter: The __dict__ attribute of class objects is documented as being a (standard) dictionary, but implemented with a proxy object. I propose to clarify the documentation in “Custom classes” under <https://docs.python.org/3.5/reference/datamodel.html#the-stand

[issue25825] AIX shared library extension modules installation broken: wrong dir names

2017-01-13 Thread Martin Panter
Changes by Martin Panter : -- title: AIX shared library extension modules installation broken -> AIX shared library extension modules installation broken: wrong dir names ___ Python tracker <http://bugs.python.org/issu

[issue18235] _sysconfigdata.py wrong on AIX installations

2017-01-13 Thread Martin Panter
Martin Panter added the comment: So are you saying you tried patching Python 2 and/or 3, but did not see any relevant change at all? -- ___ Python tracker <http://bugs.python.org/issue18

[issue16189] config/ld_so_aix not found: old dir name

2017-01-13 Thread Martin Panter
Changes by Martin Panter : -- title: ld_so_aix not found -> config/ld_so_aix not found: old dir name ___ Python tracker <http://bugs.python.org/issu

<    9   10   11   12   13   14   15   16   17   18   >