[issue26826] Expose new copy_file_range() syscall in os module.

2016-06-09 Thread Martin Panter
Martin Panter added the comment: It’s a bit ugly, but I would write the test so that it is recorded as skipped: try: os.copy_file_range(...) except OSError as err: if err.errno != ENOSYS: raise # We get to see the full exception details self.skipTest(err) # Test is

[issue26556] Update expat to 2.2.1

2016-06-09 Thread Brian Martin
Brian Martin added the comment: Per http://expat.sourceforge.net/, version 2.1.1 fixes CVE-2015-1283, not 2.2.1 as mentioned in a comment. -- nosy: +Brian Martin ___ Python tracker <http://bugs.python.org/issue26

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

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch Tommy. I think we can close this now. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue8491] Need readline command and keybinding information

2016-06-09 Thread Martin Panter
Martin Panter added the comment: For the record, I removed some trailing spaces and reworded the link in the comitted version. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python track

[issue7356] parsing of ldconfig output in ctypes/utils.py depends on the locale

2016-06-09 Thread Martin Panter
Martin Panter added the comment: This was supposed to be fixed in 2.7 by r78979 and beb9d176503e. But those changes were made to the dead _findLib_ldconfig() function (later deleted as part of Issue 13979). I will port the changes to the live _findSoname_ldconfig() function. -- nosy

[issue26565] [ctypes] Add value attribute to non basic pointers.

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Eryk Sun’s as_void suggestion sounds similar to doing: ctypes.cast(any_pointer, ctypes.c_void_p) Why do you want the address? Perhaps it is good enough to get it from a void pointer: ctypes.cast(any_pointer, ctypes.c_void_p).value Maybe “pointer_value” would

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Updated Python 2 patch merged with recent changes. I will commit at least the Python 3 version soon, because the existing code sets a bad example for potential additions (Issue 26439). -- Added file: http://bugs.python.org/file43326/ctypes_util_popen-4

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

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Will try to change the existing code from os.popen to subprocess (Issue 26439) to set a better example for new code like this -- dependencies: +avoid using a shell in ctypes.util: replace os.popen with subprocess

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

