[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 <rep...@bugs.python.org> <http://bugs.pyt

[issue1446619] extended slice behavior inconsistent with docs

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

[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

[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

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

2016-12-23 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: Added file: http://bugs.python.org/file46020/max_over_line.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

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

2016-12-23 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: Removed file: http://bugs.python.org/file46019/max_over_line.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[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

[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

[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

[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

[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

[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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25677] Syntax error caret confused by indentation

2016-12-19 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[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 <rep...@bugs.python.

[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

[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

[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

[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 other peop

[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

[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 <rep...@bugs.python.org> <http://bugs.pyt

[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") >>> s.

[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 <

[issue28960] Small typo in Thread.join docs

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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

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

2016-12-10 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

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

2016-12-10 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

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

2016-12-10 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- stage: -> needs patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20191> ___ _

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2016-12-10 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- dependencies: +resource.prlimit(int, int, str) crashs ___ Python tracker <rep...@bugs.python.org> <http://bugs.pytho

[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

[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

[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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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: (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') if True

[issue28771] Update documented signatures of tp_get/setattr

2016-12-09 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

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

2016-12-09 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

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

2016-12-09 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[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 <rep...@bugs.python.org> <http://bugs.python.or

[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

[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

[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

[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 <

[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 <rep...@bugs.python.org> <http://bugs.python.org/iss

[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

[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' -- nosy: +

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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-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

[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

[issue3687] Popen() object stdout attribute reassignment behaviour

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

[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=57343=57344>: “Added an __iter__() to email.message.Message for iterating over the message’s headers.” On the other hand, e

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

2016-12-05 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- title: int no attribute 'lower' iterating email.Messasge -> int no attribute 'lower' iterating email.Message ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[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' Python 2 does

[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

[issue28874] test_logging fails and freezes

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

[issue28875] test fails and freezes

2016-12-04 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> duplicate status: open -> closed superseder: -> test_logging fails ___ Python tracker <rep...@bugs.python.org> <http://bu

[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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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

[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

[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.

[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

[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: globals

[issue28853] locals() and free variables

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Marco, your patch removes the description for class blocks. Is that your intent, or just an accident? See r53954. My understanding is “function block” is there to distinguish these three modes: def foo(): # Function block print(locals()) class Bar

[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- title: os.path.mount sometimes raises FileNotFoundError on Windows -> os.path.ismount sometimes raises FileNotFoundError on Windows ___ Python tracker <rep...@bugs.pytho

[issue28728] test_host_resolution in test_socket fails

2016-11-30 Thread Martin Panter
Martin Panter added the comment: I think the original test is trying to ensure that an invalid numeric IP address results in an OSError. So changing it to skip the test on OSError does not seem wise. Also, Silent Ghost said that the problem was with gethostbyaddr(), not gethostbyname(). I

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

2016-11-30 Thread Martin Panter
Martin Panter added the comment: “digits which do not form decimal radix forms” I see you have taken this from a Unicode document, but “forming a form” seems a long way of saying very little. The difference seems a bit vague, but I gather that digits not in the Unicode “decimal digit

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

2016-11-30 Thread Martin Panter
Martin Panter added the comment: This seems reasonable in general. Did you test this exact patch Patrila? It looks to me like you need to change ENOENT → errno.ENOENT, etc. -- components: +Tests nosy: +martin.panter stage: -> patch review type: -> behavior versions: -Pyth

[issue28728] test_host_resolution in test_socket fails

2016-11-30 Thread Martin Panter
Martin Panter added the comment: Maybe you could factor out the first part of test_bad_address() that skips the test. It would only need to be used by negative test cases (that purposefully test invalid names). I presume positive tests would not need to be wrapped

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

2016-11-30 Thread Martin Panter
Martin Panter added the comment: It will apply to the 3.5 and 3.6 branches if I first backport revision 0a18d2cfeb52 (Issue 28753), which I think is valid. But I would wait until there is a branch for 3.6.1, and then commit to all three branches. (Ned asked for only release-critical changes

[issue28841] urlparse.urlparse() parses invalid URI without generating an error (examples provided)

2016-11-30 Thread Martin Panter
Martin Panter added the comment: Also, this is in direct contradiction to Issue 20270. -- nosy: +serhiy.storchaka ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28841] urlparse.urlparse() parses invalid URI without generating an error (examples provided)

2016-11-30 Thread Martin Panter
Martin Panter added the comment: The Python documentation refers to RFC 3986, which allows an empty port string introduced by a colon, although it recommends against it: <https://tools.ietf.org/html/rfc3986#section-3.2.3> The “port” subcomponent of “authority” is designated by an op

[issue25701] Document that tp_setattro and tp_setattr are used for deleting attributes

2016-11-30 Thread Martin Panter
Martin Panter added the comment: I made one minor change: element → slice -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2016-11-30 Thread Martin Panter
Martin Panter added the comment: As of Issue 25701, the null-to-delete feature is documented as being deprecated in favour of calling the related Del functions or macros. There was a python-dev thread at <https://marc.info/?i=n32kch$eie$1...@ger.gmane.org>. I’m not sure if that is good

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

2016-11-30 Thread Martin Panter
Martin Panter added the comment: I’m waiting for the 3.6 release candidate before pushing to the Py 3 branches. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Martin Panter
Martin Panter added the comment: If adding proper support for hi=None, maybe lo=None should also be supported. Also, I would think the main Doc/library/bisect.rst documentation needs updating, and a test and What’s New entry added. -- ___ Python

[issue28797] Modifying class __dict__ inside __set_name__

2016-11-28 Thread Martin Teichmann
Martin Teichmann added the comment: I personally prefer the first patch, which iterates over a copy of __dict__. Making a copy of a dict is actually a pretty fast operation, I would even expect that it is faster than the proposed alternative, creating tuples. Even if the second approach

[issue28827] f-strings: format spec should not accept unicode escapes

2016-11-28 Thread Martin Panter
Martin Panter added the comment: I don’t have Py 3.6 to test on, but won’t that make it unnecessarily inconvenient to use certain format codes? I.e. codes that involve non-ASCII characters, control codes, quote signs, or backslashes. Slightly silly use case: >>> "The time is

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-28 Thread Martin Panter
Martin Panter added the comment: Regarding the problem with the default value, can we use “unspecified”, as documented at <https://docs.python.org/dev/howto/clinic.html#writing-a-custom-converter>, or is that an old relic that no longer exists (hinted at the end of Issue 20293)? F

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

2016-11-28 Thread Martin Panter
Martin Panter added the comment: Thanks, this looks good to me, although let’s not touch the blank line at the end of the file. -- nosy: +martin.panter stage: -> commit review versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 -Python

[issue28804] file tell() report incorrect file position on Windows (but Linux is OK)

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Is this a duplicate of Issue 26016? -- nosy: +martin.panter ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Taking the first function, bisect_right(), as an example, I see these differences: * bisect_right(a, x[, lo[, hi]]) -> index This signature is removed. I think removing it is reasonable, because pydoc can extract the proper signature from the Arg Cli

[issue28785] Clarify the behavior of NotImplemented

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Correct, I meant to say the first fallback is the other call. BTW your suggested text might hold for __eq__(), but for __ne__(), returning NotImplemented seems to bypass the “not a.__eq__(b)” fallback. -- ___ Python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Victor, what changes to the doc strings are you talking about? Adding descriptions of the parameters, maybe? Other than that they look very similar to me. I haven’t looked closely, but the Python doc strings have been updated at least once more than the C doc

[issue28782] SEGFAULT when running a given coroutine

2016-11-25 Thread Martin Richard
Martin Richard added the comment: Thank you all for fixing this so quickly, it's been done amazingly fast! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

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

2016-11-24 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- dependencies: +Argument Clinic for bisect.bisect_left ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28785] Clarify the behavior of NotImplemented

2016-11-24 Thread Martin Panter
Martin Panter added the comment: The documentation of this that comes to mind is spread over <https://docs.python.org/3.6/reference/datamodel.html#object.__eq__> and <https://docs.python.org/3.6/reference/expressions.html#value-comparisons>. My understanding of how it work

[issue28728] test_host_resolution in test_socket fails

2016-11-24 Thread Martin Panter
Martin Panter added the comment: I’m curious what the result of gethostbyaddr() is in your case, Silent Ghost. import socket socket.gethostbyaddr("::1q") socket.gethostbyaddr("::1::2") socket.gethostbyaddr("1:1:1:1:1:1:1:1:1") On my computer, I get “socket.gaierr

[issue28728] test_host_resolution in test_socket fails

2016-11-23 Thread Martin Panter
Martin Panter added the comment: Maybe worth looking at what name resolution stuff is enabled in /etc/nsswitch.conf. On the hosts line, my current computer (v basic setup) has hosts: files dns myhostname My guess is you have a plugin which is resolving these ip-address lookalikes

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-23 Thread Martin Panter
Martin Panter added the comment: The tests changes also produce a DeprecationWarning: == ERROR: testEnterAttributeError1 (test.test_with.FailureTestCase

[issue10721] Remove HTTP 0.9 server support

2016-11-23 Thread Martin Panter
Martin Panter added the comment: V4 patch adjusting to recent code change. Raymond: Given the problems caused by the current code, would you reconsider your opposition? Otherwise, what do you think should be the future of the code? Should we fix it so that it handles real HTTP 0.9 requests

[issue28771] Update documented signatures of tp_get/setattr

2016-11-23 Thread Martin Panter
Martin Panter added the comment: Python 2 patch is on top of the patch for Issue 25701 -- dependencies: +Document that tp_setattro and tp_setattr are used for deleting attributes ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue28771] Update documented signatures of tp_get/setattr

2016-11-23 Thread Martin Panter
Martin Panter added the comment: In Python 2, charbufferproc was changed to use non-const char ** in revision dba6494735d0 (perhaps by accident). Otherwise, this patch is the same as for Python 3. I have added a sentence about using NULL for deletion in the patch. -- Added file: http

[issue25701] Document that tp_setattro and tp_setattr are used for deleting attributes

2016-11-23 Thread Martin Panter
Martin Panter added the comment: The 2.7 patch looks okay to me. I confirmed that sq_ass_slice gets called to delete slices, and I presume the other stuff is similar to Python 3. Do you want to commit this to 2.7 Serhiy? -- stage: patch review -> commit rev

[issue28532] Show sys.version when -V option is supplied twice.

2016-11-23 Thread Martin Panter
Martin Panter added the comment: Looks good to me -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28532> ___ ___ Python-bugs-list

[issue28782] SEGFAULT when running a given coroutine

2016-11-23 Thread Martin Richard
New submission from Martin Richard: Hi, I stumbled upon a SEGFAULT while trying Python 3.6.0 on a project using asyncio. I can't really figure out what's happening, so I reduced the original code triggering the bug down to a reproducible case (which looks a bit clunky, sorry). The case has been

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-22 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.

[issue28768] Warning: implicit declaration of function '_setmode'

2016-11-22 Thread Martin Panter
Martin Panter added the comment: The Modules/main.c change at least looks reasonable as a bug fix. In the long term, it would be nice to clean up some of the conditions for including . Currently it is unconditional via PC/pyconfig.h, configure.ac optionally enables HAVE_IO_H

<    4   5   6   7   8   9   10   11   12   13   >