New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:
[EMAIL PROTECTED]:~$ ls .pythonstartup.py
.pythonstartup.py
[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&qu
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
Why wasn't it backported to 2.5?
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment:
Any buggy behavior might be relied on by applications. Taken to the
extreme, you can never have a bug-fix release of Python.
__file__ from PYTHONSTARTUP breaks the warnings module. It would be
difficult for an application to r
Jean-Paul Calderone added the comment:
There's no bug here. You've misunderstood how the literal \0 syntax works.
Perhaps this will clarify things:
>>> list('\0123')
['\n', '3']
>>> list('\x001
Jean-Paul Calderone added the comment:
It doesn't matter whether \0 or \x00 is used. They mean the same thing. Maybe
this is the example I should have given:
>>> list('\0%s' % ('12',))
['\x00', '1',
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue7092>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jean-Paul Calderone :
>From python-dev:
On Fri, Jan 29, 2010 at 15:04, wrote:
> On 10:47 pm, tjre...@udel.edu wrote:
>>
>> On 1/29/2010 4:19 PM, Collin Winter wrote:
>>>
>>> On Fri, Jan 29, 2010 at 7:22 AM, Nick Coghlan wrote:
>>
Jean-Paul Calderone added the comment:
Sounds like one.
As far as the trial behavior goes, "trial foo.test_suite" won't work, but
"trial foo" will call "foo.test_suite", if one is defined.
--
nosy: +exarkun
__
Jean-Paul Calderone added the comment:
I agree that changing the result object is a better way to implement this
feature: if the results object wants to report things by *name*, not
*description*, then it should get the test's *name*, not rely on changing the
meaning of the t
New submission from Robert Paul Allen :
I would like to see support for NTFS symbolic links to be added to the os
module. As simple Popen('mklink') implementation could be used. Any other ideas?
--
components: Library (Lib), Windows
messages: 99170
nosy: ipatrol
severity: nor
Jean-Paul Calderone added the comment:
> With paramterized tests *all* the tests are run and *all* failures reported.
> With testing in a loop the tests stop at the first failure.
+1 to this justification. Parameterized tests are a big win over a simple for
loop in a test.
(Howe
Jean-Paul Calderone added the comment:
Your output looks fishy. Anyway, the behavior of += isn't a bug:
>>> a = b = (1, 2)
>>> a += (1, 2, 3)
>>> a
(1, 2, 1, 2, 3)
>>> a is b
False
>>>
It's confusing, to be sure, but no mutation is
Jean-Paul Calderone added the comment:
Something else I think it would be nice to consider is what the id() (and
shortDescription(), heh) of the resulting tests will be.
It would be great if the id were sufficient to identify a particular test *and*
data combination.
In trial, we're t
Jean-Paul Calderone added the comment:
I think it's likely that the test program does drastically different things on
Linux than it does on OS X:
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits"
Jean-Paul Calderone added the comment:
> So is it reasonable / unavoidable that UCS4 builds should be 1200 times
> slower at regex handling?
No, but it's probably reasonable / unavoidable that a more complex regex should
be some number of times slower than a simpler regex.
On
Jean-Paul Calderone added the comment:
Why is the Microsoft CRT argument error handler no longer disabled?
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue8
Jean-Paul Calderone added the comment:
> What kind of signals can be received in real-life?
There are lots of possible answers. Here's one. You launch a child process
with os.fork() (and perhaps os.exec*() as well). Eventually you'll get a
SIGCHLD in the parent when the chi
Jean-Paul Calderone added the comment:
Just a couple comments:
* If MSG_WAITALL is defined and a signal interrupts recv, will a string
shorter than requested will be returned by sock_recvall?
* Since MSG_WAITALL is already exposed to Python (when the underlying
platform provides it), I
Jean-Paul Calderone added the comment:
The name suggests a different behavior to me - I assumed it would set the
reference count to a specific value. Maybe this is the kind of thing Raymond
had in mind when he said "The mnemonic doesn't work for me".
--
New submission from Jean-Paul Calderone :
There are two tests for the way inspect.classify_class_attrs handles various
sorts of attributes. The tests are identical, except one uses a classic class
and one a new-style class. The tests sources have actually begun to diverge,
but so far only
Changes by Jean-Paul Calderone :
Added file: http://bugs.python.org/file16856/test_inspect.patch
___
Python tracker
<http://bugs.python.org/issue8363>
___
___
Python-bug
Jean-Paul Calderone added the comment:
Okay.
I shouldn't commit until after trunk is unfrozen though, right?
--
___
Python tracker
<http://bugs.python.org/i
Jean-Paul Calderone added the comment:
Committed in r79935
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
New submission from Jean-Paul Calderone :
Linux offers the signalfd syscall since 2.6.22 (with minor changes afterwards).
This call allows signals to be handled as bytes read out of a file descriptor,
rather than as interruptions to the flow of a program. Quite usefully, this
file
Jean-Paul Calderone added the comment:
I've started on an implementation of this in /branches/signalfd-issue8407.
--
___
Python tracker
<http://bugs.python.org/i
Jean-Paul Calderone added the comment:
> Will the modified test fail on platforms that don't define HAVE_SIGACTION?
Only if they also have siginterrupt, which seems unlikely (as neologix
explained). The implemented behavior on such platforms is unmodified from
current trunk, while
Jean-Paul Calderone added the comment:
> The one big difference I can see is that set_wakeup_fd() doesn't transmit the
> signal number, but this could be fixed if desired (instead of sending '\0',
> send a byte containing the signal number).
There's a lot mor
Jean-Paul Calderone added the comment:
SMTP (RFC 2821) doesn't support non-ASCII envelope addresses. A better
behavior here would be for connection.login to raise a ValueError or a
TypeError whenever a non-str is passed in.
RFC 5336, though, adds the UTF8SMTP extension, which adds su
Jean-Paul Calderone added the comment:
> Furthermore, python's socket documentation makes it clear:
Why does CPython go out of its way to make it impossible to pass 0 to the
platform listen() API? The part of the specification you quoted makes it very
clear that 0 is a valid value
Jean-Paul Calderone added the comment:
It'd be nice to have a unit test that passes a small enough value to listen()
to trigger the check. Since there's no way to reliably determine what the
system backlog really is, there's probably no reason to actually try to
determine
Jean-Paul Calderone added the comment:
Well, at the risk of stating the obvious, perhaps the dup() thing should be
eliminated. The justification for it seems less than clear, and apparently it
causes some problems.
That might be a direction to consider in the long term, though, rather than
Jean-Paul Calderone added the comment:
> What is the mnemonic corresponding to errno 35 under OS X?
EAGAIN
--
___
Python tracker
<http://bugs.python.org/iss
Jean-Paul Calderone added the comment:
> But as I said, it's not reliable.
I don't see any evidence in support of this statement. Did you notice that the
FreeBSD thread you referenced is:
* 6 years old
* about UDP
It's not obvious to me that it's actually rel
Jean-Paul Calderone added the comment:
None of that has much relevance when the socket is in *non-blocking* mode.
--
___
Python tracker
<http://bugs.python.org/issue8
Jean-Paul Calderone added the comment:
> If there's something else that would be useful and I can provide it, I'd be
> glad to.
A minimal example which reproduces the behavior. :)
--
___
Python tracker
<http://bugs.p
Jean-Paul Calderone added the comment:
> But if someone can get me access to an FTP server on the other end of a slow
> link, I'd be glad to do what I can .
It's easy to get a slow FTP server. Twisted's FTP support lets you do all
kinds of customization; making a ser
Jean-Paul Calderone added the comment:
getpeername() "sometimes" failing "soon" after a socket is created is a
semi-well-known Windows socket... feature. For whatever that's worth.
--
___
Python tracker
<http
Jean-Paul Calderone added the comment:
For reference:
http://pyopenssl.sourceforge.net/pyOpenSSL.html/openssl-context.html
http://www.heikkitoivonen.net/m2crypto/api/M2Crypto.SSL.Context%27.Context-class.html
and `man -k SSL_CTX_`
--
nosy: +exarkun
Jean-Paul Calderone added the comment:
http://www.openssl.org/news/secadv_20100324.txt
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3555
New Windows builds of any versions of CPython which are still receiving
security updates should be released.
--
nosy: +exarkun
priority
Jean-Paul Calderone added the comment:
find_unused_port is the wrong approach altogether. Uses of it should be
replaced by bind_port and then find_unused_port should be removed.
--
___
Python tracker
<http://bugs.python.org/issue8
Changes by Jean-Paul Calderone :
--
nosy: -exarkun
___
Python tracker
<http://bugs.python.org/issue665761>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jean-Paul Calderone added the comment:
One open question regarding interaction with threading. sigprocmask's behavior
in a multithreaded program is unspecified. pthread_sigmask should be used
instead. I could either expose both of these and let the caller choose, or I
could
Changes by Jean-Paul Calderone :
--
nosy: +gps
___
Python tracker
<http://bugs.python.org/issue8407>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
2801 - 2900 of 3213 matches
Mail list logo