R. David Murray added the comment:
Because:
1) The __debug__ flag is defined to be process-global. If you test it in one
module, your code should be able to assume that it has the same value in all
other modules
2) python-dev does not support running .pyo code without -O turned on. In
R. David Murray added the comment:
The reason the codes are not documented is that they are not supported.
Because we delegate to the system strftime, they happen to work.
To change that the most sensible thing would be to have our own strftime
implementation, which makes this essentially a
R. David Murray added the comment:
Frankly I'm surprised it works at all, since fileinput.input() will by default
read from stdin, and stdin is in turn being read by the python prompt.
I just checked 2.5 on linux, and the same situation exists there (two ^Ds are
required to end the
R. David Murray added the comment:
I don't know how the EOF character works, but I wouldn't be surprised if it had
to be on a line by itself to mean EOF.
If the double EOF is required when not at the interactive prompt, then there
could be a long standing bug in fileinput's lo
R. David Murray added the comment:
And yes, a number with leading zeros is an invalid token in Python3, because in
Python2 it was an octal number, and now we spell octal as, eg, 0o0001.
--
nosy: +r.david.murray
___
Python tracker
<h
R. David Murray added the comment:
That makes sense. It is a consequence of (a) buffered input and (b) the fact
that EOF on stdin doesn't really close it. (And by interactive here I don't
just mean Python's interactive prompt, but also the shell).
By default fileinput uses r
R. David Murray added the comment:
Hmm. Maybe issue 10197 should be reclassified as an enhancement...
--
nosy: +r.david.murray
resolution: wont fix -> duplicate
superseder: -> subprocess.getoutput fails on win32
title: commands.getoutput() is broken -> commands.getoutput()
R. David Murray added the comment:
fileinput should work (for some definition of work) for anything that can be
opened by name using the open syscall on unix. That includes many more things
than files. Named pipes are a particularly interesting example in this context
R. David Murray added the comment:
So the real question is: does readlines block until the byte count is
satisified? It might, but the docs for io.IOBase.readlines leave open the
possibility that fewer lines will be read, and do not limit that to the EOF
case. It's not clear, howeve
R. David Murray added the comment:
The _pyio.py version of readlines does read until the count is equaled or
exceeded. This could, however, be an implementation detail and not part of the
spec.
--
___
Python tracker
<http://bugs.python.
R. David Murray added the comment:
It would be best to have the pickle tests always run against both the C and
python code. We do this for other modules that have C versions of some or all
of the Python code. And yes, making the two consistent is also good. Since
pickle is generally not
R. David Murray added the comment:
The news item isn't completely clear. It sounds like the mailbox is now
automatically being flushed between pops, but what you really fixed is popping
if the *application* does a flush between them,
R. David Murray added the comment:
See also issue 13498.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue14992>
___
___
Python-bug
R. David Murray added the comment:
Note that the implementation of makedirs exist_ok has a significant bug (issue
13498) which renders it mostly useless in practice. Parties interested in this
issue might be interested in figuring out how to fix that bug :)
--
nosy: +r.david.murray
R. David Murray added the comment:
By calling 'set.union' you are calling the method on the class. When you call
a method directly on a class object, you have to explicitly pass in 'self'.
Thus the first argument when you call it like that must be a set obje
R. David Murray added the comment:
"Mailbox no longer throws an error if a flush is done between operations when
removing or changing multiple items in mbox, MMDF, or Babyl mailboxes."
--
___
Python tracker
<http://bugs.python.o
Changes by R. David Murray :
--
components: +email
nosy: +barry, r.david.murray
___
Python tracker
<http://bugs.python.org/issue15095>
___
___
Python-bugs-list m
R. David Murray added the comment:
This is fixed in Python3:
>>> def foo(a, b=None):
... pass
...
>>> foo(b=1)
Traceback (most recent call last):
File "", line 1, in
TypeError: foo() missing 1 required positional argument: 'a'
--
nosy: +r.da
R. David Murray added the comment:
Probably. Unless I'm mistaken, the issue with concurrent rewrite (as opposed
to append) exists for single-file-mailboxes in the general case, not just in
Python. And as far as I know failure is never noisy, the last writer wins.
--
R. David Murray added the comment:
Hmm. I think that chapter could use a more extensive rewrite with some
additional information provided. For example, you actually can have a __main__
module in a package, and anything inside it will execute when the package is
run via -m.
The "othe
R. David Murray added the comment:
It's not clear to me why the behavior differs. Hopefully Eric will explain.
For 2.7 we should probably just revert the change to the yield statement to
restore the previous behavior, unless format can be fixed.
--
nosy: +eric.smith, r.david.m
R. David Murray added the comment:
importlib is written in python. So you get a python traceback of its execution
stack. Yes it is noisy, but I'm not sure that this should be changed, or we'd
lose some of the benefit of having importlib written in python. (It also might
R. David Murray added the comment:
To clarify Amaury's example:
rdmurray@hey:~/python/p33>./python -c "import distutils.msvc9compiler"
Traceback (most recent call last):
File "", line 1, in
File "", line 1288, in _find_and_load
File "&quo
Changes by R. David Murray :
--
Removed message: http://bugs.python.org/msg163238
___
Python tracker
<http://bugs.python.org/issue15111>
___
___
Python-bugs-list m
R. David Murray added the comment:
To clarify Amaury's example:
rdmurray@hey:~/python/p32>./python -c "from distutils import msvc9compiler"
Traceback (most recent call last):
File "", line 1, in
File "/home/rdmurray/python/p32/Lib/distutils/msvc9compi
R. David Murray added the comment:
I'm not sure why there isn't a review link for your patch.
"which(file..."
I don't think file is a good name. 'fn' or 'filename' or 'string' would all be
better choices, I think. 'file' imp
R. David Murray added the comment:
>>> print('{}'.format(u'\u2107'))
Traceback (most recent call last):
File "", line 1, in
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2107' in position
0: ordinal not in
R. David Murray added the comment:
Or use 'from __future__ import unicode_literals'.
--
___
Python tracker
<http://bugs.python.org/issue15109>
___
___
R. David Murray added the comment:
Note that the use of 'format' in the 2.7 patch caused a regression (% causes an
implicit promotion to unicode, .format does not). See issue 15109.
--
nosy: +r.david.murray
___
Python trac
R. David Murray added the comment:
Note that this is a regression in 2.7.3 relative to 2.7.2, which is why I'm
marking it as high priority.
--
nosy: +petri.lehtinen
priority: normal -> high
stage: -> needs patch
___
Python tra
Changes by R. David Murray :
--
nosy: +bethard
___
Python tracker
<http://bugs.python.org/issue15112>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
Well, I don't think that imitating the command line needs to extend to
supporting doing unusual things to builtins, so unless someone like Terry
disagrees I think we should close this as won't fix.
--
nosy: +r.david.murray, terry.reedy
R. David Murray added the comment:
Your plan sounds fine to me.
--
___
Python tracker
<http://bugs.python.org/issue15114>
___
___
Python-bugs-list mailin
R. David Murray added the comment:
First of all, I presume you are running this in python2.7, since it doesn't
work in python3. In Python3 MIMEText takes a string as input, not a bytes
object, unless you pass it a _charset parameter. If you do that, the encoding
is done when the obje
R. David Murray added the comment:
Barry: I think we should documentationally deprecate the encoders module. I
can't see any utility in a new program calling those functions explicitly,
especially if the program ever wants to port to Python3. Or maybe the Python2
docs would say depre
Changes by R. David Murray :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue15113>
___
___
Python-bugs-list mailing list
Unsubscri
R. David Murray added the comment:
I think so, yes. When we have the mimeregistry equivalent of the
headerregistry, the new mime Message classes can have a set_charset with a
different implementation. I'll want to talk about the API details on email-sig
before I do anything, t
Changes by R. David Murray :
--
nosy: +ezio.melotti
___
Python tracker
<http://bugs.python.org/issue15120>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
It would be nice to do some research on what MUAs that support mbox format do
here. (eg: mutt, pine if it still exists, etc).
--
___
Python tracker
<http://bugs.python.org/issue15
R. David Murray added the comment:
Any chance you'd be willing to look in the source code and see if they do any
locking mailbox doesn't? The evidence you've already gathered is probably
enough to justify adding the option, though.
--
___
R. David Murray added the comment:
It does.
--
keywords: +easy
nosy: +bethard, r.david.murray
stage: -> needs patch
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6
___
Python tracker
<http://bugs.python.org/issu
R. David Murray added the comment:
I appreciate the work and thought that went into this, but this is not normally
the kind of change that we apply. Any change has a chance of introducing bugs
(see, for example, issue 15109, where a seemingly innocuous change from %
formatting to .format
R. David Murray added the comment:
Also as an FYI, triple double quote marks are our standard for docstrings. I
don't believe we normally align assignments, but I don't know if that is
specifically called out in PEP8. I haven't looked at the patch in detail, but
in scan
R. David Murray added the comment:
Added some review comments on latest patch.
--
___
Python tracker
<http://bugs.python.org/issue444582>
___
___
Python-bug
R. David Murray added the comment:
Nope, it was intentionally unselected. We use versions for the versions in
which we will fix the bug, and 2.6 gets only security patches at this point.
In any case, argparse isn't part of the stdlib in 2.6.
--
versions: -Pytho
R. David Murray added the comment:
I took the five minutes to test this. It does not fail in 2.7. I remember we
fixed some other issues with '-prefix=/', so I presume this got fixed at that
time as a byproduct. Either that, or it was a Fedora bug of some sort.
--
assig
R. David Murray added the comment:
Oh, and to make sure your second report doesn't get lost, could you open
another issue for the other bug, and give a complete example?
--
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
I'm fine with this version going in, but I don't understand what you are saying
about PATHEXT. You are getting it from the environment, but you say the shell
always looks at the extension. So if someone has changed PATHEXT in their
environmen
R. David Murray added the comment:
I think it would be more surprising if by default it did something different
than what the 'which' command does. It also seems like the most useful result
to return by default. If there's demand for a non-abspath version we could add
th
Changes by R. David Murray :
--
components: +email
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue665194>
___
___
Python-bugs-list mailing list
Unsub
R. David Murray added the comment:
I'm fine with it changing. Hopefully it won't introduce subtle bugs in
anyone's programs :)
--
___
Python tracker
<http://bugs.pyth
Changes by R. David Murray :
--
components: +email
nosy: +barry, r.david.murray
___
Python tracker
<http://bugs.python.org/issue4473>
___
___
Python-bugs-list m
R. David Murray added the comment:
Yeah, Brian had it as 'file' before, and I asked him to change it because it is
confusing. 'file' sounds like a Python file object, which this is not.
'filename' would be OK, but 'cmd', as you note, is what it is rea
R. David Murray added the comment:
Well, I guess I'd like to keep it since it does satisfy a need in the email
package: to manipulate dates in the local timezone when composing messages. It
isn't a critical need, though; the critical need is just to be able to have a
datetime th
New submission from R. David Murray :
I've been working on this steadily for a while. I think it is now all working
correctly. At least, it passes all the same tests that the existing RFC mime
header parser passes, plus a bunch of additional ones.
There are a couple of commented out
R. David Murray added the comment:
Committed with release manager agreement.
--
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
R. David Murray added the comment:
Well, the original change to using utf-8 by default was considered a bug fix.
But I suppose you are right that this goes beyond that into enhancement
territory. In which case we could wait for an enhancement to the C API to base
it on, for which we'd
R. David Murray added the comment:
You could make the test a loop, with the timeout increasing each time through
the loop, failing only if all tries fail. That way on faster machines the test
will pass faster. It'll take even longer on slow machines, but they are slow
anyway so that m
R. David Murray added the comment:
Oh you youngsters. "Offline" doesn't mean "not on the Internet", it means "not
on a computer" :)
Yes, "interactive" would be clearer.
--
nosy: +r.david.murray
__
R. David Murray added the comment:
I haven't touched localtime since pycon, so I presume this hasn't been detected
before due to our lack of a windows 64bit buildbot.
--
components: +email
nosy: +barry, belopolsky
priority: norm
R. David Murray added the comment:
Status quo wins a stalemate (and this isn't even really a stalemate.
Languishing is for bugs/enhancements no one has stepped up to implement. This
one is rejected.
--
status: languishing -> closed
__
R. David Murray added the comment:
This works fine for me. It is almost certain to be a case of something on your
pythonpath crashing when pydoc imports it while looking for things that match
the keyword. There is unfortunately no way to bullet proof pydoc against this.
--
nosy
R. David Murray added the comment:
Ned: since it is a core dump, I doubt the patch for ignoring exceptions during
import will fix this. Note that 'pyg_register_boxed' is not a string that
appears in the python source, so it is pretty certainly a third party extension
modu
R. David Murray added the comment:
In general in Python we let exceptions speak for themselves. It would,
however, probably be reasonable to add the try/except and error message in
_test, which should only be called when the module is run as a script.
--
nosy: +r.david.murray
Changes by R. David Murray :
--
nosy: +vinay.sajip
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue15179>
___
___
Python-bugs-list mailin
R. David Murray added the comment:
Great, thanks.
There's a loop around testfiles. I think it would be nicer to not call
sys.exit. You could at the same time fix what appears to be a bug in the loop
code. It looks like 1 is currently returned only if the last file fails.
Hmm, and
New submission from R. David Murray :
test_shutil leaves several (six) directories in /tmp. This eventually fills
/tmp on my buildbots and causes subsequent test runs to fail.
--
components: Tests
keywords: buildbot
messages: 164026
nosy: hynek, r.david.murray
priority: normal
R. David Murray added the comment:
OK, let's move this, then. I asked the question because I'd like to know what
the best practice is for exceptions in the stdlib. This is an area in which we
have made quite a bit of progress recently (ie: the work done on exceptions for
Python
R. David Murray added the comment:
Ah, right, I misread the code when I looked at it.
There is usually a reason why something is done the way it is...though not
always. But, running some example command lines, it looks to me like the
current behavior is there because without it, you won
R. David Murray added the comment:
Could someone be depending on it? Sure. Is that likely enough to block this
as a bug fix? Personally I think not. Appending to the mailbox when adding
messages is, I think, the expected behavior, and always rewriting it is the
surprising behavior.
The
R. David Murray added the comment:
Is this a duplicate of issue 6975, or something different?
2.6 only gets security patches. (We use the version field to show what version
we need to apply the fix to.)
--
nosy: +r.david.murray
versions: +Python 3.3 -Python 2.6
Changes by R. David Murray :
--
superseder: -> symlinks incorrectly resolved on Linux
___
Python tracker
<http://bugs.python.org/issue15196>
___
___
Python-
Changes by R. David Murray :
--
nosy: +hynek, pitrou, r.david.murray
versions: -Python 3.1
___
Python tracker
<http://bugs.python.org/issue6975>
___
___
Pytho
Changes by R. David Murray :
--
components: +email
nosy: +barry, r.david.murray
___
Python tracker
<http://bugs.python.org/issue15199>
___
___
Python-bugs-list m
R. David Murray added the comment:
Although I do dislike how long it is, I think I agree with larry on this one
that follow_symlinks is the cleanest choice. And we are post feature-freeze,
so I think changing it should be done only if there is a strong reason.
--
nosy
R. David Murray added the comment:
Unless there are places where it is actually broken, I don't think there is a
good reason to have step 3.5, though. Just add the deprecation warning and
remove it in 4.0.
--
nosy: +r.david.murray
___
P
R. David Murray added the comment:
Thanks for working on this. Could you please post the fix as a patch file? If
you don't have mercurial, you can generate the diff on windows using the python
diff module (scripts/diff.py -u ). Actually, I'm not sure
exactly where diff is in t
R. David Murray added the comment:
Well, I had no involvement in the windows registry reading stuff, and it is
relatively new. And, as issue 10551 indicates, a bit controversial. (issue
15199 is a different bug, in python's own internal table).
Can you run that diff again and use th
Changes by R. David Murray :
--
assignee: collinwinter ->
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
type: crash ->
___
Python tracker
<http://bugs.pyt
Changes by R. David Murray :
--
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue15208>
___
___
Pyth
New submission from R. David Murray :
The idea for the attached patch comes from the QNX development team. In their
measurements, replacing the re.split-plus-line-reassembly code in
BufferedSubFile with str.splitlines provided a 30% reduction in email parsing
time. The code is also a lot
R. David Murray added the comment:
This is true for most (all?) CPython classes that are implemented in C. For
example io.StringIO instances do not have a __module__ attribute either.
--
nosy: +r.david.murray
___
Python tracker
<h
R. David Murray added the comment:
The problem with running all the files as things stand is that the errors get
lost in the other output. Changing that would definitely be an enhancement.
--
___
Python tracker
<http://bugs.python.org/issue15
Changes by R. David Murray :
--
components: +email
nosy: +barry, r.david.murray
___
Python tracker
<http://bugs.python.org/issue15232>
___
___
Python-bugs-list m
R. David Murray added the comment:
I think that sounds reasonable. The message should say files in all three
cases', since the individual test file summary method will be similar but
talking about numbers of tests.
--
___
Python tracker
R. David Murray added the comment:
I thought we had other tests that did this as well (pickle?). If you need
reproducibility you check the random seed and reuse it.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue15
R. David Murray added the comment:
As mentioned, the first step is to create some tests that can validate the
current behavior, so that changes don't break things. This is a non-trivial
task. I know from experience with a similar refactoring that even seemingly
simple changes can
R. David Murray added the comment:
Thanks for the report. However, do you have a patch to propose? Otherwise I'm
not sure there is a reason to keep this issue open...one can always say various
things are slow; that by itself is not a bug. Performance enhancement patches
are we
R. David Murray added the comment:
Don't you have to resolve issue 7475 before you can add them, though?
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
Whatever the good or bad points of the API design, it is what it is and has
been for a very long time. It is not something that is going to change,
because the break in backward compatibility would be too large.
What is unclear about the documentation that
R. David Murray added the comment:
If someone wants to propose a patch we can reopen the issue.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
R. David Murray added the comment:
Well, if you want to invoke the context in setup/teardown for some reason (as
opposed to in the test methods themselves), you can do this:
def setUp(self):
self.foo = MyContextManager.__enter__()
self.addCleanup(MyContextManager.__exit__
R. David Murray added the comment:
That should have been
self.addCleanup(MyContextManager.__exit__)
You could alternatively call __exit__() explicitly in tearDown, of course, but
I believe addCleanup is a more reliable cleanup than tearDown
R. David Murray added the comment:
2.6 only gets security fixes at this point, which this is not.
--
nosy: +r.david.murray
resolution: -> out of date
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tr
R. David Murray added the comment:
I'm sorry, It looks like you said it was working as you expected in 2.7, and
you marked it for version 2.6. So what is the bug that you see in 2.7?
--
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
Ah. I have no idea. I did a search and could not find an issue about it being
fixed...that doesn't mean there wasn't one, though.
Does the problem occur *only* solaris? Because if it isn't solaris specific it
might be this one
R. David Murray added the comment:
Re-reading the issue I think the OP was not trying to define '-debug', but was
indeed reporting the behavior when -debug was passed to the parser. I've
committed your tests (thanks).
So we now have tests for both cases, and this issue c
R. David Murray added the comment:
I don't understand why you would expect to get a ". The unicode characters
aren't "s. As far as I can see (from, for example,
http://codepoints.net/U+201C), Python is behaving as expected here.
--
nosy: +r.david.murray
res
R. David Murray added the comment:
os.environ is not a dictionary, so it isn't all that surprising that a shallow
copy doesn't behave like a shallow copy of a dictionary. deepcopy does what
you'd expect, as does os.environ.copy().
Perhaps it is worth improving this by ad
R. David Murray added the comment:
Thanks. (This error existed on only in the 2.7 docs.)
--
nosy: +r.david.murray
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: enhancement -> behavior
___
Python tr
4301 - 4400 of 10554 matches
Mail list logo