Changes by Martin Panter :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
Changes by Martin Panter :
Added file: https://bugs.python.org/file44237/Python3.6.ctypes.160823.patch
___
Python tracker
<https://bugs.python.org/issue26439>
___
___
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
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
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
Changes by Martin Panter :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Martin Panter added the comment:
Is this a duplicate of Issue 24052?
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue24045>
___
___
Pytho
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
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"")
-
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
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
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.
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
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue9951>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
I always assumed that None was a unwise value to pass to the “os.path”
functions. Indeed, at the top of the documentation page it says they only
accept bytes or (text) string parameters. Although returning a consistent error
might be a sensible addition
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue22601>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue22599>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
For the record, the python-dev thread about blocking imports is at
<https://mail.python.org/pipermail/python-dev/2013-October/129907.html>. It
sounded like the conclusion was that there shouldn’t be a problem importing a
module at finalization.
Martin Panter added the comment:
[padding to avoid UTF-8 error with bug tracker]
See also Issue 22374, where an equivalent of “patch.object” is suggested as an
example context manager for the “contextlib” documentation.
If we added a plain function or context manager rather than a new
Martin Panter added the comment:
Issue 12067 has a large patch in progress that would conflict with the changes
suggested here. However most of the concerns here may already be addressed
there, if the patch ever goes ahead.
--
nosy: +vadmium
Martin Panter added the comment:
Maybe it would be wise to split this task up and commit the bits that don’t
need any more work. I think the existing patch might already solve Issue 22001.
--
___
Python tracker
<http://bugs.python.org/issue12
Martin Panter added the comment:
About the byte sequence comparisons, I wondered if it was misleading to say
that a list(), tuple() or range() can only be compared to the same type,
without mentioning that bytes() and bytearray() can be compared to each other.
BTW just noticed you say range
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue15944>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue21436>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Martin Panter:
Continuing on from Issue 22247 (other out-of-date __all__ attributes),
shutil.__all__ is missing (at least) get_terminal_size(), which was implemented
for Issue 13609.
--
components: Library (Lib)
messages: 229630
nosy: vadmium
priority: normal
Martin Panter added the comment:
Is there anything else that needs doing to get this committed and resolved? My
patch is just a trivial reordering of Evens’s, with about one sentence deleted.
--
___
Python tracker
<http://bugs.python.org/issue21
Martin Panter added the comment:
Looking at Lib/test/test___all__.py, that module just makes sure that the names
imported with “from ... import *” are the same as listed in the __all__
attribute. It does no know what the __all__ attribute is meant to contain
Martin Panter added the comment:
See also Issue 10976, discussing passing bytes() strings to json.loads()
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue10
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue19837>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Issue 17909 (auto-detecting JSON encoding) looks like it has a patch which
would probably satisfy this issue
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue10
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue17909>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue22678>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
The new text seems reasonable to me on its own, however I still think the
heapsort() docstring needs updating as well
--
___
Python tracker
<http://bugs.python.org/issue22
Martin Panter added the comment:
If you adjusted the detect_encoding() logic according to Pete Cordell’s table
at the bottom of
<http://www.ietf.org/mail-archive/web/json/current/msg01959.html>, it might
work for standalone strings.
However since the RFC encourages UTF-8 fo
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue21650>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
The patch seems reasonable to me
--
___
Python tracker
<http://bugs.python.org/issue22153>
___
___
Python-bugs-list mailin
Martin Panter added the comment:
Do you mean pretending there is no default “methodName” value, or pretending
that the runTest() method is not invoked by discovery?
I would have to check, but I think I have relied on the runTest() method being
discovered in the past, when I did not think a
Martin Panter added the comment:
As uncovered in Issue 12855, str.splitlines() currently considers the FS, GS
and RS (1C–1E), but not the US (1F), to be line breaks. It might be surprising
if these are no longer considered white space but are still considered line
breaks.
--
nosy
Martin Panter added the comment:
One exception that comes to mind is generators. According to Issue 13814, it is
deliberate that you have to call close(), so perhaps someone could come up with
an example based on that.
--
nosy: +vadmium
___
Python
Martin Panter added the comment:
Removing stuff from the documentation would make it hard to understand what
existing code means that uses runTest(). Isn’t this a case where you would add
a big red “Deprecated since version . . .” warning instead? Maybe a comprimise
would be to “hide” its
New submission from Martin Panter:
I encountered this when I added a unit test case that invoked os.chdir() with a
temporary directory on Linux. After the directory was removed, some of the
subsequent test cases failed, although I don’t think they should depend on a
particular CWD.
I suspect
Martin Panter added the comment:
This is one that has often bugged me. When your repr() implementation is
broken, it is quite confusing figuring out what is going wrong. Falling back to
object.__repr__() is one option, however I would probably be happy with a
simple “exception in repr
Martin Panter added the comment:
Shouldn’t this issue be marked closed and fixed?
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue13444>
___
___
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue22852>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Similarly for the readable(), seekable() and writable() documentation
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue22
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue19777>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
The only time I see a warning would be useful is if you intended to override a
standard module with a module of the same name in the current directory. In all
other cases I think it would be better to either generate an ImportError if the
module is not found
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue22867>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
As far as I can tell, the “line” attribute isn’t documented anyway. But Issue
8450 is opened about improving the exception when the connection is closed.
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.
Martin Panter added the comment:
I suggest this is the same situation as Issue 6785, and is not a bug in Python.
However it might be reasonable to allow forcing a HTTP client connection to
version 1.0, which could be used as a workaround
Martin Panter added the comment:
See also Issue 3566, which also brings up the false BadStatusLine exception,
and suggests some kind of retry logic.
Whatever exception it is, it could be documented better. In Issue 66621, the
poster thought it should be an IncompleteRead exception
Martin Panter added the comment:
Sorry the IncompleteRead reference was meant to be Issue 666219
--
___
Python tracker
<http://bugs.python.org/issue8450>
___
___
Martin Panter added the comment:
I don’t think the peek hack needs to go into to the standard library. It is
just a workaround for code using the current library, to differentiate an empty
status line due to EOF from any other kind of “bad” status line. This is what
Issue 8450, “False
Martin Panter added the comment:
Hi Serhiy, I submitted the form online on 22 Nov; just patiently waiting for it
to come through now.
In the last few minutes I noticed an asterisk has appeared against my name on
the bug tracker, so hopefully it is all good now
Martin Panter added the comment:
Looks like revision 561d1d0de518 was to fix this issue, but the NEWS entry has
the wrong reference number
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue22
New submission from Martin Panter:
The following code generates a connection reset error on Wine (Windows
emulator, because I don’t have actual Windows to test on). Probably only a
minor issue, but the error message isn’t quite right:
>>> s = create_connection(("lo
Martin Panter added the comment:
See Issue 21228 for a patch which documents the “.msg” hack, and that the
info() method is available for HTTP responses.
I think documenting the “.headers” attribute would be a bad idea, because it is
introducing yet another way to do what the almost
Martin Panter added the comment:
Updated patch with indentation fixed and new wording. I am just guessing the
RST syntax based on the surrounding text, so please review :)
--
Added file: http://bugs.python.org/file37372/runtest.patch
___
Python
Changes by Martin Panter :
Added file: http://bugs.python.org/file37377/runTest2-3.4.patch
___
Python tracker
<http://bugs.python.org/issue22153>
___
___
Python-bug
Martin Panter added the comment:
Updated patch, which applies to current tip of the default branch, and includes
the formatting fix. Also including a version that applies to the 3.4 branch.
Alternatively, if you patch the 3.4 branch it looks like merging to default
automatically gives the
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue18373>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue18679>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Martin Panter :
--
nosy: +vadmium
___
Python tracker
<http://bugs.python.org/issue5166>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Update patch with typo fixed, removed note about the “codecs” module (which I
never found useful either), and updated the doc string with similar wording.
Terry, do you think the wording in the patch is good enough, or do you think
some of your proposed
Martin Panter added the comment:
I have been bitten by this when attempting to implement my own event loops.
Parts of the “asyncio” code itself expects that the callback is not invoked
directly after call_soon() returns. Here is a simple patch.
--
keywords: +patch
nosy: +vadmium
New submission from Martin Panter:
The documentation mentions BaseEventLoop as an attribute of the “asyncio”
module, but it is not actually there (at least in v3.4.2). I have to import it
specially from “asyncio.base_events”. Is this an oversight in the
documentation, or am I relying on
Martin Panter added the comment:
I’m largely happy with any of these revisions. If I end up doing another patch
I would omit the *str* (it is a class name, not a parameter). Also I would omit
the range(2^20) claim. Unless people think it is important; why is it different
to sys.maxunicode + 1
Martin Panter added the comment:
There could be potential for breaking compatibility if people are intentionally
sending values with folded lines (obsoleted by the new HTTP RFC).
Perhaps the same error should be raised for values that cannot be encoded in
Latin-1? Also, maybe most control
New submission from Martin Panter:
In Lib/test/test_argparse.py:
class TestHelpVersionOptional(HelpTestCase):
"""Test that the --version argument can be suppressed help messages"""
Assuming that the docstring means something like “. . . can be suppressed _in
Martin Panter added the comment:
Here is much larger patch in the spirit of Ryan’s, that fixes the
documentation, adjusts the tests, and some of the internal comments and
variable names in the source code as well. However if some changes are too
controversial, I am happy to simplify it to
Martin Panter added the comment:
Here is a patch to fix this by calling wait() even if stdin.close() fails,
including a test case. With my patch, the subprocess context manager __exit__()
will still raise a BrokenPipeError, but no zombie will be left.
--
keywords: +patch
Added file
Martin Panter added the comment:
Not exactly sure what do you want the Python library to do, but perhaps this is
a duplicate of Issue 8450, about making the error less misleading when the
connection is closed before _any_ status line is sent. See also Issue 7427.
--
nosy: +vadmium
Martin Panter added the comment:
Actually the “struct” module doc string seems to already hint that format
strings can be byte strings:
“Python bytes objects are used to hold the data representing the C struct and
also as format strings
Martin Panter added the comment:
It seems to me that the simplest fix is to document:
1. Struct.format attribute is a byte string
2. The input format strings for struct.pack(), Struct class, etc, are also
allowed to be byte strings, for consistency (Issue 16349)
Here is a patch that does that
Martin Panter added the comment:
I’m far from an expert on the C API, but I was looking for a way to inspect a
“builtin_function_or_method” a.k.a. PyCFunction_Type a.k.a.
types.BuiltinMethodType, and ended up looking at the “Instance Method Objects”
section. So maybe your functions should go
Martin Panter added the comment:
Since the doctype() method doesn’t appear to be removed from the “default”
(3.5?) branch either, here is a patch that avoids the deprecation warning when
inheriting method + a test.
Hopefully this will be useful when you get some time to look at it. I’m not
Changes by Martin Panter :
--
title: RFC 2387 in email package -> RFC 2387 (multipart/related) in email
package
___
Python tracker
<http://bugs.python.org/issue
Martin Panter added the comment:
Here is a patch with my suggestion. It also now refers to _the_ dictionary
rather than just _a_ dictionary, and drops the word “current”, so that it does
not sound like saving a snapshot.
--
keywords: +patch
Added file: http://bugs.python.org/file37478
Changes by Martin Panter :
Removed file: http://bugs.python.org/file37478/globals-copy.patch
___
Python tracker
<http://bugs.python.org/issue19737>
___
___
Python-bug
Changes by Martin Panter :
Added file: http://bugs.python.org/file37479/globals-copy.patch
___
Python tracker
<http://bugs.python.org/issue19737>
___
___
Python-bug
Martin Panter added the comment:
I would go for raising ValueError for port numbers out of range. The value of
None was already defined to mean that no port is included in the URL.
Also, the ValueError exception should be documented. It is surprising that
urlsplit() does not raise any
Martin Panter added the comment:
I think a global registry seems like overkill. Here is a patch to make
urljoin() treat schemes more equally and work with arbitrary schemes
automatically. I haven’t heard any arguments against this option yet, and it
didn’t break any tests.
Another option
New submission from Martin Panter:
First ones I noticed were codecs.encode() and codecs.decode(). Here is a list
of other candidates, although they are not all documented, so maybe should not
all be in __all__.
>>> import codecs
>>> public = (a for a in dir(codecs) i
Martin Panter added the comment:
Okay I will try and make a patch for this once I have finished a patch to
revise the documentation for Issue 19548
--
___
Python tracker
<http://bugs.python.org/issue23
Martin Panter added the comment:
RFC 1521 says that a text newline should be encoded as CRLF, and that any
combination of 0x0D and 0x0A bytes that do not represent newlines should be
encoded like other control characters as =0D and =0A.
Since in Python 3 the codec outputs bytes, I don’t think
Martin Panter added the comment:
Okay so maybe the documentation should include these restrictions on encoding:
* The data being encoded should only include \r or \n bytes that are part of \n
or \r\n newline sequences. Encoding arbitrary non-text data is not supported.
* The two kinds of
1501 - 1600 of 4320 matches
Mail list logo