Martin Panter added the comment:
Paul, if the user specifically wants to bind to a numeric IPv4 address, is
there any advantage of choosing the dual-stack IPV6_V6ONLY=0 mode with a mapped
:::a.b.c.d address?
--
___
Python tracker
<h
Martin Panter added the comment:
Patch 3 fixes some more cases I found in the array module:
>>> a + a
Modules/arraymodule.c:809:5: runtime error: null pointer passed as argument 1,
which is declared to never be null
Modules/arraymodule.c:809:5: runtime error: null pointer passed as a
Martin Panter added the comment:
Will commit this soon, apart from dropping “such as bytearray” for s#, which I
don’t remember the reasoning.
--
stage: patch review -> commit review
versions: -Python 3.4
___
Python tracker
<http://bugs.pyth
Martin Panter added the comment:
Wilcox: 3.4 is in security maintainence mode. I suggest using 3.5, or look at
backporting revision d00837de03d7 (Issue 26884), which I presume fixes this.
--
nosy: +martin.panter
___
Python tracker
<h
Martin Panter added the comment:
If you want to silently skip over invalid cookies by looking for a semicolon,
see Issue 25228. For that, I think we need someone to add some more tests and
confirm it doesn’t open a security hole.
Also maybe see Issue 22983 and Issue 17340.
--
nosy
Martin Panter added the comment:
Here is a patch with my idea of how it should work
--
keywords: +patch
Added file: http://bugs.python.org/file44000/setup-before-thread.patch
___
Python tracker
<http://bugs.python.org/issue27
Changes by Martin Panter :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Martin Panter added the comment:
I committed my patch for Issue 24278 (revision ad7da726bea6), so this notice is
now removed
--
nosy: +martin.panter
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
superseder: -> Docs on Parsing argument
Martin Panter added the comment:
It seems the test infrastructure likes all references to thread objects to be
deleted, even if they are no longer running.
--
Added file: http://bugs.python.org/file44003/setup-before-thread.v2.patch
___
Python
Martin Panter added the comment:
_freeze_import is only in Python 3, but I backported my final change because it
is more general and also affects pgen.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
_
New submission from Martin Panter:
Modules/_ctypes/_ctypes_test.c defines a structure called BITS and exports two
C functions set_bitfields() and unpack_bitfields() that operate on it. However
only unpack_bitfields() seems to have been used, in
Lib/ctypes/test/test_bitfields.py. Either there
Martin Panter added the comment:
Thanks for your feedback. I add a reference to km\ntifs.h in the comment. The
buildbots seem generally happy with the change. (One timed out in the tests,
but that seems to be an existing intermittent problem.)
--
resolution: -> fixed
stage: pa
Martin Panter added the comment:
Okay, so to be clear, I am assuming XLC supports all of the following fields,
and uses unsigned bit fields by default:
struct UNSIGNED_BITS {
unsigned int AU: 1;
int A: 1; /* Equivalent to unsigned int */
signed int AS: 1;
unsigned short MU: 1
Martin Panter added the comment:
GDB also seems affected. The significance of this is it makes me suspect a bug
in Readline’s callback-based “alternative interface”, as opposed to the simpler
blocking interface. I know Python and GDB both use the callback API, and that
Bash doesn’t.
You
Martin Panter added the comment:
I backported the patch to 2.7. Now I get no warnings about syntax highlighting
from 2.7 (there were only a few reported before).
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -&g
Martin Panter added the comment:
Earl: Can you give any more details on your original hang or race condition?
Was it related to setting PORT, or shutting down the server, or something else?
It is not clear from your patch. I have tried adding artificial sleep() calls
at various points but
Martin Panter added the comment:
I am pretty sure it isn’t legal. Python’s inet_aton() just wraps the underlying
OS call. According to Posix
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_addr.html>, the
leading zero in 093 would indicate octal notation, but the nine is
Martin Panter added the comment:
Xiang: regarding your overflow_fix_in_listextend.patch, what do you think about
adding a comment or debugging assertion instead, something like:
/* It should not be possible to allocate a list large enough to cause an
overflow on any relevant platform
Martin Panter added the comment:
I’ve decided I would prefer deprecating the Latin-1 encoding, rather than
adding more encoding support for iterables and text files. If not deprecating
it altogether, at least prefer just ASCII encoding (like Python 2). The
urlopen() function already rejects
Martin Panter added the comment:
Yes when I say “text” I mean str objects, as opposed to byte strings, etc.
I wonder if it would be safer to test for TextIOBase. With the read(0) hack,
the zero size may be unexpected. A file object may need special handling to
generate an empty result, or to
Changes by Martin Panter :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue27414>
___
___
Python-bugs-list mailing list
Unsubscrib
Martin Panter added the comment:
For the test case given, the main problem is actually that a header field is
being incorrectly split on a Latin-1 “next line” control code U+0085. The
problem is already described under Issue 22233. It looks like I wrote a patch
for that a while ago, so it
Martin Panter added the comment:
.
It would be nice to get feedback if my patch is sensible, especially from
people familiar with normal usage of the “email” module, as opposed with the
usage by the HTTP module.
--
stage: -> patch rev
New submission from Martin Panter:
Looks good to me
--
nosy: +martin.panter
stage: -> commit review
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issu
Martin Panter added the comment:
FWIW I doubt HTTP 1.1 ever required support for other HTTP versions; see for
instance <https://tools.ietf.org/html/rfc2068#section-19.7>.
This v2 patch adds another test that includes what I understand is a true HTTP
0.9 request (although the mock conn
Martin Panter added the comment:
If the code does happen to mutate the dictionary, there would still be a bug
with modifying any dictionary passed in by the caller. But I suspect there is
no bug. So I am not sure the change is worth it. If we do go ahead, the
documentation needs updating to
Martin Panter added the comment:
Thanks David. Since I am more intersted in fixing this robustly for HTTP and
similar protocols, I might focus on just Issue 24363. Either confine my changes
to the existing HTTP (or new) policy and start using that, or just address this
from the HTTP package
Martin Panter added the comment:
_is_textIO(): I’m sorry but I still prefer the TextIOBase check over read(0).
Each option has a disadvantage, but with TextIOBase, the disadvantage only
affects text files, not byte files.
Maybe another option is to stick with the current checking of the “mode
Martin Panter added the comment:
Some of the header field validation was included in Demian’s first patch,
raising HTTPEncodingError. But I don’t know why he included it. Maybe it was
more appropriate then; it looks like that patch took a different approach than
the current encode_chunked
Changes by Martin Panter :
--
assignee: orsenthil -> martin.panter
___
Python tracker
<http://bugs.python.org/issue12319>
___
___
Python-bugs-list mai
Martin Panter added the comment:
Any news on the remaining failures for year 2037?
What about the buildbots that time out? Can the size of the tests be reduced,
or perhaps should the buildbots be updated to extend the timeout?
--
___
Python tracker
Martin Panter added the comment:
Serhiy, you assigned this to yourself. What do you think of my patch?
--
___
Python tracker
<http://bugs.python.org/issue27
Changes by Martin Panter :
--
dependencies: +Remove HTTP 0.9 server support
___
Python tracker
<http://bugs.python.org/issue26578>
___
___
Python-bugs-list mailin
Martin Panter added the comment:
There are a few small benefits from removing it, but I am not too fussed if we
decide to leave it.
* If we keep it, should we fix it so that it doesn’t deadlock? Otherwise, we
carry around buggy and untested code that claims to be a HTTP 0.9 server but
isn’t
Martin Panter added the comment:
Xiang’s patch looks okay from a correctness point of view
--
___
Python tracker
<http://bugs.python.org/issue16764>
___
___
Pytho
Martin Panter added the comment:
I am trying out your patch at the moment. There are plenty of test suite
failures; I ran the test suite with approximately the following:
./python -bWerror -m test -Wr -j0 -u network -x
test_{mailbox,shelve,faulthandler,multiprocessing_main_handling,venv
Martin Panter added the comment:
I am pretty happy with the latest patch. I left one comment. I will try to give
it a more thorough review and actually test it out at some point, but I don’t
anticipate any major problems.
--
___
Python tracker
Martin Panter added the comment:
Issue 23545 has a patch with some comments from me about adding other warnings
via “autoconf foo”, so you could copy from that if you want.
The few warnings that I glanced at do not look troublesome. But maybe it is
worth working around them to see other
Martin Panter added the comment:
The proposed options add exactly one warning for me (ignoring warnings from
libffi). How would you work around this:
./Include/pymem.h:136:18: warning: comparison is always false due to limited
range of data type [-Wtype-limits]
( ((size_t)(n
Martin Panter added the comment:
I agree it would be worth checking for a slowdown.
As well as giving the option of omitting the table argument, it would make call
sites easier to read. It would avoid suggesting that the first argument is
translated to the second, like maketrans().
data
Martin Panter added the comment:
Tests fail on a Power PC buildbot:
http://buildbot.python.org/all/builders/PPC64LE%20Fedora%203.x/builds/1476/steps/test/logs/stdio
==
FAIL: testExactPowers (test.test_statistics.Test_Nth_Root
Martin Panter added the comment:
Both parts of your commit seem to have helped. However I found two failures
still happening, and one new failure:
1. Casablanca and El_Aaiun still failing since the original commit:
http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/1318/steps
Martin Panter added the comment:
Patch1 looks fine to me, though I will have to rely on you people to verify
that it does what it’s supposed to. Do you want me to commit it straight away,
or wait for your follow-up patch?
--
___
Python tracker
Martin Panter added the comment:
Thanks for the explanation. It seems a bit strange that the server thread was
running so slow while the main thread did one thousand polls over at least one
second. Perhaps there is a blocking DNS call hidden somewhere in it somewhere?
In any case, I am pretty
Martin Panter added the comment:
Have you had any luck reviewing this Robert?
--
___
Python tracker
<http://bugs.python.org/issue27348>
___
___
Python-bugs-list m
Martin Panter added the comment:
See also Issue 27409, where I am proposing to list the SO_* and other constants
by name (with associated Python version and whether they are missing on some
platforms), but without descriptions.
--
nosy: +martin.panter
Martin Panter added the comment:
Issue 12887 is open to add explanations of the SO_* constants
--
dependencies: +Documenting all SO_* constants in socket module
___
Python tracker
<http://bugs.python.org/issue1732
Martin Panter added the comment:
I didn’t look too closely, but I did see that _ssl_locks_count is unsigned int.
I was compiling for x86-64 Linux, where int is 32 bits and size_t is 64. So
maybe GCC was optimizing the (size_t) cast away, and then rightfully warning
that the largest unsigned
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
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
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
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
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
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
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(...
Changes by Martin Panter :
--
nosy: -martin.panter
___
Python tracker
<http://bugs.python.org/issue6143>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
Changes by Martin Panter :
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue27643>
___
___
Python-bugs-list mailing list
Unsubscrib
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
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
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
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'
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
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
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
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
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
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
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
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
Changes by Martin Panter :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
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
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
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
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
Martin Panter added the comment:
Patch looks fine to me.
--
stage: -> commit review
___
Python tracker
<http://bugs.python.org/issue26907>
___
___
Python-
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
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
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
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
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
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
Changes by Martin Panter :
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue27746>
___
___
Python-bugs-list mailing list
Un
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
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
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
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
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
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
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
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
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
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
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
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
1401 - 1500 of 4320 matches
Mail list logo