[issue27746] ResourceWarnings in test_asyncio

2016-08-12 Thread Martin Panter
New submission from Martin Panter: $ ./python -bWerror -m test -r -u all . . . 0:12:58 [ 70/402] test_asyncio Exception ignored in: > Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/asyncio/sslproto.py", line 329, in __del__ source=self) Re

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-08-12 Thread Martin Panter
Martin Panter added the comment: No super important reason, just to avoid indenting the code. This is a medium-sized test function, with a few long lines already. And if you keep the indentation the same, it makes it easier to port other changes to Python 2, look through the repository

[issue24363] httplib fails to handle semivalid HTTP headers

2016-08-12 Thread Martin Panter
Martin Panter added the comment: In order to avoid messing too much with the intricacies of the existing email parsing, here is a patch for Python 3 that limits the behaviour changes to the HTTP module. It should fix the bad handling of broken header lines. As a side effect, it should also

[issue1602] windows console doesn't print or input Unicode

2016-08-13 Thread Martin Panter
Martin Panter added the comment: For compatibility, I think it may be good to add custom implementations of the buffer attribute and detach() method to stdin/out. They should be able to at least read and write ASCII bytes. It might be easiest to keep them as the current BufferedReader/Writer

[issue27761] Private _nth_root function loses accuracy

2016-08-13 Thread Martin Panter
Martin Panter added the comment: The problem is more widespread than just Power PC. The same failures (+/-29) are also seen on the three s390x buildbots. There are multiple failures of testExactPowers(Negatives) on http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/11140/steps

[issue3244] multipart/form-data encoding

2016-08-14 Thread Martin Panter
Martin Panter added the comment: I think encoding the user’s IP address into the boundary is a bad idea. Forest’s version uses the existing “email” package, which calls random.randrange(sys.maxsize) and searches through the data for conflicts. I haven’t really researched this, but I suspect

[issue1602] windows console doesn't print or input Unicode

