Martin Panter added the comment:
Thanks for the help Serhiy
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs
Martin Panter added the comment:
Hi Xavier, I was about to push input-readline.v2.patch, but I thought it might
be good to check with you first if this causes problems with Android, based on
my experience with Issue 28997. With the patch applied
Martin Panter added the comment:
I agree the second patch is more correct. This undoes the change as it was
introduced in revision c4cf1b886d6b and matches the Python 2 text.
--
nosy: +martin.panter
resolution: -> fixed
stage: commit review -> resolved
status: open -&g
Changes by Martin Panter <vadmium...@gmail.com>:
Added file: http://bugs.python.org/file46020/max_over_line.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Martin Panter <vadmium...@gmail.com>:
Removed file: http://bugs.python.org/file46019/max_over_line.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Martin Panter added the comment:
Max_over_line.patch is my attempt: Keep the original _MAXLINES = 2048 code, but
override it with _MAX_OVER_LINE = 64000 when reading OVER response lines. I
also added a test case.
--
Added file: http://bugs.python.org/file46019/max_over_line.patch
Martin Panter added the comment:
Multi-connect.patch is a smaller patch that changes setUpClass() → setUp(), so
that each test method creates a new NNTP connection. The downside is all the
reconnecting slows the test execution from 42 s down to 115 s, which is why I
would like to move
Martin Panter added the comment:
This is a change in behaviour of the _copy() loop: it will stop as soon as EOF
is read from the parent’s input, and immediately close the terminal master.
Unpatched, the loop continues to read output from the child, until the child
closes the terminal slave
Martin Panter added the comment:
Python 2.6 is quite old and doesn’t even receive security patches any more as
far as I know. I would start by trying 2.7, or failing that, try backporting
the changes from Issue 6267. My guess is this is related to persistent HTTP
connections being dropped.
I
Martin Panter added the comment:
The basic idea of your patch may be reasonable, but something is not right.
Imagine the locale is something other than UTF-8. The input code will now
contain mojibake print("\xC3\xAB"), although the decode() call will translate
the result back to th
Martin Panter added the comment:
Python 3 doesn’t have an __all__ list; it was removed in r85073 (Issue 3612).
I don’t understand why it was removed. Maybe Hirokazu didn’t understand what it
does. Since this is a regression, perhaps it should be added back.
--
components: +Library
Martin Panter added the comment:
I will try to come up with something in a few days
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
Patch looks good to me. Although maybe you don’t need the IndexError check in
the test. Won’t limit[key] already handle that for you (as long as key isn’t -1
etc).
--
___
Python tracker <rep...@bugs.python.
Martin Panter added the comment:
I finished reviewing the most recent patches and left some comments. Perhaps it
is worth splitting the conglomerate patch up. I don’t see any point holding
back some modules while things are tweaked in unrelated files.
My biggest concern is casting function
Martin Panter added the comment:
It seems I can write it without the escaped spaces. Is there a problem with
this:
*x*:sup:`16` + *x*:sup:`12` + *x*:sup:`5` + 1
I’m happy to add the CRC-32 polynomial if you think it would be useful,
although it is a lot longer (fifteen terms instead of four
Martin Panter added the comment:
As far as I know, non-ASCII newlines and whitespace are not supported in Python
source code, so there is not a big need to support it in bytes.fromhex()
either. But since bytes.fromhex() accepts Unicode strings, I think non-ASCII
whitespace would be okay
New submission from Martin Panter:
If I had known this it would have saved me getting a separate implementation
working.
>>> hex(binascii.crc_hqx(b"\x01", 0))
'0x1021'
https://files.stairways.com/other/binhex-40-specs-info.txt
Documenting this might helped many other peop
Martin Panter added the comment:
This is a breakdown of running the test script on my Linux setup (UTF-8 locale):
^A^B^B^B^B^B^B^B\t\tx\t\r\n
Input echoed back (before Readline disables echo)
[\xc3\xafnserted]
Inserted by pre_input_hook()
|t\xc3\xab[after]
Inserted by the Ctrl
Martin Panter added the comment:
Thanks Jim
--
nosy: +martin.panter
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.7
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Martin Panter added the comment:
The first offending message I found is number 183465:
>>> s.group("comp.lang.python")
('211 4329 179178 183507 comp.lang.python', 4329, 179178, 183507,
'comp.lang.python')
>>> s._putcmd("OVER 183465")
>>> s.
Martin Panter added the comment:
Just a quick note for the moment: It may not be wise to drop the limit to
readline(). That is undoing Issue 16040. Maybe we need a better test if this
change doesn't fail the test suite.
--
___
Python tracker <
Changes by Martin Panter <vadmium...@gmail.com>:
--
stage: -> commit review
versions: +Python 3.5, Python 3.6
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Martin Panter added the comment:
Looks good apart from one quirky test case, see Reitveld
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Changes by Martin Panter <vadmium...@gmail.com>:
--
stage: -> needs patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20191>
___
_
Changes by Martin Panter <vadmium...@gmail.com>:
--
dependencies: +resource.prlimit(int, int, str) crashs
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pytho
Martin Panter added the comment:
Revision 4bac47eb444c fixed setrlimit(). Perhaps those changes can just be
applied again to prlimit().
I’m not an Arg Clinic expert, but isn’t one of its purposes to imitate native
Python function signatures? Since argument unpacking was dropped from Python 2
Martin Panter added the comment:
Zach’s comments on float seem to have been addressed
(https://bugs.python.org/review/20185/diff2/10940:10949/Objects/floatobject.c).
The comments on the resource module were about return converters:
<http://bugs.python.org/review/20185/diff2/10817:10
Martin Panter added the comment:
Julien, to help push these changes forward, I suggest start by rebasing and
reviewing the conglomerate patch, since it seems that was almost ready.
Reading through the thread, it seems the current status is:
1. _crypt module handled elsewhere by Antoine
2
Martin Panter added the comment:
Patch v6 strips the form feed, and adds an extra test.
--
Added file: http://bugs.python.org/file45844/cpython25677.v6.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
I think there are actually two issues at play here:
1. The caret is not compensated for indentation removed from the code. This is
what Issue 25677 was originally about. The current patch there will ensure that
the behaviour is always like the second (top
Martin Panter added the comment:
(Long story short: need to strip form feeds in print_error_text(), but I agree
that this otherwise does fix a bug.)
There is one minor regression that this patch causes IMO. Given the following
file, where represents a form feed character ('\014')
if True
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
Patch for %x in Py 2.
--
Added file: http://bugs.python.org/file45828/alt-zero.py2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
I’m okay with this version unless anyone has any more improvements.
--
stage: patch review -> commit review
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.or
Martin Panter added the comment:
Patch ruling out the len(s) corner case. I use a modified version of Fumihiro’s
suggestion.
--
versions: +Python 3.6, Python 3.7 -Python 3.4
Added file: http://bugs.python.org/file45827/extended_slicing_docs.v2.diff
Martin Panter added the comment:
The documentation for %x etc also had the same problem, and it applies to
Python 2 for %x. Here is a patch for Python 3. The behaviour is already tested,
but there were some quirks due to porting from Py 2 tests, and duplicate tests
which I removed
Martin Panter added the comment:
Seems a reasonable feature. The documentation would also need updating.
Which specific (whitespace) characters do you propose to ignore? Just ASCII
ones, as in bytes.isspace(), or others like b"\xA0" (non-breaking space) and
U+2028 (line
Martin Panter added the comment:
See also Issue 11842 about the behaviour of slice.indices() in this situation,
and Issue 1446619 about fixing the documentation for reverse slices regarding
positive out-of-range indexes.
--
___
Python tracker <
Martin Panter added the comment:
Fumihiro’s suggestion seems reasonable to me (assuming it still applies to the
current text)
--
nosy: +martin.panter
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/iss
Martin Panter added the comment:
I think Steven’s main complaint is that it is hard to make a reversed slice
extend to the start of the original sequence, unless you omit (or use None as)
the endpoint:
>>> "01234567"[4:0:-1] # Includes index [4], stops before reach
Martin Panter added the comment:
Looks like a leftover relic from Python 2. In Python 3, the prefix is “0o”, not
just “0”. This matches to change in Python 2 to 3 octal literal syntax. And
there is no special handling of zero in 3:
>>> "%#o" % 0
'0o0'
--
nosy: +
Martin Panter added the comment:
Brett, what was the other bug? The bug number you posted is for this bug.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
input-readline.v2.patch sets stderr=DEVNULL so that the prompt does not come
out in the test log.
A disadvantage of this is that if there is a failure, any error messages, stack
trace, etc is also lost. To fix this properly, we would probably have to
capture
Martin Panter added the comment:
Actually, I found a regression. Looks like you also need to cancel any
showwarning() function set by the user:
>>> import warnings
>>> warnings.showwarning = print
>>> with warnings.catch_warnings(record=True) as recording
Martin Panter added the comment:
The patch looks sensible to me. The fix is basically an extension to the first
fixup (9c92352324e8), where Victor split _showwarnmsg_impl() out of
_showwarnmsg(). Now, _showwarnmsg() is a helper for the C module to choose
between the backwards-compatible
Changes by Martin Panter <vadmium...@gmail.com>:
--
stage: -> needs patch
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.6, Python 3.1, Python
3.2
___
Python tracker <rep...@bugs.python.org>
<http://bugs.py
Martin Panter added the comment:
The __iter__() method was added by Barry in
<http://svn.python.org/view/sandbox/trunk/emailpkg/5_0-exp/email/message.py?r1=57344=57343=57344>:
“Added an __iter__() to email.message.Message for iterating over the message’s
headers.”
On the other hand, e
Changes by Martin Panter <vadmium...@gmail.com>:
--
title: int no attribute 'lower' iterating email.Messasge -> int no attribute
'lower' iterating email.Message
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Martin Panter added the comment:
You just need a messsage object with one or more header fields:
>>> msg = message_from_string("Name: value\r\n\r\n")
>>> for m in msg:
... pass
...
AttributeError: 'int' object has no attribute 'lower'
Python 2 does
Martin Panter added the comment:
Since people keep coming upon this bug, perhaps we should inhibit push my fix
without fixing that other prompt bug (now a feature change I think). Probably
have to capture stderr to avoid it coming out in the test output.
--
versions: +Python 3.7
Changes by Martin Panter <vadmium...@gmail.com>:
--
title: test_logging fails -> test_logging fails and freezes
type: -> behavior
___
Python tracker <rep...@bugs.python.org>
<http://bugs.
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> duplicate
status: open -> closed
superseder: -> test_logging fails
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
If you only need the readable interface, use BytesIO or StringIO.
I once had an implementation like Serhiy’s, called dummywriter:
<https://github.com/vadmium/python-lib/blob/99ec887/streams.py#L12>. To fully
implement the writable file API it shoul
Martin Panter added the comment:
Fair enough, I don’t really mind if it is (lo=0, hi=None). I think I have only
used bisect with both defaults anyway.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
Some minor tweaks to my earlier patch:
* list comprehension → comprehension
* time it is called → time of the call
--
versions: +Python 3.6, Python 3.7 -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file45735/locals_doc.04.patch
Martin Panter added the comment:
http://buildbot.python.org/all/builders/AMD64%20Windows8%202.7/builds/9/steps/test/logs/stdio
==
ERROR: test_readonly_files (test.test_dumbdbm.DumbDBMTestCase
Martin Panter added the comment:
Serhiy: The Windows buildbots are having trouble removing read-only files.
Maybe restore the write mode for the end of the test, or fix support.rmtree()?
See <https://docs.python.org/3/library/shutil.html#rmtree-example>.
--
nosy: +martin.
Martin Panter added the comment:
Xavier, you are welcome to propose your own version of the text, or build on
Julien’s. See also Issue 22057, about copying all globals vs builtins.
--
nosy: +martin.panter
stage: -> patch review
versions: +Python 2.7, Python 3.6, Python
Martin Panter added the comment:
“the current mapping of '__builtins__' is copied into *globals* ”
That sounds like we insert each individual builtin name, i.e.
globals.update(builtins_mapping). But my understanding is that it is the
__builtins__ global variable that is affected:
globals
Martin Panter added the comment:
Marco, your patch removes the description for class blocks. Is that your
intent, or just an accident? See r53954.
My understanding is “function block” is there to distinguish these three modes:
def foo():
# Function block
print(locals())
class Bar
Changes by Martin Panter <vadmium...@gmail.com>:
--
title: os.path.mount sometimes raises FileNotFoundError on Windows ->
os.path.ismount sometimes raises FileNotFoundError on Windows
___
Python tracker <rep...@bugs.pytho
Martin Panter added the comment:
I think the original test is trying to ensure that an invalid numeric IP
address results in an OSError. So changing it to skip the test on OSError does
not seem wise. Also, Silent Ghost said that the problem was with
gethostbyaddr(), not gethostbyname().
I
Martin Panter added the comment:
“digits which do not form decimal radix forms”
I see you have taken this from a Unicode document, but “forming a form” seems a
long way of saying very little. The difference seems a bit vague, but I gather
that digits not in the Unicode “decimal digit
Martin Panter added the comment:
This seems reasonable in general.
Did you test this exact patch Patrila? It looks to me like you need to change
ENOENT → errno.ENOENT, etc.
--
components: +Tests
nosy: +martin.panter
stage: -> patch review
type: -> behavior
versions: -Pyth
Martin Panter added the comment:
Maybe you could factor out the first part of test_bad_address() that skips the
test. It would only need to be used by negative test cases (that purposefully
test invalid names). I presume positive tests would not need to be wrapped
Martin Panter added the comment:
It will apply to the 3.5 and 3.6 branches if I first backport revision
0a18d2cfeb52 (Issue 28753), which I think is valid. But I would wait until
there is a branch for 3.6.1, and then commit to all three branches. (Ned asked
for only release-critical changes
Martin Panter added the comment:
Also, this is in direct contradiction to Issue 20270.
--
nosy: +serhiy.storchaka
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
The Python documentation refers to RFC 3986, which allows an empty port string
introduced by a colon, although it recommends against it:
<https://tools.ietf.org/html/rfc3986#section-3.2.3>
The “port” subcomponent of “authority” is designated by an op
Martin Panter added the comment:
I made one minor change: element → slice
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Martin Panter added the comment:
As of Issue 25701, the null-to-delete feature is documented as being deprecated
in favour of calling the related Del functions or macros. There was a
python-dev thread at <https://marc.info/?i=n32kch$eie$1...@ger.gmane.org>.
I’m not sure if that is good
Martin Panter added the comment:
I’m waiting for the 3.6 release candidate before pushing to the Py 3 branches.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
If adding proper support for hi=None, maybe lo=None should also be supported.
Also, I would think the main Doc/library/bisect.rst documentation needs
updating, and a test and What’s New entry added.
--
___
Python
Martin Teichmann added the comment:
I personally prefer the first patch, which iterates over a copy of __dict__.
Making a copy of a dict is actually a pretty fast operation, I would even
expect that it is faster than the proposed alternative, creating tuples.
Even if the second approach
Martin Panter added the comment:
I don’t have Py 3.6 to test on, but won’t that make it unnecessarily
inconvenient to use certain format codes? I.e. codes that involve non-ASCII
characters, control codes, quote signs, or backslashes. Slightly silly use case:
>>> "The time is
Martin Panter added the comment:
Regarding the problem with the default value, can we use “unspecified”, as
documented at
<https://docs.python.org/dev/howto/clinic.html#writing-a-custom-converter>, or
is that an old relic that no longer exists (hinted at the end of Issue 20293)?
F
Martin Panter added the comment:
Thanks, this looks good to me, although let’s not touch the blank line at the
end of the file.
--
nosy: +martin.panter
stage: -> commit review
versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 -Python
Martin Panter added the comment:
Is this a duplicate of Issue 26016?
--
nosy: +martin.panter
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
Taking the first function, bisect_right(), as an example, I see these
differences:
* bisect_right(a, x[, lo[, hi]]) -> index
This signature is removed. I think removing it is reasonable, because pydoc can
extract the proper signature from the Arg Cli
Martin Panter added the comment:
Correct, I meant to say the first fallback is the other call.
BTW your suggested text might hold for __eq__(), but for __ne__(), returning
NotImplemented seems to bypass the “not a.__eq__(b)” fallback.
--
___
Python
Martin Panter added the comment:
Victor, what changes to the doc strings are you talking about? Adding
descriptions of the parameters, maybe? Other than that they look very similar
to me.
I haven’t looked closely, but the Python doc strings have been updated at least
once more than the C doc
Martin Richard added the comment:
Thank you all for fixing this so quickly, it's been done amazingly fast!
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Changes by Martin Panter <vadmium...@gmail.com>:
--
dependencies: +Argument Clinic for bisect.bisect_left
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Martin Panter added the comment:
The documentation of this that comes to mind is spread over
<https://docs.python.org/3.6/reference/datamodel.html#object.__eq__> and
<https://docs.python.org/3.6/reference/expressions.html#value-comparisons>.
My understanding of how it work
Martin Panter added the comment:
I’m curious what the result of gethostbyaddr() is in your case, Silent Ghost.
import socket
socket.gethostbyaddr("::1q")
socket.gethostbyaddr("::1::2")
socket.gethostbyaddr("1:1:1:1:1:1:1:1:1")
On my computer, I get “socket.gaierr
Martin Panter added the comment:
Maybe worth looking at what name resolution stuff is enabled in
/etc/nsswitch.conf. On the hosts line, my current computer (v basic setup) has
hosts: files dns myhostname
My guess is you have a plugin which is resolving these ip-address lookalikes
Martin Panter added the comment:
The tests changes also produce a DeprecationWarning:
==
ERROR: testEnterAttributeError1 (test.test_with.FailureTestCase
Martin Panter added the comment:
V4 patch adjusting to recent code change.
Raymond: Given the problems caused by the current code, would you reconsider
your opposition?
Otherwise, what do you think should be the future of the code? Should we fix it
so that it handles real HTTP 0.9 requests
Martin Panter added the comment:
Python 2 patch is on top of the patch for Issue 25701
--
dependencies: +Document that tp_setattro and tp_setattr are used for deleting
attributes
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
Martin Panter added the comment:
In Python 2, charbufferproc was changed to use non-const char ** in revision
dba6494735d0 (perhaps by accident). Otherwise, this patch is the same as for
Python 3. I have added a sentence about using NULL for deletion in the patch.
--
Added file: http
Martin Panter added the comment:
The 2.7 patch looks okay to me. I confirmed that sq_ass_slice gets called to
delete slices, and I presume the other stuff is similar to Python 3. Do you
want to commit this to 2.7 Serhiy?
--
stage: patch review -> commit rev
Martin Panter added the comment:
Looks good to me
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28532>
___
___
Python-bugs-list
New submission from Martin Richard:
Hi,
I stumbled upon a SEGFAULT while trying Python 3.6.0 on a project using
asyncio. I can't really figure out what's happening, so I reduced the original
code triggering the bug down to a reproducible case (which looks a bit clunky,
sorry). The case has been
Changes by Martin Panter <vadmium...@gmail.com>:
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.
Martin Panter added the comment:
The Modules/main.c change at least looks reasonable as a bug fix.
In the long term, it would be nice to clean up some of the conditions for
including . Currently it is unconditional via PC/pyconfig.h, configure.ac
optionally enables HAVE_IO_H
801 - 900 of 9608 matches
Mail list logo