[issue22474] No explanation of how a task gets destroyed in asyncio 'task' documentation

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

[issue22197] Allow better verbosity / output control in test cases

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

[issue21329] configparser can't parse MySQL style config

2014-09-27 Thread Martin Panter
Martin Panter added the comment: See Issue 12662 for a related earlier proposal. (Although the multimap proposal here sounds better than concatenating the values as proposed there.) -- nosy: +vadmium ___ Python tracker <http://bugs.python.

[issue22253] ConfigParser does not handle files without sections

2014-09-27 Thread Martin Panter
Martin Panter added the comment: See also Issue 549037, about handling files with a single anonymous section -- ___ Python tracker <http://bugs.python.org/issue22

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

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

[issue19622] Default buffering for input and output pipes in subprocess module

2014-10-01 Thread Martin Panter
Martin Panter added the comment: I agree that it is misleading to say it matches Python 2 behaviour, as I said in my original post. Do you think I should reopen this and get that bit removed from the documentation? I don’t see an easy way to make the behaviour consistent in all cases. My

[issue18131] Tkinter Variables require a proper master

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

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

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

[issue7175] Define a standard location and API for configuration files

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

[issue22555] Tracking issue for adjustments to binary/text boundary handling

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

[issue22563] namedtuple: raise an exception when the given class name would override an existing name

2014-10-06 Thread Martin Panter
Martin Panter added the comment: Perhaps Leo doesn’t understand that the name passed to “namedtuple” is just an indicator for debugging etc, and it doesn’t really have to be unique or even correspond with what it is assigned to. I do remember finding it a bit odd that I had to give it a name

[issue21049] Warning at interpreter exit triggers flood of “ImportWarning: sys.meta_path is empty”

2014-10-08 Thread Martin Panter
Martin Panter added the comment: Quentin, do you think this should be reopened? Brett Cannon, I wonder if the only reason you closed this bug is because you thought the scenario to trigger it is very unlikely. Considering it affected someone else, and that there are other real-world triggers

[issue22247] More incomplete module.__all__ lists

2014-10-08 Thread Martin Panter
Martin Panter added the comment: Confirmed Python 3.4.2 fixes the missing NNTPError. I never remembered the other instance I found, so I am happy for this to be closed. -- ___ Python tracker <http://bugs.python.org/issue22

[issue6143] IDLE - an extension to clear the shell window

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

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

2013-12-17 Thread Martin Panter
Martin Panter added the comment: Thanks for looking at this. Perhaps you weren’t pasting the HTTP response into “socat”. After the six request lines are printed out, I enter the five lines between and ; I didn’t really make this obvious. Otherwise, urlopen() hangs waiting for the response

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

2013-12-19 Thread Martin Panter
Martin Panter added the comment: How is it safer to manually set “h.sock._closed”? Playing with the internals of HTTPConnection is one thing, but playing with the internals of the socket object as well does not seem necessary. Also the ResourceWarning is warning that the socket and connection

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

[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

[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

[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

[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

[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

[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

[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

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