2016-06-09 Thread Martin Panter
Martin Panter added the comment: This version of the patch looks good to me -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issu

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Yes it is okay. The code is compiling a dummy file without main(), just to see what libraries GCC tries to link with it. It is only interested in extracting the line matching *libc.so.*, which in your case should be /lib/i386-linux-gnu/libc.so.6 So you should

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Test suite emits a new warning, and fails under python -Werror: == ERROR: test_readline (test.test_asyncio.test_pep492.StreamReaderTests

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

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Kaushik or David (or anyone else), does you have an idea of how to fix the Windows tests? It would be good to make the buildbots healthy again, then it is easier to see new failures in Windows. -- priority: normal -> h

[issue19930] os.makedirs('dir1/dir2', 0) always fails

2016-06-09 Thread Martin Panter
Martin Panter added the comment: I’ve never considered this sort of scenario properly, so I don’t know if leaving the default mode for the parent directories is the best way or not. The obvious but more complicated alternative would be to call chmod() on all the new directories in a second

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Yes a comment sounds like a good idea. Here is a new Py 3 patch. -- Added file: http://bugs.python.org/file43329/ctypes_util_popen-5.py3.patch ___ Python tracker <http://bugs.python.org/issue22

[issue27286] str object got multiple values for keyword argument

2016-06-10 Thread Martin Panter
New submission from Martin Panter: Playing with the generalized unpacking (PEP 448), I found a funny error message, when duplicate dictionary unpackings are included and also duplicate a literal keyword argument: >>> print(end=".\n", **dict(end="dupe")) # No p

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

2016-06-10 Thread Martin Panter
Martin Panter added the comment: Okay I will avoid this problem in the future. I often use the mq extension, but I can reset the user and date with that. -- ___ Python tracker <http://bugs.python.org/issue24

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

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

[issue24136] document PEP 448: unpacking generalization

2016-06-10 Thread Martin Panter
Martin Panter added the comment: Here is a new patch that also updates the documentation for list etc displays as well as function calls. Let me know what you think. The 3.5 What’s New notes were written separately; Neil’s patch was never applied. But I have rescued his update for

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-10 Thread Martin Panter
Martin Panter added the comment: I didn’t realize, sorry for the noise -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue27243> ___ _

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

2016-06-10 Thread Martin Panter
Martin Panter added the comment: Thanks for you help figuring this out Serhiy, especially for the Python 2 case. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

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

2016-06-10 Thread Martin Panter
Martin Panter added the comment: My guess is the file.startswith(basedir) in the getdocloc() method is getting tricked by non-canonical paths (e.g. lowercase vs uppercase C: drive?). Would it help to use something like os.path.normcase(), or maybe os.path.commonpath(), pathlib.PurePath.parts

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

2016-06-10 Thread Martin Panter
Martin Panter added the comment: Victor originally opened this mentioning a 256-byte limit. I guess that comes from Open BSD’s getentropy() function: <http://man.openbsd.org/OpenBSD-current/getentropy.2>. Solaris’s getrandom() function <https://docs.oracle.com/cd/E53394_01/ht

[issue27296] Urllib/Urlopen IncompleteRead with HTTP header with new line characters

2016-06-11 Thread Martin Panter
Martin Panter added the comment: HTTP header fields are not supposed to have line breaks unless followed by a space or tab. So the server is actually providing a faulty response. However Python could do better at handling this case. There is already a bug open for this: Issue 24363. For the

[issue24363] httplib fails to handle semivalid HTTP headers

2016-06-11 Thread Martin Panter
Changes by Martin Panter : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue24363> ___ ___ Python-bugs-list mailing list Unsub

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-06-11 Thread Martin Panter
Martin Panter added the comment: Revision 3f49e89be8a9 seems to be the cause of an x86 Tiger buildbot failure: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/10924/steps/test/logs/stdio == FAIL

[issue27186] add os.fspath()

2016-06-11 Thread Martin Panter
Martin Panter added the comment: Test_fspath_protocol_bytes() (added in revision 5a62d682636e) fails on Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds//steps/test/logs/stdio == ERROR

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

2016-06-11 Thread Martin Panter
Martin Panter added the comment: Thanks Kaushik. I also changed the https:// detection to also detect http://, to maintain backwards compatibility. I am porting these changes to 2.7. -- versions: +Python 2.7 ___ Python tracker <h

[issue24136] document PEP 448: unpacking generalization

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Thanks for the review. I committed my patch in the hope that it makes it into 3.5.2, but if people want to suggest further improvements etc that is okay. -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue15649] subprocess.Popen.communicate: accept str for input parameter if universal_newlines is False

2016-06-12 Thread Martin Panter
Martin Panter added the comment: See also Issue 27273, proposing to use text string input as an indicator to turn on universal_newlines=True in the higher-level functions. I’m not excited by either proposal, but I find the other one a bit more palatable. IMO allowing text string input to

[issue12623] "universal newlines" subprocess support broken with select- and poll-based communicate()

2016-06-12 Thread Martin Panter
Martin Panter added the comment: . Summary: There was originally a bug, but it has been fixed. At best, we leave this open to work on including Andrew’s patch. Andrew’s patch adds a modified copy of test_universal_newlines_communicate_stdin(). But it does not look correct, and would fail on

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

2016-06-12 Thread Martin Panter
Changes by Martin Panter : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue16484> ___ ___ Python-bugs-list mailing list Unsubscrib

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

2016-06-12 Thread Martin Panter
Martin Panter added the comment: . Michael, how are you supposed to apply your latest patch? I have Gnu Patch 2.7.5, but even in the best case it doesn’t find the files to patch: $ patch -p1 -n < python.Lib.ctypes.160608.patch can't find file to patch at input line 2 The text leadi

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

2016-06-12 Thread Martin Panter
Martin Panter added the comment: I updated the patch to fix the error handling and memory leak. it also now skips the test in case the locale cannot encode the test data. -- Added file: http://bugs.python.org/file43359/readline_locale.v4.patch

[issue17239] XML vulnerabilities in Python

