[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2013-12-19 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue19977> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4492] httplib code thinks it closes connection, but does not

2013-12-27 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue4492> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7464] circular reference in HTTPResponse by urllib2

2013-12-27 Thread Martin Panter
Martin Panter added the comment: Sounds like urlopen() is relying on garbage collection to close the socket and connection. Maybe it would be better to explicitly close the socket, even if you do eliminate all the garbage reference cycles. My test code for Issue 19524 might be useful here. It

[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2013-12-27 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20059> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2013-12-27 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20074> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12692] test_urllib2net is triggering a ResourceWarning

2013-12-28 Thread Martin Panter
Martin Panter added the comment: Any chance of backporting this to version 3.3? I think it is a real-world issue beyond the test suite. See Issue 19524. -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue12

[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2013-12-28 Thread Martin Panter
Martin Panter added the comment: Just discovered the same fix of manually closing the socket object was already made independently of my patch in the “default” branch! See Issue 12692. http://hg.python.org/cpython/rev/92656b5df2f2 The main difference is my patch should also close the

[issue20096] Mention modernize and future in Python 2/3 porting HOWTO

2013-12-31 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20096> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6135] subprocess seems to use local encoding and give no choice

2013-12-31 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue6135> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3

2014-01-04 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue19729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11681] -b option undocumented

2014-01-04 Thread Martin Panter
Martin Panter added the comment: Try this to trigger a warning: python2 -b -c 'bytearray("3") == u"3"' -c:1: BytesWarning: Comparison between bytearray and string -- nosy: +vadmium ___ Python tracker <

[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2014-01-05 Thread Martin Panter
Martin Panter added the comment: The Issue 12692 fix has been backported to the 3.3 branch, and it fixes this bug. However here is an updated patch (against revision 28337a8fb502 in the “3.3” branch) consisting of two left over bits you might still want to use: 1. My test case 2. Explicitly

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-01-05 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue13881> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20132] Many incremental codecs don’t handle fragmented data

2014-01-05 Thread Martin Panter
New submission from Martin Panter: Many of the incremental codecs do not handle fragmented data very well. In the past I think I was interested in using the Base-64 and Quoted-printable codecs, and playing with other codecs today reveals many more issues. A lot of the issues reflect missing

[issue8796] Deprecate codecs.open()

2014-01-05 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue8796> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19548] 'codecs' module docs improvements

2014-01-05 Thread Martin Panter
Martin Panter added the comment: Addition to the list of improvements: * Under codecs.IncrementalEncoder.reset() it mentions calling encode('', final=True). This call does not work as written for the byte encoders in my experience, because they do not accept empty text strings.

[issue20190] dict() in dict(foo='bar') raises

2014-01-08 Thread Martin Häcker
New submission from Martin Häcker: I was quite surprised by this behavior: >>> dict() in [dict()] True >>> dict() in [] False >>> dict() in dict(foo='bar').keys() Traceback (most recent call last): File "", line 1, in TypeError: unhashable type:

[issue20190] dict() in dict(foo='bar').keys() raises

2014-01-08 Thread Martin Häcker
Changes by Martin Häcker : -- title: dict() in dict(foo='bar') raises -> dict() in dict(foo='bar').keys() raises ___ Python tracker <http://

[issue20190] dict() in dict(foo='bar').keys() raises

2014-01-09 Thread Martin Häcker
Martin Häcker added the comment: Sorry, I got the title wrong on the first try. (Already corrected). I think the problem is that the API of dict.keys() is surprising. One gets back something that behaves like a list, the name 'keys' suggests that it is a list and for lists t

[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2014-01-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue19619> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20132] Many incremental codecs don’t handle fragmented data

