Martin Panter added the comment:
Brett, what was the other bug? The bug number you posted is for this bug.
--
___
Python tracker
<http://bugs.python.org/issue28
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'
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:
Fumihiro’s suggestion seems reasonable to me (assuming it still applies to the
current text)
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue1446
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:
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 separat
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:
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:
I’m okay with this version unless anyone has any more improvements.
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issu
Changes by Martin Panter :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Martin Panter added the comment:
Patch for %x in Py 2.
--
Added file: http://bugs.python.org/file45828/alt-zero.py2.patch
___
Python tracker
<http://bugs.python.org/issue28
Changes by Martin Panter :
--
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
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'
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:
Patch v6 strips the form feed, and adds an extra test.
--
Added file: http://bugs.python.org/file45844/cpython25677.v6.patch
___
Python tracker
<http://bugs.python.org/issue25
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:
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
Changes by Martin Panter :
--
dependencies: +resource.prlimit(int, int, str) crashs
___
Python tracker
<http://bugs.python.org/issue6083>
___
___
Python-bug
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
Changes by Martin Panter :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue20191>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Martin Panter :
--
resolution: -> fixed
stage: commit 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
Martin Panter added the comment:
Looks good apart from one quirky test case, see Reitveld
--
___
Python tracker
<http://bugs.python.org/issue28512>
___
___
Pytho
Changes by Martin Panter :
--
stage: -> commit review
versions: +Python 3.5, Python 3.6
___
Python tracker
<http://bugs.python.org/issue28960>
___
___
Python-
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
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&qu
Martin Panter added the comment:
Thanks Jim
--
nosy: +martin.panter
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.7
___
Python tracker
<http://bugs.python.or
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+A
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
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 if it
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:
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:
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
<http://bugs.python.
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 will try to come up with something in a few days
--
___
Python tracker
<http://bugs.python.org/issue28971>
___
___
Python-bug
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:
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 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:
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:
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 the
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
Changes by Martin Panter :
Added file: http://bugs.python.org/file46020/max_over_line.patch
___
Python tracker
<http://bugs.python.org/issue28971>
___
___
Python-bug
Changes by Martin Panter :
Removed file: http://bugs.python.org/file46019/max_over_line.patch
___
Python tracker
<http://bugs.python.org/issue28971>
___
___
Python-bug
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
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:
Thanks for the help Serhiy
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Martin Panter :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Changes by Martin Panter :
--
stage: -> needs patch
versions: +Python 3.6, Python 3.7
___
Python tracker
<http://bugs.python.org/issue28978>
___
___
Python-
Martin Panter added the comment:
Issue 28978 covers the parameter list syntax (Bug 1 + plus another problem).
--
dependencies: +a redundant right parentheses in the EBNF rules of
parameter_list
___
Python tracker
<http://bugs.python.org/issue22
Martin Panter added the comment:
Thanks for finding this Woo!
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.7
___
Python tracker
<http://bugs.python.or
Martin Panter added the comment:
That would be possible in Python 3, not Python 2 though.
--
___
Python tracker
<http://bugs.python.org/issue28815>
___
___
Pytho
Martin Panter added the comment:
Example where an implementation like Serhiy’s was not good enough:
<https://bugs.python.org/issue29130#msg284437>. In that case, the lack of
flush() method causes a subtle problem.
--
___
Python tracker
Martin Panter added the comment:
David is right. The 120 code was added in Issue 5319, as a way of indicating a
problem in the final stages of the interpreter exiting. The two conditions that
trigger this are calling the flush() method on sys.stdout and sys.stderr. If
you add a dummy flush
New submission from Martin Panter:
Normally there is a Python 3 compatibility warning emitted when a class is
based on object, implements __eq__(), but does not define __hash__():
$ python -3 -c 'class C(object): __eq__ = lambda self, other: True'
-c:1: DeprecationWarning: Overrid
Martin Panter added the comment:
Thanks, I will try to look at that some time
--
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Martin Panter added the comment:
Behaviour change in Free BSD as I understand. Nothing changed in Python, but
perhaps older versions of Free BSD behaved like Linux and raised EIO (or
another errno; it is not clear).
--
___
Python tracker
<h
Martin Panter added the comment:
Hi Cornelius and thanks for the work. Since the patch adds a significant amount
of code, I think you might have to sign the contributor agreement:
<http://www.python.org/psf/contrib/contrib-form/>. You can do it in a web
browser.
I would like to revie
Martin Panter added the comment:
Ignore my comment about contrib agreement, that must have come through recently
:)
--
___
Python tracker
<http://bugs.python.org/issue29
Martin Panter added the comment:
FWIW Issue 28290 was also opened about this pragma directive being not
recognized by a compiler called xlC on AIX.
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue29
Martin Panter added the comment:
Regarding reopening Issue 10656, whatever you think is more appropriate. You
just have to judge whether it is the same use case, the same code affected, etc.
Issue 16189 and Issue 25825 were about updating to match recent changes to
directory names, and I
Martin Panter added the comment:
The ResourceWarning was added by Issue 26741.
I agree that there are legitimate reasons why pre-3.6 code may avoid calling
Popen.wait() and equivalent. Victor opened Issue 27068 about adding a
Popen.detach() method, which such code could use to opt out of the
Martin Panter added the comment:
The user can access pipes and close them directly, or keep their own reference.
I don’t think detach() should touch pipes, and __exit__() should probably
continue to close them. Maybe call the method detach_pid() if that makes it
clearer that pipes are
Martin Panter added the comment:
The code in test.py is not realistic. It spawns children only to terminate them
straight away, and you could easily reap each child after calling terminate().
You might have more influence with a realistic use case.
Victor has committed a fix for the
Martin Panter added the comment:
I would prefer to commit Chris’s fix for BSDs (Issue 26228) with a regression
test. I can explain in the commit message who contributed to which part, or do
two separate commits if you prefer. But the point is to add the test with the
fix. I’m not going to
Martin Panter added the comment:
It is still not clear what change you were proposing. Perhaps factor out the
common code for ADSLGEN and OPCODEHGEN? If so, that has been done as part of
Issue 26662 in 3.5+.
--
nosy: +martin.panter
superseder: -> configure/Makefile doesn't
Martin Panter added the comment:
Other tests are skipped if libc_name is None, so your assertion is inconsistent.
FTR there are reports open about problems with bootstrap files like asdl_c.py,
e.g. Issue 28143 proposing to port that file to Python 3, and Issue 23404 about
the future of “make
Changes by Martin Panter :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Martin Panter added the comment:
.
Thanks for the explanation. It sounds like the Readline library assumes an
ASCII-only locale and sets its “convert-meta” variable to “on”. But Python
assumes UTF-8 and inputs b"\xC3\xAB" to the terminal. Readline converts the
input to two escape
Martin Panter added the comment:
Isn’t cElementTree useful and recommended in 2.7? It would be awkward to
deprecate it in Python 3. But I guess the other cases should be okay to
deprecate in 3.7.
--
nosy: +martin.panter
___
Python tracker
<h
Martin Panter added the comment:
It looks like the logic for handling an error seeding from urandom is reversed:
<https://hg.python.org/cpython/rev/45fc0c83ed42#l6.66>. Random_seed_urandom()
actually returns -1 if is an exception set, and 0 if it was successful.
The result would be a
Martin Panter added the comment:
David you are right, thanks.
Dustin: the exact patch you want is revision 0a55e039d25f.
--
resolution: -> duplicate
status: open -> closed
superseder: -> Python 3.6 on Windows doesn't seed Random
Changes by Martin Panter :
--
dependencies: +failing overflow checks in replace_*
___
Python tracker
<http://bugs.python.org/issue1621>
___
___
Python-bugs-list m
Martin Panter added the comment:
FTR I thought the consensus was not to backport these fixes unless there was a
demonstrated problem: <https://bugs.python.org/issue1621#msg144499>, though
personally, I would be in favour of backporting in many cases.
Regarding str.join() in unicode.
Martin Panter added the comment:
Both fixes (join and replace) look good to me. However I don’t think it is
necessary to change the exception message in 3.5 or 3.6.
--
___
Python tracker
<http://bugs.python.org/issue29
Martin Panter added the comment:
.
The documentation did not get merged properly into 3.6+. And even in 3.5, under
METH_KEYWORDS, I propose to change “The flag is typically combined with
METH_VARARGS” to “The flag must be combined . . .”.
The remaining issue15657_36.diff patch looks out of
Martin Panter added the comment:
Inada, I think you messed up the positioning of bits of the patch. E.g. there
are now test methods declared inside a helper function (rather than a test
class).
Since it seems other people are in favour of this API, I would like to expand
it a bit to cover
Martin Panter added the comment:
Thanks Jim
--
nosy: +martin.panter
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.7
___
Python tracker
<http://bugs.python.or
Martin Panter added the comment:
The patch for Issue 26228 proposes an improvement to the situation, although it
is not perfect and does not include a test. I wonder if it is possible to
replace fork() and execlp() with a subprocess.Popen invokation, at least in a
new Python release
New submission from Martin Panter:
The __dict__ attribute of class objects is documented as being a (standard)
dictionary, but implemented with a proxy object. I propose to clarify the
documentation in “Custom classes” under
<https://docs.python.org/3.5/reference/datamodel.html#the-stand
Changes by Martin Panter :
--
title: AIX shared library extension modules installation broken -> AIX shared
library extension modules installation broken: wrong dir names
___
Python tracker
<http://bugs.python.org/issu
Martin Panter added the comment:
So are you saying you tried patching Python 2 and/or 3, but did not see any
relevant change at all?
--
___
Python tracker
<http://bugs.python.org/issue18
Changes by Martin Panter :
--
title: ld_so_aix not found -> config/ld_so_aix not found: old dir name
___
Python tracker
<http://bugs.python.org/issu
Martin Panter added the comment:
Looks like Doc/tools/susp-ignored.csv needs updating:
$ make -C Doc/ suspicious
[. . .]
writing output... [ 49%] library/hashlib
WARNING: [library/hashlib:502] ":vatrogasac" found in ">>> coo
New submission from Martin Panter:
On a Linux computer I have LANG=en_US.utf8 set. Python 3 initializes the locale
with this setting (see revision 43e32b2b4004):
>>> locale.setlocale(locale.LC_CTYPE) # Get setting initialized by Python
'en_US.utf8'
In Lib/test/test___a
New submission from Martin Panter:
The “unittest” documentation has “tests cases” written a few times. This
doesn’t seem right to me, but I thought I should get a second opinion in case I
missed something.
--
assignee: docs@python
components: Documentation
files: tests-cases.patch
Martin Panter added the comment:
So the problem seems to be that Python assumes Readline’s encoding is UTF-8,
but Readline actually uses ASCII (depending on locale variables). The code at
the start of the test is supposed to catch when add_history() calls
PyUnicode_EncodeLocale() and fails
Martin Panter added the comment:
V3 of my patch skips the Readline tests in cases involving non-ASCII bytes when
the locale seen by Readline would be ASCII. Readline may translate the
non-ASCII bytes to escape sequences, and treat them as special Meta (Alt) key
combinations. This behaviour
Martin Panter added the comment:
I would say it is more important to fit in with the surrounding style than
mindlessly follow PEP 7. IMO the indentation in the configure script is a mess,
but if we fix it up, it should probably be done separately to adding this extra
flag
Martin Panter added the comment:
Maybe a duplicate of Issue 16623
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue29290>
___
___
Python-bug
Martin Panter added the comment:
See also Issue 3991 with proposals for handling non-ASCII as new features.
--
nosy: +martin.panter
___
Python tracker
<http://bugs.python.org/issue20
Martin Panter added the comment:
Issue 9679: Focusses on encoding just the DNS name
Issue 20559: Maybe a duplicate, or opportunity for better documentation or
error message as a bug fix?
Andreas’s patch just proposes a new function called quote_uri(). It would need
documentation. We already
Martin Panter added the comment:
In general, HTTP URLs are supposed to be ASCII only. Newer protocols (e.g. RTSP
which is based on HTTP) specifically allow UTF-8 encoding. But it would be
wrong for Python’s HTTP library to assume UTF-8 is wanted everywhere.
Especially in a domain name (e.g
Martin Panter added the comment:
Thanks for the feedback
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Martin Panter :
--
dependencies: +Wrong documentation (Language Ref) for unicode and str comparison
___
Python tracker
<http://bugs.python.org/issue12
Martin Panter added the comment:
The Python 3 version of this was rewritten in Issue 12067. It would be good to
port the new text to the Python 2 version, although that is not straightforward
because of various differences between Python 2 and 3.
That doesn’t rule out making smaller more
Martin Panter added the comment:
D.get(key[, default]) -> D[key] if key in D, else default.
There is no big problem with that. D is defined at the start. The only thing I
would have suggested is avoid using square brackets to mean two things in the
one expression. Since it is no longer
Martin Panter added the comment:
If you read the whole paragraph carefully, I don't think it is too misleading.
"In particular, tuples and lists . . ." suggests the author was just trying to
say that a tuple never compares equal to a list. Maybe we just need to make
th
Martin Panter added the comment:
Have you seen <https://docs.python.org/2.7/reference/datamodel.html#slots>?
There is also <https://docs.python.org/2.7/glossary.html#term-slots>.
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
Martin Panter added the comment:
Here is a port of the documentation to Python 2. Main differences:
* Default rules for order comparisons are different
* Not all kinds of objects inherit from object()
* str(), unicode() compatibility
* xrange() only seems to have default comparability
* NAN
801 - 900 of 4320 matches
Mail list logo