2016-06-12 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +Avoid entity expansion attacks in Element Tree, xml.sax and xml.dom fetch DTDs by default ___ Python tracker <http://bugs.python.org/issue17

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Okay changing to ::1 might have a decent chance of success. If nobody else comes forward, I can try committing it and see if it fixes the buildbot. -- ___ Python tracker <http://bugs.python.org/issue27

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Merged with current code, and migrated the interrupted-write test from test_wsgiref into test_socketserver. -- Added file: http://bugs.python.org/file43365/buffered-wfile.v3.patch ___ Python tracker <h

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Forgot to remove the workaround added to 3.5 for wsgiref in Issue 24291 -- Added file: http://bugs.python.org/file43366/buffered-wfile.v4.patch ___ Python tracker <http://bugs.python.org/issue26

[issue24363] httplib fails to handle semivalid HTTP headers

2016-06-12 Thread Martin Panter
Martin Panter added the comment: See also Issue 26686; the same problem, but with parsing RFC5322 header fields, rather than HTTP. -- ___ Python tracker <http://bugs.python.org/issue24

[issue10839] email module should not allow some header field repetitions

2016-06-12 Thread Martin Panter
Martin Panter added the comment: There are already the makings of an alternative API: https://docs.python.org/3.6/library/email.message.html#email.message.Message.add_header There is also replace_header(), but it only replaces the _first_ header field, and leaves later ones untouched. However

[issue25476] close() behavior on non-blocking BufferedIO objects with sockets

2016-06-12 Thread Martin Panter
Martin Panter added the comment: I propose to reject this. Close() should always close the underlying file descriptor or socket, even if there is a blocking error or other exception. -- resolution: -> rejected status: open -> pending ___