2014-01-10 Thread Martin Panter
Martin Panter added the comment: I think calling iterencode() with an empty iterator is a side issue. Even with a non-empty iterator, it tries to encode an empty _text_ string to finalise the encoder: >>> bytes().join(codecs.iterencode(iter((b"data",)), "base64-codec&q

[issue20190] dict() in dict(foo='bar').keys() raises

2014-01-11 Thread Martin Häcker
Martin Häcker added the comment: Well, if that's the case, then this bug indeed can be closed. You switched from list as the base type to set and that has to be dealt with on application side. Still this is surprising, but there's not much that c

[issue17814] Popen.stdin/stdout/stderr documentation should mention object type

2014-01-11 Thread Martin Panter
Martin Panter added the comment: The patch specifies the stream types are either BufferedReader/Writer, TextIOWrapper, or None. However they can also be plain FileIO in my experience (Python 3.3 with bufsize=0). Maybe it would be simpler to defer to the documentation for open(), which

[issue20238] Incomplete gzip output with tarfile.open(fileobj=..., mode="w:gz")

2014-01-13 Thread Martin Panter
New submission from Martin Panter: I am trying to create a tar file after opening it as a temporary file, and it seems to be writing truncated output when I use mode="w:gz". My workaround looks like it will be to use mode="w|gz" instead. It’s not clear what the differ

[issue20295] imghdr add openexr support

2014-01-18 Thread Martin Vignali
New submission from Martin Vignali: Add support for detect openexr file (http://www.openexr.com/) Based on information provided by : http://www.openexr.com/ReadingAndWritingImageFiles.pdf I make some tests, on different kind of exr file, to check, the new function. -- components

[issue20295] imghdr add openexr support

2014-01-19 Thread Martin Vignali
Martin Vignali added the comment: New patch with formatting correction and documentation update. I'm not sure about the place of the versionadded directive in the documentation. -- Added file: http://bugs.python.org/file33547/img_hdr_exr_2.

[issue20295] imghdr add openexr support

2014-01-19 Thread Martin Vignali
Martin Vignali added the comment: You're right, i make the correction, in a new patch. I make other tests, with official sample files : http://download.savannah.nongnu.org/releases/openexr/openexr-images-1.4.0.tar.gz -- Added file: http://bugs.python.org/file33554/img_hdr_exr_3.

[issue19990] Add unittests for imghdr module

2014-01-19 Thread Martin Vignali
Martin Vignali added the comment: I made a simple exr file with the lib Exr (it's a half float ZIP16 RGBA file), in order to add real exr file to the unit test. When use with the patch i made here http://bugs.python.org/issue20295 , this sample file return 'exr'. Sorry, i do

[issue9694] argparse required arguments displayed under "optional arguments"

2014-01-21 Thread Martin d'Anjou
Martin d'Anjou added the comment: How about calling required arguments "required arguments"? required arguments: --reqarg REQARG, -r REQARG This is required optional arguments: -h, --helpshow this help message and exit --optarg OP

[issue20333] argparse subparser usage message hides main parser usage

2014-01-21 Thread Martin d'Anjou
New submission from Martin d'Anjou: Consider the following code: #!/usr/bin/env python3 import argparse # create the top-level parser parser = argparse.ArgumentParser(prog='PROG') parser.add_argument('--file', help='A filename', required=True) subparser

[issue20518] Weird behavior with multiple inheritance when C classes involved

2014-02-05 Thread Martin Teichmann
New submission from Martin Teichmann: Python behaves odd with regards to multiple inheritance and classes written in C. I stumbled over this problem while working with PyQt4, but soon realized that part of the problem is not actually in that library, but is deep down in the CPython core. For

[issue20518] multiple inheritance + C extension = possibly unexpected __base__

2014-02-08 Thread Martin Teichmann
Martin Teichmann added the comment: I've been working a bit on a solution to this issue, one proposal is in the attached patch. The patch adds a new flag to tp_flags, called Py_TPFLAGS_SOLID, which marks a class as being solid, i.e. its memory layout is incompatible with its parent layo

[issue20318] subprocess.Popen can hang in threaded applications in Python 2

2014-02-09 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20318> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9694] argparse required arguments displayed under "optional arguments"

2014-02-10 Thread Martin Panter
Martin Panter added the comment: A new “required arguments” section seems too arbitrary to me. It would clash with the “positional arguments” heading, since those are also required by default. I would go with the heading “options”, as a noun. That term seems to be well used, at least on

[issue20351] Add doc examples for DictReader and DictWriter

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20351> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2014-02-10 Thread Martin Panter
Martin Panter added the comment: The server in question is sending a chunked response, but seems to be closing the connection when it is done, without sending a zero-length chunk (which I understand it is meant to according to the HTTP protocol). My Firefox shows the XML without any

[issue19974] tarfile doesn't overwrite symlink by directory

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue19974> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4356] Add "key" argument to "bisect" module functions

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue4356> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1243678] httplib gzip support

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue1243678> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20284> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20405] Add io.BinaryTransformWrapper and a "transform" parameter to open()

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20405> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18956] Document useful functions in ‘pydoc’ module

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue18956> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12916] Add inspect.splitdoc

