Terry J. Reedy added the comment:
assertWarns is new in 3.2 and not in 2.7.
The sentence was copied from the assertRaises section but not changed.
Thanks for reporting.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type: enhancement -&
Terry J. Reedy added the comment:
Yes, 'long int' should just be 'int' in 3.x.
However, int/int (integer division) is *not* the same thing as int/float. In
the latter case, the int is converted to float first and if that conversion
fails, there is no result.
Now th
Terry J. Reedy added the comment:
I re-ran with setUp 'raise' changed to 'pass' to see the effect of raise
AssertionError or unittest.SkipTest in tearDown and indeed the test fails or
skips even then. I suggest adding ', other than AssertionError or SkipTest,'
ju
Terry J. Reedy added the comment:
I tried to run the currently unnecessary Mac 'darwin' check in 2.7 with
if sys.platform == 'darwin':
from lib-tk.test.runtktests import check_tk_availability
# tkinter.test.suppport in
Terry J. Reedy added the comment:
Based on recent python-list posts, there is also 'break is bad' propaganda
going around. Perhaps we should say that loop-and-a-half with break is
preferred (or at least equally acceptable) to repeating code.
while True:
value = getvalue()
if
Terry J. Reedy added the comment:
-def temp_cwd(name='tempcwd', quiet=False, path=None):
+def temp_cwd(name='tempcwd', quiet=False):
Since this parameter removal was pushed, the Windows buildbots consistently
have this new error in this Windows-only test
Terry J. Reedy added the comment:
Some comments on patch 6:
1. tearDownClass was omitted, resulting in boxes left on the screen, at least
when running in Idle with win7. I added this to the README.
I am also getting messages like "warning: callback failed in WindowList : invalid command
New submission from Terry J. Reedy:
Writing tests for FormatParagraph.py #18226 revealed that it could use some
improvements.
At minimum, some for format_paragraph should probably be replaced with
textwrap.wrap (or the class) in order to handles double spacing after
sentences
Terry J. Reedy added the comment:
Patch attached with current version. I noted in a comment that we should
probably replace some of format_paragraph with textwrap.wrap.
The find_paragraph test works fine with the current text mock. I split one test
method and will probably do more.
It could
Terry J. Reedy added the comment:
As of this moment, the test has run on one of the two Win7 machines and the xp
buildbot. It also runs by itself on my win7 desktop with a fresh pull.
--
___
Python tracker
<http://bugs.python.org/issue15
Terry J. Reedy added the comment:
+-infinity and nans were created for reasons that do not apply to standard
python. In Fortran, C, etcetera, float arrays can only contain floats (hence
calling a non-number a float) and continuing a computation after numerical
error is more difficult or
Terry J. Reedy added the comment:
I would prefer one type too, if it can be done gracefully enough. I had thought
of a set-mode function (method), but anticipate objection to such modal
action-at-distance behavior. A context manager, which I had not thought of,
somewhat alleviates that
New submission from Terry J. Reedy:
Current situation:
test.support.requires starts with
if resource == 'gui' and not _is_gui_available():
On windows, _is_gui_available() uses ctypes to determine that there really is a
graphics screen. On other systems, it just returns True, ev
Terry J. Reedy added the comment:
This is working, so closing. I opened #18604 for consolidating gui checks in
test.support.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python track
Terry J. Reedy added the comment:
> What about the second line?
What second line?
> It doesn't catch any exception
It? I do not understand your point. Your example works as documented, including
"any unexpected exception is an error".
Actually, that should be '
Terry J. Reedy added the comment:
I am re-closing as there is no defined bug to fix, and 2.7 is closed to
enhancements.
--
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tr
Terry J. Reedy added the comment:
In in absence of the information needed to consider this a current Python bug,
I am closing it as either out-of-date (already fixed) or invalid (a third-party
problem).
--
resolution: -> out of date
stage: test needed -> committed/rejected
Terry J. Reedy added the comment:
I agree with the proposal.
Some of the code seems redundant with code we already have.
In Python, I would write
def codepoint_from_U_notation(name, namelen):
if not (4 <= namelen <= 6): raise
return chr(int(name, 16))
maybe with try-except to re
New submission from Terry J. Reedy:
Three related doc change proposals. The Versions only apply to the third as the
first two are for PEP 8.
1. PEP 8 has a section entitled "Encodings (PEP 263)" with a link to the
verbose PEP. I think it would be better if it were "Source E
Terry J. Reedy added the comment:
If the iterator for 'self' were de-structive, if it removed (popped) the test
from whatever structure holds it before yielding it, the messiness of enumerate
and the new ._removeTestAtIndex method would not be needed and 'for test in
self
Terry J. Reedy added the comment:
No, but I recreated it from my description and attached it. But see next
message.
--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file31135/18270-27.diff
___
Python trac
Terry J. Reedy added the comment:
Looking further at handling debug, startup, cmd, or script options. When any of
these are set, enable_shell is also, so to reach here, shell must be true, so
only the MAC test, the subject of this issue, needs protection. Smaller patch
(fewer lines changed
Terry J. Reedy added the comment:
With that fixed, I am inclined to close this.
--
___
Python tracker
<http://bugs.python.org/issue18570>
___
___
Python-bug
New submission from Terry J. Reedy:
[0. On mailing lists, 'lambda expression' is used rather than 'lambda form'.
Docs use both. Consistency across docs is a broader issue than this one. So
leave title alone for this one.]
1. (first sentence) "By popular demand, a fe
New submission from Terry J. Reedy:
Functional Programming HowTo, near the end, has a section
Small functions and the lambda expression
http://docs.python.org/3/howto/functional.html#small-functions-and-the-lambda-expression
To illustrate, it starts with
adder = lambda x, y: x+y
Terry J. Reedy added the comment:
Patch looked good, so I backported to 2.7 (attached, in case there are
problems) and pushed.
--
assignee: -> terry.reedy
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
Added file: http://bug
Terry J. Reedy added the comment:
Can you add a reference for the coefficients?
I believe
def test_main():
test.support.run_unittest(ColorsysTest)
if __name__ == "__main__":
test_main
has been and is being replaced in other test files with
if __name__ == "__main__":
Terry J. Reedy added the comment:
I agree. Go ahead and push.
--
___
Python tracker
<http://bugs.python.org/issue14323>
___
___
Python-bugs-list mailing list
Unsub
Terry J. Reedy added the comment:
Ezio 2. Explicitly say "use 'as' instead of ','". Someone who does not know
that 'as' is available since 2.6 may not understand.
3. 'byte' may be interpreted a
Terry J. Reedy added the comment:
Byte 0, not byte 1, is the start byte, and it should be F0, as in output below.
However, I now see "invalid continuation byte'.
In 2.7.5,
# -*- coding: utf-8 -*-
s = b'𐒢' # output same if uncomment following lines
#s = u'𐒢'.enc
Changes by Terry J. Reedy :
--
dependencies: +IDLE Unit test for FormatParagrah.py
___
Python tracker
<http://bugs.python.org/issue18583>
___
___
Python-bug
Terry J. Reedy added the comment:
Added tests to get 100% coverage (not counting in __name__ block).
More test cleanups. Some of the extra newlines come from getting to 'end'
instead of 'insert'. Others are avoided by adding newline to end of test
strings, which is more
Stephen J. Turnbull added the comment:
A few small comments and nits.
1. I'm with the author on the question of a sum function in this module. The
arguments that builtin sum isn't accurate enough, and neither is math.fsum for
cases where all data is of infinite precision, are eno
Terry J. Reedy added the comment:
I got rid of the shutdown warning by replacing EditorWindow with a simple mock,
as explained in the test file. Doing so also reduced the running time from
about .40 seconds to .25 (it was 1.0+ before I reduced the redundancy of the
tests). All the asserts
Terry J. Reedy added the comment:
This tracker is for patching CPython, not Windows or 3rd-party C libraries.
Ramchandra is right, Python does not display windows. In the cases you mention,
this is done by 3-rd party cross-platform graphics libraries interacting with
Windows' native gra
Terry J. Reedy added the comment:
Unless there is a buildbot problem, further enhancements of either file will be
part of #18583
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
superseder: -> Idle: enhance For
Changes by Terry J. Reedy :
--
assignee: docs@python -> terry.reedy
nosy: +terry.reedy
stage: -> commit review
___
Python tracker
<http://bugs.python.org/i
Terry J. Reedy added the comment:
Zhongyue, we merge 3.x patches forward (currently 3.3 to 3.4) so only one patch
is usually needed unless the differences are non-trivial. It is easier if
different version patches are tagged with the version in the filename.('-27',
for instance.
If
Terry J. Reedy added the comment:
I am not able to reproduce any problem on Win 7 with either recent 2.7.6a0
(repository) or 3.3.2. Nothing happens if I click on [File] or anywhere else
outside of the entry box or [_]...[X] window buttons. Please give the signin
info such as "Python
Terry J. Reedy added the comment:
This was the only failure on 2 of 4 buildbots when I last looked.
test_os has several methods like this:
def test_dup2(self):
if hasattr(os, "dup2"):
self.check(os.dup2, 20)
Should the hasattr be moved to skipUnless for al
Terry J. Reedy added the comment:
Failure is intermittent. The only related lines in test_codeccallbacks are
002: import html.entities
102:l.append("&%s;" % html.entities.codepoint2name[ord(c)])
--
nosy: +terry.reedy
___
Python
Terry J. Reedy added the comment:
The 'fix', including the test, is included with the patch for #18226. It
shares with normal text the problem that selections of partial lines do not
work well. I think this might be fixed in #18583 by only re-wrapping compl
Terry J. Reedy added the comment:
The patch applies cleanly on my 3.4 Win 7, fresh debug build. Somewhat
fortuitously, as it turns out, I have not downloaded the files needed for ssl
support. For each modified file, I ran
python_d -m test -v test_xxx
test test_nntplib crashed -- Traceback
Terry J. Reedy added the comment:
Applies and runs (with text_posix entirely skipped).
--
___
Python tracker
<http://bugs.python.org/issue18702>
___
___
Python-bug
Terry J. Reedy added the comment:
Based on working with the #18226 patch, I now think that rewrapping partial
lines is a bug. Although I removed some problematical tests, I think there is
still one that verifies buggy behavior. The outline of steps (which necessarily
omits some details) would
New submission from Terry J. Reedy:
idlelib.IdleHistory is only imported in PyShell.PyShell. History is only
instantiated once, with output_sep defaulting to \n. This constant parameter
and the consequence splitting and joining with \n in ._get_source and
._put_source are useless. After the
Changes by Terry J. Reedy :
--
dependencies: +IDLE Unit test for IdleHistory.py
___
Python tracker
<http://bugs.python.org/issue18732>
___
___
Python-bugs-list m
Terry J. Reedy added the comment:
Note to myself. The current test suite has one test commented out because it
worked with EditorWindow but not the mock. It is possible that it is a
mark-gravity issue. (I ran into this with the mock for IdleHistory
Terry J. Reedy added the comment:
IdleHistory.py is identical in 2.7 and 3.3. It is only imported in PyShell.py
(within class PyShell, line 852 in 3.3). History is only initialized once, with
the default output_sep. See #18732 for deleting the unneeded parameter and
associated cruft.
The
Changes by Terry J. Reedy :
Added file: http://bugs.python.org/file31287/test_idlehistory3.diff
___
Python tracker
<http://bugs.python.org/issue18425>
___
___
Python-bug
Terry J. Reedy added the comment:
Revised patch with tests modified to pass, as described in pydev post.
1. test. added to test_statistics_approx import
2. delete test_main and change ending of both to
if __name__ == '__main__':
unittest.main()
--
nosy: +terry.reedy
Added
Terry J. Reedy added the comment:
Moved most initialization to method setUp to prevent cascading of test
failures. Added info about History.fetch and FetchTest.fetch_test methods.
Added tests for non-cyclic and special behavior and for fetch event wrappers.
Coverage is essentially 100
Terry J. Reedy added the comment:
Please visit
http://www.python.org/psf/contrib/
http://www.python.org/psf/contrib/contrib-form/
and submit a Contributor Agreement. This process is complete when '*' appears
after your name here, as with mine
Changes by Terry J. Reedy :
--
resolution: -> fixed
superseder: -> IdleHistory.History: eliminate unused parameter; other cleanup.
___
Python tracker
<http://bugs.python.org/i
Changes by Terry J. Reedy :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue18425>
___
___
Python-bugs-list mailing list
Unsubscri
Terry J. Reedy added the comment:
test.regrtest is semi-useless, at least for idle, in 2.7 -- see commit message.
First run single file directly or python -m test.test_idle.
--
___
Python tracker
<http://bugs.python.org/issue18
Changes by Terry J. Reedy :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Terry J. Reedy:
It has become apparent from various discussions in recent months that
chain.from_iterable is at least as useful as chain. In fact, I now think that
'chain' should have been what chain.from_iterable is, with current chain(a,b,c)
done as chain((a,
Terry J. Reedy added the comment:
My counter proposal #18752 is that chain.from_iterable become a deprecated
alias for a new function, chain_iterable. With '@classmethod' removed, the
current Python equivalent would work for chai
Terry J. Reedy added the comment:
LGTM
--
nosy: +terry.reedy
stage: patch review -> commit review
type: -> behavior
___
Python tracker
<http://bugs.python.org/i
Terry J. Reedy added the comment:
You changed "NNTP_CLASS = nntplib.NNTP_SSL", which could potentially fail, to
"NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None)", which cannot fail. Since
that was the only thing that previously could fail, the change leaves nothi
Terry J. Reedy added the comment:
test_datetime passes on current 3.3 and 3.4.
datetimetest.py now gives the same answer for all 4 classes
unsupported operand type(s) for +: 'SubPy' and 'int'
unsupported operand type(s) for +: 'int' and 'SubPy'
NotI
Terry J. Reedy added the comment:
'Filename extensions' are a proper subset of 'suffixes'.
https://en.wikipedia.org/wiki/Filename_extension
Dan 'solutions' indicates that he thinks that the two sets are or should be the
same, which they are not. The only thing t
Terry J. Reedy added the comment:
My original suggestion was to put the possibly failing assignment inside
@classmethod
def setUpClass:
NNTP_CLASS = nntplib.NNTP_SSL
so that failure of the assignment would be be reported, but not affect import
Terry J. Reedy added the comment:
It would be fine with me to shorten the suggestion and not repeat the defaults.
They are currently in both doc and docstring, but with *more* words than I used.
"The file name will begin with *prefix* and end with *suffix*. There is no
automatic addition
Terry J. Reedy added the comment:
I added the docstrings that I wish had already been present.
The only 2.7-3.3 difference in SearchDialogBase is Tkinter/tkinter.
--
assignee: -> terry.reedy
stage: -> patch review
___
Python tracker
Terry J. Reedy added the comment:
A subtle point about coverage. The target module must be imported.
from idlelib import SearchDialogBase as sdb # works.
import idlelib.SearchDialogBase as sdb # does not
at least not as I invoke coveragepy in my batch file.
With this change, the four
Terry J. Reedy added the comment:
Ezio: grepping test/*.py for (name)'= self.assertEqual' gets 182 hits in 15
different files. If you are generically opposed to name localization, please
take your case to pydev. I also found 'unless = self.assertTrue' and am sure I
hav
Terry J. Reedy added the comment:
As with searchdialogbase tests, I get the following in the console every time I
run the test file within idle.
'''
can't invoke "event" command: application has been destroyed
while executing
"event generate $w <>&q
Changes by Terry J. Reedy :
Added file: http://bugs.python.org/file31369/18489-test_searchengine4.diff
___
Python tracker
<http://bugs.python.org/issue18489>
___
___
Pytho
Terry J. Reedy added the comment:
Summary:
I am in favor of making more Python code analysis available from within Idle. I
have an alternate, more generalized proposal. I am opposed to this specific
proposal and think this issue should be closed.
Alternatives: when and how to analyze.
1
Terry J. Reedy added the comment:
For next edit -- docstring for class SearchDialogBase:
> +a row of standard radiobuttons (create_option_buttons);
This is wrong -- these are Checkbuttons
> +a row of dialog specific radiobuttons (create_other_buttons).
dialog-sp
Terry J. Reedy added the comment:
Victor, do you have any opinion on this unicode filename issue?
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue13
Terry J. Reedy added the comment:
Slight correction: While I do not believe I have seen *clipboard* contents
pasted, after running a program from the editor that prints (to the shell), I
*have* seen the last line reprinted when trying to enter something new as the
prompt. This sometimes might
Terry J. Reedy added the comment:
For msilib, 'int numbers' should just be 'ints' or 'integers'.
---
For PC/winreg.c '''\
PyDoc_STRVAR(PyHKEY_Detach_doc,
"key.Detach() -> int\n"
...
"On 64 bit windows, the result of this function i
Terry J. Reedy added the comment:
Incorrect fixes.
accidentaly -> accidentally
occurence -> occurrence
--
nosy: +terry.reedy
___
Python tracker
<http://bugs.python.org/i
New submission from Terry J. Reedy:
Idle once used os.spawnv to open the user subprocess and 2.7 still does.
Sockets were then used to interact with the subprocess. Since rev71746,
2011-8-3, 3.2+ use subprocess.Popen but still use sockets. A rare but continual
problem is failure to make the
Terry J. Reedy added the comment:
I opened #18823 "Idle: use pipes instead of sockets to talk with user
subprocess" I think this or a socket fix is needed before we remove -n.
--
___
Python tracker
<http://bugs.python.o
Terry J. Reedy added the comment:
Big changes: monkey-patched module so tests of functions not using Text are
non-gui; split search tests from other class tests as part of this. Several
other little changes.
The four lines still not covered are the bodies of
if ok: start = last
if wrapped and
Terry J. Reedy added the comment:
The attached patch works on 3.3 and just need a small addition for 100$
coverage. After that, I intend to commit after porting to 2.7 (only two lines
to change, I think) and testing it there.
I split the search test case into three, one for each method. The
Terry J. Reedy added the comment:
Adding
engine.patvar.set(None)
Equal(search(text), None)
to test_search completed the coverage.
--
___
Python tracker
<http://bugs.python.org/issue18
Stephen J. Turnbull added the comment:
I have a gentoo host, but I'd like to know how did the OP get a debug Python in
the first place? The ebuild for python 2.7.5-r1 doesn't say anything about
debug options. "How" would preferably include information about the C comp
Terry J. Reedy added the comment:
For the tutorial, I agree with presenting json rather than pickle for all the
reasons given, with pickle mentioned in a paragraph at the end (more powerful,
more dangerous, see warning in manual before using).
--
nosy: +terry.reedy
stage: -> ne
Terry J. Reedy added the comment:
I think this should be closed as extremely likely to be a matplotlib error.
--
nosy: +terry.reedy
___
Python tracker
<http://bugs.python.org/issue18
Terry J. Reedy added the comment:
The two cases are not parallel.
a = sorted(b)
abbreviates
a = list(b)
a.sorted()
which occurred often enough to be a nuisance. With this proposal,
a = reversed(b)
would abbreviate
a = reversed(list(b))
which is probably less common and certainly less
Terry J. Reedy added the comment:
README.txt is also used in lib/idlelib and lib/idlelib/idle_test. In the latter
case, I was told to use this.
--
nosy: +terry.reedy
___
Python tracker
<http://bugs.python.org/issue18
Terry J. Reedy added the comment:
The discrepancy between doc and code should be eliminated. In this case, it
seems the doc should be changed (in 3.3 as well). Would 'not' in the right
place suffice?
--
nosy: +terry.reedy
___
Python trac
Terry J. Reedy added the comment:
I think the warning should be silenced on all versions where it occurs. There
is no real problem here, but there can be with multiple opens without close on
non-refcounted interpreters. Patch looks good but I have not tried it.
--
nosy: +terry.reedy
Changes by Terry J. Reedy :
--
resolution: -> duplicate
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue17224>
___
___
Python-bugs-
Terry J. Reedy added the comment:
There was a issue about people not being able to open windows 'library' files
from Idle, but it was determined not to be an Idle problem. I cannot find it
now. The outcome may have been that this was presumed to be a tk bug, but your
report
Terry J. Reedy added the comment:
I have thought about such a feature also. I would at least like to have patch
to try it out. Possible? I suspect so.
--
nosy: +terry.reedy
versions: +Python 3.4 -Python 2.7
___
Python tracker
<h
Terry J. Reedy added the comment:
Perhaps I am confused because I did not notice the switch between
builtins.__import__ and importlib.__import__ -- and I do not know the relation
between the two, if indeed they are two and not one. What I read and understood
is
* importlib.import_module doc
Terry J. Reedy added the comment:
> How about we simply add the warning from
> http://docs.python.org/3/library/pickle.html#module-pickle to the beginning
> (or end) of the section?
That is one possibility.
> The Official Python Tutorial has always assumed a certain
Terry J. Reedy added the comment:
Two years later, I get the exact same failure in both repository 3.3.2+ and
installed 3.3.2. So eol extension and .hgignore seem irrelevant.
I sometime think Python should stop generating files with \r\n. In other words,
change os.linesep to '\n
New submission from Terry J. Reedy:
These are due to \r in line endings, as with #12037.
File "F:\Python\dev\py34\lib\test\test_sax.py", line 634, in test_expat_file
self.assertEqual(result.getvalue(), xml_test_out)
Assert fails because off many \rs in xml_text_out. Same in
li
Terry J. Reedy added the comment:
On #12037, David suggests instead the equivalent of this:
with open(TEST_XMLFILE_OUT) as f:
xml_test_out = f.read().encode('ascii')
--
___
Python tracker
<http://bugs.python.o
Terry J. Reedy added the comment:
Attached patch works here too. Only the test...rfc822 part applies to 3.3, both
to 3.4. The same idea works for #18889 too.
--
Added file: http://bugs.python.org/file31527/12037_test_email2.diff
___
Python tracker
Terry J. Reedy added the comment:
Adding something like '(not builtins.__import__)' or '(different from
builtins.__import__') after 'importlib.__import__' should reduce the
possibility of confusing the two and expecting something that will not happen.
You mig
Terry J. Reedy added the comment:
As I said on #12037, I would rather \r was not in the file. I do not know if it
is present in the master repository or added by hg when cloning.
Buildbots and developer desktops are different environments. The tests must
work on both.
Nit 1: right, I should
Stephen J. Turnbull added the comment:
I did "emerge =dev-lang/python-2.7.5-r1" *twice* with the environment
configuration described in msg196520, then *once* with it disabled because one
of the cases you described was when you tried to revert to a non-debug Python.
(Besides, I am
8201 - 8300 of 13135 matches
Mail list logo