[issue27109] plistlib.__all__ list is incomplete

2016-05-28 Thread Martin Panter
Martin Panter added the comment: I think this patch is okay -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue27109> ___ ___ Python-bug

[issue27105] cgi.__all__ is incomplete

2016-05-28 Thread Martin Panter
Martin Panter added the comment: For this particular case, there is only one existing test class called CgiTests, without any special setup or handling. It seems too arbitrary to have a second class called MiscTestCase, so I would prefer the new test be added to CgiTests

[issue27124] binascii.a2b_hex raises binascii.Error and ValueError, not TypeError

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

[issue27150] PEP446 (CLOEXEC by default) violation with fcntl.fcntl(..., fcntl.F_DUPFD)

2016-05-29 Thread Martin Panter
Martin Panter added the comment: I don’t see any violation or anything needing fixing in the documentation or code. Can you elaborate? The fcntl() documentation says “The values used for ‘cmd’ [F_DUPFD, etc] are operating system dependent, and are available as constants in the ‘fcntl’ module

[issue27117] turtledemo does not work with IDLE's new dark theme.

2016-05-29 Thread Martin Panter
Martin Panter added the comment: It looks like your commit to the “default” branch already included the relevant changes, so I did the merge while keeping the files the same. If I missed something, it may need an extra update. But the tests seem to be working (is there a turtledemo test

[issue27125] Typo in Python 2 multiprocessing documentation

2016-05-29 Thread Martin Panter
Martin Panter added the comment: Thanks for the report Phoenix -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue26589] Add HTTP Response code 451

2016-05-29 Thread Martin Panter
Martin Panter added the comment: It seems like this code does get used, so I agree to add it. I think the table in the RST documentation should also be updated, possibly with a versionadded/versionchanged notice. -- nosy: +martin.panter ___ Python

[issue27125] Typo in Python 2 multiprocessing documentation

2016-05-29 Thread Martin Panter
Martin Panter added the comment: Indeed it is duplicated! I must have read this in my head many times before pushing it, and never picked it up. -- ___ Python tracker <http://bugs.python.org/issue27

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread Martin Panter
Martin Panter added the comment: This recently hung AMD64 FreeBSD 9.x 3.5. The stack trace was different, and there is only one thread: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.5/builds/828/steps/test/logs/stdio [398/398] test_io Timeout (0:15:00)! Thread

[issue23680] Sporadic freeze in test_interrupted_write_retry_text