2014-02-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue12916> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue894936] Have a split corresponding with os.path.join

2014-02-10 Thread Martin Panter
Martin Panter added the comment: I suggest closing this in favour of issue 11344, “Add os.path.splitpath(path) function”, which has a more complete patch ready. -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue894

[issue12849] Cannot override 'connection: close' in urllib2 headers

2014-02-16 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue12849> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20632] Define a new __key__ protocol

2014-02-16 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue20632> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12849] Cannot override 'connection: close' in urllib2 headers

2014-02-16 Thread Martin Panter
Martin Panter added the comment: I suggest using setdefault() in urllib.request.AbstractHTTPHandler.do_open(): headers.setdefault("Connection", "close") I am trying to work around a server that truncates its response when this header is sent, and this change would

[issue9232] Allow trailing comma in any function argument list.

2014-02-26 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue9232> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1508475] transparent gzip compression in urllib

2014-02-26 Thread Martin Panter
Martin Panter added the comment: I have code that already handles an “gzip” encoded response from urlopen(). All three patches leave the Content-Encoding header intact, so I suspect my code would try to decompress the body a second time. Deleting this header (as already suggested) would work

[issue14302] Rename Scripts directory to bin and move python.exe to bin

2014-02-27 Thread Martin Dengler
Changes by Martin Dengler : -- nosy: +mdengler ___ Python tracker <http://bugs.python.org/issue14302> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14302] Rename Scripts directory to bin and move python.exe to bin

2014-02-28 Thread Martin Dengler
Martin Dengler added the comment: Is this state "closed" per https://mail.python.org/pipermail/distutils-sig/2013-October/022855.html or "languishing" per https://mail.python.org/pipermail/python-dev/2012-March/117946.html ? I would add a belated "me too" to th

