R. David Murray added the comment:
All of which isn't to discount that you might have a found a bug, by the way,
if you want to investigate further :)
--
___
Python tracker
<https://bugs.python.org/is
R. David Murray added the comment:
Hmm. Yes, \r\n should be disallowed in the arguments to Address. I thought it
already was, so that's a bug. That bug produces the other apparent bug as
well: because the X: was treated as a separate line, the previous header did
not need double q
R. David Murray added the comment:
One more tweak to the test and we'll be good to go.
--
___
Python tracker
<https://bugs.python.org/issue39040>
___
___
R. David Murray added the comment:
Ideally this should be exposed by extending the content manager. Instantiating
MIME classes is part of the old API, not the new. The code in the PR may well
be correct, but class should be hidden from the normal user (of the new API).
I'm not sure
R. David Murray added the comment:
I don't see the change to the test in the PR. Did you miss a push or is github
doing something wonky with the review? (I haven't used github review in a
while and I had forgetten how hard it
R. David Murray added the comment:
Thanks for the ping. Whether or not Serhiy's patch fixed the original problem,
the algorithm rewrite has happened so this issue is no longer relevant in any
case.
--
stage: test needed -> resolved
status: open -
R. David Murray added the comment:
Are you saying there is no (http) RFC compliant way to fix this, or no way to
fix it with the email library parsers? If the latter, the library is pretty
flexible and for internal stdlib use it would probably be permissible to
directly call methods in the
R. David Murray added the comment:
Since you parsed it as a string it is not really legitimate to serialize it as
bytes. (That will work if the input message only contains ascii, but not if it
contains unicode). You'll get the same error if you replace the garbage with
the "
R. David Murray added the comment:
AFAIR it can only be done using the roundup command line on the server.
--
nosy: +ezio.melotti
___
Python tracker
<https://bugs.python.org/issue39
R. David Murray added the comment:
Thanks for the PR, but I've noted an issue on the review. In any case we
should agree on what goes in the repr here in this issue before actually
implementing anything.
--
___
Python tracker
&
R. David Murray added the comment:
Please open a new issue for this question.
--
___
Python tracker
<https://bugs.python.org/issue10740>
___
___
Python-bug
R. David Murray added the comment:
If we can get an actual reproducer using message_as_bytes I'd feel more
comfortable with the fix. I worry that there is some other bug this is
exposing that should be fixed instead.
--
___
Python tr
R. David Murray added the comment:
message_from_bytes
--
___
Python tracker
<https://bugs.python.org/issue39384>
___
___
Python-bugs-list mailing list
Unsub
R. David Murray added the comment:
I think you are saying that you want the charset in the encoded filename to be
GBK rather than utf-8? utf-8 should certainly display correctly in your email
client, though, so if it is not there is something else going wrong.
As far as the 3 tuple not
R. David Murray added the comment:
Actually, given that the contentmanager does accept a charset parameter for
text content, it does seem reasonable to treat this as a bug. But as I said
fixing it may not be trivial.
--
___
Python tracker
R. David Murray added the comment:
The legacy API appears to be using an RFC-incorrect (but common) encoded-word
encoding, while the new API is using the RFC-compliant MIME-parameter encoding
(% encoding). Which email client are you using
R. David Murray added the comment:
Since Outlook is one of the mailers that generates the non-RFC-compliant
headers, it doesn't surprise me all that much that it can't interpret the RFC
compliant headers correctly.
I'm not sure there is anything we can do here.
I suppose som
R. David Murray added the comment:
This is not actually a duplicate of 11783. Rereading (parts of) that issue, we
decided we currently have no good way to do automatic conversion between
unicode and internationalized domains, so the user of the library has to do it
themselves. This means
R. David Murray added the comment:
I don't object to this patch, but that sure looks like a broken system.
--
___
Python tracker
<https://bugs.python.org/is
R. David Murray added the comment:
I actually agree: if most (by market share) MUAs handle the RFC-incorrect
parameter encoding style, and a significant portion does not handle the RFC
correct style, then we should support the de-facto standard rather than the
official standard as the
R. David Murray added the comment:
You are welcome to open a doc-enhancement issue for the global docs. For the
other, as noted already if you want to advocate for a change to this behavior
you need to start on python-ideas, but I don't think you will get any traction.
Another pos
R. David Murray added the comment:
Thanks for the PR. I've made some review comments.
--
___
Python tracker
<https://bugs.python.org/issue39073>
___
___
R. David Murray added the comment:
My guess is that it isn't so much that __bool__ is special, as that the
evaluation of values in a boolean context is special. What you have to do to
make a mock behave "correctly" in the face that I'm not sure (I haven't
inves
R. David Murray added the comment:
New changeset 614f17211c5fc0e5b828be1d3320661d1038fe8f by Ashwin Ramaswami in
branch 'master':
bpo-39073: validate Address parts to disallow CRLF (#19007)
https://github.com/python/cpython/commit/614f17211c5fc0e5b828be1d332066
R. David Murray added the comment:
Thanks!
--
___
Python tracker
<https://bugs.python.org/issue39073>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by R. David Murray :
--
stage: patch review -> backport needed
___
Python tracker
<https://bugs.python.org/issue39073>
___
___
Python-bugs-list mai
R. David Murray added the comment:
Yeah, that looks like a bug in the old API. If you try the new API, it does
the right thing. To do that, import email.policy and make your
message_as_string call:
email.message_from_string(raw, policy=email.policy.default)
Note, however, that you
R. David Murray added the comment:
As far as I know you currently still have to specify the policy. It was, yes,
intended that 'default' become the actual default. I could have sworn there
was an open issue for doing this, but I can't find it. I remember having a
co
R. David Murray added the comment:
The PR looks good to me, but I describe the change differently. I'm not sure
how I missed this in the original implementation, since I obviously checked it
for the 8bit case. Too long ago to rem
R. David Murray added the comment:
New changeset 6f2f475d5a2cd7675dce844f3af436ba919ef92b by Arkadiusz Hiler in
branch 'master':
bpo-40597: email: Use CTE if lines are longer than max_line_length consistently
(gh-20038)
https://github.com/python/cpyt
R. David Murray added the comment:
Thanks, Arkadiusz.
--
resolution: -> fixed
stage: patch review -> backport needed
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/i
R. David Murray added the comment:
New changeset c1f1ddf30a595c2bfa3c06e54fb03fa212cd28b5 by Miss Islington (bot)
in branch '3.8':
bpo-40597: email: Use CTE if lines are longer than max_line_length consistently
(gh-20038) (gh-20084)
https://github.com/python/cpyt
Change by R. David Murray :
--
stage: backport needed -> resolved
___
Python tracker
<https://bugs.python.org/issue40597>
___
___
Python-bugs-list mai
R. David Murray added the comment:
Yep, you've found another in a category of bugs that have shown up in the
parser: places where there is a missing check for there being any value at all
before checking character [0].
In this case, the fix should be to add
if not obs_local
R. David Murray added the comment:
After thinking about it some more, I think given that when there is no
non-ascii mbox will happily treat *anything* as valid on the "From " line, that
we should consider blowing up on non-ascii t
R. David Murray added the comment:
This has nothing to do with python other than the fact that you are using it to
capture stdout. You have to figure out how to get the output you want to be
what shows up on stdout, python has no knowledge of what commands you put in
your shell script, and
R. David Murray added the comment:
The return value is correct. Interpreted as an email address, 'randomstring'
is a local mailbox.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Pyt
R. David Murray added the comment:
New changeset 21017ed904f734be9f195ae1274eb81426a9e776 by Abhilash Raj in
branch 'master':
bpo-39040: Fix parsing of email mime headers with whitespace between
encoded-words. (gh-17620)
https://github.com/python/cpyt
R. David Murray added the comment:
If you use the 'sendmail' function for sending, then it is entirely your
responsibility to turn the email into "wire format". Unicode is not wire
format, but if you give sendmail a string that only has ascii in it it nicely
converts
R. David Murray added the comment:
I'm short of time, if someone could approve Mark's PR and merge it it would be
great. There wasn't supposed to be any behavior change other than the one
documented in #40597.
--
___
Python
R. David Murray added the comment:
The as_strings docs say:
"Flattening the message may trigger changes to the Message if defaults need to
be filled in to complete the transformation to a string (for example, MIME
boundaries may be generated or modified)."
So, while this is ind
Change by R. David Murray :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
R. David Murray added the comment:
The fix looks good to me. Don't know how I made that mistake, and obviously I
didn't write a test for it...
--
___
Python tracker
<https://bugs.python.o
R. David Murray added the comment:
It's not really an abuse. It is, however, buggy. It should be being applied
*only* when the header contains unstructured text. Unfortunately I made the
choice to treat any header that doesn't have a specific parser as unstructured,
and that w
R. David Murray added the comment:
Yes for the registry changes. I thought we had fixed the bug that was causing
message-id to get encoded, but maybe it still exists in 3.7? I don't remember
when we fixed it (and I may be remembering wrong!)
As for X- "unstructured header
R. David Murray added the comment:
The problem with that archive is that it is not in proper mbox format. It
contains the following line (5689):
From here I was hoping to run something like “dbus-send –system
–dest=Test.Me –print-reply /Japan Japan.Reset.Test string:”Hello””
You will
R. David Murray added the comment:
No, it wouldn't. I expect
"{}".format(x)
to produce something for an arbitrary x. Breaking that would break a
fundamental Python contract.
Improving the error message for 'd' is more possible. Perhaps "the format c
R. David Murray added the comment:
Oh, and when you say there is nothing in the documentation about the 's' case
for arbitrary objects, it is made clear in various places that every object has
an str, which defaults to its repr if it has no specific __str__. Combine that
R. David Murray added the comment:
"an empty format string" is exactly what I was talking about. Putting nothing
between the {}'s is an empty format string. I can't think of any way to make
that wording clearer.
The format docs should not contains examples of the
R. David Murray added the comment:
Good point. That should be fixed. It should be "empty format specification".
--
___
Python tracker
<http://bugs.python.o
R. David Murray added the comment:
Meaning you want to run the same test suite with a variety of different DB
connections? That seems like a reasonable use case.
Personally I find that while I sometimes create subclasses to adjust certain
class parameters (thus creating a parameterized test
R. David Murray added the comment:
Drat, the tracker lost my post. In summary, given a concrete use case (running
a test case with a variety of different DB connections) and the improved
readablility for the common case of just changing class constants in the
'parameterized' subcl
R. David Murray added the comment:
Maybe we could add a recipe for doing this to the load_tests docs?
I don't think that load_tests is going to be more readable, though, since it
doesn't allow you to put the parameterization next to the class you are
parameterizing (unless y
R. David Murray added the comment:
That's not the kind of parameterization this ticket is about, though. You are
talking about passing data in to a test run from the command line (or other
source), which is a different issue (though the implementations might share
some common infrastru
R. David Murray added the comment:
I'd still like to see a recipe for creating parameterized test cases via
load_tests added to the docs. It may be relatively obvious how to do it once
you think of it, but it isn't obvious to a relative newcomer that you *can* do
it, and it wo
Changes by R. David Murray :
--
priority: normal -> low
___
Python tracker
<http://bugs.python.org/issue13826>
___
___
Python-bugs-list mailing list
Unsubscri
R. David Murray added the comment:
It is not particularly intuitive what goes in to a Popen non-shell argument
list, unless you are an experienced programmer. The real purpose of the note
is to convey a lot of information about how tokenization works in a short
example, and it also
R. David Murray added the comment:
Oh, I see. Yes, that is a problem.
object.__format__ knows the type of the object it was called on, right?
Couldn't it catch the error and re-raise it with the correct type? (If the
type isn't str, of course, we don't want to get i
R. David Murray added the comment:
Oh, never mind that comment about recursion, I wasn't thinking it through.
--
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
So the error is going to be something about the source type not supporting
'__format__'?
That change will also address the OP's concern about truncated reprs when a
fixed string length is specified, so I agree that the title issue can be
c
R. David Murray added the comment:
Adding tests helps the other VMs, which generally are trailing behind the
CPython releases.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue13
R. David Murray added the comment:
My understanding (and recollection, but I don't have notes I can point at to
hand) is that one goal that arose from recent VM and language summits was for
the CPython test suite to be used as the validating test suite, with
CPython-specific tests mark
R. David Murray added the comment:
Oh, and in case it isn't clear, this request is *coming* from one of the other
VMs (pypy), so if my summit recollection is correct, they are in fact "adding a
test that they need" by submitting this issue :)
(Or at least they will have once
R. David Murray added the comment:
Well, since it isn't limited to interactive use, I don't think 'interactive' is
missing.
MOTW links are a more global issue that was discussion on python-dev (I forget
the outcome, but I think it was "no").
I don't see an
R. David Murray added the comment:
You can feed a cmd driven interface from stdin or via cmd.onecmd.
However, I agree that the intended and primary use case is interactive. There
wouldn't be much point in using cmd if the primary intent of your program
wasn't i
R. David Murray added the comment:
This is a duplicate of issue 9291.
--
nosy: +r.david.murray
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> mimetypes initialization fails on Windows because of non-Latin
characters
R. David Murray added the comment:
There is also the fact that we have traditionally exposed thin wrappers around
posix functions (and then were practical provided Windows emulations). We
aren't 100% consistent about this, but we are pretty consistent abo
R. David Murray added the comment:
If you are trying to time something (an interval), having the time go backward
can really screw up your data. And that *will* happen on a system that is
running NTP (or even just resets its time). monotonic clocks were introduced
at the OS level for a
R. David Murray added the comment:
I don't think I would have ever thought of testing a datetime for its truth
value. But the behavior you observe is consistent with the rest of Python: 0
is false.
I wonder if this is by design or by accident.
--
nosy: +r.david.m
Changes by R. David Murray :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue13936>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
Yes, but text/tab-delimited-values/.tsv is older. .tsv dates from the days of
Gopher, but text/csv was formalized only in October of 2005. Presumably nobody
has asked for it before, for some odd reason.
Now we get to debate again whether updating
R. David Murray added the comment:
As far as I know having it mirror the IANA registry is the intent (there's a
comment in the module that can be read as implying that). So I'd be inclined
to treat this one as a bug and fix it in 2.7 and 3.2 as well as 3.3.
I'm not sure w
R. David Murray added the comment:
Ah, analagous to the way keyword.py regenerates its embedded table based on the
actual python grammar? Yes, that would be nice.
--
___
Python tracker
<http://bugs.python.org/issue13
R. David Murray added the comment:
5322 is still a draft, according to the IETF.
That said, we are paying attention to 5322.
--
nosy: +r.david.murray
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
___
Pytho
R. David Murray added the comment:
This is fixed already in 3.3. It is a behavior change that could theoretically
cause some problems. Currently, you can think of None as meaning "there was no
timezone info at all", which is subtly different from -, which means "this
tim
R. David Murray added the comment:
I have to say that the non-obvious subtleties you point out in your rglob make
me think I personally would probably opt to use Nick's module directly instead,
so that I was sure what I was getting.
--
nosy: +r.david.m
R. David Murray added the comment:
Hmm. Just to make it clear where I'm coming from, though, I should also point
out that I use rdiff-backup, which uses the **/yadayada syntax, and I hate it
any time I have to try to figure out what such a glob is going to actually
R. David Murray added the comment:
How about having separate starting path and glob arguments, where the glob
cannot contain any directory?
I'm -1 on this function as it stands. My vote could change if the final
semantics are intuitive and unambiguous. (It's OK if getting t
R. David Murray added the comment:
So given
/home/a
/home/a/k.py
/home/a/c/j.py
/home/b/z.py
/home/b/c/f.py
and a current directory of /home/a, we'd have:
pattern matches
--- ---
*.py k.py, c/j.py
c/*.pyc/j.py
c*
R. David Murray added the comment:
On the drive home...are you borrowing one of Google's self driving cars? :)
--
___
Python tracker
<http://bugs.python.org/issu
R. David Murray added the comment:
Well, in that case I would expect that the argument 'c/*.py' would start
walking in the c directory, but I definitely did not get that impression from
Antoine's explanation of how the function works.
I again advocate separating th
R. David Murray added the comment:
That's just how function definitions in Python work. The prototype is
evaluated when the function is defined, not when it is run, so the default
value of path will always be the value of getcwd at the time the function
*defintion* is done (which
R. David Murray added the comment:
I don't know, is it? From what has been said so far I'd expect */c/d/*.py to
look for *.py files in all c/d subdirectories of direct subdirectories of the
current directory, and subdirectories of those c/d directories. But I wouldn't
R. David Murray added the comment:
@antoine: no, my description involves recursion. It assumes that the path
portion of the glob specifies the directories to *start* from, but that the
filename glob portion then applies recursively to any of those start
directories.
The alternative
R. David Murray added the comment:
Oh, yeah, and there's still the question of whether or not directories are
matched by the terminal glob pattern, which I would naively expect they would
be, in either interpretation, but I wouldn'
R. David Murray added the comment:
Ah, OK, so what you are saying is that rglob returns the concatenation of the
results of running ls with the argument glob in each subdirectory of a walk
starting with the current directory, except that the returned names have paths
anchored in the current
R. David Murray added the comment:
However you do it, I'm very much in favor of having the full name available. I
either wrote or fixed (I can't remember which) that stack walk in pydoc, and
you are right, it is very very ugly. This would also be a big benefit for
unittest, which
R. David Murray added the comment:
On Windows we do (now) read from the registry as well. My guess is there are a
lot more Windows systems out there with outdated registries then there are unix
systems with outdated /etc/mime files, though
R. David Murray added the comment:
The last forumulation of what rglob does "apply the glob to the current
directory and all subdirectories recursively, returning the joined list with
filenames anchored in the current directory" is simple and intuitive enough for
me. (I'm not
R. David Murray added the comment:
Hmm. I misread this. You are, in fact correct, but I don't think there is
anything comprehensive to do here. As I make changes and have actually checked
then against RFC 5322, I'm either changing or adding that RFC number to the
comment
R. David Murray added the comment:
Alberto, might you still interested in working on this? I thought I'd do a
quick update to current trunk and check it in, but in the process of doing that
I found some issues. I suspect it has been frustrating for you that nothing
happened with thi
R. David Murray added the comment:
Gah, that's what I get for trying to do something quick. By changing the name
of that variable I introduced a backward incompatibility, since that change was
released in 3.2.
--
___
Python tracker
R. David Murray added the comment:
OK. Maybe someone else will want to work on it, too. I'll see if I can get it
taken care of one way or another during the PyCon sprints.
I'm going to mark this as easy, because really other than expanding test
coverage I think the only thing
R. David Murray added the comment:
It looks like this changed between 2.x and 3.x but the docs were not updated.
None makes more sense than the module as __self__, though, so perhaps it is
actually a bug. Then, again, since Python functions don't have a __self__, the
__self__ of bui
R. David Murray added the comment:
Or you could give the strftime specification string that produces the
equivalent output.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue13
Changes by R. David Murray :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue13881>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
This isn't really the place to get help on using python, but no, python doesn't
do any implicit locking for you.
--
nosy: +r.david.murray
resolution: -> invalid
status: open -> closed
___
Pytho
R. David Murray added the comment:
The latter is arguably a bug. The former is working as designed, as far as I
know. In Python3 bytes and string do not compare equal.
--
nosy: +michael.foord, r.david.murray
___
Python tracker
<h
R. David Murray added the comment:
In case it isn't clear, by "arguably a bug" I mean in a theoretical sense.
Even if Michael agrees with me we can't change the fact that 2.7 unittest
treats str and unicode with the same content as equal.
For the other it might have been
R. David Murray added the comment:
That can't work. The logging messages may come from libraries written by
someone else, using % formatting. The style has to be set at the individual
logger level.
--
nosy: +r.david.murray, vinay.
2301 - 2400 of 10554 matches
Mail list logo