Martin Panter added the comment:
Thanks for you help figuring this out Serhiy, especially for the Python 2 case.
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Martin Panter added the comment:
My guess is the file.startswith(basedir) in the getdocloc() method is getting
tricked by non-canonical paths (e.g. lowercase vs uppercase C: drive?). Would
it help to use something like os.path.normcase(), or maybe
os.path.commonpath(), pathlib.PurePath.parts
Martin Panter added the comment:
Victor originally opened this mentioning a 256-byte limit. I guess that comes
from Open BSD’s getentropy() function:
<http://man.openbsd.org/OpenBSD-current/getentropy.2>. Solaris’s getrandom()
function <https://docs.oracle.com/cd/E53394_01/ht
Martin Panter added the comment:
HTTP header fields are not supposed to have line breaks unless followed by a
space or tab. So the server is actually providing a faulty response.
However Python could do better at handling this case. There is already a bug
open for this: Issue 24363.
For the
Changes by Martin Panter :
--
versions: +Python 3.6 -Python 3.4
___
Python tracker
<http://bugs.python.org/issue24363>
___
___
Python-bugs-list mailing list
Unsub
Martin Panter added the comment:
Revision 3f49e89be8a9 seems to be the cause of an x86 Tiger buildbot failure:
http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/10924/steps/test/logs/stdio
==
FAIL
Martin Panter added the comment:
Test_fspath_protocol_bytes() (added in revision 5a62d682636e) fails on Windows:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds//steps/test/logs/stdio
==
ERROR
Martin Panter added the comment:
Thanks Kaushik. I also changed the https:// detection to also detect http://,
to maintain backwards compatibility.
I am porting these changes to 2.7.
--
versions: +Python 2.7
___
Python tracker
<h
Martin Panter added the comment:
Thanks for the review. I committed my patch in the hope that it makes it into
3.5.2, but if people want to suggest further improvements etc that is okay.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -&g
Martin Panter added the comment:
See also Issue 27273, proposing to use text string input as an indicator to
turn on universal_newlines=True in the higher-level functions. I’m not excited
by either proposal, but I find the other one a bit more palatable.
IMO allowing text string input to
Martin Panter added the comment:
.
Summary: There was originally a bug, but it has been fixed. At best, we leave
this open to work on including Andrew’s patch.
Andrew’s patch adds a modified copy of
test_universal_newlines_communicate_stdin(). But it does not look correct, and
would fail on
Changes by Martin Panter :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue16484>
___
___
Python-bugs-list mailing list
Unsubscrib
Martin Panter added the comment:
.
Michael, how are you supposed to apply your latest patch? I have Gnu Patch
2.7.5, but even in the best case it doesn’t find the files to patch:
$ patch -p1 -n < python.Lib.ctypes.160608.patch
can't find file to patch at input line 2
The text leadi
Martin Panter added the comment:
I updated the patch to fix the error handling and memory leak. it also now
skips the test in case the locale cannot encode the test data.
--
Added file: http://bugs.python.org/file43359/readline_locale.v4.patch
Changes by Martin Panter :
--
dependencies: +Avoid entity expansion attacks in Element Tree, xml.sax and
xml.dom fetch DTDs by default
___
Python tracker
<http://bugs.python.org/issue17
Martin Panter added the comment:
Okay changing to ::1 might have a decent chance of success. If nobody else
comes forward, I can try committing it and see if it fixes the buildbot.
--
___
Python tracker
<http://bugs.python.org/issue27
Martin Panter added the comment:
Merged with current code, and migrated the interrupted-write test from
test_wsgiref into test_socketserver.
--
Added file: http://bugs.python.org/file43365/buffered-wfile.v3.patch
___
Python tracker
<h
Martin Panter added the comment:
Forgot to remove the workaround added to 3.5 for wsgiref in Issue 24291
--
Added file: http://bugs.python.org/file43366/buffered-wfile.v4.patch
___
Python tracker
<http://bugs.python.org/issue26
Martin Panter added the comment:
See also Issue 26686; the same problem, but with parsing RFC5322 header fields,
rather than HTTP.
--
___
Python tracker
<http://bugs.python.org/issue24
Martin Panter added the comment:
There are already the makings of an alternative API:
https://docs.python.org/3.6/library/email.message.html#email.message.Message.add_header
There is also replace_header(), but it only replaces the _first_ header field,
and leaves later ones untouched. However
Martin Panter added the comment:
I propose to reject this. Close() should always close the underlying file
descriptor or socket, even if there is a blocking error or other exception.
--
resolution: -> rejected
status: open -> pending
___
Martin Panter added the comment:
Victor, why did you change the title to specify non-blocking mode? I think
blocking mode can also be handled at the same time.
I propose:
1. In existing versions (2.7, 3.5): Document that it is undefined what
IOBase.writelines() will do if a write() call does
Martin Panter added the comment:
Should the skip logic perhaps check for sys.platform == "win32" instead? The
buildbots are still failing.
--
___
Python tracker
<http://bugs.python.o
Martin Panter added the comment:
I went with os.name == "nt", which is what other scandir() tests use. I’m not
sure there is a practical different. Anyway the buildbots seem happier now.
--
___
Python tracker
<http://bugs.python.o
Martin Panter added the comment:
FWIW in the HTTP bug <https://bugs.python.org/issue24363#msg244676>, David said
“when seeing a line that doesn't look like a header the error recovery is to
treat that line as the beginning of the body (ie: assume the blank line is
missing).
Martin Panter added the comment:
Alexander: does my latest patch linebreakdoc.v5.py2.7.patch address your
concerns about the 2.7 documentation? If so, I can push it to the repository.
--
___
Python tracker
<http://bugs.python.org/issue12
Martin Panter added the comment:
Looks like you are right. The change in the implementation happened in revision
19196cce1431.
--
keywords: +easy
nosy: +martin.panter
stage: -> needs patch
versions: -Python 3.4
___
Python tracker
&l
Martin Panter added the comment:
I get two other test suite failures if I set PYTHONIOENCODING, so I am not
going to bother addressing this in test_readline :)
FAIL: test_forced_io_encoding (test.test_capi.EmbeddingTests)
FAIL: test_7 (test.test_pkg.TestPkg
Martin Panter added the comment:
Updated Py 2 patch to v5 with the added GCC comment
--
Added file: http://bugs.python.org/file43383/ctypes_util_popen-5.py2.patch
___
Python tracker
<http://bugs.python.org/issue22
Martin Panter added the comment:
An Open Indiana buildbot failed. The old code let the shell print any errors
about missing programs to /dev/null, so I will change the subprocess calls to
handle OSError.
==
ERROR: setUpModule
Martin Panter added the comment:
Buildbots look happy with test_asyncio now, so closing again.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
Martin Panter added the comment:
Failures from AMD64 Snow Leop buildbots:
==
FAIL: test_nonascii_history (test.test_readline.TestHistoryManipulation
Martin Panter added the comment:
Matthias: your change causes pydoc to raise KeyError if I set MANPAGER but not
PAGER. I’m guessing you intended something else?
--
nosy: +martin.panter
versions: +Python 3.6 -Python 3.3
___
Python tracker
<h
Martin Panter added the comment:
Thanks, that version looks more sensible
--
___
Python tracker
<http://bugs.python.org/issue8637>
___
___
Python-bugs-list mailin
Martin Panter added the comment:
Does Debian use PAGER or MANPAGER? What’s the advantage of the “pager” command
in addition?
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue27
Martin Panter added the comment:
Also need a fix for missing set_pre_input_hook() on the AIX buildbot:
==
FAIL: test_nonascii (test.test_readline.TestReadline
Martin Panter added the comment:
I made a patch to fix all header section parsing by default in the email module
(see Issue 26686). I’m not 100% sure if it is safe in general, but if it is, it
would fix this bug.
--
dependencies: +email.parser stops parsing headers too soon
Martin Panter added the comment:
Updated Py 2 patch to handle OSError when shell=True is not used
--
Added file: http://bugs.python.org/file43387/ctypes_util_popen-6.py2.patch
___
Python tracker
<http://bugs.python.org/issue22
Martin Panter added the comment:
Thanks John
--
stage: needs patch -> commit review
___
Python tracker
<http://bugs.python.org/issue27311>
___
___
Python-
Martin Panter added the comment:
Yeah I think your change is enough.
Adding a cast would solve this compiler warning:
Python/random.c:168:17: warning: conversion to ‘int’ from ‘long int’ may alter
its value [-Wconversion]
n = syscall(SYS_getrandom, dest, n, flags
Martin Panter added the comment:
Think I got all the bugs fixed here.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Martin Panter :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Martin Panter :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12855>
___
___
Pyth
Martin Panter added the comment:
Thanks for working on this. I did a pass over your patch and left a bunch of
comments.
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issu
New submission from Martin Panter:
In trying to understand the defects from parsing an email Message object, and
trying to use the raise_on_defect=True mode, I found a few inconsistencies with
the documentation. I made a preliminary patch, but it may need adjusting.
1. There is no class
Martin Panter added the comment:
In particular, I noticed InvalidHeaderDefect is not raised if a header line
begins with a colon (:), and also MisplacedEnvelopeHeaderDefect, if a header
line begins "From ", including a space, and is neither the first or last line
of the head
Changes by Martin Panter :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue27329>
___
___
Python-bugs-list mailing list
Unsubscrib
Martin Panter added the comment:
As far as this bug goes, 3.5 is not very different from 2.7
--
nosy: +martin.panter
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue27
Martin Panter added the comment:
Here is a possible patch for 3.5+ based on my modest understanding of the
concerns about insecure results and blocking. I hope that my wording is clear,
couldn’t be confused with Linux’s /dev/random blocking and running out of fresh
entropy, etc.
I also tried
Martin Panter added the comment:
Mostly looks good. I left a two comments.
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue27330>
___
___
Martin Panter added the comment:
I will try to have a closer look at this some time, but my immediate worry is
it looks like you are directly copying Bash code (GPL) into Python (less
restrictive license).
Perhaps a more general solution would be to expose rl_add_defun() to native
Python
Martin Panter added the comment:
Rebased so Rietveld can work with it, earlier version was my fault.
As far as I can see (looking at Python/random.c and configure.ac), the Solaris
version should also use GRND_NONBLOCK:
#ifdef MS_WINDOWS
#elif defined(HAVE_GETENTROPY) && !defined(su
Martin Panter added the comment:
I think my proposed patch for Issue 17546 addresses this. That patch was also
written to address Issue 17960.
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue27
Changes by Martin Panter :
--
versions: -Python 3.2
___
Python tracker
<http://bugs.python.org/issue14562>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
This patch was also posted to Issue 26867, with a bit more discussion and
analysis, so closing as a duplicate.
--
resolution: -> duplicate
status: open -> closed
superseder: -> test_ssl test_options fails on ubu
Martin Panter added the comment:
FWIW I imagine Ubuntu overriding the option will break the example code in the
documentation of clearing SSL_OP_NO_SSLv3:
<https://docs.python.org/3.5/library/ssl.html#ssl.create_default_context>. If
we keep that documentation, I think we should conti
New submission from Martin Panter:
According to the documentation, HTTPSConnection.request() should accept
arbitrary bytes-like objects, but this is not the case. Currently (since Issue
23756), a “bytes-like object” is defined to be anything that works with
Python’s buffer API, as long as it
Changes by Martin Panter :
--
dependencies: +bytes-like objects with socket.sendall(), SSL, and http.client
___
Python tracker
<http://bugs.python.org/issue23
Martin Panter added the comment:
Fixed conflicts with recent changes
--
versions: +Python 2.7 -Python 3.4
Added file: http://bugs.python.org/file43428/non-urlencoded.6.patch
___
Python tracker
<http://bugs.python.org/issue23
Martin Panter added the comment:
FYI instead of changing the helper into a static method, I think you could have
just called http.client._get_content_length().
I don’t understand why we need the new encode_chunked=True flag. Can’t
urllib.request leave the Transfer-Encoding field up to
Martin Panter added the comment:
Thanks Berker. In this case the previous tests using the same NNTP connection
object were skipped. First run:
test_unknown_command (test.test_nntplib.NetworkedNNTPTests) ... ok
test_welcome (test.test_nntplib.NetworkedNNTPTests) ... ok
test_with_statement
Martin Panter added the comment:
Restored “On Linux” for the changed in 3.5.2 notice. I do think it is better to
be general and future-proof, but that is a separate, less important issue to
the main purpose of the patch. (I don’t know if Solaris’s version can block or
not.)
--
stage
Martin Panter added the comment:
Sorry about impersonating your name as committer Victor. I have been fixing
this problem in recent patches, but because I imported your patch a while ago I
forgot about it.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -&g
Martin Panter added the comment:
There is also Issue 13224 proposing to change __str__() to just return the
__name__ or __qualname__ if I remember correctly.
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue25
Martin Panter added the comment:
This is failing on Windows 7 buildbots:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7849/steps/test/logs/stdio
==
ERROR: test_sio_loopback_fast_path
Martin Panter added the comment:
I also backported most of my changes to 2.7, although __name__ wasn’t
originally linking to anything at all there.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -P
Martin Panter added the comment:
Yogesh: Victor’s patch has already been applied. What is left to do is another
patch that enables Victor’s code on OS X when Gnu Readline is being used, as
opposed to the usual Apple Editline.
Also, I think it is valid to update the version check to 6.1
Martin Panter added the comment:
Here is a patch to enable the workaround on OS X, and to adjust the test
condition to 6.1. It would be nice if someone with OS X and Gnu Readline can
confirm that this fixes the problem.
--
stage: needs patch -> patch review
Added file: h
Changes by Martin Panter :
--
components: +Extension Modules, Windows -Library (Lib)
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
___
Python tracker
<http://bugs.python.org/issue27
Martin Panter added the comment:
Are you sure Oleg? As far as I understand, Python 2 by default wraps C stdio
file objects, and also has Python 3’s file objects in the “io” module. But I
expect TemporaryFile() would use the default stdio files, and the cause of this
bug, Issue 21679, should
Martin Panter added the comment:
This original bug was about fstat() failing for an anonymous file (after the
directory entry was removed). But in your situation the file system refuses to
unlink the directory entry.
If you think there is something that can be fixed in Python, I suggest open
New submission from Martin Panter:
If the exception argument is None or repr(None), it is omitted from the report
when a thread raises an unhandled exception:
>>> def raise_exception(e):
... raise e
...
>>> t = Thread(target=raise_exception, args=(Exception
Martin Panter added the comment:
Here is a patch that changes all affected tests to use a custom server running
on localhost:
* Local server is based on the existing NNTPv2Handler class, and the
LocalServerTests class
* Reintegrate test_starttls() back into NetworkedNNTPTestsMixin
* Only
Martin Panter added the comment:
Here is a diff that shows my changes better. I temporarily moved some classes
back to their original positions to reduce the diff size, though it won’t work
in practice because Python needs the classes defined before using them.
--
Added file: http
Martin Panter added the comment:
Uploading a combined patch that should work with Rietveld, and I will leave
some comments.
I don’t think there is much that I am comfortable changing in Python 2.7. In
general it is a bad idea to add new features that are only going to be
available in e.g
Martin Panter added the comment:
I left a few more comments, but I see that many of my earlier comments (both in
Rietveld and main bug thread) still apply.
I’m still struggling to understand all the special cases for the find_library()
argument. You seem to have added even more recently
Martin Panter added the comment:
Here is a new version which I think should be okay to apply. I restored the
references to the base class, but now using the MessageDefect name. I removed
the changes relating to raise_on_defect not being strict, in favour of fixing
Issue 24364
Martin Panter added the comment:
Here is a patch to fix the two defects in Lib/email/feedparser.py. I also made
some extra changes to the tests:
* Remove some tests from Lib/test/test_email/test_email.py, because I think
they were redundant with methods of the same name in
Martin Panter added the comment:
Here is a patch documenting that RawIOBase.writelines() is undefined for
partial writes and blocking errors, as mentioned in (1) above.
The alternative of requiring write() to be retried would IMO be unfair to
existing writelines() implementations. It also
Changes by Martin Panter :
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/issue26894>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Martin Panter :
--
stage: patch review -> needs patch
title: raw_input misbehaves when readline is imported -> Document the need to
pass the prompt to raw_input() with readline
versions: -Python 3.4
___
Python tracker
Martin Panter added the comment:
It looks like Antoine’s second failure (test_getcode) should be fixed now that
transient_internet() is used (Issue 12138).
Looking at Antoine’s first failure, it will always be possible for it to fail
depending on the conditions of the buildbot, internet, and
Changes by Martin Panter :
--
versions: -Python 3.1, Python 3.2
___
Python tracker
<http://bugs.python.org/issue1606233>
___
___
Python-bugs-list mailin
Martin Panter added the comment:
More recently, Issue 19884 has worked around the problem where practical on
non-Apple platforms, so perhaps this problem is not so important now. However
it could still be present with older Gnu Readline versions, and slightly newer
versions on Apple (pending
Martin Panter added the comment:
This seems like something that should be fixed in Readline, rather than Python.
Judging by the rl_clear_history() documentation, it sounds like this is private
data. Maybe we need a version of rl_free_undo_list() that works for old history
items, or a Readline
Changes by Martin Panter :
--
stage: -> needs patch
title: ‘tokenize.detect_encoding’ is confused between text and bytes: no
‘startswith’ method on a byte string -> Clarify error when
‘tokenize.detect_encoding’ receives text
type: crash -> behavior
versions: +Python 3.5, P
Martin Panter added the comment:
I wonder why you can’t add the locking around input() calls at a higher level,
rather than needing to change the readline module itself.
--
stage: -> patch review
title: Expand readline module -> Wrap rl_forced_update_display() and lock
re
Martin Panter added the comment:
Is this related to Readline’s history_write_timestamps() feature, or is this a
request for Python to make a custom history file?
--
components: +Extension Modules -Library (Lib)
nosy: +martin.panter
___
Python
Martin Panter added the comment:
I think Victor may be on the right track. Since the macro contains two
newlines, a single call to rl_callback_read_char() is going to produce two
calls back to the rl_callback_handler_install() handler to receive each line.
I can make the example from the
Martin Panter added the comment:
Surely this should be fixed in Editline, not Python?
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue13
Martin Panter added the comment:
In Issue 6953, I updated the documentation to indicate which underlying
Readline functions etc are accessed. So perhaps that helps, so the reader knows
what function to look up in the Readline documentation.
Other than that, I’m not sure what else to do. It
Martin Panter added the comment:
I presume the original report was due to testing when the server happened to
return an article with an empty body. The failing test is
# XXX this could exceptionally happen...
self.assertNotIn(article.lines[-1], (b".", b".\n", b".\r\n&
Martin Panter added the comment:
See also Issue 1175004, proposing the same sort of custom function, but called
“py_callback”.
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue1690
Martin Panter added the comment:
Revisions 12e53abec5d0 and 0c7fff783b32 look like they do the same thing as
Benno’s patch. Perhaps we can close this?
--
nosy: +martin.panter
resolution: -> out of date
___
Python tracker
<http://bugs.pyth
Martin Panter added the comment:
The most serious of these IMO is the signed overflow warnings in
Modules/cPickle.c. I get the same warnings if I disable the “gcc -fwrapv” mode:
/media/disk/home/proj/python/cpython/Modules/cPickle.c: In function
‘Unpickler_noload’:
/media/disk/home/proj
Martin Panter added the comment:
Looking closer at cPickle.c (after upgrading my GCC), I think there are two
warnings happening, when Pdata_clear() is inlined into each of noload_reduce()
and noload_setitem(). I think both cases are false positives; there is no
actual signed overflow possible
Martin Panter added the comment:
I think this should be treated as a feature, not a bug, since as Christian
said, the documentation currently does not support this case.
--
title: urllib2.urlopen fails to load URL -> urlopen URL with unescaped space
type: -> enhancement
ve
Martin Panter added the comment:
Issue 15068 as been fixed in 3.5+ and 2.7, and it looks like it fixes the
fileinput aspect of this bug. That leaves the sys.stdin aspect, which only
affects Python 2, and I think is a duplicate of Issue 1633941.
--
nosy: +martin.panter
resolution
Martin Panter added the comment:
See also the second part of Issue 25863, a similar symptom with the iso-2022-jp
codec. I suspect many of the multibyte CJK type codecs don’t properly support
saving and restoring their state.
--
nosy: +martin.panter
Martin Panter added the comment:
I think an answer to Benjamin’s question is necessary to move this forward. The
code already checks the index before calling history_get(). How do you manage
to get null pointers returned for every history item?
In the LLVM bug thread, I noticed “libedit
501 - 600 of 1765 matches
Mail list logo