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.
R. David Murray added the comment:
Um. I'm inclined to think that #13637 was a mistake.
Functions that accept bytes and return bytes and also accept string and return
string seem uncontroversial. However, accepting bytes or string and returning
bytes is not an obviously good idea, an
R. David Murray added the comment:
OK, I skimmed the thread I was remembering, and while it was discussing
str->str and bytes->bytes primarily, the only pronouncement I could find was
that functions should not accept a *mix* of bytes and string. So I guess I
withdraw my objection, al
R. David Murray added the comment:
Did you upload urlparse.py to the issue by accident?
Can you please provide some examples of where you think the current code is
producing incorrect results?
--
nosy: +r.david.murray
___
Python tracker
<h
R. David Murray added the comment:
It's not a patch if it is the whole file. A diff would be much more useful,
since then we could see the changes easily.
This kind of change would require a bit of discussion. I'm doubtful that it
would be applied as a bug fix, and we might eve
R. David Murray added the comment:
OK' I'm back to being 100% on the side of rejecting both of these changes.
ASCII is not unocode, it is bytes. You can decode it to unicode but it is not
unicode. Those transformations operate bytes to bytes, not bytes to unicode.
We made
R. David Murray added the comment:
Non-ascii binary data should not be being rejected unless validate
is true. So what are you going to do with non-ascii-range unicode in
that case? Ignore it as well? That can't be right.
I believe this should be discussed on pytho
R. David Murray added the comment:
I disagree with this commit. Reopening pending discussion on python-dev.
--
status: closed -> open
___
Python tracker
<http://bugs.python.org/issu
R. David Murray added the comment:
I disagree with this feature. Reopening pending discussion on python-dev.
--
nosy: +r.david.murray
status: closed -> open
___
Python tracker
<http://bugs.python.org/issu
R. David Murray added the comment:
Discussion resolved in favor of patch.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
Changes by R. David Murray :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue13641>
___
___
Python-bugs-list mailing list
Unsubscri
R. David Murray added the comment:
Is it totally insane to think about using a float subclass with an additional
attribute instead of a tuple?
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue14
R. David Murray added the comment:
You'll have to give more details about what you are doing, but I suspect you
are in fact calling it incorrectly. In addition, there are pretty much no
circumstances in which you want to use string.rfind in 2.7. Just use ''.rfind.
R. David Murray added the comment:
Ah, perhaps you *meant* you are calling rfind on a string, rather than calling
rfind on the 'string' module as I imagined.
So, we definitely need more details about how you are producing this failure
and what the traceback looks like.
R. David Murray added the comment:
Why not just call the helper in setUp? Otherwise, it looks good to me.
This is a bug fix and should be backported, I believe.
--
versions: +Python 2.7, Python 3.2
___
Python tracker
<http://bugs.python.
R. David Murray added the comment:
Unless I'm misunderstanding, this is a duplicate of issue 1602.
You will note that the problem is *not* with Python (or open source software in
general), the problem is that Microsoft treats the command line as a second (or
third, or fourth) class ci
R. David Murray added the comment:
OK, so I still don't understand what problem it is you are reporting. What do
you mean by "can't craete non-valid strings"? Of course you can't. (I don't
see how you could do that programatically, either, although that depen
R. David Murray added the comment:
I'm changing the title since PEP 414 has no bearing here.
--
title: Fix unicode literals (for PEP 414) -> Fix unicode literals
___
Python tracker
<http://bugs.python.org
R. David Murray added the comment:
Since this bug is about adding a new feature, it is unlikely to be the correct
bug for this to be against.
Given that you've identified a regression, I suggest you open a new bug with a
reproducer, and we'll set it to relea
R. David Murray added the comment:
Marking as release blocker since this is a regression. Added people from the
other curses issue as being likely to be interested in this one.
--
nosy: +cben, gpolo, haypo, inigoserna, jcea, phep, pitrou, python-dev,
r.david.murray, schodet, zeha
R. David Murray added the comment:
I agree with Eric. I've run in to this error, and immediatly figured out what
I'd done wrong based on the existing error message.
--
nosy: +r.david.murray
resolution: -> invalid
stage: -> committed/rejected
status
R. David Murray added the comment:
To answer Glenn's procedural question: no this is not a bug whose fix can be
backported. API changes are not allowed in maintenance releases. Doc
improvements can be backported, though, so I'm leaving versios alone
(alternatively someone could
R. David Murray added the comment:
32 is re.U, which is always ored with the passed in flags, unless re.A is set
in the passed in flags. The flag docs should certinaly be updated to reflect
this.
--
nosy: +r.david.murray
stage: -> needs patch
versions: +Python
R. David Murray added the comment:
Yes, cleanups would be better as a separate issue.
--
___
Python tracker
<http://bugs.python.org/issue8739>
___
___
Python-bug
R. David Murray added the comment:
Juhana: thanks for the patch. I see an issue with it, though. What if the
email address is something like john.si...@example.com?
My thought is that there are two ways to handle this. Either we do a full RFC
address parse in __getaddr and have it return
R. David Murray added the comment:
OK, reopening. I've added 3.2 and 3.3 as I imagine the same problem will exist
there.
Now we need someone to propose a patch to fix it.
--
resolution: out of date ->
stage: test needed -> needs patch
status: closed -> open
version
R. David Murray added the comment:
+10 :)
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue14265>
___
___
Python-bugs-list mailin
R. David Murray added the comment:
I think it should use the same default as open, but frankly I couldn't remember
the right way to achieve that. Suggestions welcome :)
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/i
R. David Murray added the comment:
I committed Tatiana's patch because it looks reasonable to me, but I'm not
familiar enough with zipimport to know if additional tests are needed. If you
think there are additional tests that should be added, please reopen the issue.
-
R. David Murray added the comment:
Duh. I should have remembered that the io module used None to represent the
default encoding. Thanks, Éric.
--
___
Python tracker
<http://bugs.python.org/issue5
R. David Murray added the comment:
Heh. Good point.
Documenting this is a clear way may be non-trivial.
--
___
Python tracker
<http://bugs.python.org/issue14
R. David Murray added the comment:
It doesn't look like it. Is that the right issue number?
--
___
Python tracker
<http://bugs.python.org/issue14250>
___
___
R. David Murray added the comment:
For 3.2 could we use the same fix, but without exposing the ability to *change*
the encoding? That is, we use TextIOWrapper but always with the default None
for encoding.
It also occurs to me that this really exposes a weakness in the design. What
if the
R. David Murray added the comment:
It also occurs to me that this fix makes the charset hook look rather odd. We
could render it redundant by passing charset to open in the non-openhook case,
and mark it deprecated.
There is also a bug in the hook_encoding docs. It says the file is opened
New submission from R. David Murray :
In Python2, this works:
>>> from email.mime.text import MIMEText
>>> m = MIMEText('abc')
>>> str(m)
'From nobody Tue Mar 13 15:44:59 2012\nContent-Type: text/plain;
charset="us-ascii"\n
R. David Murray added the comment:
It makes no sense that changing how Subject is generated would affect the later
formatting of the mime header. There is no coupling that I'm aware of in the
code.
I notice that your handcrafted version uses uppercase for the charset and CTE
code. Ca
R. David Murray added the comment:
Thanks, Brian.
(For the record, this is a bug in email6 code that hasn't been checked into
trunk yet.)
--
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
I fixed this for test_email by adding automatic unit test discovery to
test_email.__init__.
I believe it should be possible for a similar thing to do be done for
test_importlib.
--
nosy: +r.david.murray
Changes by R. David Murray :
--
nosy: +eric.smith
versions: +Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/issue14297>
___
___
Python-bug
R. David Murray added the comment:
We could also just decide we don't need it :)
If we do (I haven't read the PEP) does a statement with an assignment make the
variable global in that scope, or does it only affect the global variable for
the duration of the assignment, and oth
R. David Murray added the comment:
Fix committed. Thanks Ali.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
I think the next thing to do would be to replace the call to send_message with
code that calls BytesGenerator to write the message out to disk, and diff the
output of the two versions (normal subject and hand-encoded subject). Maybe
that will give us a
R. David Murray added the comment:
I'm pretty sure Michael is talking about unittest. Doing the same for regrtest
would be interesting but not as important. (When I run individual tests from
the Python test suite I generally use -m unittest to
R. David Murray added the comment:
OK, got it. When I created BytesParser I turned the 'NL' constant into a class
attribute, but in the line that handles Header objects in BytesParser I failed
to change NL to self._NL. So when send_message calls flatten with
linesep='\r\
R. David Murray added the comment:
Thanks for the bug report. I thought we had tests for processing Header
objects when serializing a message using BytesParser, but clearly we didn't.
And thanks Tatiana and Martin for issue review and testing.
--
resolution: -> fixed
stat
Changes by R. David Murray :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
By the way, Alberto, if you haven't already submitted a contributor agreement,
could you do so please? We have one from Dan from the sprints. Michele, you
aren't marked in the tracker as having submitted an agreement but you've been
activ
4601 - 4700 of 12944 matches
Mail list logo