[issue14014] codecs.StreamWriter.reset contract not fulfilled

2015-01-13 Thread Martin Panter
Martin Panter added the comment: Maybe it would be better to redefine the docstring to say it flushes the codec as well as calling flush() on the underlying stream. But if you really want to finish the job you should probably be closing the underlying stream, which would flush if necessary

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

2015-01-13 Thread Martin Panter
Martin Panter added the comment: Here is a patch to implement the zlib-codec and bz2-codec StreamWriter classes based on their IncrementalEncoder classes. It depends on my patch for Issue 23231, though I guess it could be tweaked to work around that if desired. -- keywords: +patch

[issue5804] Add an 'offset' argument to zlib.decompress

2015-01-14 Thread Martin Panter
Martin Panter added the comment: A different test case for “unused_data” attribute was added in 2012 for Issue 16350, so that part is no longer needed. If this feature goes ahead, it might be nice to also update the bzip and LZMA modules for consistency. In Python 3, the equivalent of the

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

2015-01-14 Thread Martin Panter
Martin Panter added the comment: New patch that also fixes StreamWriter.writelines() in general for the byte codecs -- Added file: http://bugs.python.org/file37710/zlib-bz2-writer.v2.patch ___ Python tracker <http://bugs.python.org/issue13

[issue17546] Document the circumstances where the locals() dict get updated