[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2014-02-28 Thread Martin Dengler
Changes by Martin Dengler : -- nosy: +mdengler ___ Python tracker <http://bugs.python.org/issue20042> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2014-03-04 Thread Martin Dengler
Changes by Martin Dengler : -- nosy: +mdengler ___ Python tracker <http://bugs.python.org/issue11240> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2014-03-04 Thread Martin Dengler
Martin Dengler added the comment: > the root issue turned out to be that when you execute any multiprocessing > statements at the module/script level on Windows, you need to put it under if > __name__ == "__main__", otherwise it will cause infinite spawning. Same for me.

[issue14302] Rename Scripts directory to bin and move python.exe to bin

2014-03-04 Thread Martin Dengler
Martin Dengler added the comment: Ok, you're right about my link #2; I meant to include this link (a reply to the link I actually included): https://mail.python.org/pipermail/python-dev/2012-March/118047.html ...in which I think the pertinent quote is: "For direct execution, th

[issue20864] getattr does not work well with descriptor

2014-03-07 Thread Martin Thurau
New submission from Martin Thurau: If you have a descriptor (in my case it was an SQLAlchemy column) on an instance and this descriptor returns None for a call to __get__ then getattr with a given default value, will not return the default, but None. I have no knowledge on the implementation

[issue10128] multiprocessing.Pool throws exception with __main__.py

2014-03-12 Thread Martin Dengler
Changes by Martin Dengler : -- nosy: +mdengler ___ Python tracker <http://bugs.python.org/issue10128> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10128] multiprocessing.Pool throws exception with __main__.py

2014-03-12 Thread Martin Dengler
Martin Dengler added the comment: I applied the patch from #10845 to 2.7.6 and it worked well for me. -- ___ Python tracker <http://bugs.python.org/issue10

[issue1731717] race condition in subprocess module

2009-09-17 Thread Joel Martin
Joel Martin added the comment: I can reproduce the problem (or at least get the same symptom) by doing this (in 2.4.6, 2.5.4 and 2.6.2): import subprocess, signal signal.signal(signal.SIGCLD, signal.SIG_IGN) subprocess.Popen(['echo','foo']).wait() The echo comman

[issue5672] Implement a way to change the python process name

2009-10-09 Thread Martin Marcher
Changes by Martin Marcher : -- nosy: +martin.marcher ___ Python tracker <http://bugs.python.org/issue5672> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7429] PrettyPrinter cannot print dicts with unsortable keys

2009-12-03 Thread Martin Altmayer
New submission from Martin Altmayer : In the following code I use a class for dictionary-keys that has a __hash__-function but cannot be ordered and try to print that dictionary with a PrettyPrinter. import pprint pp = pprint.PrettyPrinter() # A class that supports hashing and comparison for

[issue7613] [cppcheck] found a regression : Invalid number of character ((). Can't process file.

2009-12-31 Thread Ettl Martin
New submission from Ettl Martin : during a check with the static code analysis tool cppcheck (http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page) the tool found a missing ')' in python-svn/Modules/flmodule.c that leads to a regression. Please refer the attached

[issue5631] Distutils "upload" command does not show up in --help-commands output.

2009-03-31 Thread Martin Blais
New submission from Martin Blais : The output of running "python setup.py --help-commands" does not include the "upload" command. -- components: Library (Lib) messages: 84884 nosy: blais severity: normal status: open title: Distutils "upload" command does

[issue5672] Implement a way to change the python process name

2010-06-24 Thread Martin Marcher
Martin Marcher added the comment: Hi, just scanned the messages. As I read it "wontfix" actually means: Ats some point in the future when the "setproctitle" project (http://code.google.com/p/py-setproctitle/source/list) has matured it will be reconsidered, correct? Yes

[issue9098] MSYS build fails with `S_IXGRP' undeclared

2010-06-28 Thread Martin Ellison
New submission from Martin Ellison : Python 2.6.5 build fails on MSYS with the following messages mar...@edward /c/Downloads/Python-2.6.5 $ make gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes - I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/import.o Python

[issue9098] MSYS build fails with `S_IXGRP' undeclared

2010-06-28 Thread Martin Ellison
Martin Ellison added the comment: I thought Python ran everywhere. That's what the documentation says. Regards, Martin (m...@acm.org) On 28 June 2010 21:00, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > I don't think MSYS

[issue9526] 2 GB limit in array module

2010-08-05 Thread Martin Frith
New submission from Martin Frith : The array module does not seem to work for arrays > 2 GB. >>> import sys, array >>> sys.maxsize 9223372036854775807 >>> x = array.array('c', ('a' for i in xrange(3))) (seems to work OK) >>> x

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

[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 <http://bugs.python.org/issue28532> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

[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

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

[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

[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

[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

[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

[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 works in gen

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

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

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

[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

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

[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 <http://bugs.python.org/issue28804> ___ ___ Pytho

[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

[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)? Failin

[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

[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

[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

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

[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

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

[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

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

[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

[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

[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

[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

[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

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

2016-12-02 Thread Martin Panter
Changes by Martin Panter : -- title: os.path.mount sometimes raises FileNotFoundError on Windows -> os.path.ismount sometimes raises FileNotFoundError on Windows ___ Python tracker <http://bugs.python.org/issu

[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

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