2016-08-14 Thread Martin Panter
Martin Panter added the comment: I think this CGI thing is a separate bug, just exacerbated by the stdin.encoding problem. :) The urllib.parse.parse_qs() function takes an encoding parameter to figure out what to do with percent-encoded values: "%A9" → b"\xA9".decode(...

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

2016-08-16 Thread Martin Panter
Changes by Martin Panter : -- nosy: -martin.panter ___ Python tracker <http://bugs.python.org/issue6143> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2016-08-17 Thread Martin Panter
Martin Panter added the comment: Patch 12 has the following changes: * Change the chunked_encoding parameter to keyword-only * Drop most of the change regarding the UpdatingFile test (see code review) * Update the urlopen() TypeError to mention “data” may be a file object * Fix and update the

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-17 Thread Martin Panter
New submission from Martin Panter: In Issue 12319, there are many iterations of a patch that adds a new TestCase subclass to Lib/test/test_httplib.py. However it never got run by the main regrtest infrastructure, because nobody remembered to add the class to the list of test classes. So I

[issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots

2016-08-17 Thread Martin Panter
Martin Panter added the comment: I think I have seen these kind of errors pop up randomly on various tests on Free BSD buildbots (at least in the last few months or so). Are the buildbots so overloaded that they drop localhost connections? Or are localhost TCP connections generally just that

[issue27791] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread"

2016-08-17 Thread Martin Panter
Martin Panter added the comment: I just happened to notice this failure on 3.5 as well: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.5/builds/791/steps/test/logs/stdio -- nosy: +martin.panter versions: +Python 3.5

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-17 Thread Martin Panter
Martin Panter added the comment: Yes I agree it would make sense to separate the test_httplib changes from the general change. I thought this task would be a very easy change, and noticed it wasn’t that simple the last minute. I would like to adjust the cleanup call to self.addCleanup

[issue27643] test_ctypes fails on AIX with xlc

2016-08-17 Thread Martin Panter
Martin Panter added the comment: Michael, byref() is just a helper for passing an object’s address to a C function. Calling func(byref(b), ...) in Python is equivalent to the C code unpack_bitfields(&b, ...) I still think the root problem is in unpack_bitfields(). When compiled with

[issue27643] test_ctypes fails on AIX with xlc

2016-08-17 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue27643> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue27506] make bytes/bytearray delete a keyword argument

2016-08-17 Thread Martin Panter
Martin Panter added the comment: I can look at enhancing the tests at some stage, but it isn’t a high priority for me. Regarding translate() with no arguments, it makes sense if you see it as a kind of degenerate case of neither using a translation table, nor any set of bytes to delete

[issue26050] Add new StreamReader.readuntil() method

2016-08-18 Thread Martin Panter
Martin Panter added the comment: In revision 83450939b106, Yury added some documentation for readuntil(). I am not familiar with this StreamReader class, but maybe Mark or someone else can check if the remaining changes in his patch are still useful. I can suggest some spelling and wording

[issue26050] Add new StreamReader.readuntil() method

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Also it looks like the b'\n' default confuses Sphinx. Maybe it needs extra escaping? -- ___ Python tracker <http://bugs.python.o

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Serhiy’s two proposals won’t work for codecs that include non-zero output for zero input: >>> tuple(iterencode((), "utf-8-sig")) (b'\xef\xbb\xbf',) >>> encode(b"", "uu") b'begin 666 \n \nend\n'

[issue27799] Fix base64-codec and bz2-codec incremental decoders

2016-08-19 Thread Martin Panter
New submission from Martin Panter: This is split off a large patch I posted at Issue 20132. My new patch here fixes the following two flaws. 1. There is special code in the bz2 decoder that returns an empty text str object at EOF, even though bz2-codec is a bytes-to-bytes codec: >>&g

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Martin Panter
New submission from Martin Panter: In the documentation for the “re” module, it says repetition codes like {4} and “*” operate on the preceding regular expression. But even though “a{4}” is a valid expression, the obvious way to apply a “*” repetition to it fails: >>> re.com

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

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Split off Issue 27799 for the base-64 incremental decoder -- dependencies: +Fix base64-codec and bz2-codec incremental decoders ___ Python tracker <http://bugs.python.org/issue20

[issue27802] Add __eq__ and __ne__ to collections.abc.Sequence.

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Your implementation looks like it will make a Sequence equal to a list and a tuple, even though lists and tuples are never equal to each other. -- nosy: +martin.panter type: -> enhancement ___ Python tracker &l

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-19 Thread Martin Panter
Martin Panter added the comment: The origin of this seems to be r68835 and Issue 5008. Victor mentioned imitating the Gnu C library. Maybe there is a better way that also supports non-seekable files better, perhaps handle ESPIPE without failing. This also affects Python 2, if you consider

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Okay so it sounds like my usage is valid if I add the brackets. I will try to come up with a documentation patch as some stage. The reason why it is not supported without brackets is to maintain a bit of consistency with the question mark (?), which modifies

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I committed the gc_collect() change to 3.5 as well, because it helped me with a separate test case. Here is the remaining change, for 3.6 only. I added a timeout to the join() call. This matches the @reap_threads decorator, which times out after 1 s

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Here is my documentation proposal. -- components: +Documentation -Library (Lib) stage: -> patch review versions: +Python 3.5 Added file: http://bugs.python.org/file44164/iter-unsupported.patch ___ Python trac

[issue27614] Race in test_docxmlrpc.py

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

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Original post: “When I assign for a item which list of single item, it seems can't set a value for item which I want to.” See the FAQ entry <https://docs.python.org/3.5/faq/programming.html#how-do-i-create-a-multidimensional-list>. When you mult

[issue27815] Make SSL suppress_ragged_eofs default more secure

2016-08-20 Thread Martin Panter
New submission from Martin Panter: In the SSL module, the wrap_socket() function (and corresponding SSLContext method) take a flag called “suppress_ragged_eofs”. It defaults to True, which makes me uncomfortable. The documentation says: ''' The parameter “suppress_ragged_eofs

[issue1223] httplib does not handle ssl end of file properly

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I think the default of suppress_ragged_eofs=True was a bad idea because by default you cannot tell a secure EOF signal from an insecure error; see Issue 27815. -- nosy: +martin.panter ___ Python tracker <h

[issue27816] sock.proto does not reflect actual protocol

2016-08-20 Thread Martin Panter
Martin Panter added the comment: The documentation already says “Socket objects also have these (read-only) attributes that correspond to the values given to the socket constructor. . . . socket.proto”. For existing versions of Python, I’m not sure there is much else we can do. In Issue

[issue26907] Add missing getsockopt constants

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Patch looks fine to me. -- stage: -> commit review ___ Python tracker <http://bugs.python.org/issue26907> ___ ___ Python-

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

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Currently, the documentation for TextIOWrapper says it is “a buffered text stream over a BufferedIOBase binary stream.” If passing a RawIOBase (buffering=0) file works, that seems like an undocumented accident. This is also explicitly disallowed with open

[issue14853] test_file.py depends on sys.stdin being unseekable

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Long story short: Don’t change Python 2, and just restore the seek(-1) test in 3. I agree in general it is better to skip a test than completely remove it. However, in Python 2, the test that Victor proposes to restore is redundant with test_file2k. Sys.stdin

[issue16968] Fix test discovery for test_concurrent_futures.py

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I don’t know much about the concurrent.futures testing, but in general IMO it makes more sense to call thread.join(), or at least @reap_threads, in each individual test case that needs it. If appropriate, you can call join() with a one-second timeout, which

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Handling ESPIPE for append mode seems reasonable to me, even as a bug fix for existing versions. But there is a similar problem with "r+" and "w+" modes and unseekable files (unless buffering=0). See Issue 20074. So we can’t say in g

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Terry, in revision 6c8dd4cb4ee7 you wrote “Fix warning tom test_config.” Perhaps this is meant to say “. . . from test_config_key” (taken from b10a312f6d00)? -- nosy: +martin.panter ___ Python tracker <h

[issue16764] Make zlib accept keyword-arguments

2016-08-20 Thread Martin Panter
Martin Panter added the comment: All the interesting keyword arguments seem to work now (checking against my notes from earlier). Is there anything else anyone wants to do, or can we close this now? -- stage: commit review -> resolved ___ Pyt

[issue27746] ResourceWarnings in test_asyncio

2016-08-21 Thread Martin Panter
Changes by Martin Panter : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue27746> ___ ___ Python-bugs-list mailing list Un

[issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present

2016-08-21 Thread Martin Panter
Martin Panter added the comment: It looks like Bert’s patch adjusted two ldconfig calls; the first one was in a BSD-specific branch. Was this intended? Only the second call (default “else:” branch) seems applicable to AIX. Perhaps the performance is improved now that the popen() shell calls

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-21 Thread Martin Panter
Martin Panter added the comment: The ctypes tests all seem to be protected with code that checks for None, and explicitly skip the test in that case. The skip message should be visible when you run the test in verbose mode. We could avoid skipping these tests in 2.7 by adding a special case

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-21 Thread Martin Panter
Martin Panter added the comment: Looks pretty good thanks Xiang. There’s one English grammar problem in a comment (see review), but I can fix that when I commit. -- stage: patch review -> commit review ___ Python tracker <http://bugs.pyth

[issue1375011] http.cookies, Cookie.py: Improper handling of duplicate cookies

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Improper handling of duplicate cookies -> http.cookies, Cookie.py: Improper handling of duplicate cookies ___ Python tracker <http://bugs.python.org/issue1

[issue25228] Regression in http.cookies parsing with brackets and quotes

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Regression in cookie parsing with brackets and quotes -> Regression in http.cookies parsing with brackets and quotes ___ Python tracker <http://bugs.python.org/issu

[issue23930] http.cookies.SimpleCookie doesn't parse comma-only separated cookies correctly

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: SimpleCookie doesn't parse comma-only separated cookies correctly -> http.cookies.SimpleCookie doesn't parse comma-only separated cookies correctly ___ Python tracker <http://bugs.pytho

[issue27674] Quote mark breaks http.cookies, Cookie.py processing

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Quote mark breaks cookie processing -> Quote mark breaks http.cookies, Cookie.py processing ___ Python tracker <http://bugs.python.org/issu

[issue27828] Regression in http.cookies parsing with single key without value

2016-08-22 Thread Martin Panter
Martin Panter added the comment: I am not the biggest expert on cookie syntaxes, but maybe these reports are related: Issue 25228: Skip over invalid cookies by searching for a semicolon; needs confirming whether it reopens a security hole Issue 17340: Problem with a comma in (or preceding) a

[issue27643] test_ctypes fails on AIX with xlc

2016-08-22 Thread Martin Panter
Martin Panter added the comment: Now I am confused. In <https://bugs.python.org/issue27643#msg271773> we have [Me] If your compiler does not support “signed short” bitfields, maybe we just have to accept that ctypes supports it even though the compiler doesn’t, and skip the test. [M

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-22 Thread Martin Panter
Martin Panter added the comment: I had understood that changing find_library() would only be useful in combination with the automatic RTDL_MEMBER detection. If you want to mention lack of support for AIX in the documentation, that is okay by me. If you want to propose an alternative

[issue25825] AIX shared library extension modules installation broken

2016-08-22 Thread Martin Panter
Martin Panter added the comment: It looks like the change from plain config to config- was made in Issue 9807 (r86731, 3.2). So the patch seems reasonable to me; it is just catching up with that change. This bug was marked for 2.7 as well. Is there anything that needs to be done for 2.7

[issue25825] AIX shared library extension modules installation broken

2016-08-23 Thread Martin Panter
Martin Panter added the comment: Patch 1 does not apply to 2.7. The offending commit 88a532a31eb3 was not made in that branch. Patch 2 may apply to 2.7, but I am not sure if it is needed or worthwhile. Again, the offending commit r86731 not made to 2.7. There is also a $(BINLIBDEST)/config

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

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

[issue27643] test_ctypes fails on AIX with xlc

2016-08-23 Thread Martin Panter
Martin Panter added the comment: Michael: When posting to the bug tracker, please trim irrelevant parts of old messages. It makes it hard to see if you actually added anything new. > [Me] If your compiler does not support “signed short” bitfields, maybe we > just have to accept that

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

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Rolf, just a note that I had to remove some trailing spaces on various continued lines in the Python code before it would let me push this. Other tweaks I made: * Eliminate _read_iterable() and lambda * Rename line → chunk The Windows buildbots fail the test

[issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present

2016-08-24 Thread Martin Panter
Martin Panter added the comment: For the record, if you wanted to actually load the library function on AIX, I understand the code might look a bit like: if sys.platform.startswith("aix"): if sys.maxsize > 2**32: lib = "libc.a(shr_64.o)" else:

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

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Thankyou Eryksun for the detailed explanation. Unfortunately, that means that uploading an unseekable file via urllib.request, or via http.client, isn’t going to work by default on Windows. I see a couple of workarounds with the current code: * Users can

[issue18485] mingw: configure for shared build

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Roumen’s patch amends code added by his patches at Issue 17597. Here is a version which is independent. -- nosy: +martin.panter stage: -> patch review versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file44210/mingw-shared.v2.pa

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

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Here is my attempt to drop automatic Content-Length with files. I also dropped the special handling of zero-length iterables, added some tests for that, and removed some unused and misleading bits from other tests. -- Added file: https

[issue19884] Importing readline produces erroneous output

2016-08-25 Thread Martin Panter
Martin Panter added the comment: Thanks, I can try to commit the version fix part of the patch when I get a chance. What is EL6.8, is that a Red Hat (Enterprise Linux) thing? -- versions: +Python 3.6 -Python 3.4 ___ Python tracker <ht

[issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-26 Thread Martin Panter
Changes by Martin Panter : -- title: os.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE -> io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE ___ Python t

[issue27830] Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments

2016-08-26 Thread Martin Panter
Martin Panter added the comment: FYI revision ffcfa4f005a3 removed the code that uses your new _PyStack_AsDict() function, so now there is a compiler warning: Objects/abstract.c:2313:1: warning: ‘_PyStack_AsDict’ defined but not used [-Wunused-function] _PyStack_AsDict(PyObject **stack

[issue26027] Support Path objects in the posix module

2016-08-26 Thread Martin Panter
Martin Panter added the comment: This change causes test_os to produce warnings, and can fail: $ hg update b64f83d6ff24 $ ./python -bWerror -m test -u all -W test_os [. . .] == ERROR: test_path_t_converter

[issue26638] Avoid warnings about missing CLI options when building documentation

2016-08-26 Thread Martin Panter
Martin Panter added the comment: Terry: the four "ini" syntax highlighting warnings were also mentioned in <https://bugs.python.org/issue26462#msg271241>. In that bug, we fixed many other similar warnings, but I think we left those as being less easy to fix. One t

[issue27425] Tests fail because of git's newline preferences on Windows

2016-08-26 Thread Martin Panter
Martin Panter added the comment: Emanuel: fix_newlines_2.patch seems to change the contents of batch from CRLF to LF newlines, undoing revision 640ccb924b5f. This seems like a step in the wrong direction. Notice $ means LF, and ^M$ means CRLF: $ curl https://bugs.python.org/file44225

[issue26027] Support Path objects in the posix module

2016-08-26 Thread Martin Panter
Martin Panter added the comment: One more thing, ;) the Windows buildbots are failing to removing a temporary file: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8173/steps/test/logs/stdio

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

2016-08-26 Thread Martin Panter
Martin Panter added the comment: I committed my patch, so now file bodies are chunk-encoded by default. The Windows buildbots pass the relevant tests again. This does mean that old code that uploaded a file to a HTTP-1.0-only server, and relied on Python automatically setting Content-Length

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

2016-08-26 Thread Martin Panter
Changes by Martin Panter : Added file: https://bugs.python.org/file44237/Python3.6.ctypes.160823.patch ___ Python tracker <https://bugs.python.org/issue26439> ___ ___

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

2016-08-27 Thread Martin Panter
Martin Panter added the comment: The documentation is in RST format in the Doc/ directory. For basic stuff, you can just copy the syntax from existing text, or see e.g. <https://docs.python.org/devguide/documenting.html#restructuredtext-primer> for more hints. For this change, I think w

[issue19884] Importing readline produces erroneous output

2016-08-27 Thread Martin Panter
Martin Panter added the comment: I committed my patch in full, so hopefully the Gnu Readline situation on OS X is also improved. Original fixes went into 3.4, but my patch only went into 3.5+. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue25825] AIX shared library extension modules installation broken

2016-08-27 Thread Martin Panter
Martin Panter added the comment: Okay, the second patch is committed to 3.5+. Is everything working now (on 2.7, 3.5, 3.6), or is there more to do? -- ___ Python tracker <https://bugs.python.org/issue25

[issue27506] make bytes/bytearray translate's delete a keyword argument

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

[issue24045] Behavior of large returncodes (sys.exit(nn))

2016-08-28 Thread Martin Panter
Martin Panter added the comment: Is this a duplicate of Issue 24052? -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue24045> ___ ___ Pytho

[issue24052] sys.exit(code) returns "success" to the OS for some nonzero values of code

2016-08-28 Thread Martin Panter
Martin Panter added the comment: Here is a relevant Posix bug thread: http://austingroupbugs.net/view.php?id=947 As well as Windows, apparently Solaris, OS X, and a recent version of Free BSD have more than eight bits of exit status. I don’t know if Python’s sys.exit() supports this though

[issue27893] email.parser.BytesParser.parsebytes docs fix

2016-08-30 Thread Martin Panter
New submission from Martin Panter: Actually it seems the parameter is called *text*: >>> BytesParser().parsebytes(bytes=b"") TypeError: parsebytes() got an unexpected keyword argument 'bytes' >>> BytesParser().parsebytes(text=b"") -

[issue22450] urllib doesn't put Accept: */* in the headers

2016-08-30 Thread Martin Panter
Martin Panter added the comment: “Proxy servers such as NGinx and Varnish: . . . if the Accept header is omitted, the proxy cache can return any of the cached responses.” This is not really my area of expertise, but this behaviour is inconsistent with my understanding of how Accept and Vary

[issue22233] http.client splits headers on non-\r\n characters

2016-08-30 Thread Martin Panter
Martin Panter added the comment: If someone reviews my patch and thinks it is fine, I might commit it. Maybe I can just re-review it myself, now that I have forgotten all the details :) If messing with the email package is a problem (performance, or compatibility), another option is to keep

[issue27895] Spelling fixes

2016-08-30 Thread Martin Panter
Martin Panter added the comment: Be careful with user-visible changes to the code, like the _encoded_EMTPY attribute (Issue 27630). I wouldn’t backport that. -- nosy: +martin.panter versions: +Python 3.6 ___ Python tracker <http://bugs.python.

[issue27630] Generator._encoded_EMTPY misspelling in email package

2016-08-30 Thread Martin Panter
Martin Panter added the comment: FYI in 3.6 the spelling has been changed to _EMPTY (Issue 27895) -- ___ Python tracker <http://bugs.python.org/issue27

[issue17207] string format precision misbehaving

2013-02-14 Thread Martin Mokrejs
New submission from Martin Mokrejs: Hi, I don't know if this is related to issue8040 or not. I find the 2.7 string formatting behavior inconsistent. I found out sometimes I have to divide my number by 100 so that the percentage values get printed correctly. Somehow, when a percent

[issue17234] python-2.7.3-r3: crash in visit_decref()

2013-02-19 Thread Martin Mokrejs
New submission from Martin Mokrejs: Hi, I do see relatively often a crash in python. Here is one stacktrace from my Gentoo Linux running 3.7.4 kernel: (gdb) where #0 0x7f624f340f08 in visit_decref () from /usr/lib64/libpython2.7.so.1.0 #1 0x7f624f2a455a in list_traverse () from

[issue1375011] Improper handling of duplicate cookies

2013-02-23 Thread Martin Melin
Martin Melin added the comment: Attached is a patch with Viraj's original fix except using a set instead of a dict as suggested by Björn. This patch also includes a test case and a note in the docs about this behavior. Since Cookie has been moved and the code has been cleaned up som

[issue1375011] Improper handling of duplicate cookies

2013-02-23 Thread Martin Melin
Martin Melin added the comment: Just adding the 3.2 patch -- Added file: http://bugs.python.org/file29179/issue1375011-3.2.patch ___ Python tracker <http://bugs.python.org/issue1375

[issue7504] Same name cookies

2013-02-23 Thread Martin Melin
Martin Melin added the comment: FYI, this looks like the same issue as #1375011 -- nosy: +mmelin ___ Python tracker <http://bugs.python.org/issue7504> ___ ___

[issue16709] unittest discover order is filesystem specific - hard to reproduce

2013-02-23 Thread Martin Melin
Martin Melin added the comment: Not sure if there was anything more to it than this, but please find an attempt to add this attached. -- keywords: +patch nosy: +mmelin Added file: http://bugs.python.org/file29197/issue16709.patch ___ Python tracker

[issue12641] Remove -mno-cygwin from distutils

2013-02-26 Thread Martin Fiers
Martin Fiers added the comment: This also affects our software. I agree with Dan (danmbox): I don't understand; so many people depend on it and yet an out-of-the-box solution doesn't work. I don't want to break the distutils package of our users because we use mingw. Within on

[issue12641] Remove -mno-cygwin from distutils

2013-02-26 Thread Martin Fiers
Martin Fiers added the comment: Dear Eric, I never said that anyone of these volunteers is unresponsible/stupid/whatsoever. It was also never my intention to express myself in this way, so I apologize if you felt harmed in any way. I was just suprised that this issue exists for so long. And

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-04-03 Thread Martin Morrison
Changes by Martin Morrison : -- nosy: +isoschiz ___ Python tracker <http://bugs.python.org/issue14905> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-04-04 Thread Martin Gfeller
Martin Gfeller added the comment: I see (under Windows) the same symptoms as reported for Debian under http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704084. Python refuses to start. 2.7.4.rc1 Windows 32-bit. -- nosy: +Martin.Gfeller

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-04-04 Thread Martin Gfeller
Martin Gfeller added the comment: @Georg, the referenced Debian issue (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704084) already contains the stack. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-04-04 Thread Martin Gfeller
Martin Gfeller added the comment: Sorry for passing on my confusion, and thanks for your help! There was indeed an old python.dll lying in one of the places Windows likes to put DLLs. Deleting it resolved the problem. Thanks again and sorry to use your valuable time. Best regards, Martin

[issue17646] traceback.py has a lot of code duplication

2013-04-06 Thread Martin Morrison
New submission from Martin Morrison: traceback.py contains a lot of code duplication, which makes it fragile in the face of changes (i.e. special cases) to the stack/traceback output (I am separately working on just such a change). The attached patch refactors the code to reduce to a single

[issue17646] traceback.py has a lot of code duplication

2013-04-06 Thread Martin Morrison
Martin Morrison added the comment: I hadn't spotted that one! My refactor goes further (consolidates all duplicates, not just the tb ones), is implemented the way you suggested therein (print in terms of extract), and is "more efficient" in that it uses generators for a

[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison
Martin Morrison added the comment: I wrote an implementation from scratch (based on the wikipedia article; I've not looked at any existing implementations) in pure Python in the attached diff. It includes tests. Feel free to use it as the pure Python implementation if desired, though I

[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison
Martin Morrison added the comment: (sorry for spam) Forgot to mention, I included an optional keyword argument to support the 'btoa' shortcut for sequences of space characters as described in the Wikipedia article. However, I'm unsure if any other implementation supports this

[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison
Martin Morrison added the comment: Ok, having now looked at mercurial's implementation... it looks like they implemented the RFC1924 version, whereas my implementation is the Ascii85 version (and I verified it against, amongst others: http://www.tools4noobs.com/online_tools/ascii85_e

[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison
Martin Morrison added the comment: Ok, I'm not even sure that Mercurial follows RFC1924! That RFC is specifically for encoding IPv6 addresses, and mandates that the calculations be performed on a 128bit integer. The Mercurial implementation seems to follow the Ascii85 policy of taking ea

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-09 Thread Martin Morrison
Changes by Martin Morrison : -- nosy: +isoschiz ___ Python tracker <http://bugs.python.org/issue17636> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17618] base85 encoding

2013-04-13 Thread Martin Morrison
Martin Morrison added the comment: Ok, great. I'll update the patch to include both encoding schemes. -- ___ Python tracker <http://bugs.python.org/is

[issue17618] base85 encoding

2013-04-13 Thread Martin Morrison
Martin Morrison added the comment: Updated patch that includes both my original implementation of Ascii85, as well as the Mercurial implementation of base85. A few notes/questions: - I named the Mercurial base85 implementation functions with the "b85" prefix. For the Ascii85 ones, I

<    16   17   18   19   20   21   22   23   24   25   >