2015-01-15 Thread Martin Panter
Martin Panter added the comment: What about instead of ''' Whether changes to one are reflected in the other after the call returns is undefined; additionally, the dictionary may change unpredictably after the call, and how it does is implementation-specific. ''

[issue18986] Add a case-insensitive case-preserving dict

2015-01-15 Thread Martin Panter
Martin Panter added the comment: For the record, this is related to PEP 455 (key-transforming dictionary) -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue18

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

2015-01-15 Thread Martin Panter
Martin Panter added the comment: I opened Issue 23231 about fixing iterencode() and iterdecode() in the general case. I added a patch to Issue 13881 to fix StreamWriter for zlib and bz2, and to fix StreamWriter.writelines() in general. I am adding a patch here to clarify the StreamReader API

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

2015-01-15 Thread Martin Panter
Martin Panter added the comment: Sorry, I changed the name of the attribute and forgot to update the doc string. Its new name was _Encoder. Your description was fairly accurate. I am adding patch v3, with an expanded the doc string. Hopefully that explains it a bit better. Since it is just

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

2015-01-15 Thread Martin Panter
Martin Panter added the comment: My “master plan” is basically to make most of the bytes-to-bytes codecs work as documented in the incremental (stateful) modes. I’m less interested in fixing the text codecs, and the quopri and uu codecs might be too hard, so I was going to propose some

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-15 Thread Martin Panter
Martin Panter added the comment: I believe the BadStatusLine can still happen, depending on the circumstances. When I get a chance I will see if I can make a demonstration. In the meantime these comments from my persistent connection handler <https://github.com/vadmium/python-iview/b

[issue23247] Multibyte codec StreamWriter.reset() crashes

2015-01-15 Thread Martin Panter
New submission from Martin Panter: $ python3 -c 'import codecs; from io import BytesIO; codecs.getwriter("big5")(BytesIO()).reset()' Segmentation fault (core dumped) [Exit 139] Happens for all the multibyte codecs: broken_stream_codecs = { "big5", "b

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

2015-01-16 Thread Martin Panter
Martin Panter added the comment: There is a flaw with inheriting the readline() method in my patch, and I have decided to give up fixing the StreamReader classes. I did update the documentation in my copy of the patch based on Marc-Andre Lemburg’s feedback if anyone is interested in it

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-16 Thread Martin Panter
Martin Panter added the comment: There is also a new sentence about the GIL at the end, but leaving the inbetween lines as they were would verify this -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue23

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-16 Thread Martin Panter
Martin Panter added the comment: What I have sometimes done in this situation is just break the overly long line into two short lines -- ___ Python tracker <http://bugs.python.org/issue23

[issue15608] Improve socketserver doc

2015-01-16 Thread Martin Panter
Martin Panter added the comment: The post makes a bit more sense once you realize the dotted numbers refer to old section numbers (which have moved on now): 20.19.2 → “Server Objects” section 20.19.1 → “Server Creation Notes” Regarding point 2: Instructions for the user to make a threading or

[issue14307] Make subclassing SocketServer simpler for non-blocking frameworks

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

[issue1429] FD leak in SocketServer when request handler throws exception

2015-01-16 Thread Martin Panter
Changes by Martin Panter : -- title: FD leak in SocketServer -> FD leak in SocketServer when request handler throws exception ___ Python tracker <http://bugs.python.org/iss

[issue13354] tcpserver should document non-threaded long-living connections

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

[issue15955] gzip, bz2, lzma: add option to limit output size

2015-01-16 Thread Martin Panter
Martin Panter added the comment: Adding issue15955_lzma_r5.diff. Main changes from r4: * Consistent Py_ssize_t type for data_size * max_size → max_length to match Python parameter name * Arranged for EOF handling to occur before, and instead of, saving the input buffer * Removed my LZMAFile

[issue23254] Document how to close the TCPServer listening socket

2015-01-16 Thread Martin Panter
New submission from Martin Panter: Running the example from the Asynchronous Mixins section of the “socketserver” documentation generates a ResourceWarning: $ ./python -btWall ThreadedTCPServer.py Server loop running in thread: Thread-1 Received: Thread-2: Hello World 1 Received: Thread-3

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-16 Thread Martin Panter
Martin Panter added the comment: Okay here is a demonstration script, which does two tests: a short basic GET request, and a 2 MB POST request. Output for me is usually: Platform: Linux-3.15.5-2-ARCH-x86_64-with-arch Normal request: getresponse() raised BadStatusLine("''&

[issue20420] BufferedIncrementalEncoder violates IncrementalEncoder interface

2015-01-17 Thread Martin Panter
Martin Panter added the comment: For what it’s worth, both io.TextIOWrapper and _pyio.TextIOWrapper appear to only ever call IncrementalEncoder.setstate(0). And the newline _decoder_ is not relevant because it doesn’t use any _encoder_. -- nosy: +vadmium

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

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

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

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

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

2015-01-17 Thread Martin Panter
Martin Panter added the comment: Another idea that doesn’t involve changing the incremental codec APIs is kind of described in <https://bugs.python.org/issue7475#msg145986>: to add format parameters to iterencode() and iterdecode(), which would allow it to determine the right data t

[issue20121] quopri_codec newline handling

2015-01-17 Thread Martin Panter
Martin Panter added the comment: Here is a patch that clarifies in the documentation and test suite how newlines work in the “quopri” and “binascii” modules. It also fixes the native Python implementation to support CRLFs. * \n is used by default (e.g. for soft line breaks if the input has no

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-18 Thread Martin Panter
Martin Panter added the comment: Spotted code in Python’s own library that maintains a persistent connection and works around this issue: Lib/xmlrpc/client.py:1142 -- ___ Python tracker <http://bugs.python.org/issue3

[issue16648] stdib should use new exception types from PEP 3151

2015-01-18 Thread Martin Panter
Martin Panter added the comment: I would support adding ENOTCONN under the ConnectionError umbrella. It is caught for shutdown() calls in a few standard library modules. Here is a demo showing how to trigger it (at least on Linux): from socket import create_connection, SHUT_RDWR from

[issue16473] quopri module differences in quoted-printable text with whitespace

2015-01-18 Thread Martin Panter
Martin Panter added the comment: Three slightly different points here: 1. Decoding trailing whitespace: My understanding is quoted-printable encoding aims to be tolerant of whitespace being added to and removed from the end of encoded lines. So I assume the “binascii” module is wrong to leave

[issue21869] Clean up quopri, correct method names encodestring and decodestring

2015-01-18 Thread Martin Panter
Martin Panter added the comment: Personally I don’t have a problem with the names; I would consider str(), bytes(), bytearray() types all to be “strings”. However there is precedent in the “base64” module for renaming to en/decodebytes(); see Issue 3613. -- nosy: +vadmium

[issue17840] base64_codec uses assert for runtime validity checks

2015-01-18 Thread Martin Panter
Martin Panter added the comment: Is this patch likely to go ahead? It has been sitting around a while and would conflict with patches I am working on. If so, I reckon it would be good to factor out some of the new bits of code (_check_strict, _StrictErrors) into a common place, like the

[issue16473] quopri module differences in quoted-printable text with whitespace

2015-01-18 Thread Martin Panter
Martin Panter added the comment: Regarding decoding trailing whitespace, <https://tools.ietf.org/html/rfc1521.html#section-5.1> rule #3 says: “When decoding a Quoted-Printable body, any trailing white space on a line must be deleted, as it will necessarily have been added by interm

[issue17840] base64_codec uses assert for runtime validity checks

2015-01-18 Thread Martin Panter
Martin Panter added the comment: Would also be good to document that errors='ignored' is not allowed. Currently the documentation says The following string values are defined and implemented by all standard Python codecs: * 'st

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Hi Demian, my intention is to demonstrate normal usage of Python’s HTTP client, whether or not its implementation misbehaves. I am trying to demonstrate a valid persistent server that happens to decide to close the connection after the first request but before

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Calling self.wfile.write(b"") should be equivalent to not calling write() at all, as far as I understand. Using strace, it does not seem to invoke send() at all. So the result will depend on what is written next. In the case of my code, nothing is wr

[issue20121] quopri_codec newline handling

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Here is patch v2, which fixes some more bugs I uncovered in the quoted-printable encoders: * The binascii version would unnecessarily break a 76-character line (maximum length) if it would end with an =XX escape code * The native Python version would insert

[issue20898] Missing 507 response description

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Just noticed the new documentation says “http.HTTPStatus.OK is also available as . . . http.server.OK”. I think this is wrong; only the client module (and now the top-level package) have those constants. The enum values are only available in the server module

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Yeah I’m happy to put a patch together, once I have an idea of the details. I’d also like to understand your scenario that would mislead the user to believe that the connection has been closed when it actually hasn’t. Can you give a concrete example or

[issue1508475] transparent gzip compression in urllib

2015-01-20 Thread Martin Panter
Martin Panter added the comment: The Lib/xmlrpc/client.py file appears to already support compression using “Content-Encoding: gzip”. Perhaps it could be leveraged for any work on this issue. -- ___ Python tracker <http://bugs.python.

[issue23275] Can assign [] = (), but not () = []

2015-01-20 Thread Martin Panter
Martin Panter added the comment: But () is the odd one out if you consider >>> [a, b] = range(2) >>> [] = range(0) >>> (a, b) = range(2) >>> () = range(0) File "", line 1 SyntaxError: can't assign to () -- nosy: +vadmium __

[issue23302] Small fixes around the use of TCP MSS in http.client

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

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is a patch, including tests and documentation. It ended up a bit more complicated than I anticipated, so I’m interested in hearing other ideas or options. * Added http.client.ConnectionClosed exception * HTTPConnection.close() is implicitly called for a

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2015-01-24 Thread Martin Panter
Martin Panter added the comment: The reference to @functools.total_ordering was actually already there; I just moved it into the paragraph about relationships between the operators. I should also point out that my description of the default __ne__() assumes that Issue 21408 is resolved; the

[issue9740] Support for HTTP 1.1 persistent connections throughout the standard library

2015-01-24 Thread Martin Panter
Martin Panter added the comment: See Issue 3566 about tweaking the “http.client” module’s BadStatusLine handling to be more helpful when implementing persistent connections. I am dumping some thoughts here about persistent connections with the “http.client” module, gained by working on that

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Updated v2 patch. This version avoids intruding into the HTTPConnection.connect() implementation, so that users, tests, etc may still set the undocumented “sock” attribute without calling the base connect() method. Also code style changes based on feedback to

[issue23232] 'codecs' module functionality + its docs -- concerning custom codecs, especially non-string ones

2015-01-24 Thread Martin Panter
Martin Panter added the comment: I am certainly no expert, but this is how I understand the three different kinds of codecs are used: * Stateless codecs: str.encode(), bytes.decode(), etc * Incremental codecs: TextIOWrapper, IncrementalNewlineDecoder * Stream codecs: only stuff inside the

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

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is a new patch which fixes the bytes-to-bytes incremental codecs. It depends on my patches for these other issues being applied first: * Issue 23231: Bytes-to-bytes support for iteren/decode() * Issue 13881: Generic StreamWriter from IncrementalEncoder

[issue21279] str.translate documentation incomplete

2015-01-24 Thread Martin Panter
Martin Panter added the comment: I’m happy with the new wording in v5. Maybe the docstring in the C module could be reflowed though. -- ___ Python tracker <http://bugs.python.org/issue21

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

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is patch v4. The stream writer is now automatically generated by default by the CodecInfo constructor if no custom stream writer parameter is supplied. The base64 and quopri codecs are adjusted to also use this default stream writer to help with Issue

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

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

[issue23320] devguide should mention rules about "paragraph reflow" in the documentation

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

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2015-01-25 Thread Martin Panter
Martin Panter added the comment: Adding a new patch that just fixes the typo error in the first patch -- Added file: http://bugs.python.org/file37859/default-ne-reflected-priority.v2.patch ___ Python tracker <http://bugs.python.org/issue4

[issue21408] delegation of `!=` to the right-hand side argument is not always done

2015-01-25 Thread Martin Panter
Martin Panter added the comment: I looked over your __ne__ removals from the library, and they all seem sensible to me. -- ___ Python tracker <http://bugs.python.org/issue21

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-25 Thread Martin Panter
Martin Panter added the comment: Thanks for the reviews. I agree about the new HTTPResponse flag being a bit awkward; the HTTPResponse class should probably raise the ConnectionClosed exception in all cases. I was wondering if the the HTTPConnection class should wrap this in a

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

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

[issue23334] http.client refactor

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

[issue23342] run() - unified high-level interface for subprocess

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

[issue22989] HTTPResponse.msg not as documented

2015-01-28 Thread Martin Panter
Martin Panter added the comment: Documenting the “headers” attribute is also discussed in Issue 12707 -- ___ Python tracker <http://bugs.python.org/issue22

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2015-01-28 Thread Martin Panter
Martin Panter added the comment: Related: Issue 12707, about deprecating some methods in favour of attributes -- ___ Python tracker <http://bugs.python.org/issue21

[issue12707] Deprecate addinfourl getters

2015-01-28 Thread Martin Panter
Martin Panter added the comment: I think it would be okay to deprecate the methods in the documentation, but they should not be removed nor trigger warnings any time soon. Currently the following related methods and attributes are documented: * addinfourl.getcode() == HTTPResponse.status

[issue12707] Deprecate addinfourl getters

2015-01-28 Thread Martin Panter
Martin Panter added the comment: Blessing a geturl() method or “url” attribute on HTTPError might require Issue 13567 to be fixed -- ___ Python tracker <http://bugs.python.org/issue12

[issue23350] Content-length is incorrect when request body is a list or tuple

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

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-01-29 Thread Martin Panter
Martin Panter added the comment: [Edit Error: 'utf8' codec can't decode byte 0xe2 in position 207: invalid continuation byte] The documentation currently says “Content-Length header should be explicitly provided when the body is an iterable”. See Lib/urllib/request.py:1133 for

[issue13322] buffered read() and write() does not raise BlockingIOError

2015-01-29 Thread Martin Panter
Martin Panter added the comment: My experiments with buffered and unbuffered readers wrapping a non-blocking TCP socket, with no data received: Method Buffered impl. Buffered doc.SocketIO impl. RawIOBase doc

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2015-01-29 Thread Martin Panter
Martin Panter added the comment: The non-blocking behaviour that I documented in my patch is under question in Issue 13322. I think it would be nice change the implementation to either return None or raise BlockingIOError. -- ___ Python tracker

[issue23350] Content-length is incorrect when request body is a list or tuple

2015-01-30 Thread Martin Panter
Martin Panter added the comment: Sorry my comment was a bit rushed. I wasn’t saying this feature shouldn’t be added. I guess I was pointing out two things: 1. Someone should updated the documentation to say that Content-Length no longer has to be explicitly provided for lists and tuples. 2

[issue15955] gzip, bz2, lzma: add option to limit output size

2015-01-30 Thread Martin Panter
Martin Panter added the comment: Nikolaus, do you still plan on doing the bzip module? If not, I could have a go when I get a chance. I’m also keen for the GzipFile decompression to be fixed, if anyone wants to review my gzip-bomb.patch

[issue23326] Remove redundant __ne__ implementations

2015-01-31 Thread Martin Panter
Martin Panter added the comment: I looked at all the instances of __ne__() identified in the patch, and they all seem redundant with the __eq__() implementations, so I think this patch is good. -- ___ Python tracker <http://bugs.python.

[issue23342] run() - unified high-level interface for subprocess

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Maybe you don’t want to touch the implementation of the “older high-level API” for fear of subtly breaking something, but for clarification, and perhaps documentation, would the old functions now be equivalent to this? def call(***): # Verify PIPE not in

[issue23358] BaseServer missing from socketserver.__all__

2015-01-31 Thread Martin Panter
New submission from Martin Panter: This patch adds BaseServer to __all__. It also adds a test case that should automatically fail if someone defines a new function or class in the “socketserver” module and does not update __all__. -- components: Library (Lib) files: socketserver

[issue23254] Document how to close the TCPServer listening socket

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is a simple patch to add server_close() to the documentation, and a simple test to ensure it closes the socket. -- keywords: +patch versions: +Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37940/server_close.patch

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-31 Thread Martin Panter
Martin Panter added the comment: I have changed my opinion of the “peek hack” from <https://bugs.python.org/issue3566#msg231413>. It would be useful when doing non-idempotent requests like POST, to avoid sending a request when we know it is going to fail. I looked into how to implement

[issue23342] run() - unified high-level interface for subprocess

2015-01-31 Thread Martin Panter
Martin Panter added the comment: It’s okay to leave them as independent classes, if you don’t want multiple inheritance. I was just putting the idea out there. It is a similar pattern to the HTTPError exception and HTTPResponse return value for urlopen

[issue23358] BaseServer missing from socketserver.__all__

2015-01-31 Thread Martin Panter
Martin Panter added the comment: New test case looks good. Checking for the underscore prefix is how I would have done it too, if I had realized it was needed :) I’m not qualified to comment on removing the run_unittest() call. -- ___ Python

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is an enhancement to the existing SimpleHTTPServerTestCase.test_get() test case, that demonstrates the current implementation breaks serving index.html files by default. -- Added file: http://bugs.python.org/file37947/index-test.patch

[issue23099] BytesIO and StringIO values unavailable when closed

2015-01-31 Thread Martin Panter
Martin Panter added the comment: I can live with the wording of StringIO, but personally prefer my v2 patch. I now understand that calling close() for Bytes and StringIO objects is intended to immediately free the memory buffer holding the file data (like deleting a file in Windows). So I

[issue12916] Add inspect.splitdoc

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is a 4th patch that allows None as input. Other changes: * Document and test getdoc() returning None * Limited the splitting and re-joining dance * Document when the synopsis and body strings are empty * More test cases I left the pydoc test there, though

[issue12916] Add inspect.splitdoc

2015-01-31 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file37948/issue12916-splitdoc-4.patch ___ Python tracker <http://bugs.python.org/issue12916> ___ ___ Pytho

[issue12916] Add inspect.splitdoc

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Oops, seems I forgot to refresh my patch -- Added file: http://bugs.python.org/file37949/issue12916-splitdoc-4.patch ___ Python tracker <http://bugs.python.org/issue12

[issue15608] Improve socketserver doc

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is an attempt to tidy up the socketserver documentation: 1. Added headings for each concrete class and mixin 2. Listed the predefined mixin subclasses 3. Changed RequestHandler to BaseRequestHandler and added class heading 4. Included headings for

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Here is another addition to the existing test suite to detect the bug with the duplicate 404 Not Found responses. It relies on running the non-Windows, non-root test that says # chmod() doesn't work as expected on Windows, and filesystem # permission

[issue12916] Add inspect.splitdoc

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Uploading issue12916-splitdoc-5.patch: * Documented TypeError * Added stacklevel=2 to warning * Test improvements * Dropped the test for pydoc.splitdoc() removal -- Added file: http://bugs.python.org/file37956/issue12916-splitdoc-5.patch

[issue15608] Improve socketserver doc

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Main changes in socketserver-doc.2.patch: * Documented constructor parameters for the server classes * Indented class methods and attributes underneath class headings -- Added file: http://bugs.python.org/file37957/socketserver-doc.2.patch

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

2015-02-01 Thread Martin Panter
New submission from Martin Panter: Currently the documentation gives the impression that the “data” parameter to Request() has to be in the application/x-www-form-urlencoded format. However I suspect that you can override the type by supplying a Content-Type header, and I would like to

[issue12916] Add inspect.splitdoc

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Yes, this is based on your patch, Stéphane. On top of it I added support for splitdoc(None), and made the other changes in the bullet points. -- ___ Python tracker <http://bugs.python.org/issue12

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Maybe because a pager sends its bytes more-or-less straight throught from input to output, the PYTHONIOENCODING (sys.stdout.encoding?) should be used for the TextIOWrapper to the pager’s input in this case. I’m not so sure this should be assumed in general

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-01 Thread Martin Panter
Martin Panter added the comment: _CData.from_buffer() is meant to take a writable buffer, and create a “ctypes” object that shares the same memory. So it should not release the buffer until that “ctypes” object is no longer needed. However I don’t know the insides of memoryview() objects that

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

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Updated patch to explain that a Request object is generated internally for urlopen(data=...), and added a test to confirm. Also removed some confusing dead code. -- Added file: http://bugs.python.org/file37972/non-urlencoded.2.patch

[issue23099] BytesIO and StringIO values unavailable when closed

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Here is an option that moves the documentation for discarding the buffer into the class description for both BytesIO and StringIO; what do you think? I would be happy enough with any of the last three patches, so I don’t want to hold this up forever

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-02 Thread Martin Panter
Martin Panter added the comment: You’re welcome to merge my test patch into yours if you want to. Or I could open a separate issue for it, I don’t mind. -- ___ Python tracker <http://bugs.python.org/issue23

[issue13322] buffered read() and write() does not raise BlockingIOError

2015-02-02 Thread Martin Panter
Martin Panter added the comment: Looking at test_io.BufferedReaderTest.test_read_non_blocking(), at Lib/test/test_io.py:1037, there are explicit tests for ‘peek(1) == b"" ’ and ‘read() is None’. The peek() test was added in revision 3049ac17e256, in 2009 (large merge of “io” impleme

[issue23377] HTTPResponse may drop buffer holding next response

2015-02-02 Thread Martin Panter
New submission from Martin Panter: This is the same issue raised at <https://bugs.python.org/issue4879#msg91597>. Currently, every time a new response is to be received, HTTPConnection passes its raw socket object to HTTPResponse, which calls sock.makefile("rb") and creates

[issue4879] Allow buffering for HTTPResponse

2015-02-02 Thread Martin Panter
Martin Panter added the comment: Opened Issue 23377 for the problem of dropping extra buffered data at the end of a response. -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue4

[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Martin Panter
Martin Panter added the comment: Regarding the documentation patch: I like to start sentences with a capital letter. Perhaps change it to start “Calling :func:`exit` only terminates . . .”. With the code change patch, it might be neater to use the SystemExit.code attribute rather than e.args

[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Martin Panter
Martin Panter added the comment: New patches look fine. BTW SystemExit.code is also documented at <https://docs.python.org/dev/library/exceptions.html#SystemExit>. -- ___ Python tracker <http://bugs.python.org/

[issue13322] buffered read() and write() does not raise BlockingIOError

2015-02-02 Thread Martin Panter
Martin Panter added the comment: I’m adding nonblock-none.patch, which changes all the simple buffered read methods to return None when there is no non-blocking data available. I’d be interested to see if other people thought this was a sensible change. * Documented existing behaviour of C

[issue2786] Names in traceback should have class names, if they're methods

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

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-02-03 Thread Martin Panter
New submission from Martin Panter: Seems to have been removed in revision 097f4fda61a4, for PEP 3151. The older EnvironmentError documentation talks about creating the exception with two and three constructor arguments, however I don’t see this in the new documentation. Is this usage meant to

[issue20413] Errors in documentation of standard codec error handlers

2015-02-06 Thread Martin Panter
Martin Panter added the comment: I changed “code point in the Unicode Private Use Area” to “individual surrogate code” in the “codecs” module documentation for Issue 19548. So perhaps (a) still needs addressing, but (b) and (c) are hopefully already fixed. -- nosy: +vadmium

[issue23285] PEP 475 - EINTR handling

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

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