[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Victor, why did you change the title to specify non-blocking mode? I think blocking mode can also be handled at the same time. I propose: 1. In existing versions (2.7, 3.5): Document that it is undefined what IOBase.writelines() will do if a write() call does

[issue27186] add os.fspath()

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Should the skip logic perhaps check for sys.platform == "win32" instead? The buildbots are still failing. -- ___ Python tracker <http://bugs.python.o

[issue27186] add os.fspath()

2016-06-13 Thread Martin Panter
Martin Panter added the comment: I went with os.name == "nt", which is what other scandir() tests use. I’m not sure there is a practical different. Anyway the buildbots seem happier now. -- ___ Python tracker <http://bugs.python.o

[issue26686] email.parser stops parsing headers too soon.

2016-06-13 Thread Martin Panter
Martin Panter added the comment: FWIW in the HTTP bug <https://bugs.python.org/issue24363#msg244676>, David said “when seeing a line that doesn't look like a header the error recovery is to treat that line as the beginning of the body (ie: assume the blank line is missing).

[issue12855] linebreak sequences should be better documented

2016-06-13 Thread Martin Panter
Martin Panter added the comment: Alexander: does my latest patch linebreakdoc.v5.py2.7.patch address your concerns about the 2.7 documentation? If so, I can push it to the repository. -- ___ Python tracker <http://bugs.python.org/issue12

[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-13 Thread Martin Panter
Martin Panter added the comment: Looks like you are right. The change in the implementation happened in revision 19196cce1431. -- keywords: +easy nosy: +martin.panter stage: -> needs patch versions: -Python 3.4 ___ Python tracker &l

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

2016-06-13 Thread Martin Panter
Martin Panter added the comment: I get two other test suite failures if I set PYTHONIOENCODING, so I am not going to bother addressing this in test_readline :) FAIL: test_forced_io_encoding (test.test_capi.EmbeddingTests) FAIL: test_7 (test.test_pkg.TestPkg

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-13 Thread Martin Panter
Martin Panter added the comment: Updated Py 2 patch to v5 with the added GCC comment -- Added file: http://bugs.python.org/file43383/ctypes_util_popen-5.py2.patch ___ Python tracker <http://bugs.python.org/issue22

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-13 Thread Martin Panter
Martin Panter added the comment: An Open Indiana buildbot failed. The old code let the shell print any errors about missing programs to /dev/null, so I will change the subprocess calls to handle OSError. == ERROR: setUpModule

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-06-13 Thread Martin Panter
Martin Panter added the comment: Buildbots look happy with test_asyncio now, so closing again. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issu

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

2016-06-13 Thread Martin Panter
Martin Panter added the comment: Failures from AMD64 Snow Leop buildbots: == FAIL: test_nonascii_history (test.test_readline.TestHistoryManipulation

[issue8637] Add MANPAGER envvar to specify pager for pydoc

2016-06-13 Thread Martin Panter
Martin Panter added the comment: Matthias: your change causes pydoc to raise KeyError if I set MANPAGER but not PAGER. I’m guessing you intended something else? -- nosy: +martin.panter versions: +Python 3.6 -Python 3.3 ___ Python tracker <h

[issue8637] Add MANPAGER envvar to specify pager for pydoc

2016-06-14 Thread Martin Panter
Martin Panter added the comment: Thanks, that version looks more sensible -- ___ Python tracker <http://bugs.python.org/issue8637> ___ ___ Python-bugs-list mailin

[issue26923] asyncio.gather drops cancellation

2016-06-14 Thread Martin Altmayer
Martin Altmayer added the comment: I don't think this is a mere documentation problem: If a future cannot be cancelled because it is already done, cancel must return False. As Johannes' example demonstrates, a wrong return value from cancel might lead to a cancelled task being conti

[issue27315] pydoc: prefer the pager command in favor of the specifc less command

2016-06-14 Thread Martin Panter
Martin Panter added the comment: Does Debian use PAGER or MANPAGER? What’s the advantage of the “pager” command in addition? -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue27

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

2016-06-14 Thread Martin Panter
Martin Panter added the comment: Also need a fix for missing set_pre_input_hook() on the AIX buildbot: == FAIL: test_nonascii (test.test_readline.TestReadline

[issue24363] httplib fails to handle semivalid HTTP headers

2016-06-14 Thread Martin Panter
Martin Panter added the comment: I made a patch to fix all header section parsing by default in the email module (see Issue 26686). I’m not 100% sure if it is safe in general, but if it is, it would fix this bug. -- dependencies: +email.parser stops parsing headers too soon

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-14 Thread Martin Panter
Martin Panter added the comment: Updated Py 2 patch to handle OSError when shell=True is not used -- Added file: http://bugs.python.org/file43387/ctypes_util_popen-6.py2.patch ___ Python tracker <http://bugs.python.org/issue22

[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-14 Thread Martin Panter
Martin Panter added the comment: Thanks John -- stage: needs patch -> commit review ___ Python tracker <http://bugs.python.org/issue27311> ___ ___ Python-

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

2016-06-14 Thread Martin Panter
Martin Panter added the comment: Yeah I think your change is enough. Adding a cast would solve this compiler warning: Python/random.c:168:17: warning: conversion to ‘int’ from ‘long int’ may alter its value [-Wconversion] n = syscall(SYS_getrandom, dest, n, flags

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

2016-06-14 Thread Martin Panter
Martin Panter added the comment: Think I got all the bugs fixed here. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-14 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-14 Thread Martin Panter
Changes by Martin Panter : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue12855> ___ ___ Pyth

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

2016-06-15 Thread Martin Panter
Martin Panter added the comment: Thanks for working on this. I did a pass over your patch and left a bunch of comments. -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issu

[issue27328] Documentation corrections for email defects

2016-06-15 Thread Martin Panter
New submission from Martin Panter: In trying to understand the defects from parsing an email Message object, and trying to use the raise_on_defect=True mode, I found a few inconsistencies with the documentation. I made a preliminary patch, but it may need adjusting. 1. There is no class

[issue24364] Not all defects pass through email policy

2016-06-15 Thread Martin Panter
Martin Panter added the comment: In particular, I noticed InvalidHeaderDefect is not raised if a header line begins with a colon (:), and also MisplacedEnvelopeHeaderDefect, if a header line begins "From ", including a space, and is neither the first or last line of the head

[issue27329] Document behavior when CDLL is called with None as an argument on POSIX systems

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

[issue27292] Warn users that os.urandom() can return insecure values

2016-06-16 Thread Martin Panter
Martin Panter added the comment: As far as this bug goes, 3.5 is not very different from 2.7 -- nosy: +martin.panter versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue27

[issue27292] Warn users that os.urandom() can return insecure values

2016-06-16 Thread Martin Panter
Martin Panter added the comment: Here is a possible patch for 3.5+ based on my modest understanding of the concerns about insecure results and blocking. I hope that my wording is clear, couldn’t be confused with Linux’s /dev/random blocking and running out of fresh entropy, etc. I also tried

[issue27330] Possible leaks in ctypes

2016-06-16 Thread Martin Panter
Martin Panter added the comment: Mostly looks good. I left a two comments. -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue27330> ___ ___

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-16 Thread Martin Panter
Martin Panter added the comment: I will try to have a closer look at this some time, but my immediate worry is it looks like you are directly copying Bash code (GPL) into Python (less restrictive license). Perhaps a more general solution would be to expose rl_add_defun() to native Python

[issue27292] Warn users that os.urandom() can return insecure values

2016-06-16 Thread Martin Panter
Martin Panter added the comment: Rebased so Rietveld can work with it, earlier version was my fault. As far as I can see (looking at Python/random.c and configure.ac), the Solaris version should also use GRND_NONBLOCK: #ifdef MS_WINDOWS #elif defined(HAVE_GETENTROPY) && !defined(su

[issue27335] Clarify that writing to locals() inside a class body is supported

2016-06-16 Thread Martin Panter
Martin Panter added the comment: I think my proposed patch for Issue 17546 addresses this. That patch was also written to address Issue 17960. -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue27

[issue14562] urllib2 maybe blocks too long with small chunks

2016-06-16 Thread Martin Panter
Changes by Martin Panter : -- versions: -Python 3.2 ___ Python tracker <http://bugs.python.org/issue14562> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25724] SSLv3 test failure on Ubuntu 16.04 LTS

2016-06-16 Thread Martin Panter
Martin Panter added the comment: This patch was also posted to Issue 26867, with a bit more discussion and analysis, so closing as a duplicate. -- resolution: -> duplicate status: open -> closed superseder: -> test_ssl test_options fails on ubu

[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-16 Thread Martin Panter
Martin Panter added the comment: FWIW I imagine Ubuntu overriding the option will break the example code in the documentation of clearing SSL_OP_NO_SSLv3: <https://docs.python.org/3.5/library/ssl.html#ssl.create_default_context>. If we keep that documentation, I think we should conti

[issue27340] bytes-like objects with socket.sendall(), SSL, and http.client

2016-06-16 Thread Martin Panter
New submission from Martin Panter: According to the documentation, HTTPSConnection.request() should accept arbitrary bytes-like objects, but this is not the case. Currently (since Issue 23756), a “bytes-like object” is defined to be anything that works with Python’s buffer API, as long as it

[issue23740] http.client request and send method have some datatype issues

2016-06-16 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +bytes-like objects with socket.sendall(), SSL, and http.client ___ Python tracker <http://bugs.python.org/issue23

[issue23360] Content-Type when sending data with urlopen()

2016-06-16 Thread Martin Panter
Martin Panter added the comment: Fixed conflicts with recent changes -- versions: +Python 2.7 -Python 3.4 Added file: http://bugs.python.org/file43428/non-urlencoded.6.patch ___ Python tracker <http://bugs.python.org/issue23

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-06-17 Thread Martin Panter
Martin Panter added the comment: FYI instead of changing the helper into a static method, I think you could have just called http.client._get_content_length(). I don’t understand why we need the new encode_chunked=True flag. Can’t urllib.request leave the Transfer-Encoding field up to

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

2016-06-17 Thread Martin Panter
Martin Panter added the comment: Thanks Berker. In this case the previous tests using the same NNTP connection object were skipped. First run: test_unknown_command (test.test_nntplib.NetworkedNNTPTests) ... ok test_welcome (test.test_nntplib.NetworkedNNTPTests) ... ok test_with_statement

[issue27292] Warn users that os.urandom() can return insecure values

2016-06-17 Thread Martin Panter
Martin Panter added the comment: Restored “On Linux” for the changed in 3.5.2 notice. I do think it is better to be general and future-proof, but that is a separate, less important issue to the main purpose of the patch. (I don’t know if Solaris’s version can block or not.) -- stage

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-17 Thread Martin Panter
Martin Panter added the comment: Sorry about impersonating your name as committer Victor. I have been fixing this problem in recent patches, but because I imported your patch a while ago I forgot about it. -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue25548] Show the address in the repr for class objects

2016-06-17 Thread Martin Panter
Martin Panter added the comment: There is also Issue 13224 proposing to change __str__() to just return the __name__ or __qualname__ if I remember correctly. -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue25

[issue26536] Add the SIO_LOOPBACK_FAST_PATH option to socket.ioctl

2016-06-18 Thread Martin Panter
Martin Panter added the comment: This is failing on Windows 7 buildbots: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7849/steps/test/logs/stdio == ERROR: test_sio_loopback_fast_path

[issue24314] irrelevant cross-link in documentation of user-defined functions

2016-06-18 Thread Martin Panter
Martin Panter added the comment: I also backported most of my changes to 2.7, although __name__ wasn’t originally linking to anything at all there. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -P

[issue19884] Importing readline produces erroneous output

2016-06-18 Thread Martin Panter
Martin Panter added the comment: Yogesh: Victor’s patch has already been applied. What is left to do is another patch that enables Victor’s code on OS X when Gnu Readline is being used, as opposed to the usual Apple Editline. Also, I think it is valid to update the version check to 6.1

[issue19884] Importing readline produces erroneous output

2016-06-18 Thread Martin Panter
Martin Panter added the comment: Here is a patch to enable the workaround on OS X, and to adjust the test condition to 6.1. It would be nice if someone with OS X and Gnu Readline can confirm that this fixes the problem. -- stage: needs patch -> patch review Added file: h

[issue27346] Implement os.readv() / os.writev()

2016-06-18 Thread Martin Panter
Changes by Martin Panter : -- components: +Extension Modules, Windows -Library (Lib) nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <http://bugs.python.org/issue27

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2016-06-18 Thread Martin Panter
Martin Panter added the comment: Are you sure Oleg? As far as I understand, Python 2 by default wraps C stdio file objects, and also has Python 3’s file objects in the “io” module. But I expect TemporaryFile() would use the default stdio files, and the cause of this bug, Issue 21679, should

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2016-06-18 Thread Martin Panter
Martin Panter added the comment: This original bug was about fstat() failing for an anonymous file (after the directory entry was removed). But in your situation the file system refuses to unlink the directory entry. If you think there is something that can be fixed in Python, I suggest open

[issue27348] Non-main thread exception handler drops exception message

2016-06-18 Thread Martin Panter
New submission from Martin Panter: If the exception argument is None or repr(None), it is omitted from the report when a thread raises an unhandled exception: >>> def raise_exception(e): ... raise e ... >>> t = Thread(target=raise_exception, args=(Exception

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

2016-06-18 Thread Martin Panter
Martin Panter added the comment: Here is a patch that changes all affected tests to use a custom server running on localhost: * Local server is based on the existing NNTPv2Handler class, and the LocalServerTests class * Reintegrate test_starttls() back into NetworkedNNTPTestsMixin * Only

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

2016-06-19 Thread Martin Panter
Martin Panter added the comment: Here is a diff that shows my changes better. I temporarily moved some classes back to their original positions to reduce the diff size, though it won’t work in practice because Python needs the classes defined before using them. -- Added file: http

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

2016-06-19 Thread Martin Panter
Martin Panter added the comment: Uploading a combined patch that should work with Rietveld, and I will leave some comments. I don’t think there is much that I am comfortable changing in Python 2.7. In general it is a bad idea to add new features that are only going to be available in e.g

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

2016-06-19 Thread Martin Panter
Martin Panter added the comment: I left a few more comments, but I see that many of my earlier comments (both in Rietveld and main bug thread) still apply. I’m still struggling to understand all the special cases for the find_library() argument. You seem to have added even more recently

[issue27328] Documentation corrections for email defects

2016-06-20 Thread Martin Panter
Martin Panter added the comment: Here is a new version which I think should be okay to apply. I restored the references to the base class, but now using the MessageDefect name. I removed the changes relating to raise_on_defect not being strict, in favour of fixing Issue 24364

[issue24364] Not all defects pass through email policy

2016-06-20 Thread Martin Panter
Martin Panter added the comment: Here is a patch to fix the two defects in Lib/email/feedparser.py. I also made some extra changes to the tests: * Remove some tests from Lib/test/test_email/test_email.py, because I think they were redundant with methods of the same name in

[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-06-20 Thread Martin Panter
Martin Panter added the comment: Here is a patch documenting that RawIOBase.writelines() is undefined for partial writes and blocking errors, as mentioned in (1) above. The alternative of requiring write() to be retried would IMO be unfair to existing writelines() implementations. It also

[issue26894] Readline not aborting line edition on sigint

2016-06-20 Thread Martin Panter
Changes by Martin Panter : -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue26894> ___ ___ Python-bugs-list mailing list Unsubscrib

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