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
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:
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:
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:
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:
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
<http://bugs.python.org/issue28
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
Changes by Martin Panter :
--
resolution: -> duplicate
status: open -> closed
superseder: -> test_logging fails
___
Python tracker
<http://bugs.python.or
Changes by Martin Panter :
--
title: test_logging fails -> test_logging fails and freezes
type: -> behavior
___
Python tracker
<http://bugs.python.org/i
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
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'
Pyth
Changes by Martin Panter :
--
title: int no attribute 'lower' iterating email.Messasge -> int no attribute
'lower' iterating email.Message
___
Python tracker
<http://
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&r2=57343&pathrev=57344>:
“Added an __iter__() to email.message.Message for iterating over the message’s
headers.”
On
Changes by Martin Panter :
--
stage: -> needs patch
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.6, Python 3.1, Python
3.2
___
Python tracker
<http://bugs.python.org/iss
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
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:
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:
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
1301 - 1400 of 9831 matches
Mail list logo