2016-05-30 Thread Martin Panter
Martin Panter added the comment: I found a relatively recent case of this failing on a buildbot: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4339/steps/test/logs/stdio == CPython 3.6.0a1+ (default:eaee5aed6fbc, May 27 2016, 05:52:21) [GCC 4.2.1 20070831 patched

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread Martin Panter
Martin Panter added the comment: Thanks, that is a very good point about threads. I remember that testing tkinter leaves an internal TK or TCL thread running in the background. And I understand Free BSD delivers process signals to arbitrary threads (not necessarily the main thread). But the

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-05-30 Thread Martin Panter
Martin Panter added the comment: Found the same hang on the 3.6 branch, which was definitely running separate processes: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4210/steps/test/logs/stdio == CPython 3.6.0a0 (default:ed6345cb08ab, Apr 29 2016, 18:35:36) [GCC

[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2016-05-31 Thread Martin Panter
Martin Panter added the comment: Here is a patch for just the wsgiref module, which I plan to commit in time for 3.5.2. I also updated the test case to avoid hanging due to a (theoretical) race with how signal handling works. -- Added file: http://bugs.python.org/file43066/wsgiref

[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-05-31 Thread Martin Panter
Martin Panter added the comment: Attached patch adds a possible test, and fixes the truncation problem I mentioned above. I tried testing set_completer_delims() with a UTF-8 locale, but I suspect Gnu Readline does not support it. I called set_completer_delims("\xF6"), which encode

[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-05-31 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file43068/readline_locale.v2.patch ___ Python tracker <http://bugs.python.org/issue16182> ___ ___ Python-bug

[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-05-31 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file43067/readline_locale.v2.patch ___ Python tracker <http://bugs.python.org/issue16182> ___ ___ Pytho

[issue22232] str.splitlines splitting on non-\r\n characters

2016-05-31 Thread Martin Panter
Martin Panter added the comment: For Python 3, the bytes.splitlines() and bytearray.splitlines() documentation has been moved to a separate section out (Issue 21777). I don’t think it is good to add much detail of bytes.splitlines() in the str.splitlines() documentation. For Python 2

[issue27171] Fix various typos

2016-05-31 Thread Martin Panter
New submission from Martin Panter: This fixes various spelling mistakes in documentation, code comments, and test function names. There is also a correction to an exception message in Modules/_ctypes/callproc.c, which I propose to fix only in 3.6. -- files: typos.py3.patch keywords

[issue27171] Fix various typos

2016-05-31 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file43077/typos.py2.patch ___ Python tracker <http://bugs.python.org/issue27171> ___ ___ Python-bugs-list m

[issue27171] Fix various typos

2016-06-01 Thread Martin Panter
Martin Panter added the comment: Thanks. The py2 version is partly a back port, but I have searched for the same kind of spelling mistakes and fixed them in different places, e.g. “overriden” in Lib/bsddb/test/test_all.py, which does not exist in Py 3

[issue12855] linebreak sequences should be better documented

2016-06-01 Thread Martin Panter
Martin Panter added the comment: Reopening to change the Python 2 documentation. A starting point may be Matthew’s patch and/or Alexander’s patch in Issue 22232. -- status: closed -> open ___ Python tracker <http://bugs.python.org/issu

[issue25570] urllib.request > Request.add_header("abcd", "efgh") fails with character ":" in first parameter string

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

[issue12855] linebreak sequences should be better documented

2016-06-01 Thread Martin Panter
Martin Panter added the comment: Here is an updated patch for Python 2, based on Benjamin’s commit, Matthew’s earlier py27 patch, and Alexander’s backport of related changes from Python 3. Let me know what you think. -- nosy: +Alexander Schrijver stage: resolved -> patch review Ad

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-01 Thread Martin Panter
Martin Panter added the comment: You should be able to use a compression (or decompression) object as a workaround. But calling zlib.compress() multiple times would generate multiple separate deflated streams, which is different. I think it is reasonable for Python to handle larger data sizes

[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Martin Panter
Martin Panter added the comment: I don’t know much about the conventions for stdout etc encoding on Windows. But in general, the patch does not seem robust. Does it work if sys.stdout is a pipe or file (not a console)? I doubt it will work when sys.stdout has been replaced by e.g. StringIO

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Martin Panter
Martin Panter added the comment: Thanks for the patches. Maybe Gregory knows more about this than I do (I never used zdict). But I think I have figured it out today, so I left some review comments :) I’m not sure whether this really is a bug fix, although it would have little if any impact

[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Martin Panter
Martin Panter added the comment: I think Issue 6135 has a bit of discussion on adding encoding and error parameters to subprocess.Popen etc. -- ___ Python tracker <http://bugs.python.org/issue27

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2016-06-01 Thread Martin Panter
Martin Panter added the comment: Patch v4 resolves conflicts against the current code. I also used AC_CHECK_DECL invocations instead of AC_COMPILE_IFELSE in the configure script. FTR I think my problems with the prompt and the terminal settings are caused by a line of code that is commented

[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-06-02 Thread Martin Panter
Martin Panter added the comment: V3 finishes what I started in v2: * Changed unchecked PyBytes_AsString() → PyBytes_AS_STRING() * Testing more functions for non-ASCII characters I tried to test it with Editline on Linux (using my patch for Issue 13501). There seem to be many quirks with my

[issue27171] Fix various typos

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

[issue27179] subprocess uses wrong encoding on Windows

2016-06-02 Thread Martin Panter
Martin Panter added the comment: Patch B changes _Py_device_encoding() to accept a file descriptor of 3, which seems wrong to me. Patch A is like the earlier patch, but calls os.device_encoding(1) instead of relying on sys.stdout, etc. I think this will still fail when the Python parent’s

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-02 Thread Martin Panter
Martin Panter added the comment: Klamann, thanks for crash report. I think your decompress crash is explained by the bug expanding past UINT_MAX I identified above. The key is that length = 0 in zlib_Decompress_decompress_impl(), as if wrapped around, and the return value will have been

[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2016-06-02 Thread Martin Panter
Martin Panter added the comment: I prefer your first solution because it seems to fit in better with how things were intended. I can add in handling of partial writes with a deprecation warning when I get a chance. I guess the documentation would be something like “Since 3.5.2, partial

[issue26589] Add HTTP Response code 451

2016-06-02 Thread Martin Panter
Martin Panter added the comment: Don’t forget to fix the RFC number (see review) :) -- ___ Python tracker <http://bugs.python.org/issue26589> ___ ___ Python-bug

[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-02 Thread Martin Panter
Martin Panter added the comment: FWIW I doubt Git is any better at this than Mercurial: <https://github.com/python/cpython/blame/master/Lib/test/test_string.py#L190> Git can automatically pick up file renames and copies when analysing the history, but has no special metadata for t

[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Martin Panter
Martin Panter added the comment: This broke test_socketserver: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7709/steps/test/logs/stdio 0:08:57 [193/400/1] test_socketserver failed test test_socketserver crashed -- Traceback (most recent call last): File &q

[issue27195] Crash when RawIOBase.write(b) evaluates b.format

2016-06-02 Thread Martin Panter
New submission from Martin Panter: $ gdb --args ./python -c ' import io class R(io.RawIOBase): def writable(self): return True def write(self, b): print("About to evaluate {!r}.format".format(b)) b.format print("Never reached")

[issue20699] Document that binary IO classes work with bytes-likes objects

2016-06-02 Thread Martin Panter
Martin Panter added the comment: I agree with avoiding the term “bytes-like object” in 2.7. It is easy to be specific when talking about concrete classes like BufferedWriter and BytesIO. But the harder question is what to specify for the abstract base classes. In patch v8, I propose to change

[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Martin Panter
Martin Panter added the comment: I left some minor review suggestions. But a more serious problem is that the change to Doc/reference/datamodel.rst breaks the formatting for me. Instead of a HTML , I get a followed by a . Unfortunately I don’t know of a way to get index entries to point to

[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-03 Thread Martin Panter
Martin Panter added the comment: IMO I wouldn’t bother. David has already done the change a different way, which is simpler to understand commit-by-commit, even if it messes with the Mercurial annotate history. FWIW I guess you could do a similar merge with an old version to restore the

[issue20699] Document that binary IO classes work with bytes-likes objects

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Actually this bug report was opened because an implementation that lacked memoryview support was broken by 2.7. The point is to document that (a subset of) memoryview objects may be passed to custom implementations. Does this need a “changed in 2.7” notice? I

[issue20699] Document that binary IO classes work with bytes-likes objects

2016-06-03 Thread Martin Panter
Martin Panter added the comment: I don’t see the point of mentioning array() objects at all. It’s hard to support array in a Python 2 implementation, as demonstrated by readinto(). And the special support for array('b') won’t help if you pass in array('B') with values 12

[issue20699] Document that binary IO classes work with bytes-likes objects

2016-06-03 Thread Martin Panter
Martin Panter added the comment: I thought :class:`str` is better documented in Python 2, but I can write bytes if you prefer. I guess it is more consistent with the rest of io.rst. -- ___ Python tracker <http://bugs.python.org/issue20

[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2016-06-03 Thread Martin Panter
Martin Panter added the comment: In wsgiref-only.v2.patch I added deprecated support for continuing when a partial write is detected. I don’t think it needs documenting though. -- Added file: http://bugs.python.org/file43143/wsgiref-only.v2.patch

[issue23680] Sporadic freeze in test_interrupted_write_retry_text

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Here is my suggested change to use setitimer(). I also closed the pipe, which means there is no need to time out the read, speeding the test up a bit more. -- keywords: +patch stage: -> patch review versions: +Python 2.7 Added file: h

[issue22331] test_io.test_interrupted_write_text() hangs on the buildbot FreeBSD 7.2

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Here is a patch with my suggestion to send the signal only when read() returns, and also closing the read end of the pipe before the write end. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file43147/int-write.pa

[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Martin Panter
Martin Panter added the comment: I haven’t tested, but maybe this will do what you want: .. index:: object; code, code object or .. index:: single: object; code single: code object -- ___ Python tracker <http://bugs.python.org/issue15

[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Not sure why it doesn’t come up in the code review, but in diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c0b4930..f34ba9f 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -847,8 +847,10 @@ Internal

[issue24617] os.makedirs()'s [mode] not correct

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch Tommy. One minor quirk that bugs me: *mode*'s gets marked up with an opening quote rather than an apostrophe. Perhaps we can change it to a Unicode apostrophe (*mode*’s). Another alternative would be: the octal representation of

[issue27202] make doctest fails on 2.7 release notes

2016-06-03 Thread Martin Panter
Martin Panter added the comment: What failures are seeing, and what version of Sphinx are you using? Perhaps this is related to Issue 26638? -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue27

[issue27202] make doctest fails on 2.7 release notes

2016-06-03 Thread Martin Panter
Changes by Martin Panter : -- Removed message: http://bugs.python.org/msg267213 ___ Python tracker <http://bugs.python.org/issue27202> ___ ___ Python-bugs-list m

[issue27202] make doctest fails on 2.7 release notes

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Ignore my message; I was thinking of something different :) I presume you are running something like the following, which seems to smoke-test the examples in the documentation: make -C Doc doctest -- ___ Python

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-03 Thread Martin Panter
Martin Panter added the comment: I suggest to drop the RESET_CONTENT exception. Content-Length: 0 is explicitly allowed by <https://tools.ietf.org/html/rfc7231#section-6.3.6> option a), and is not very different to the general case IMO. Content-Length was added here to help with buggy c

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Ah, forget that bit about RESET_CONTENT. If we include Content-Length, it will probably be non-zero, which will be wrong. So your patch is better in that regard. -- ___ Python tracker <http://bugs.python.

[issue27203] Failing doctests in Doc/faq/programming.rst

2016-06-03 Thread Martin Panter
Martin Panter added the comment: make -C Doc/ suspicious fails: WARNING: [faq/programming:1177] ".. testsetup:" found in ".. testsetup::" Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv. If all issues are false pos

[issue27202] make doctest fails on 2.7 release notes

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Since I stuck my neck out, I will say that this seems reasonable to me. We could probably still run doctest in the actual 2.7 branch to detect any errors there. -- stage: -> patch review versions: +Python

[issue24238] Avoid entity expansion attacks in Element Tree

2016-06-03 Thread Martin Panter
Martin Panter added the comment: Today I discovered that Christian’s defusedxml project already does the same sort of thing. The difference is he calls the parameter forbid_entities. So I have updated my patch and changed the name from reject_entities to forbid_entities for compatibility

[issue24617] os.makedirs()'s [mode] not correct

2016-06-04 Thread Martin Panter
Martin Panter added the comment: I think it would be good to move the sentence about FileExistsError away from your new paragraph about *mode*. Also, I would try to make the hyperlink a bit more explicit and descriptive, maybe The *mode* parameter is passed to :func:`mkdir`; see :ref:`the

[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules

2016-06-04 Thread Martin Panter
Martin Panter added the comment: It seems the test is broken on Windows: http://buildbot.python.org/all/builders/x86%20Windows7%203.5/builds/915/steps/test/logs/stdio == ERROR: test_mixed_case_module_names_are_lower_cased

[issue26373] asyncio: add support for async context manager on streams?

2016-06-04 Thread Martin Panter
Martin Panter added the comment: Above two commits were actuall for Issue 26372 -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue26

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-04 Thread Martin Panter
Martin Panter added the comment: Maybe use os.devnull instead of "/dev/null"? http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7728/steps/test/logs/stdio ==

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-04 Thread Martin Panter
Martin Panter added the comment: Okay here are some more thoughts about your latest patch: ## Automatic RTLD_MEMBER ## I was still uneasy about the automatic setting of RTLD_MEMBER. But I looked for how others handle this, and I found Libtool’s LTDL library, and Apache Portable Runtime (APR

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-04 Thread Martin Panter
Martin Panter added the comment: For a HEAD request, I think we should continue to send Content-Length (except in combination with one of the special responses). HEAD is slightly different to 304 Not Modified. With HEAD vs GET, the response code and other header values do not change, but the

[issue13771] HTTPSConnection __init__ super implementation causes recursion error

2016-06-04 Thread Martin Panter
Martin Panter added the comment: My guess is Michael was doing something like >>> class Monkey(http.client.HTTPSConnection): ... pass ... >>> http.client.HTTPSConnection = Monkey >>> http.client.HTTPSConnection("bugs.python.org") Traceback (most rec

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-04 Thread Martin Panter
Martin Panter added the comment: I think it would be unusual to have different error handling for GET vs HEAD, given HEAD is supposed to be exactly like GET but without a body. On the other hand, see SimpleHTTPRequestHandler.send_head() for an example of calling send_error(NOT_FOUND) for both

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-04 Thread Martin Panter
Martin Panter added the comment: Sorry to be a pain, but I think the new logic for HEAD is wrong. See review. -- ___ Python tracker <http://bugs.python.org/issue25

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-04 Thread Martin Panter
Martin Panter added the comment: Here is a patch which I propose to use that factors out a set_inflate_zdict() function. I think this will help with maintainence, e.g. if someone changes the UINT_MAX checking, but forgets that there are two places than need changing. Let me know if that is

[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2016-06-05 Thread Martin Panter
Martin Panter added the comment: Here is an updated patch with the remaining fixes for other servers. I considered changing the behaviour of shutil.copyfileobj() to handle partial writes better. But I decided against it, because: (a) nobody has complained yet, and (b) it could potentially

[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Martin Panter
Martin Panter added the comment: This test is already decorated with @skip_if_broken_ubuntu_ssl. I’m not sure Python should go too far out of its way to handle downstream patches, but it seems there is a precedent here. -- nosy: +martin.panter

[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Martin Panter
Martin Panter added the comment: I was a little concerned that Alex’s patch used “test A -ef B”, which is not specified by Posix. But it is apparently widely supported (and consider we would only need it for cross compilation). Anyway, I was going to suggest test "$(srcdir)" == &

[issue17598] mingw: init system calls

2016-06-05 Thread Martin Panter
Martin Panter added the comment: Part of this patch is superceded by revision c7adad17f663 (Issue 22579). Here is a patch of the remaining significant changes. But I don’t know enough about Modules/Setup.config.in and Modules/Setup.dist to give it a proper review. -- nosy

[issue27164] zlib can't decompress DEFLATE using shared dictionary

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

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Martin Panter
Martin Panter added the comment: Minor thing: the patch has tabbed intentation in places rather than spaces. As I understand it, if there is no entropy initialized, this patch will fall back to reading /dev/urandom, which will return predictable data (opposite of “random” data!). But since we

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Martin Panter
Martin Panter added the comment: Maybe an alternative would be to add a special PYTHONHASHSEED=best-effort (or whatever) value that says if there is no entropy available, use a predictable hash seed. That would force whoever starts the Python process to be aware of the problem

[issue27108] mimetypes.__all__ list is incomplete

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

[issue27109] plistlib.__all__ list is incomplete

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

[issue27110] smtpd.__all__ list is incomplete

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

[issue27105] cgi.__all__ is incomplete

2016-06-05 Thread Martin Panter
Martin Panter added the comment: Thanks for the patches Jacek. This one I committed after moving the test into CgiTests. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bug

[issue27107] mailbox.__all__ list is incomplete

2016-06-05 Thread Martin Panter
Martin Panter added the comment: FTR the closest thing I could find discussing reap_children() is Issue 16968. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue27233] Missing documentation for PyOS_FSPath

2016-06-05 Thread Martin Panter
Martin Panter added the comment: I haven’t really been following the FS-path stuff, but I guess this also needs .. versionadded:: 3.6 -- nosy: +martin.panter stage: -> patch review ___ Python tracker <http://bugs.python.org/issu

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-06 Thread Martin Panter
Martin Panter added the comment: Thanks Susumu, I think the logic is right this time. I left some new suggestions for the tests, if you want to take them on or not, that’s up to you. -- ___ Python tracker <http://bugs.python.org/issue25

[issue27238] Bare except: usages in turtle.py

2016-06-06 Thread Martin Panter
Martin Panter added the comment: The documentation says __file__ can be missing. It is missing for builtin modules (e.g. sys) and frozen modules (e.g. __hello__). -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue27

[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-06 Thread Martin Panter
Martin Panter added the comment: Thanks Alex & Xavier. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.pytho

[issue27261] io.BytesIO.truncate does not work as advertised

2016-06-07 Thread Martin Panter
Martin Panter added the comment: BytesIO is supposed to implement IOBase. I would treat this as a bug in existing versions too. -- nosy: +martin.panter stage: -> needs patch versions: +Python 2.7, Python 3.5 ___ Python tracker &l

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-07 Thread Martin Panter
Martin Panter added the comment: Patch 07 looks fine. I presume you still want to do the porting to 3.5 and 2.7. -- ___ Python tracker <http://bugs.python.org/issue25

[issue8491] Need readline command and keybinding information

2016-06-07 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch. I left a couple review comments. Also, this new paragraph should be outside the “Note” box, which is specifically about libedit aka Editline, not Gnu Readline. -- stage: needs patch -> patch rev

[issue27242] Make the docs for NotImplemented & NotImplementedError unambigous

2016-06-07 Thread Martin Panter
Martin Panter added the comment: Emanuel, have you seen <https://docs.python.org/devguide/documenting.html#building-the-documentation>? From my experience, install Sphinx, and then “make -C Doc/ html”. About the patch, I think the “.. note” boxes should be intended und

[issue15476] Index "code object" and link to code object definition

2016-06-07 Thread Martin Panter
Martin Panter added the comment: Yes it seems you even fixed the problem with the definition list, which I thought was not fixable :) -- stage: needs patch -> commit review ___ Python tracker <http://bugs.python.org/issu

[issue20699] Document that binary IO classes work with bytes-likes objects

2016-06-07 Thread Martin Panter
Martin Panter added the comment: New patch that I plan to commit: * Use bytes instead of str * bytes, bytearray or memoryview for readinto() methods * bytes or memoryview for write() methods * Added single “Changed in version 2.7” notice under the IOBase class (rather than every version of

[issue24136] document PEP 448: unpacking generalization

2016-06-08 Thread Martin Panter
Martin Panter added the comment: Thanks for helping with this Jelle. The documentation of unpacking sequences vs iterables was adjusted in 3.6 as part of Issue 23275. I guess part of revision 8a0754fed986 should be extracted to 3.5 as well. Looking at the function call syntax, positional and

[issue22942] Language Reference - optional comma

2016-06-08 Thread Martin Panter
Martin Panter added the comment: Bug 1 is still present in 3.5. In 3.6 it is no longer relevant because the documentation was changed for Issue 9232 (allowing trailing commas in function definitions). Bug 2 is present in 2.7, but is not relevant to 3.5+. Trailing commas are now allowed in

[issue21313] Py_GetVersion() is broken when using mqueue and a long patch name

2016-06-08 Thread Martin Panter
Martin Panter added the comment: Closing now that platform._sys_version() can tolerate the truncated version info. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue25738] http.server doesn't handle RESET CONTENT status correctly

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

[issue27242] Make the docs for NotImplemented & NotImplementedError unambigous

2016-06-08 Thread Martin Panter
Martin Panter added the comment: I think the box about NotImplementedError needs indenting too. See the box for <https://docs.python.org/3.5/library/functions.html#locals> for a better example. -- ___ Python tracker <http://bugs.p

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing /arguinthe random module on getrandom()

2016-06-08 Thread Martin Pitt
Martin Pitt added the comment: > you could give some kind of command-line flag That already exists -- set PYTHONHASHSEED=0. > But I'll let someone else have the joys of negotiating with Lennart, and I > won't blame the Python devs if using GRND_NONBLOCK unconditionally is l

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-08 Thread Martin Panter
Martin Panter added the comment: If the seed is to be based on time.time(), why not use something based on hash(time.time()) to avoid the 1/256 s resolution? If there is a practical way to get pseudo-random data from the platform, it would be better to use that, rather than cooking up our own

[issue16132] ctypes incorrectly encodes .format attribute of memory views

2016-06-08 Thread Martin Panter
Martin Panter added the comment: In Python 3.5 (since Issue 15944), you can now cast normal C-contiguous memoryviews (including ones from ctypes) to bytes: >>> a = (ctypes.c_double * 3)(1,2,3) >>> m = memoryview(a) >>> m.format '>> byteview = m.cast("

[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()

2016-06-09 Thread Martin Panter
Martin Panter added the comment: I dislike the “block” term for a different reason: it suggests raising EAGAIN (= BlockingIOError). But the proposal here is actually to generate data with low entropy. In the long term, it sounds like two separate functions is the way to go. I would prefer

[issue27278] py_getrandom() uses an int for syscall() result

2016-06-09 Thread Martin Panter
Martin Panter added the comment: According to <http://man7.org/linux/man-pages/man2/getrandom.2.html>, getrandom() returns no more than 32 MiB as an int on Linux. Doesn’t that mean you can rely on syscall()’s long return value fitting in an int? Maybe just cast n = (int)sycall(...)

[issue27278] py_getrandom() uses an int for syscall() result

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Make that INT_MAX. Or change n from an int to a Py_ssize_t. Both Linux and Solaris versions or getrandom() are documented as accepting size_t buflen. -- ___ Python tracker <http://bugs.python.org/issue27

<    11   12   13   14   15   16   17   18   19   20   >