Jean-Paul Calderone added the comment:
> I'm not sure if I agree that find_unused_port() should be removed though; it
> does serve a purpose in very rare corner cases.
It can serve a purpose in any number of cases. My point is that it's *always*
unreliable, though. Any t
Jean-Paul Calderone added the comment:
Considering that it's extremely difficult to implement this correctly and in a
cross-platform way, I think it makes sense as a stdlib addition (though I'd add
it as a method of a `path` type rather than to the "shell ut
Jean-Paul Calderone added the comment:
> You mean that socket.create_connection(), httplib (issue 3972) and ftplib
> (issue 8594) should have used a different API to implement their
> "source_address" option?
I'm not sure what you mean. The problem here is that you
Jean-Paul Calderone added the comment:
> One of the tests in test_socket is checking that an attempt to connect to a
> port with no server running gives socket.error. For that, we need a port
> that's guaranteed to have no server present.
A good way to do this is to create a s
Changes by Jean-Paul Calderone :
--
stage: unit test needed -> patch review
___
Python tracker
<http://bugs.python.org/issue5727>
___
___
Python-bugs-list mai
Jean-Paul Calderone added the comment:
I think this is ready for a first review. See
<http://codereview.appspot.com/1132041>. If everyone agrees this is
inappropriate for 2.7, then I'll port the changes to 3.x. I don't expect there
to be much difference in
Changes by Jean-Paul Calderone :
--
keywords: +needs review
status: open -> languishing
versions: +Python 3.2 -Python 2.6
___
Python tracker
<http://bugs.python.org/iss
Jean-Paul Calderone added the comment:
I agree that this should be landed (for 2.6 and 2.7). I think I can do it. I
made some changes to the tests, though. It would be nice for someone to look
those over and make sure the change still looks good.
I checked everything in to the
Jean-Paul Calderone added the comment:
Major buildbot failures caused by this change, eg:
ERROR: test_file (test.test_urllib2net.OtherNetworkTests)
--
Traceback (most recent call last):
File
"/home/buildbot/slave/py-
New submission from Jean-Paul Calderone :
The item "How do I prepare a new branch for merging?" is unclear about which
branch needs to be prepared. It could be the source branch or the destination
branch. In #python-dev, I learned that it's probably the destination branch
Jean-Paul Calderone added the comment:
Should be resolved in, oh, let's see, r81007, r81011, r81016, and r81018.
Thanks to everyone who helped out.
--
resolution: -> fixed
status: open -> closed
versions: +Python 3.1
___
Python tra
Jean-Paul Calderone added the comment:
zope.interface.interface.InterfaceClass implements __lt__ and __gt__.
It doesn't override any of the other comparison methods, and it relies
on inheriting an identity-based __hash__ from its parent.
Disabling __hash__ when __cmp__ or __eq__ is de
Jean-Paul Calderone added the comment:
It implements ordering based on the interface's fully-qualified Python
name (ie, (__module__, __name__)). This is compatible with the default
__eq__ implementation.
__
Tracker <[EMAIL PROTECTED]>
<http://b
Jean-Paul Calderone added the comment:
You're correct in pointing out that IMAP4 supports arbitrary encodings,
so simply hard-coding ASCII is not correct. The encoding isn't
connection-level, but applies to particular sequences of bytes in the
connection stream. To correctly int
Jean-Paul Calderone added the comment:
The attached patch doesn't fix the issue I described:
* err_closed() will raise an exception indicated the file is closed.
However, the file is not necessarily closed, so this exception is wrong.
* Most or all PyFile_WriteString callers are stil
Jean-Paul Calderone added the comment:
The patch doesn't change the threading module, so I'm not sure if
there's anything in particular you think is performance critical there.
The places where it uses try/finally are:
* _Condition.wait. This performs operations on a mutex
Jean-Paul Calderone added the comment:
It's explicitly not (and Guido said this is what he wanted, several
times). However, CPython will not raise a KeyboardInterrupt in the
middle of a C function. Hence my parenthetical about implementing the
lock type
Jean-Paul Calderone added the comment:
There may not be a guarantee, but it will with the current
implementation, and the discussion on this ticket seems to be very
geared towards CPython implementation peculiarities.
__
Tracker <[EMAIL PROTECTED]>
Jean-Paul Calderone added the comment:
> Slice objects are really meant to be internal structures and not
passed around in the user's code.
I don't know what they're "meant" to be, but they're certainly not
internal. If you implement __getitem__, __setitem__,
Jean-Paul Calderone added the comment:
I don't see the ability to use a slice as a dict key as particularly
more surprising than the ability to use ints as dict keys. Someone who
doesn't understand how dicts work can use either of these features to
write broken programs.
I have tho
Changes by Jean-Paul Calderone <[EMAIL PROTECTED]>:
--
nosy: -exarkun
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2268>
__
___
Python-bugs
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
The Python buildbot's waterfall view currently shows all builders. Not
all of these are expected to work currently. This can be confusing to
people trying to understand the current state of Python on various
platforms. B
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
If gc.set_debug(gc.DEBUG_STATS) is enabled, collection will report
elapsed time as it progresses through collection. However, the
reporting code clobbers the value it uses to compute the elapsed time,
so the value alternates b
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
Which system uses a 32 bit PID? Not Linux, or FreeBSD, or OS X - they
all use 16 bit PIDs.
--
nosy: +exarkun
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
PIDs cycle quite frequently. You must be thinking of something else.
Even 64 bit Linux has a maximum PID of 2 ** 15 - 1.
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
In Python 2.5 and earlier, the `showwarning´ function in the `warnings´
module has this signature:
def showwarning(message, category, filename, lineno, file=None):
In trunk (and presumably what will become Python 2.6), th
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
By the way, I just noticed that Lib/idlelib/PyShell.py includes an
override of `showwarning´ which is defined with the old signature.
I ran idle from trunk and verified that is indeed breaks warning rep
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
$ python -c "print len('`pwd`'); import os; print os.getcwd()"
1174
Traceback (most recent call last):
File "", line 1, in ?
OSError: [Errno 34] Numerical result out of range
$
The getcwd man p
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
If a warning is emitted then a filter with the "always" rule is added
then the is emitted again, it will not be shown the second time:
[EMAIL PROTECTED]:~$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:5
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
In Python 2.5 and earlier, passing stacklevel=0 to warnings.warn
resulted in a warning shown which pointed to warnings.py. In Python
2.6, passing a stacklevel of 0 results in the warning shown pointing to
the file containing th
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
[EMAIL PROTECTED]:~$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more i
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
There aren't many high-ish level APIs for dealing with lnotab.
dis.findlinestarts is one, but it's not clear if it's private or public.
If it's public, it'd be great to make it clear that it is and doc
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
It'd be better if it did.
--
components: Library (Lib)
messages: 75292
nosy: exarkun
severity: normal
status: open
title: inspect.getsource doesn't work on functions imported from a zipfile
type: behavior
vers
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
It seems to depend on working directory:
[EMAIL PROTECTED]:/tmp$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
Here is a transcript for a complete, self-contained, minimal reproduction:
[EMAIL PROTECTED]:~$ cd /tmp
[EMAIL PROTECTED]:/tmp$ mkdir zipimportbugexample
[EMAIL PROTECTED]:/tmp$ cd zipimportbugexample/
[EMAIL PROTECTED
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
The __import__ function ihooks installs has a signature which is
incompatible with the real __import__ function, breaking some things
when ihooks is in use:
[EMAIL PROTECTED]:~$ python2.5
Python 2.5.2 (r252:60911, Jul 31 2008,
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
2.6 exhibits the same behavior as 2.5 in this case. 3.0 exhibits
similar behavior, but with a slightly different exception in the NUL
case. The examples included showing the Python 3 behavior don't cover
the same cases as t
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
This is still relevant. It makes linecache (and therefore some other
things, like inspect.getsource) almost useless in many cases. For
example, because of this, sometimes inspect.getsource will raise an
IOError and sometimes i
Changes by Jean-Paul Calderone <[EMAIL PROTECTED]>:
--
nosy: -exarkun
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1210>
___
__
Changes by Jean-Paul Calderone <[EMAIL PROTECTED]>:
--
nosy: +exarkun
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4295>
___
__
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
With a recent build of the py3k branch, sys.path ends up with this element:
/home/exarkun/Projects/python/branches/py3k/Lib/[EMAIL PROTECTED]@
which doesn't exist and doesn't look like it should exist. plat-linux2,
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
expatreader.py has a __main__ which uses something called
`xml.sax.XMLGenerator´. However, `xml.sax´ has no such attribute.
--
components: Library (Lib)
messages: 76754
nosy: exarkun
severity: normal
status: open
titl
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
I tried running 2to3 on Twisted. Here's the result:
[EMAIL PROTECTED]:~/Projects/Twisted/trunk$ time
~/Projects/python/branches/release26-maint/python
/home/exarkun/Projects/python/branches/release26-maint/Tools/scripts/2t
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
It would be great if this could be backported.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
Consider:
[EMAIL PROTECTED]:~$ ~/Projects/python/branches/release26-maint/python
Python 2.6+ (trunk:66997, Oct 23 2008, 16:02:09)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright",
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
The "f65" is the chunk length for the first chunk returned when
requesting that URL. A proxy could easily hide this by switching to a
different transfer encoding.
-
Jean-Paul Calderone added the comment:
Performance shouldn't be a major concern here. Utility is more
important and the implementation can be optimized later.
My initial impression of netaddr is pretty good. One thing it has going
for it is documentation. The netaddr google page gi
Jean-Paul Calderone added the comment:
> hm, all addresses have a subnet, even if its an implied /32, so
specifying a network as ("1.1.1.0", "1.1.1.255") seems a lot more
off-putting than "1.1.1.0/24". You're also much more likely to see the
latter in netwo
Jean-Paul Calderone added the comment:
This is causing problems for me as well. The attached patch no longer
applies cleanly to trunk. I've attached an updated version which
addresses the conflicts. The new behavior fixes the issues I have with
the current behavior. It'd be great
Jean-Paul Calderone added the comment:
After updating the patch there so that it can be applied, it does seem
to address my issue. I added a comment there.
___
Python tracker
<http://bugs.python.org/issue4
Jean-Paul Calderone added the comment:
New version of the patch which doesn't rewrite pyc files attached.
Added file: http://bugs.python.org/file12599/update_co_filename.diff
___
Python tracker
<http://bugs.python.org/issu
New submission from Jean-Paul Calderone :
In order to create an element with an attribute and a child, this is
necessary:
e = Element("foo")
e.setAttribute("bar", "baz")
e.appendChild(quux)
It would be preferable if Element.__init__ accepted two ad
New submission from Jean-Paul Calderone :
Here's a transcript demonstrating the disagreement:
exar...@charm:~$ mkdir warningexample
exar...@charm:~$ cd warningexample/
exar...@charm:~/warningexample$ mkdir foo
exar...@charm:~/warningexample$ touch foo/__init__.py
exar...@
Jean-Paul Calderone added the comment:
Perhaps even more disconcerting is the disagreement between
inspect.getabsfile(f) and inspect.getabsfile(inspect.getmodule(f)). The
latter agrees with the warnings system, unlike the former which just
looks at the filename in the .pyc
New submission from Jean-Paul Calderone :
It seems impossible to clone an Element created without a document:
>>> Element('foo').cloneNode(False)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.5/xml/dom/minidom.py&quo
Jean-Paul Calderone added the comment:
This seems to be a partial duplicate of 3383. A suggestion on that
ticket was to look for objdump in PATH and then try /usr/sbin.
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue4
Jean-Paul Calderone added the comment:
I think Antoine meant (and I was just copying him) /bin or /usr/bin.
The specific case where I encountered the failure was one where PATH was
not set to anything. The fix in the patch attached to this ticket would
make it much easier to track down why
New submission from Jean-Paul Calderone :
According to a recent thread on python-dev, Python APIs with the same
name as native APIs can be trusted to just pass through to the platform
API call
(<http://mail.python.org/pipermail/python-dev/2009-January/084899.html>).
This isn't the c
New submission from Jean-Paul Calderone :
The attached program demonstrates that the ContentHandler.skippedEntity
callback is not invoked for all skipped entities. Specifically, it is
not invoked for those in attribute values. Additionally, it
demonstrates that when parsing a document with no
Jean-Paul Calderone added the comment:
After further investigation, I've learned a bit more. External entities
are forbidden in attribute values. Their presence constitutes a "fatal
error" according to <http://www.w3.org/TR/REC-xml/#forbidden>. This
means that dr
Changes by Jean-Paul Calderone :
--
title: inconsistent, perhaps incorrect, behavior with respect to entities
parsed by xml.sax -> xml.sax.expatreader.ExpatParser incorrectly silently skips
external character entities in attribute values
___
Pyt
Jean-Paul Calderone added the comment:
> My first impression was that the '1' in 'kq.control(None, 4, 1)'
already did this; i.e., that it meant that the kq.control function
would wait up to 1 second for a response, but that doesn't seem to be true.
Since there a
Jean-Paul Calderone added the comment:
Jesse, can you explain the cause of the bug? Maybe that will inspire
someone to come up with an idea for a fix.
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue4
Jean-Paul Calderone added the comment:
You also need to add unit tests for the new behavior you've implemented.
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/i
New submission from Jean-Paul Calderone :
Sometimes a syntax error in source passed to `compiler.parse´ causes a
`SyntaxError´ with lots of nice information to be raised:
>>> from compiler import parse
>>> try:
... parse("def f(")
... except SyntaxErro
Jean-Paul Calderone added the comment:
This isn't accurate. distutils *will* create the directory if it does
not exist. Perhaps you have setuptools installed? setuptools disables
this behavior of distutils and forces you to create the directory manually.
--
nosy: +ex
Jean-Paul Calderone added the comment:
See my comment on issue5070.
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue5071>
___
___
Python-bug
Jean-Paul Calderone added the comment:
Yea. setuptools is often discussed on distutils-sig:
http://www.python.org/community/sigs/current/distutils-sig/
And has an issue tracker of its own:
http://bugs.python.org/setuptools/
http://bugs.python.org/setuptools/issue54 sounds like this
Jean-Paul Calderone added the comment:
Not being able to figure out where a name came from easily is worse than
having to type out the import statement. This feature would negatively
impact readability of Python source significantly.
--
nosy: +exarkun
Jean-Paul Calderone added the comment:
As far as Twisted is concerned, the two cases Tarek mentioned aren't
really relevant. In order for Zooko's use case to be handled ("install
Twisted on an OLPC"), what would be ideal is if there were a way to tell
distutils about a
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue4631>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
The backslash escaping has nothing to do with os.environ. It's the way
any string with a backslash in it is displayed in the interactive
interpreter (it's the way str.__repr__ works). Performing any escaping
on a string to make it usable in
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue3823>
___
___
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__
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:
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
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
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue3959>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue3783>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue805194>
___
___
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/issue1043706>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
This is still/again broken, probably because the "fixed" version still
hard-codes all of the geometry values and these will certainly not be correct
for all combinations of display dpi, font configuration, etc.
Instead, `TreeNode
Jean-Paul Calderone added the comment:
> May somebody check for this? Otherwise the bug could be considered invalid.
This is not the proper workflow for bug tracking. "No one is working on this
right now" is not the same as "This bug is invalid". No one worked on thi
New submission from Jean-Paul Calderone :
Allocating a Python list and a bunch of Capsules for each PyArg_ParseTuple call
is expensive and unnecessarily complicated.
The freelist never escapes getargs.c (if it ever did, it would be a bug). The
same job can be accomplished with a normal C
Changes by Jean-Paul Calderone :
--
keywords: +patch
Added file: http://bugs.python.org/file24873/getargs.patch
___
Python tracker
<http://bugs.python.org/issue14
Changes by Jean-Paul Calderone :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue14325>
___
___
Python-bugs-
Jean-Paul Calderone added the comment:
If it's a bit faster, that'd be a nice win, but I didn't benchmark. I'm
primarily interested in correctness in the PyPy case (PyPy re-uses this code),
and I think CPython benefits from the slightly simplified code as well.
If you do
Jean-Paul Calderone added the comment:
> Sounds promising. Do you think this should be hooked into
> SSLContext.set_default_verify_paths, or be exposed as a separate method?
If there were an API which exposed the certificate material, then this would be
more useful to libraries trying
New submission from Jean-Paul Calderone:
datetime.timedelta instances are divisible by integers on Python 2.7, but not
when __future__.division has been turned on:
exarkun@top:~$ ~/Projects/cpython/2.7/python -c '
from datetime import timedelta
print timedelta(seconds=3) / 2
'
0:00
Jean-Paul Calderone added the comment:
Hm. Maybe I am. Yet isn't true division implemented for this pair of types in
Python 3? I'm not sure why it shouldn't be implemented for them in Python 2.
Also that raises another question. Does a result of one and one half seconds
ma
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
> I think that's a very obscure interpretation of floor division for
timedeltas :-)
Note - I don't care about this. I just want `timedelta / int` to do the same
thing in Python 2.7 with __future__.division as `timedelta / int` does in
Pyth
New submission from Jean-Paul Calderone:
Debugging problems involving the frozen importlib._bootstrap is difficult,
because the source for importlib._bootstrap is not available to pdb. The
bootstrap code can be stepped through, but with only function names and line
numbers available, not
New submission from Jean-Paul Calderone:
The attached unit test fails with an ImportError... sometimes. Here's a little
blob of shell that seems to make the failure come up more quickly:
while ~/Projects/cpython/3.3/python -m unittest -v test_broken_import; do
rm -rf test_broken_i
New submission from Jean-Paul Calderone:
Python 3.3.0rc2+ (default:9def2209a839, Sep 10 2012, 08:44:51)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> memoryview(b'foo') + b'bar'
Jean-Paul Calderone added the comment:
> What is the expected outcome? memoryviews can't be resized, so
this scenario isn't possible:
The same as `view.tobytes() + bytes`, but without the extra copy implied by
`view.tobytes()`.
> Just prepend the empty bytestring if you want
Jean-Paul Calderone added the comment:
Since Benjamin originally requested this feature, and then decided that he
could accomplish his desired goal (ftplib porting, as far as I can tell)
without it, I think that the "rejected" status is actually incorrect. I think
that Benjamin j
101 - 200 of 391 matches
Mail list logo