Jean-Paul Calderone added the comment:
Can this ticket be marked as a release blocker so it's not forgotten
about for 2.7?
--
___
Python tracker
<http://bugs.python.org/i
Jean-Paul Calderone added the comment:
Alright. So in Python 3.1, this is the behavior:
>>> BaseException().message
(attribute error)
>>> BaseException("foo").message
(attribute error)
>>> BaseException("foo", "bar").message
(attr
Jean-Paul Calderone added the comment:
Hm. That PEP is marked as rejected, though. I guess it was partially
implemented, those changes included in the Python 2.5 release, and then
it was decided that it was a bad idea, rejected, and the changes undone
for 3.x (what about 2.7)? Or did
Jean-Paul Calderone added the comment:
After looking at this more carefully, I find myself wondering what
exactly is being deprecated at all.
Brett said:
> it's needed for anyone who came to rely on the feature in their 2.5
code from Python.
Can someone help me understand what the fe
Jean-Paul Calderone added the comment:
This also affects Twisted. We worked around it a couple months ago by
putting a read-only `message` property onto our Exception subclass
(Here's the revision: <http://twistedmatrix.com/trac/changeset/27062>).
This seemed reasonable enough, b
Jean-Paul Calderone added the comment:
Thanks for that Georg.
I'm still having trouble with this. I'm aware that the issue tracking
isn't the right place to ask for help with writing programs, but I think
that since I still can't get this code to work, even looking at t
Jean-Paul Calderone added the comment:
Oops. I wrote "In contract" in my previous message. I meant "In contrast".
--
___
Python tracker
<http://bu
Jean-Paul Calderone added the comment:
Hi Georg, thanks for your comment.
I'm not sure I fully understand, though.
The compiler package is widely used, okay. So I suppose that means that
the desire here is to make those users happy?
But the compiler package is deprecated, and has known
New submission from Jean-Paul Calderone :
None of the documentation seems to cover this parameter. The test suite
doesn't even seem to exercise it, either. What does it do? What kind
of values are expected to be passed for it?
--
assignee: georg.brandl
components: Document
Jean-Paul Calderone added the comment:
Ah, thanks for the clarification, Philip. I've attached another patch
updating those docs.
--
___
Python tracker
<http://bugs.python.org/i
Changes by Jean-Paul Calderone :
Added file: http://bugs.python.org/file14839/subprocess-conversion-doc.patch
___
Python tracker
<http://bugs.python.org/issue5
Jean-Paul Calderone added the comment:
Bugs are no longer being fixed in the compiler package. To me, that
says it should be regular-deprecated. People with no short term plans
of switching to Python 3 will still want to avoid the compiler package.
They should be told about the deprecation
New submission from Jean-Paul Calderone :
According to http://docs.python.org/library/compiler.html, the compiler
package is deprecated. However, importing the compiler package does not
emit a deprecation warning. It should, to convey this information to
people who are actually trying to use
Jean-Paul Calderone added the comment:
Hey Philip,
I'm not sure I follow. The patch only changes the os module, not the
subprocess module. What subprocess documentation do you think needs to
be updated?
--
___
Python tracker
Jean-Paul Calderone added the comment:
Attached os-popen-list.patch which includes all of the earlier
os-popen.diff and adds tests which fail without this patch and pass with
it. They also pass on Python 2.5. The patch is against the Python 2.6
maintenance branch, but presumably it should be
Changes by Jean-Paul Calderone :
Added file: http://bugs.python.org/file14791/os-popen-list.patch
___
Python tracker
<http://bugs.python.org/issue5329>
___
___
Python-bug
Jean-Paul Calderone added the comment:
I hope you'll also write some unit tests for privilege.py (actually, I
hope you'll do test driven development on it).
--
___
Python tracker
<http://bugs.python.
Jean-Paul Calderone added the comment:
It would still be nice to have the currently unimplemented platform
wrappers added to the standard library, though. For example, as solinym
pointed out, getresuid and getresgid are not currently wrapped at all.
There may be other low-level APIs which may
Jean-Paul Calderone added the comment:
Maybe this should just be a third-party module for the time being? That
removes the question of which stdlib module to add it to for now. Plus,
since it's not just a straightforward platform API wrapper, it probably
merits separate distribution t
Jean-Paul Calderone added the comment:
If it's not a problem, then the invoker doesn't need to check the exit
code of setup.py. Why are you resistant to exposing more information?
--
___
Python tracker
<http://bugs.python.
Jean-Paul Calderone added the comment:
This makes it more easily possible for automated systems to detect that
there was a problem with the build.
Checking an exit code is easy. Grabbing and parsing stdout and stderr
is hard and fragile.
--
nosy: +exarkun
Jean-Paul Calderone added the comment:
Here's a patch implementing part of the requested feature.
pystones cannot tell the difference between tr...@head with or without
this patch applied. Both report a maximum of 78125 pystones/second/
--
keywords: +patch
nosy: +exarkun
Added
Jean-Paul Calderone added the comment:
Notice what it does to other dict keys:
>>> simplejson.dumps({1: 1})
'{"1": 1}'
In other words, I don't think this is a bug. It's how JSON works. JSON
dict keys are str
Jean-Paul Calderone added the comment:
The os module is mostly for wrappers around native platform APIs. So at
the very least, I don't think such an API belongs there. It would fit
in to a general process-related module, perhaps.
--
___
P
Jean-Paul Calderone added the comment:
It might be better to pick a better (but probably platform-specific) API
for such a use-case. os.kill has a problem with false positives (on
Linux it will tell you a process exists even when it doesn't). Looking
in /proc/ or using a Windows A
Jean-Paul Calderone added the comment:
For what it's worth, here are some timings from my system. First,
os.kill without raising an exception:
exar...@boson:~$ python -m timeit -s 'import os; pid = os.getpid()' '
os.kill(pid, 0)
'
100 loops, best of 3: 0.413 us
Jean-Paul Calderone added the comment:
This is quite a microoptimization. Why do you think you need to avoid
the exception here?
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue6
New submission from Jean-Paul Calderone :
The load_tests feature will be new in 2.7. Earlier in the unittest
documentation, there's a mention that loadTestsFromModule was changed in
2.7 to add support for load_tests. However, the main documentation for
load_tests doesn't say anyt
New submission from Jean-Paul Calderone :
exar...@boson:~$ cat > test_foo.py
from unittest import TestCase
class SomeTests(TestCase):
def test_foo(self):
pass
exar...@boson:~$ python -m unittest test_foo
--
Ra
Jean-Paul Calderone added the comment:
This is a duplicate of #5210, which has a patch attached.
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue6
Jean-Paul Calderone added the comment:
> It's not, I was more thinking of push_str(foo), where it uses a
default encoding. I think some people don't know what unicode or
encoding is, or don't want to worry about it.
Nice as it sounds, the problem with this is that those p
Jean-Paul Calderone added the comment:
> It's not 'that' clear you should only work with bytes on a socket.
It's pretty clear to me. :) That's what sockets can deal with - bytes.
If you want to transfer something other than bytes via a socket, then
you need to
Jean-Paul Calderone added the comment:
Cool, thanks. PyCrypto also works again now.
--
___
Python tracker
<http://bugs.python.org/issue6377>
___
___
Python-bug
Jean-Paul Calderone added the comment:
It looks like this change may have broken some parts of distutils. For
example, Twisted's setup.py now produces this output when running the
build_ext command:
$ ~/Projects/python/trunk/python setup.py build_ext
running build_ext
Traceback (most r
Jean-Paul Calderone added the comment:
Cool. I'm convinced.
--
___
Python tracker
<http://bugs.python.org/issue6410>
___
___
Python-bugs-list mailing list
Jean-Paul Calderone added the comment:
FWIW, here are some use cases:
http://twistedmatrix.com/trac/browser/tags/releases/twisted-8.2.0/twisted/python/context.py#L32
http://twistedmatrix.com/trac/browser/tags/releases/twisted-8.2.0/twisted/python/log.py#L270
http://twistedmatrix.com/trac
Jean-Paul Calderone added the comment:
> IIRC, Guido has previously rejected this suggestion and its variants.
Got a link? It'd be nice to know what the rationale was.
--
___
Python tracker
<http://bugs.python.or
Jean-Paul Calderone added the comment:
Why so much opposition to the shorter spelling of .copy() & .update()?
As Tim pointed out, lists, tuples, and strings all provide this
shortcut. Why not dicts?
--
nosy: +exarkun
___
Python tracker
&
New submission from Jean-Paul Calderone :
I ran 2to3 over Twisted r27084 like this:
time ~/Projects/python/trunk/python
/home/exarkun/Projects/python/trunk/Tools/scripts/2to3 -j 4 twisted/ >
2to3.patch
Visual inspection revealed some curious defects, and attempting to apply
it failed like t
Changes by Jean-Paul Calderone :
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue6403>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
Solaris 10 introduced "The Event Completion Framework". I am not
particularly familiar with Solaris, so I couldn't say whether it would
be better to target this or the older /dev/poll. Some documentation
suggests that "The Event Comp
Jean-Paul Calderone added the comment:
You're talking about adding a non-local goto feature to the language.
This would be a huge change, and not one that is generally in the
direction that any widespread languages (let alone Python itself) are
going these days.
Please raise this on o
New submission from Jean-Paul Calderone :
I found a couple mistakes in test_with.py with Pyflakes.
--
components: Tests
files: test_with.patch
keywords: patch
messages: 89530
nosy: exarkun
severity: normal
status: open
title: test_with.py has a couple minor mistakes
versions: Python 2.7
Jean-Paul Calderone added the comment:
I just want to second Kristján's position. I've used assertRaises a lot
over the years (an implementation in a third-party unit testing library)
and it is extremely common that I want the exception object to perform
the kind of checks he is
New submission from Jean-Paul Calderone :
Consider this source file:
# coding: ascii
☃
It is not a valid Python program (for several reasons). The first
problem encountered is that bytes representing SNOWMAN do not fit into
ASCII, so the file cannot be decoded using the declared encoding
Jean-Paul Calderone added the comment:
I found XMLGenerator in xml.sax.saxutils. Attached patch changes
expatreader to use that instead. Though I have no idea what the point
of this stanza is. I suppose it's to exercise the code, in lieu of some
unit tests. It might be better to just d
Jean-Paul Calderone added the comment:
So how about it?
--
___
Python tracker
<http://bugs.python.org/issue4180>
___
___
Python-bugs-list mailing list
Unsub
Jean-Paul Calderone added the comment:
Perhaps the C implementation should interpret the stacklevel parameter
differently so that it is compatible with the Python implementation.
The stacklevel value is, after all, a very important part of the
interface of warnings.warn, as it is the only way
Jean-Paul Calderone added the comment:
This was done long ago, it seems.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue2376>
___
_
Jean-Paul Calderone added the comment:
Any plans for a unit test for this change?
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue3684>
___
___
Jean-Paul Calderone added the comment:
Have you checked to see what the result of a ** b is?
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue6
New submission from Jean-Paul Calderone :
If an extension type supplies a tp_new or tp_init, these will be invoked
by the normal instantiation logic. They will also be exposed as
`__new__´ and `__init__´ attributes of the type. However, there is no
way to supply a docstring for these methods
New submission from Jean-Paul Calderone :
Creation of GC'd types is explained at
<http://docs.python.org/c-api/gcsupport.html>.
The docs claim that PyObject_GC_Track must be called once an object
created with PyObject_GC_New is initialized. The docs fail to explain
what should be do
Jean-Paul Calderone added the comment:
pygtk doesn't release the GIL around its internal calls unless you call
threads_init. So I think this is pretty clearly just a misuse of the
pygtk library. There's nothing at all Python can do about it. If an
extension library doesn't
Jean-Paul Calderone added the comment:
Oh, I forgot dictionaries aren't weakrefable. That's such a pain, I
thought the third solution would be a good balance between easy and good. :/
Regarding the first solution, my only question right now is whether this
should be a new attribute/
New submission from Jean-Paul Calderone :
When a frame's f_locals attribute is accessed, one of two things happens:
* If this is the first access, a new dictionary is created and it is
populated with the locals from the frame (since they are not stored
internally as a dictionary).
Jean-Paul Calderone added the comment:
Perhaps Gregory has some idea about how this can most easily be
resolved, since I think he did the work on #3745 which introduced this
change in behavior.
--
nosy: +gregory.p.smith
___
Python tracker
<h
Jean-Paul Calderone added the comment:
I would certainly like to, but unfortunately at present I am unable to.
--
___
Python tracker
<http://bugs.python.org/issue6
Jean-Paul Calderone added the comment:
It seems a patch would be an enormous undertaking, as the data structure
returned by the parser does not include this information, and the parser
is written in C.
I'll just hack around this somehow. Don't expect a pat
Jean-Paul Calderone added the comment:
Here's a new patch which adds SetParamEntityParsing to the pyexpat
library docs and adds another test for external entity reference
handling. This is probably all I'll do on this ticket.
--
Added file: http://bugs.python.org
Jean-Paul Calderone added the comment:
Here's a patch which removes sgmlop support from xmlrpclib.
--
keywords: +patch
Added file: http://bugs.python.org/file14023/xmlrpclib.patch
___
Python tracker
<http://bugs.python.org/i
Jean-Paul Calderone added the comment:
Here's a patch which renames `_result´ to `_resultForDoCleanups´.
Another possibility would be for `doCleanups´ to take the result object
as an argument. This would make it harder for applications to call
directly, though (I've never wan
New submission from Jean-Paul Calderone :
r72219 introduced an `_result´ attribute to `TestCase´. As `TestCase´
is designed specifically with the intent that applications should
subclass it -- and frequently -- I would suggest that the attribute be
given a name less likely to collide with a
New submission from Jean-Paul Calderone :
It used to be possible to use hashlib with arrays; it no longer seems
possible.
exar...@charm:~$ python -c '
import sys, hashlib, array
print sys.version_info
print hashlib.sha1(array.array("b", [1, 2, 3])).hexdigest()
'
Jean-Paul Calderone added the comment:
> Even though I still don't understand the original issue, apparently,
> it is an issue only if the localtime() function is used. Extensions
> that don't use it might still work fine, according to the report.
I have an extension which
New submission from Jean-Paul Calderone :
Per issue3308, it is not really possible to build Python extensions with
MinGW anymore (as far as I can tell). The distutils documentation is
misleading in this regard, as is the continued existence of the
build_ext --compiler=mingw32 option. The
New submission from Jean-Paul Calderone :
Python includes several APIs for manipulating TLS:
PyAPI_FUNC(int) PyThread_create_key(void);
PyAPI_FUNC(void) PyThread_delete_key(int);
PyAPI_FUNC(int) PyThread_set_key_value(int, void *);
PyAPI_FUNC(void *) PyThread_get_key_value(int
Jean-Paul Calderone added the comment:
This actually appears to be an issue with the sgmlop-based parser, not
the expat-based parser. After removing sgmlop, the exception-raising
behavior is restored.
Perhaps this bug should be closed as invalid, then. Only, I wonder if
this is the right bug
New submission from Jean-Paul Calderone :
Prior versions of xmlrpclib.loads would raise an exception when passed
malformed documents:
exar...@bigdog24:~/_trial_temp$ python2.4 -c 'from xmlrpclib import
loads; loads("\x00\n\n \n \n \n
\n\n")'
Traceback (most recent call la
Jean-Paul Calderone added the comment:
Hi Benjamin,
Thanks for this fix. :) I noticed the revision in your comment doesn't
seem to be the one that contains the fix though.
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/i
Jean-Paul Calderone added the comment:
/Any/ addCleanup that is successfully executed should cause the cleanup
function to be called. Otherwise you have to define all your cleanup
twice, and that's no fun.
--
___
Python tracker
Jean-Paul Calderone added the comment:
> And maybe the addCleanup components could be a stack of callable objects?
Yea, that's handy. My example didn't show it, but that's what trial
implements.
--
___
Python tracker
<h
Jean-Paul Calderone added the comment:
Here's one:
class ReactorShutdownInteraction(unittest.TestCase):
"""Test reactor shutdown interaction"""
def setUp(self):
"""Start a UDP port"""
self.serve
Jean-Paul Calderone added the comment:
dpaste.com will eventually discard your proof. You should include all
information for a bug report on the tracker. You can include the code
in a comment or attach it to the ticket as a file.
--
nosy: +exarkun
Jean-Paul Calderone added the comment:
> I think the policy is to mirror all possible O_* constants, even if they
> are of no use in Python. For example, we also have os.O_DIRECTORY.
Not disagreeing with the conclusion of this ticket, but I would like to
point out that os.O_DIRECTORY
New submission from Jean-Paul Calderone :
codecs.lookup is documented as returning a tuple. It actually returns a
what the registered lookup function returns, which really *should* be a
codecs.CodecInfo instance. If a registered lookup function actually
returns a tuple, then codecs.getreader
Jean-Paul Calderone added the comment:
To clarify, I'll probably work on this patch a bit more later, adding a
few more tests for related behavior.
--
___
Python tracker
<http://bugs.python.org/i
Jean-Paul Calderone added the comment:
Here's the version I have now. I don't think it's complete, but it
finishes the test started in the previous patch, and the test passes.
--
Added file: http://bugs.python.org/file13323/use-fore
Jean-Paul Calderone added the comment:
Thanks, that helped a bunch. I'm sure it would have taken me a long
time to find SetParamEntityParsing(XML_PARAM_ENTITY_PARSING_ALWAYS).
Perhaps it would also be good to expand the pyexpat documentation to
cover that method and parameter (unless
New submission from Jean-Paul Calderone :
Lacking unit tests for this (documented) functionality makes it harder
for alternate Python runtimes to correctly provide it. Plus, if it's
not tested, it might not work.
I tried to write tests for the feature since I recently used it and
thoug
Jean-Paul Calderone added the comment:
Unit tests are a great thing as well. Also, the deprecation warnings
you've added are the really annoying kind. They refer to users to the
source of the deprecated methods themselves! A vastly preferable use of
the warnings system is to refer use
Changes by Jean-Paul Calderone :
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue5380>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
> UTF-7 already sounds like something horrible for me, but a *modified*
> UTF-7 encoding is something a little bit more strange for me. Why not
> reusing directly UTF-7.
UTF-7 wasn't horrible for its time, but its time has very likely
Jean-Paul Calderone added the comment:
Read the docs for kill(2). -1 is a completely legitimate PID.
Recommend close as invalid.
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue5
Jean-Paul Calderone added the comment:
IMAP4 UTF-7 is implemented in Twisted -
<http://twistedmatrix.com/trac/browser/trunk/twisted/mail/imap4.py#L5385>,
<http://twistedmatrix.com/trac/browser/trunk/twisted/mail/test/test_imap.py#L58>.
Feel free to re-use any of that code that woul
Jean-Paul Calderone added the comment:
Hi Antoine,
> > Surely the majority of the burden is imposed by the C
implementation. I expect that 90% of the time spent fixing bugs will be
spent fixing them in C.
> Hmm, it depends. It's probably true in general, but I suspect a fair
Jean-Paul Calderone added the comment:
> We don't maintain any other features in two languages for those
purposes. IMO, it will just be more of a burden to fix bugs in two
different places as compared to the advantages you mention.
Surely the majority of the burden is imposed
Jean-Paul Calderone added the comment:
> Oh, and "what to do of the now unused pure Python implementations in
io.py"? Easiest would be to dump them, as they will probably get
hopelessly out of sync, but perhaps there's some genuine
portability/educational advantage to ke
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue1941>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue1043706>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue1053365>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue805194>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jean-Paul Calderone :
If pydoc is used to try to look up the documentation for a module which
does not exist, this is reported reasonably:
exar...@charm:~$ pydoc foobarbaz
no Python documentation found for 'foobarbaz'
exar...@charm:~$
However, if
New submission from Jean-Paul Calderone :
The weekly tracker summary emails sent to python-dev contain incorrect
information. The value for the "median duration of open issues" it
reports has recently wrapped around to 0 and started growing from there.
Looking at older reports, it
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue3783>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue3959>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
> It's indeed possible to provide that as a third-party module; one
> would have to implement an EntityResolver, and applications would
> have to use it. If there was a need for such a thing, somebody would
> have done it years ago.
I do
Jean-Paul Calderone added the comment:
Though it's inconvenient to do so, you can arrange to have the locator
available from the entity resolver. The content handler's
setDocumentLocator method will be called early on with the locator
object. So you can give your entity resolver a
Changes by Jean-Paul Calderone :
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue2124>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
Some comments on tmp_dev_shelver.py...
Regarding SQLhash.__init__, it would be better to avoid relying on the
"sqlite_master" table by using the CREATE TABLE IF NOT EXISTS form of
table creation.
Setting the isolation_level in __init__
201 - 300 of 391 matches
Mail list logo