R. David Murray added the comment:
It doesn't matter *how* you get to the situation where you are releasing a lock
that hasn't been acquired, the point is to document what actually happens when
you do the release. And just yesterday I needed to know this, since I have a
lock that
R. David Murray added the comment:
I, on the other hand, would prefer if it were made part of the API contract
that an error is raised, and to fix any stdlib implementations *of that API*
that don't conform to that. (That is, locks from other modules may well not
follow that API, and
Changes by R. David Murray :
--
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue14518>
___
___
Python-bugs-list mailing list
Unsubscri
R. David Murray added the comment:
The documentation appears to be correct to me. Can you demonstrate your
suggestion with some examples?
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue14
R. David Murray added the comment:
Is this a bug report about configure, or a bug report about a crash during
compilation after you've adjusted the configure parameters? It seems like you
are reporting two different things here.
For the configure issue, would you care to suggest a patc
R. David Murray added the comment:
Can you suggest a patch? As I said on the other issue I don't believe any core
developers have access to hpux.
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
To quote Martin from an older issue: "Python on HP-UX has never really worked
well, but it has worked in some fashion for a long time". IA64 probably
introduces a whole slew of new issues. If you can work through them and
suggest patches tha
R. David Murray added the comment:
Oh, and python2.6 is in security-fix only mode, so any fixes would only go into
go into 2.7 and later. Have you gotten as far as trying to reproduce this on
2.7?
--
___
Python tracker
<http://bugs.python.
R. David Murray added the comment:
Oh, wait, I see you are testing the security RC. Is this a new problem, or
does it also occur with the previous released version of 2.6?
--
___
Python tracker
<http://bugs.python.org/issue14
R. David Murray added the comment:
To clarify what Serhiy said about the patches, the link to the patch works, but
the Reitveld review button isn't working. I get 'No issue exists with that id
(6972)'.
--
nosy: +loewis
___
Python
R. David Murray added the comment:
Can you clarify? In what sense has the 2.7.3 rc regressed?
--
___
Python tracker
<http://bugs.python.org/issue14526>
___
___
New submission from R. David Murray :
The attached patch makes 'test_main' optional for stdlib tests. If a test
module does not have a 'test_main', regrtest will use the unittest
loadTestsFromModule loader to load the tests.
This moves us further in the direction of u
R. David Murray added the comment:
I can't imagine when you'd *not* want setUpModule/tearDownModule to run, so
that's a reasonable conversion path. The other path for reap_children and
reap_threads would be to apply them to the individual classes that require them
within
R. David Murray added the comment:
I think dummy_threading should be fixed (but only in 3.3, just in case it
causes any backward compatibility issues with someone's code).
Logging I'd leave to Vinay to decide about.
I'm assuming that if any of the others devs nosy on this issu
R. David Murray added the comment:
David, thanks for your assistance. I didn't wind up using your patch, but the
work you did was valuable in preparing the patch I committed.
What I did was turn your 'detect the attributes' recipe into a unit test. I
then applied your patch
R. David Murray added the comment:
I'm sorry, but the bug tracker isn't a good place to get help. You'll have
better luck getting assistance for this on the python-list mailing list (see
mail.python.org).
--
nosy: +r.david.murray
resolution: -> invalid
stage: -&g
New submission from R. David Murray :
A common pattern in testing is to have a base test class that implements test
methods, and subclasses that provide various data that drives the tests to be
run in different ways. It is convenient for the base class to inherit from
TestCase, but this
Changes by R. David Murray :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
Antoine: I don't have any problem with that personally, but Michael did, and
he's the maintainer :)
But there is a small advantage: it means you don't have to keep repeating the
'unittest.TestCase' boilerplate in each subclass decl
Changes by R. David Murray :
--
nosy: +vinay.sajip
___
Python tracker
<http://bugs.python.org/issue14539>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
Note that I did just document the mixin idiom in the Lib/test docs. Which core
developers probably don't read :)
--
___
Python tracker
<http://bugs.python.org/is
R. David Murray added the comment:
"delete_after" what? I know it is somewhat implicit in the fact that it is a
context manager call, but that is not the only context the method name will be
seen in. (eg: 'dir' list of methods, doc index, etc). Even as a context
manager
R. David Murray added the comment:
By the way, I still think it would be nicer just to have the context manager
work as expected with delete=True (ie: doesn't delete until the end of the
context manager, whether the file is closed or not). I'm OK with being voted
down on th
R. David Murray added the comment:
Well, fixing NamedTemporaryFile in either of the ways we've discussed isn't
going to fix people writing non-portable code. A unix coder isn't necessarily
going to close the file before reading it. However, it would at least
significantly in
R. David Murray added the comment:
Thanks for the patch.
Do you have any interest in writing a test for this? Tests for tools go in
Lib/test/test_tools.py.
--
nosy: +r.david.murray
stage: -> test needed
type: -> behavior
versions: +Python 3.2, Python 3.3 -Pyth
R. David Murray added the comment:
It would also be reasonable to add a comment to the code mentioning why this
particular (security) comparison is *not* vulnerable to a timing attack, which
would serve the education purpose if someone does look at the code.
--
nosy: +r.david.murray
R. David Murray added the comment:
The content of a symbolic symlink is a symbolic reference to another location
in the file system. If you had used a hard link it would certainly work as you
expected.
The behavior with respect to symbolic links ought to be documented here:
http
R. David Murray added the comment:
I misread the docs. They aren't wrong, but it is still the case that they
don't mention that the directory name is what you get on entry to the context,
which is what led to my confusion.
Here's a patch.
--
keywords: +patch
nosy:
New submission from R. David Murray :
This was removed in 2cf7bb2bbfb8 along with a bunch of other functions. Yet in
issue 13959 Brett mentions needing to implement it. I don't see any
replacement for its functionality in importlib, so I would think it would be a
function we would wa
R. David Murray added the comment:
Thanks for the patch. I don't think you ran the test though, since it didn't
pass, and there was a mistake in your patch :)
I had to change the test considerably, and only applied the test part on 3.3
since I used mock.
--
resolution:
R. David Murray added the comment:
OK, the text at the start of the section, that I didn't notice in the 2.7 docs,
says they are obsolete and replaced by find_module and import_module. But
load_source is much more convenient, so I for one am not going to remove my use
of it in the te
Changes by R. David Murray :
--
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue14555>
___
___
Python-bugs-list mailing list
Unsubscri
R. David Murray added the comment:
Thanks.
--
nosy: +r.david.murray
resolution: -> fixed
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python.or
New submission from R. David Murray :
2.7 d60ef141e090
3.2 f25fb7e1d076
3.3 bd353f12c007
Thanks.
--
nosy: +r.david.murray
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tr
R. David Murray added the comment:
Serhiy: this looks good. I get some test errors when I apply it on 2.7 though.
Would you be interested in doing a 2.7 version as well?
(Minor comment: the test method would be better as two test methods, and it
would be nice to have a third test method
R. David Murray added the comment:
Serhiy: this looks good. I get some test errors when I apply it on 2.7 though.
Would you be interested in doing a 2.7 version as well?
(Minor comment: the test method would be better as two test methods, and it
would be nice to have a third test method
Changes by R. David Murray :
--
Removed message: http://bugs.python.org/msg158095
___
Python tracker
<http://bugs.python.org/issue14399>
___
___
Python-bugs-list m
R. David Murray added the comment:
Can you point to the changes you think are at issue? That might help us track
down why the change was made. This isn't necessarily a bug, but even if it
isn't, the behavior should probably be explicitly documented.
--
nosy:
R. David Murray added the comment:
Ah, so there are actually two timeouts of interest. One is "time out if there
is no more data for X seconds", and the other is "time out if there is no match
for X seconds". It used to do the former, now it does the latter.
I think y
R. David Murray added the comment:
Thanks.
We've had trouble in the past with a conversion to new style class breaking
people's code. People are less likely to be subclassing ZipFile, though, so it
is probably OK.
--
___
Python trac
R. David Murray added the comment:
It is fixed in Python3. Apparently Raymond was wrong about it having been
fixed earlier (or perhaps he was referring to the unicode being removed from
the pydoc __credits__ string).
--
nosy: +r.david.murray
R. David Murray added the comment:
Yes, after considerable discussion those of working on this stuff decided that
the goal should be that the parser be able to complete parsing, without error,
anything the typical browsers can parse (which means, pretty much anything,
though that says
R. David Murray added the comment:
Search is currently not returning all matching issues, unfortunately. You
might get a few more hits by searching for hpux in the title field via advanced
search.
--
nosy: +r.david.murray
___
Python tracker
R. David Murray added the comment:
Thanks, Serhiy.
I made one small change, using 'with self.assertEqual' in the TypeError test.
You might want to check that out, it is a useful technique.
Oh, and I removed the type check from the 2.7 patch. You can use a unicode
string as
R. David Murray added the comment:
I mean "with self.assertRaises(TypeError):".
--
___
Python tracker
<http://bugs.python.org/issue14399>
___
___
R. David Murray added the comment:
Ah. I based that on the fact that the third test passed without the change. I
thought you were adding that test of changing the comment just as a double
check. I should have asked instead of assuming
R. David Murray added the comment:
I must have been seeing what I expected to see. The test that failed was the
non-empty test.
News item fixed, thanks for the correction.
--
___
Python tracker
<http://bugs.python.org/issue14
Changes by R. David Murray :
--
title: imaplib.IMAP4.authenticate authobject fails with PLAIN mechanism ->
imaplib.IMAP4.authenticate authobject does not work correctly in python3
___
Python tracker
<http://bugs.python.org/issu
R. David Murray added the comment:
It works fine if you use unicode.
--
nosy: +r.david.murray
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
Indeed, this type of confusion is a large part of the motivation behind Python3.
You might try posting to the python-list mailing list asking for help if for
some reason you are required to use python2 for your program
R. David Murray added the comment:
It certainly is worthwhile pursing this in some fashion, since at the very
least the existing error message needs to be improved. But perhaps there is
something more that can be done to gracefully handle this case, instead. I
think the next interesting
R. David Murray added the comment:
The suggested doc change won't work, since that would imply that the size
argument was required. We'd have to use the old truncate([size]) notation.
Supporting it as a keyword argument is probably to be preferred, but someone
will have to write
R. David Murray added the comment:
Hmm. 2.5 years later it isn't looking like we are going to get a response.
Closing.
--
nosy: +r.david.murray
resolution: -> works for me
stage: -> committed/rejected
status: open -> closed
___
Changes by R. David Murray :
--
assignee: -> lukasz.langa
nosy: +lukasz.langa
___
Python tracker
<http://bugs.python.org/issue14590>
___
___
Python-bugs-lis
Changes by R. David Murray :
--
versions: -Python 2.6, Python 3.1
___
Python tracker
<http://bugs.python.org/issue14590>
___
___
Python-bugs-list mailin
R. David Murray added the comment:
There wouldn't be serious backward incompatibility. Truncate(0) would still
mean the same thing as truncate(size=0). I don't remember if we treat
supporting the keyword form when it is doced that as a bug or not, though, so
you might be rig
Changes by R. David Murray :
--
assignee: -> ncoghlan
___
Python tracker
<http://bugs.python.org/issue14588>
___
___
Python-bugs-list mailing list
Unsubscri
R. David Murray added the comment:
Something seems to have gone wrong with the 'reply' form. Sorry about that.
Please use the URL instead.
--
nosy: +r.david.murray
resolution: -> invalid
stage: -> committed/rejected
status
R. David Murray added the comment:
Hmm. The account *looks* normal, and has your email address attached. Can you
log in using the password you chose?
--
___
Python tracker
<http://bugs.python.org/issue14
R. David Murray added the comment:
As long as you are good with a registered account, that's what's important. If
I get time I'll take a deeper look, but most likely I won't unless this happens
again.
--
___
P
Changes by R. David Murray :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue14592>
___
___
Python-bugs-list mailing list
Unsubscribe:
R. David Murray added the comment:
This is essentially a duplicate of issue 14551, but perhaps with a bit more
weight behind it.
--
nosy: +brett.cannon, pitrou, r.david.murray
versions: -Python 2.6, Python 2.7, Python 3.1
___
Python tracker
<h
R. David Murray added the comment:
In general it is difficult to impossible to get Python2 to unload modules
before the interpreter shuts down. See issue 9072. I'm not savvy enough with
the C stuff to know if the fact that you loaded it via ctypes changes anything,
but I doubt it.
R. David Murray added the comment:
Yeah, they really need to be documented in order for us to document them as
deprecated if we decide we really want to remove them later. "Obsolete" is
not, I think, the same as "deprecated".
--
__
R. David Murray added the comment:
This appears to be failing on the buildbots:
http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/3358/steps/test/logs/stdio
http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/2037/steps/test/logs
R. David Murray added the comment:
The one-liner is "good enough", but...
The use case is indeed loading a module from an arbitrary file without having
to worry about sys.path, etc. For that load_source is intuitive. The
one-liner is an adequate substitute, but feels like a ste
R. David Murray added the comment:
Current default will become 3.3. 3.1 has been out for a while :)
Your thought sounds reasonable, though Martin may have further input.
Would you are to propose a patch? Otherwise most like nothing will happen with
this issue. 3.3 Beta is scheduled for
New submission from R. David Murray :
Not sure which revision triggered this, so opening a new bug:
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/6381/steps/test/logs/stdio
There's also a test_reprlib failure, no idea if it is related.
--
keywords: bui
R. David Murray added the comment:
Well, if you want backward compatibility, you pretty much have to keep it as
is, don't you?
This is the only time I've used load_source, and it was used because we didn't
want to bother mucking with the path but did want to load the mo
R. David Murray added the comment:
I think you misunderstand the way that python arguments work. If you have a
function so:
def func(size=None):
Then func(0) and func(size=0) are equivalent, and func(0, size=0) is a
TypeError because you've provided two arguments instead of jus
R. David Murray added the comment:
Ah, I'm glad someone else chimed in. I was going to say that I was pretty sure
we had a macro for doing this, but I don't do much C level coding so I didn't
have a reference handy.
--
___
Python
R. David Murray added the comment:
macro, function...something automated, anyway :)
--
___
Python tracker
<http://bugs.python.org/issue14586>
___
___
Python-bug
R. David Murray added the comment:
Can you demonstrate the parsing error? maxlen should have no effect during
parsing.
--
___
Python tracker
<https://bugs.python.org/issue36
R. David Murray added the comment:
As for the other, I don't see the need for a custom error. It's a ValueError
in my view. I wouldn't object to it strongly, but note that this error is
content dependent. If there's nothing to encode, you can "get away with"
R. David Murray added the comment:
Good point about the backward compatibility. Yes I agree, I think raising the
error is probably better. A deprecation warning seems like a good path
forward...I will be very surprised if anyone encounters it, though
R. David Murray added the comment:
Right, one of the fundamental principles of the email library is that when
parsing input we do not ever raise an error. We may note defects, but whatever
we get we *must* parse and turn in to *something
R. David Murray added the comment:
A cleaner/safer solution here would be:
tok, *remainder = _wsp_splitter(value, 1)
if _rfc2047_matcher(tok):
tok, *remainder = value.partition('=?')
where _rfc2047_matcher would be a regex that matches a correctly formatted
en
R. David Murray added the comment:
I don't see that line of code in unstructured_ew_without_whitespace.diff.
Oh, you are referring to his monkey patch. Yes, that is not a suitable
solution for anyone but him, and I don't think he meant to imply
R. David Murray added the comment:
New changeset feac6cd7753425fba006e97e2d9b74a0c0c75894 by R. David Murray
(Abhilash Raj) in branch 'master':
bpo-33524: Fix the folding of email header when max_line_length is 0 or None
(#13391)
https://github.com/python/cpyt
R. David Murray added the comment:
New changeset ef5bb25e2d6147cd44be9c9b166525fb30485be0 by R. David Murray
(Batuhan Taşkaya) in branch 'master':
bpo-27737: Allow whitespace only headers encoding (#13478)
https://github.com/python/cpython/commit/ef5bb25e2d6147cd44be9c9b166525
R. David Murray added the comment:
Thanks.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python.or
R. David Murray added the comment:
Can you demonstrate the problem with an actual email object?
header_store_parse is not meant to be called directly.
--
___
Python tracker
<https://bugs.python.org/issue36
R. David Murray added the comment:
Nevermind, I was testing with the wrong version of python. This bug was
introduced somewhere after 3.4 :(
>>> from email.message import EmailMessage
>>> m = EmailMessage()
>>> m['Subject'] = 'Hello Wörld! H
R. David Murray added the comment:
New changeset 0416d6f05a96e0f1b3751aa97abfffe6d3323976 by R. David Murray (Miss
Islington (bot)) in branch '3.7':
bpo-27737: Allow whitespace only headers encoding (GH-13478) (#13517)
https://github.com/python/cpyt
David K. Hess added the comment:
Thank you Steve!
Nice to see this one make it across the finish line.
--
___
Python tracker
<https://bugs.python.org/issue4
R. David Murray added the comment:
"But - what are we solving for here?" I'll tell you what my fairly common use
case is. Suppose I have some test infrastructure code, and I want to make some
assertions in it. What I invariably end up doing is passing 'self'
R. David Murray added the comment:
The fact that the original report mentions HeaderParserError implies that the
new API is being used, though the report didn't make that clear. The problem
still exists:
>>> m = message_from_string("To: :Foo
>>> \n\n
R. David Murray added the comment:
BareQuotedString implies the new API is being used, though that was not made
clear in the report. However, unlike the other recently closed issue, this one
was in fact fixed (and I have a vague memory of reviewing the PR):
>>> m = message_fr
R. David Murray added the comment:
Note that the reporter indicated that the message was an instance of
EmailMessage (the new API). You'd need to use policy-default to get that using
message_from_string. But yes, this was fixed in another issue.
--
stage: patch review ->
R. David Murray added the comment:
This problem is the whole reason "mangle_from" exists in the email library...
--
___
Python tracker
<https://bugs.python.o
R. David Murray added the comment:
FYI, it would have been most helpful if you had posted your example in the
issue text instead of as an attached file, as it explains the problem better
than your text does :)
Here is a minimal reproducer:
>>> m = EmailMessage(policy=strict)
&g
R. David Murray added the comment:
The display name is a phrase, and a phrase is a sequence of words, and a word
is either a quoted string or an atom. So it is legal to mix quoted strings and
encoded words in a display name. I'd vote to do whichever one is easier to
implement :
R. David Murray added the comment:
Right, those absolutely are valid addresses. A resolver will normally look up
a name with an internal dot first as if it were an FQDN, but if it does so and
does not get an answer it will then look it up again as a "local" address
(appending i
Change by R. David Murray :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
R. David Murray added the comment:
The input header is not valid (non-ascii is not allowed in headers), so you
shouldn't expect make_header to do anything sensible. Note that this is the
legacy API, which is a toolkit and does not hold your hand when it comes to RFC
compliance. Aside
R. David Murray added the comment:
Right, and the python email package fully supports non ascii:
>>> msg = EmailMessage()
>>> msg['Subject'] = "Panamá- Casco Antiguo"
>>> bytes(msg)
b'Subject: =?utf-8?q?Panam=C3=A1-?= Casco Antiguo\n\n'
R. David Murray added the comment:
New changeset b9c3da5c89c66dcccf382e8f196746da2a06d4cc by R. David Murray
(Sanyam Khurana) in branch 'master':
bpo-24744: Raises error in pkgutil.walk_packages if path is str (#1926)
https://github.com/python/cpyt
R. David Murray added the comment:
Thanks, Sanyam.
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
R. David Murray added the comment:
Since according to Eryk there's no way to have a reliable cross-platform
exception class catching file name to long, I'm rejecting this feature request.
--
resolution: -> rejected
stage: -> resolved
status
R. David Murray added the comment:
It's not obvious from your discussion, Nick, *why* venv won't use an upgraded
system pip if it has been manually upgraded. There's no need for internet
access in that case (which is the argument for using the bundled pip when
running ensurepi
4901 - 5000 of 12944 matches
Mail list logo