New submission from R. David Murray:
The subject says it all, but here is an example (from issue 18044):
>>> msg = message_from_string('To: =?utf-8?q?Eric?= \n\n',
policy=default)
>>> msg['To']
'=?utf-8?q?Eric?= '
--
compon
R. David Murray added the comment:
The issue for the second bug is issue 18431.
--
___
Python tracker
<http://bugs.python.org/issue18044>
___
___
Python-bug
R. David Murray added the comment:
Regardless of whether or not it *can* be fixed, I personally would not expect
the file position to be either unchanged or predictable. The file object is
being passed to something that is going to read and/or write from it, after
all. If the calling
R. David Murray added the comment:
Hmm, yes. Perhaps it should say "does not advance the read position"?
--
___
Python tracker
<http://bugs.python.o
R. David Murray added the comment:
Fixed. Thanks for the report, Tim.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
I don't think the comment about save and restore of the file position adds
enough value to be worth the possible confusion ("do I only need to save and
restore around peek? Why?") I think the sentence should read, ex, "Calling a
:class
R. David Murray added the comment:
Thanks, Madison. I tweaked the wording slightly, but the essence is the same
:).
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bug
R. David Murray added the comment:
Looks like this is causing buildbot failures:
http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/2330/steps/test/logs/stdio
http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6094/steps/test/logs/stdio
--
nosy
R. David Murray added the comment:
I chose 'access position' because that's the terminology used in the 'seek' man
page. 'file position' sounds odd to me, but since that is the term already
used it does make sense to be consistent.
--
a
R. David Murray added the comment:
Thanks. Fixed.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
versions: +Python 2.7, Python 3.3
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
Yeah, DISPLAY is how unix finds the X11 display. I don't remember how the
tkguionly tests deal with that being missing, but since the tests are run
"headless" there is indeed no DISPLAY for the t
R. David Murray added the comment:
Looks like ttk_guionly gets skipped on my buildbot because of the following
code at the top of test_ttk_guionly:
try:
ttk.Button()
except TclError as msg:
# assuming ttk is not available
raise unittest.SkipTest("ttk not availabl
R. David Murray added the comment:
Using os.path.join to create the filenames should also work, I would think.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue18
R. David Murray added the comment:
It enables the resource when the tests are run via unittest. (That is, it is
equivalent to specifying '-u urlfetch' when running regrtest.)
--
nosy: +r.david.murray
___
Python tracker
<http://bu
R. David Murray added the comment:
NB: This is only a bug in python2.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue18482>
___
___
Pytho
R. David Murray added the comment:
I'm sorry, I misspoke. It only works when you run the test file as command:
./python Lib/test/test_codecmaps_cn.py
(which uses unittest.main, thus my error in calling it 'via unittest').
So, the fact that the tests don't run if discov
R. David Murray added the comment:
+1. You should probably open a new issue for that proposal.
--
___
Python tracker
<http://bugs.python.org/issue18258>
___
___
R. David Murray added the comment:
Haypo: it gives a result on python3.
--
___
Python tracker
<http://bugs.python.org/issue18482>
___
___
Python-bugs-list mailin
R. David Murray added the comment:
Ah, yes, I see that you are correct.
--
resolution: -> out of date
stage: -> committed/rejected
status: open -> closed
type: crash -> enhancement
___
Python tracker
<http://bugs.python
R. David Murray added the comment:
I presume you mean you are motivated to turn it on (to catch the bugs). I
still think that also fixing the bugs in the other places str(bytes) is used
would be better. Are they occurring in third party libraries? How often do
you run into it
R. David Murray added the comment:
Since we only use unittest for running subsets of our test suite, I think the
better behavior is to run everything that -u all normally runs. That is, when
one uses unittest to run a bit of the test suite, one generally wants to run
the tests one specifies
R. David Murray added the comment:
That's because there's nothing to assert. The test is making sure no exception
is raised. (Why no exception is raised is a good question, but that design
predates my stewardship of the module :)
A comment to that effect would probably be a
R. David Murray added the comment:
We prefer one ticket per issue. The line is fuzzy...I think it would be OK to
fix these all at once since they are all small cleanups in test_email, but as
you can tell from how complex the title got, they are not really conceptually
related.
The try
R. David Murray added the comment:
The fundamental behavior here is not going to change, as maintaining a bright
line between bytes and strings is central to Python3's design.
The question is, does the method for achieving your goal need better
documentation?
--
assignee: -&
R. David Murray added the comment:
The tuple pluralization looks correct to me.
--
___
Python tracker
<http://bugs.python.org/issue18516>
___
___
Python-bug
R. David Murray added the comment:
Do you understand why it was called again with the exception set? I'm worried
that there might be a change in behavior here that the tests aren't catching.
--
nosy: +r.david.murray
___
Python trac
R. David Murray added the comment:
My expectation would be that we want the tests to be runnable (and be run, not
skipped) with Python installed, and thus we build the test module. (Whether or
not our tests actually *can* be run with Python installed is an open question,
though.) And
R. David Murray added the comment:
I'm inclined to agree with Ramchandra. It might be worth a doc footnote,
though.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
It looks like you are still patching get_payload. This should be a really
simple patch against set_payload.
It occurs to me that there could be a backward compatibility concern if passing
binary to set_payload currently actually works in some cases, so we
R. David Murray added the comment:
Raised by what? I thought the callback *was* the thing raising the
exception? Are you sure you don't just need to clear the exception
if the callback function raises one?
--
___
Python tracker
R. David Murray added the comment:
Rather than closing it, we converted it to a documentation issue. I think it
is worth a footnote in the docs, since it is not obvious (without reading the
source code) that a return statement will cause timeit to return an invalid
result instead of raising
R. David Murray added the comment:
Yes, that's what I had in mind.
--
___
Python tracker
<http://bugs.python.org/issue18324>
___
___
Python-bugs-list m
R. David Murray added the comment:
OK, this makes much more sense to me now :)
I take it the overflow error is the only one the C code could ever raise? If
so, the patch looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue18
R. David Murray added the comment:
Unless I'm misunderstanding something, the current implementation does match
the current documentation: if < n, returning bytes
is returning "up to n". "Up to" means it could be "less than".
So you are advocating a ch
R. David Murray added the comment:
I'm in favor of treating this a bugfix. It is a bug for repr to raise a
recursion error, IMO.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
Anatoly: FYI "Do not hijack the issue" is not a collaborative conversation
style in English. A more collaborative conversation style would be to leave
out that part of the sentence, and just say that you think value interpretation
should be
Changes by R. David Murray :
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue18543>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
So this represents a change in behavior of the socket library on Fedora 18 vs
earlier versions? Do any of the impalib tests fail?
--
components: +email
nosy: +barry, r.david.murray
versions: +Python 3.4
___
Python
R. David Murray added the comment:
OK, yeah, this seems to be long standing, untested behavior. I will take a
look at what should be done here.
--
___
Python tracker
<http://bugs.python.org/issue18
R. David Murray added the comment:
Oh, it would definitely be a backward compatibility issue. Imagine code that
does a dirname and branches like this:
d = dirname(somepath)
if d:
else:
Or to give a more concrete example:
path = fn if dirname(fn) else
R. David Murray added the comment:
Thanks, but the new test doesn't fail. With your test patch,
test_default_values fails, but that is explicitly checking for the 'timeout'
attribute, which isn't actually part of the public API. The new test passes
even without t
R. David Murray added the comment:
Thanks, Vajrasky.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
versions: +Python 3.3
___
Python tracker
<http://bugs.python
R. David Murray added the comment:
The patch looks good to me. Can you add a pickling test?
--
___
Python tracker
<http://bugs.python.org/issue17818>
___
___
R. David Murray added the comment:
Well, the FAQ entry is "why didn't a .pyc file get created", so presumably the
querant knows enough to be looking for one to get created, and so presumably
knows more-or-less what it is.
It seems to me that your rewording loses the sense o
R. David Murray added the comment:
Is your patch backward?
"Treat the path naturally" assume everyone agrees with you as to what is
natural. It would be better, I think, to be explicit about it.
--
___
Python tracker
<http://bu
R. David Murray added the comment:
Thanks, Tshepang.
--
nosy: +r.david.murray
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
R. David Murray added the comment:
No, but you can do this:
>>> utils.getaddresses(['a...@example.com, b...@example.com'])
[('', 'a...@example.com'), ('', 'b...@example.com')]
Not the worlds most intuitive API, I know...which
R. David Murray added the comment:
pyclbr is parsing the source code, and since _Aifc_params is not a class, it
does not get detected. So we just need to add it to the ignore list in the
pyclbr test.
I'm also getting this when I run the test with your patch applied:
/home/rdmurray/p
R. David Murray added the comment:
Thanks, Claudiu.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
The definition of an Iterable is a class that defines an __iter__ method.
Your class does not, so the behavior you site is correct.
The glossary entry for 'iterable' could use a little clarification. A class
that defines __getitem__ is an itera
R. David Murray added the comment:
Yes, this is a very good point. (And your passing test is worthwhile, you are
correct.)
People are expected to be able to write handlers, so clearly the timeout API
needs to be documented, if for no other reason than to keep a handler writer
from
R. David Murray added the comment:
Python 3.2.3 (default, Jun 15 2013, 14:13:52)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> '\uD80C\uDC80'
'\ud80c\udc80'
>&
R. David Murray added the comment:
Probably. I think the default build on Gentoo is wide.
That seems to make the existing text even more incorrect :)
--
___
Python tracker
<http://bugs.python.org/issue18
R. David Murray added the comment:
Thank you for the report. We currently don't have automated testing of the
doctest strings, and I must have neglected to hand test those examples before
release. I will fix (and test!) them ASAP.
--
components: +email
nosy: +barry, r.david.m
Changes by R. David Murray :
--
nosy: +denkoren
___
Python tracker
<http://bugs.python.org/issue6471>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
This is a duplicate of issue 6471, which we really do need to fix. But there
are backward compatibility concerns with fixing it in 2.7, I'm afraid.
--
nosy: +r.david.murray
resolution: -> duplicate
stage: -> committed/rejected
s
R. David Murray added the comment:
OK, this fixed. The 'as_string' example will still fail, as I never added the
policy argument to that method. I'll deal with that in a separate issue.
Unfortunately it is quite possible there are other errors in the new docs,
since they a
R. David Murray added the comment:
Yes, we make the issue have a dependency on the issue it is using. I have done
that for this one.
--
dependencies: +Idle find function closes after each find operation
nosy: +r.david.murray
resolution: works for me ->
stage: -> patch
New submission from R. David Murray:
When I wrote those docs I intended to add a policy argument to as_string, but
did not do it by the time 3.3 was released. The docs for 3.3 need to be
corrected, and I need to decide if I do want to add that keyword to as_string
in 3.4 (the answer is
R. David Murray added the comment:
Thanks for the report. Actually that first 'fromlines' should be 'fromfile'.
Looks like someone made a typo when converting the example to use the 'with'
statement.
--
nosy: +r.david.murray
resolution: -> fixed
sta
R. David Murray added the comment:
Committed the doc patch. Thanks Sijin.
--
nosy: +r.david.murray
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
R. David Murray added the comment:
The patch looks good, but I would prefer that the test not use mock+knowledge
of how get_comment is implemented, but instead test the public API by actually
creating a module and deleting the source file. test.script_helpers can be
used to do this easily
R. David Murray added the comment:
Heh, that's the kind of behavior change I was worried about :(.
--
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
I think it is fine to backport this, since it only affects tests, and allows
the backported idle tests to be consistent.
For 3/4, I agree that requires should skip always if the GUI infrastructure is
not available. The "don't skip if main
R. David Murray added the comment:
The support package is fixed (I presume :), but there was also a desire
expressed to expose this functionality in shutil, since it can arise in
"normal" Python programs as well as in the test suite. Given that the fix has
been successful in the
R. David Murray added the comment:
Thanks, Claudiu.
--
nosy: +r.david.murray
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
Yeah, deferred blocker is fine with me.
--
priority: release blocker -> deferred blocker
___
Python tracker
<http://bugs.python.org/iss
R. David Murray added the comment:
Well, you haven't done anything wrong, but I'm not sure what we can do in
response to the report. What how will the answer to the question serve you?
What will you know after getting the answer that you didn't know before getting
the answ
R. David Murray added the comment:
Well, it is the case that if you substitute a list comprehension for a
generator expression in arbitrary code, most of the time it would work but
occasionally it wouldn't, because the runtime behavior is different (lazy
production versus all-at
R. David Murray added the comment:
That would give you a false positive, though. It would return True for the 'y'
in my example, which is not iterable. So Iterable's behavior here is an
example of the Python design rule "resist the temptation to guess".
As Terry
New submission from R. David Murray:
Emails and web pages may specify a character set of iso-8859-8-i, which has
exactly the same code points as iso-8859-8. The -i has to do with how
bi-directional text is handled, but doesn't affect the encoding:
http://lists.w3.org/Archives/Publi
R. David Murray added the comment:
“What is the proper way of asking if an object is iterable if it does not
support the iterator protocol but does support the old getitem protocol?”
The *only* answer to that question is to try to iterate it, and see if you get
a KeyError on "0".
New submission from R. David Murray:
When Microsoft handles Korean text, it uses its own code page, cp949, which is
a superset of ks_c-5601-1987. But when talking to the rest of the world, it
claims that the character set name is ks_c-5601-1987. This means that text
claimed to be in ks_c
R. David Murray added the comment:
I got the impression from what I read that -e included additional control
sequences, but perhaps I misunderstood and that only meant that the data stream
was expected to *use* additional control sequences but the control codes
themselves are part of the base
R. David Murray added the comment:
I think it would be confusing for assert to raise anything other than an
AssertionError, so I also think this should be rejected.
It might be interesting for there to be a way to call unittest's assert methods
in a debug context (that is, without havi
R. David Murray added the comment:
Terry: I would not be in favor of using the normal iter, since iterating a
collection doesn't normally empty it, and there may be tools that iterate a
test suite outside of test execution. Adding a pop_iter method would be a
backward compatibility
R. David Murray added the comment:
This appears to have turned the buildbots red.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue17
R. David Murray added the comment:
If your code is catching an exception generated by an assert statement, your
code is using assert incorrectly. There is never any reason, as far as I can
see, to catch an assert outside of a testing framework, and in a testing
framework you definitely want
R. David Murray added the comment:
This issue is actually about adding the aliases to the codecs module. I'm not
entirely sure at this point what the canonical character set name should be for
email output (which is what the ALIASES table con
R. David Murray added the comment:
This is a only a duplicate of issue 1300 in the sense that that issue points
out that list2cmdline has nothing to do with passing/quoting strings for
cmd.exe.
list2cmdline is an internal function of the subprocess module. Its docstring
documents the MS C
R. David Murray added the comment:
The first line above is incomplete. I meant that issue 1300 is only a
duplicate in the sense that it points out that list2cmdline implements the MS C
quoting rules, *not* the cmd.exe quoting rules.
--
___
Python
R. David Murray added the comment:
I'm not going to object to the name, since I see that it is used elsewhere in
programming for the proposed meaning. But allow me to rant about the
corruption of the English language here. To me, "coalesce" should involve a
computation base
R. David Murray added the comment:
The list form of Popen should never be used with shell=True.
It would be very good if someone would propose a 'cmd.exe quote' function for
the stdlib.
But both of these points don't have anything to do with this issue, as fa
R. David Murray added the comment:
"Using the same rules as the MS C runtime" means that, given a sequence (list)
of arguments, create a string that uses the same quoting that the MS C runtime
uses. That is, if you have a sequence of arguments in a C program, and you
want to ca
R. David Murray added the comment:
Did you intend to attach a patch?
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue18657>
___
___
Pytho
R. David Murray added the comment:
Thanks, Madison.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
versions: +Python 3.3 -Python 3.5
___
Python tracker
<http://bugs.python
R. David Murray added the comment:
Looking just at the proposed functionality (taking a prefix) and ignoring the
requested complexification :), the usual name for the text produced by this
process is a "lead"
(http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Lead_section)
R. David Murray added the comment:
Technically a bytes object is sequence of integers, not a sequence of bytes.
That is, if you iterate it, you get integers. Python doesn't have a 'byte'
type.
--
nosy: +r.david.murray
___
Python
Changes by R. David Murray :
--
nosy: +vinay.sajip
___
Python tracker
<http://bugs.python.org/issue18671>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
This is more of a documentation issue than a code issue. To be mathematically
precise, the text and error message should read "a non-negative value".
Alternatively the text and error could be changed to report that timeout may
not be negative, w
R. David Murray added the comment:
Your use cases are either already addressed by contextlib.ExitStack, or should
be addressed in the context of its existence. It is the replacement for
contextlib.nested.
--
nosy: +ncoghlan, r.david.murray
R. David Murray added the comment:
Ideally, for backward compatibility reasons we really ought to support access
by the old (incorrect) name even in 3.4 (with a deprecation warning, even more
ideally). I'm not sure if that's practical?
--
nosy: +r.da
R. David Murray added the comment:
Raising it on python-ideas sounds like a good idea, then.
I must admit that I don't understand what you mean by "combining existing
context managers into a nested one" that isn't ad
R. David Murray added the comment:
In what way does repr(x)[1:-1] not serve your use case?
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue18
R. David Murray added the comment:
Exactly. 0 means "Don't wait, just raise an error immediately if the queue is
empty/full".
--
___
Python tracker
<http://bugs.pyt
R. David Murray added the comment:
Can you reproduce this using 2.7? 2.6 only gets security fixes.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue18
Changes by R. David Murray :
--
title: Tkinter focus_get on menu causes crash -> Tkinter focus_get on menu
results in KeyError
___
Python tracker
<http://bugs.python.org/issu
R. David Murray added the comment:
We use the 'crash' type for interpreter crashes (segfaults). So goes under the
'behavior' type.
--
nosy: +r.david.murray
type: crash -> behavior
___
Python tracker
<http://
Changes by R. David Murray :
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue18691>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
This issue tracker is for reporting bugs in Python and its standard library.
Your submission looks like a request for help. You are much more likely to get
the answer to your question on the python-list mailing list. Please submit
your question there
3801 - 3900 of 10554 matches
Mail list logo