Jack Diederich added the comment:
Thanks David, do you want to apply? Looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue7761>
___
___
Pytho
Jack Diederich added the comment:
There was no test suite for telnetlib prior to 2.7/3.1 so it is easily possible
that this is a regression. If you can post a test case that fails or - even
better - a patch that passes where the current code fails I'd be very
appreciative.
--
Changes by Jack Diederich :
--
assignee: -> jackdied
nosy: +jackdied
versions: +Python 3.2 -Python 3.3
___
Python tracker
<http://bugs.python.org/issu
Changes by Jack Diederich :
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue11812>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jack Diederich <[EMAIL PROTECTED]> added the comment:
Thanks for the ping. I just rewrote the patch from scratch and it
handles corner cases (of which there are many in the parse tree) better.
I'll upload/checkin sometime today.
___
Python trac
Jack Diederich <[EMAIL PROTECTED]> added the comment:
The new patch works and handles all the corner cases I could think of.
I tried to comment the heck out of it because it does a lot of manual
walking and manipulation of the syntax tree.
This only handles __metaclass__ inside class
Jack Diederich <[EMAIL PROTECTED]> added the comment:
+0
* The peepholer comment promises "Optimizations are restricted to simple
transformations occuring within a single basic block." and this goes
beyond that. You could patch that comment.
* This needs a matching p
Jack Diederich <[EMAIL PROTECTED]> added the comment:
Augmented version of Daniel's patch.
This makes an internal function that does the same work. It uses
txt.find() instead of split() or partition() because for pathologically
long strings find() is noticeably faster. It also doe
Jack Diederich <[EMAIL PROTECTED]> added the comment:
This was fixed in more recent versions of 2.5, it now raises a
"SystemError: too many statically nested blocks"
Thanks for the tip Guilherme.
Marking closed.
--
nosy: +jackdied
resolution: -> out of date
sta
Jack Diederich <[EMAIL PROTECTED]> added the comment:
This is a bug in the external ClientCookie module (and their website
hasn't been updated since 2006).
Marking closed.
--
nosy: +jackdied
resolution: -> invalid
status: open -> closed
_
Jack Diederich <[EMAIL PROTECTED]> added the comment:
mailbox.py uses os.open instead of the builtin open() because it wants
to pass the exclusive flag (O_EXCL). As a result your 0077 umask gets
combined with the default of 0777 like this:
0777 & ~0077 == 0700 == '-rwx--
Jack Diederich <[EMAIL PROTECTED]> added the comment:
It is a common apache problem. Elementree imports an expat parser
(presumably cElementree doesn't) and different versions of expat play
together very poorly. Lots of apache modules load one xml lib version
or another and they t
Jack Diederich <[EMAIL PROTECTED]> added the comment:
Antoine, I looked at your patch and I'm not sure why you applied it
instead of applying mine (or saying +1 on me applying my patch).
Yours uses str.partition which I pointed out is sub-optimal (same big-Oh
but with a larger cons
Jack Diederich <[EMAIL PROTECTED]> added the comment:
Benjamin, the 2to3 parse tree straddles the 2.x Grammar and 3.x Grammar
(it's its own thing) which is why fixup_parse_tree is there. From the
docstring:
one-line classes don't get a suite in the parse tree so we add one
Jack Diederich added the comment:
I'm having some trouble wrapping my head around this one. It isn't obvious to
me that
my_method(*args):
print(args)
class A():
meth = partial(my_method, 'argA')
ob = A()
ob.meth('argB')
should print (, 'argA',
Jack Diederich added the comment:
-1, my Ubuntu laptop says "linux2" and not "ubuntu." This would also be an
incompatible change that would cause headaches with little benefit to balance
it out.
--
nosy: +jackdied
___
P
Jack Diederich added the comment:
I was mistaken, the tests were backported to 3.1.x maint (In fact I was the one
who did it). So this is fixed in the next point release of 3.1.x.
--
resolution: -> out of date
status: open -> closed
___
Jack Diederich added the comment:
changing the definition to (const char *) seems like the right thing to do - a
quick grep of the Python source and a search on google codesearch only shows
uses with either string literals or string literals cast to (char *) in order
to silence a warning. I
Jack Diederich added the comment:
This is true but /any/ key in the WeakValueDictionary could be reused and
result in similar behavior, not just the id() of the inserted value. I'm
closing at "won't fix"
--
nosy: +jackdied
resolution: -> wont fix
Jack Diederich added the comment:
I suggest this be closed WONTFIX. The str.split() documentation accurately
describes str.split() but doesn't happen to do what the OP wanted which was
list(filter(None, '00010001'.split('0')))
Instead split(sep) is the reciprocal o
Jack Diederich added the comment:
+0 I'm ambivalent. The script uses a reasonable default and pyhton3 is a
reasonable default for the 3k branch. That said most people will have to edit
the file anyway to use it: I had to chmod a+x the file and change the bang path
to /usr/bin/python t
Jack Diederich added the comment:
Here is a profile run of the 200 line case, run on the 3.x trunk, and with all
the trivial functions removed. quick_ratio and __contains__ dominate the time.
The process was CPU bound, memory usage stayed low.
17083154 function calls (17066360 primitive
Jack Diederich added the comment:
how about "an equivalent path" instead of "equal path"? The result of
ntpath.join(ntpath.split(path)) should point to the same location even if it
isn't literally the same string.
--
nosy: +jackdied
_
Jack Diederich added the comment:
+1, the C patch looks good to me. The test file needs a new test that checks
the 'with' behavior. Also, what changed so that the test now needs to ignore
AttributeErrors in play_sound_file()?
--
nosy:
Jack Diederich added the comment:
We talked about it at sprints and the semantics are ambiguous and there are
alternatives.
Ambiguous:
def show_funcs(*args): print(args)
class A():
run = partial(1)
ob = A()
ob.run(2,3)
Should this print (self, 1, 2, 3) or (1, self, 2, 3)? And
Jack Diederich added the comment:
correction:
run = partial(1)
should have been
run = partial(show_funcs, 1)
--
___
Python tracker
<http://bugs.python.org/issue4
Jack Diederich added the comment:
I've been digging into the patch. Is there a reason sendmsg() wants an
iterable of buffers instead of just accepting a str? The list-of-buffers more
closely matches the underlying syscall but I'm not sure what the python benefit
is, especially wh
Jack Diederich added the comment:
Additional data point: the perl version takes a single scalar (instead of a
list of scalars) for use with sendmsg()
http://search.cpan.org/~MJP/Socket-MsgHdr-0.01/MsgHdr.pm
--
___
Python tracker
<h
Jack Diederich added the comment:
one of the other sprinters just pointed out that Modules/_multiprocessing.c
(py3k branch) uses sendmsg/recvmsg internally to pass file descriptors back and
forth. The code is very short and readable
New submission from Jack Diederich :
I tried logging into the tracker using my gmail login and accidentally
created a new user. Could someone either wipe out the OpenID for
jackd...@gmail.com (but NOT the "jackdied" login with email addy of
jackd...@gmail.com) or combine the two?
In
Changes by Jack Diederich :
--
assignee: d...@python -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue8707>
___
___
Python-bugs-lis
Jack Diederich added the comment:
Woops, didn't know that email would create a new bug.
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/i
New submission from Jack Diederich <[EMAIL PROTECTED]>:
typeobject.c:type_new only allows 0 or 1 keyword arg in class creation
instead of an arbitrary number as per PEP3115.
I'm working on a patch.
--
assignee: jackdied
components: Interpreter Core
messages: 63681
nos
Jack Diederich <[EMAIL PROTECTED]> added the comment:
Not a bug.
If you pass arbitrary keywords in class construction you have to define
__new__ and __init__ on the metaclass to handle them.
--
resolution: -> invalid
status: open -> closed
__
Changes by Jack Diederich <[EMAIL PROTECTED]>:
--
nosy: +jackdied
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2366>
__
___
Python-bugs
Jack Diederich <[EMAIL PROTECTED]> added the comment:
This patch raises a py3k warning from inside the dir() machinery so it
will only warn when dir() is called on an object with an old style
__members__ or __methods__ attribute. It does not warn if there is an
old style __members__ att
Jack Diederich <[EMAIL PROTECTED]> added the comment:
Fixer patch works for me (both must be applied).
A 3k warning for accessing is harder - it would have to copy the module
type or dict type and supply a custom to_getattro that watches for
accesses to exc_(type|values|traceback). I
Jack Diederich <[EMAIL PROTECTED]> added the comment:
Here is a partial implementation. It doesn't warn about __metaclass__
at the module level and doesn't handle multiple __metaclass__
assignements in one class. tests pending.
--
keywords: +patch
Added file: http:/
Jack Diederich <[EMAIL PROTECTED]> added the comment:
New patch that does more. Collin, could you take a look at the fixer?
I listed some stumbling blocks at the top (and at least one bug in
2to3). The fixer seems to work fine on actual files but the unit tests
that use strings do n
Jack Diederich <[EMAIL PROTECTED]> added the comment:
+1, I'll burn my _apply_evil(ModuleObject *) function patch to
moduleobject.c which did a memcpy on a type object and several other
heresies.
On Tue, Mar 25, 2008 at 4:27 AM, Brett Cannon <[EMAIL PROTECTED]> wrote:
>
>
Jack Diederich added the comment:
Either someone changed the test or I can't understand how the try/except/else
could happen where 'conn' is undefined in the else. Either way, I'm marking it
closed.
--
resolution: -> out of date
New submission from Jack Diederich :
The core types use doubles, not floats. The file and function names
should reflect that (the docs already do).
--
components: None
messages: 90169
nosy: jackdied
severity: normal
status: open
title: Rename float*.[ch] to double.[ch]
versions: Python
Jack Diederich added the comment:
fixed in r74217
My thanks to everyone who contributed to this bug. "irek" if you let me
know your name I'll add it to Misc/ACKS as well.
PS, The additional testcase is not ideal; it tests the bad behavior by
hooking into the debug output ins
New submission from Jack Diederich :
test/test_telnetlib.py has zero tests for the telnetlib.Telnet.write method.
--
assignee: jackdied
messages: 90963
nosy: jackdied
severity: normal
status: open
title: test_telnetlib doesn't test Telnet.write
versions: Python 2.7, Pytho
Jack Diederich added the comment:
between r71434 and r74217 this should be fixed for 3.2.
Marking as closed.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
this was fixed in r47215 (circa 2006). Marking closed.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
Jack Diederich added the comment:
Marking closed/won't fix. ASCII strings are the byte-ish type in 2.x so
we should expect the caller to convert down from unicode when sending
bytes over the wire.
--
resolution: -> wont fix
status: open -
Jack Diederich added the comment:
Marking as easy. What needs to be done is to add a small fake socket
class that redefines socket.sendall(self, bytes) to capture the args to
sock.sendall so it can be assertEqual'd to the expected bytes.
class SocketSendall(socket.socket):
_raw_sen
Jack Diederich added the comment:
The code that raises the error is in ceval.c which is a critical path.
The raise is done as soon the iterator has one more item than is needed
(see Daniel Diniz's comments on infinite iterators). While the check
could return more useful information for
Jack Diederich added the comment:
The stat module wasn't deprecated in 3.1, so is this now a non-issue?
If not, is it related to issue#1820?
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/i
Jack Diederich added the comment:
I was looking at 3.x, JP's patch is relative to 2.x and takes a little
more unpacking (a couple function calls more) but looks to me to be the
same. In 2.x unpack_iterable() sets/returns an error once one item more
than is required is received. It do
Jack Diederich added the comment:
Thanks for the update Irek (and the help!). You are now listed in Misc/ACKS.
--
___
Python tracker
<http://bugs.python.org/issue6
Jack Diederich added the comment:
Thanks Rodrigo, I'll integrate this and check it in.
--
___
Python tracker
<http://bugs.python.org/issue6582>
___
___
Jack Diederich added the comment:
applied in r74638
and I've added you to Misc/ACKS
Thanks again for the patch!
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python
Jack Diederich added the comment:
I think this is fixed by r74638 but it never triggered on my box (Ubuntu
9.x) so I can't be sure. What distro are you using?
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs
Jack Diederich added the comment:
Looks good and works for me, please check it in.
--
___
Python tracker
<http://bugs.python.org/issue7207>
___
___
Python-bug
Jack Diederich added the comment:
Antoine Pitrou: Besides, the test flow in test_telnetlib really is a
mess (setUp and tearDown getting called multiple times, for example),
could you clean it up?
Yes, I'm working on refactoring the test server and separating out
testing that versus testin
Jack Diederich added the comment:
I tried passing a size to readline to see if increasing the chunk helps
(test file was 120meg with 700k lines). For values 1k-10k all took
around 30 seconds, with a value of 100 it took 80 seconds, with a value
of 100k it ran for several minutes before I
Jack Diederich added the comment:
This seems to have been introduced in r72930 when the stackUnderflow()
was moved from the top of the function to the bottom. It used to test
for len > 0.
Question, should cPickle and pickle be raising the same error here?
UnpicklingError is defined
Jack Diederich added the comment:
+1
Patch and tests work for me. Uploaded a patch that is identical except
the file paths are fixed.
Was the old behavior stable across compilers anyway? It memcmpared two
different structs and IIRC only the first item of each struct is
guaranteed to be at
Jack Diederich added the comment:
Here is a more verbose patch. It checks to see if the first two
arguments stand-alone as well. It also updates NEWS and ACKs and adds
some assertRaises for various bounds checks.
--
nosy: +jackdied
Added file: http://bugs.python.org/file13423
Jack Diederich added the comment:
I assigned this to me. I'll be sprinting on telnetlib.
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.or
Jack Diederich added the comment:
Unfortunately universal newlines are more complicated than replace() can
handle. See io.py, you may be able to use one of those classes to the
the universal new line handling on the cheap (or at least easy).
--
nosy: +jackdied
Jack Diederich added the comment:
sets and frozensets have already been updated to format like lists.
This patch formats defaultdicts like dicts.
--
keywords: +patch
nosy: +jackdied
Added file: http://bugs.python.org/file13425/issue_5131.patch
Jack Diederich added the comment:
+1 for a docbug. The last item is always the physical line and not the
logical line. Some other examples:
if True and \
False: pass
if (True and
False): pass
--
nosy: +jackdied
___
Python tracker
<h
Jack Diederich added the comment:
closing, Garbriel's explanation is sufficient.
--
nosy: +jackdied
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python
Jack Diederich added the comment:
survey of other modules that use O_RDRW
The following include sys/type.h and fcntl.h unconditionally:
bsdmodule.c, dbmmoudle.c, _fileio.c
posixmodule.c includes them after doing an #ifdef check
mmapmodule.c currently (2.7 trunk) includes sys/types.h with an
Jack Diederich added the comment:
py3k is different enough (esp the NEWS) that I'll have to apply it by
hand. This patch was against the 2.x trunk.
--
___
Python tracker
<http://bugs.python.org/i
Jack Diederich added the comment:
running a fresh 2.7 trunk
>>> a
>>> a.move(-1, -1, -1
... )
Segmentation fault
j...@sprat:~/src/python-rw$ ./python
Python 2.7a0 (trunk:70847M, Mar 31 2009, 14:14:31)
[GCC 4.3.2] on linux2
Type "help", "copyright", "
Jack Diederich added the comment:
Looks good. Attached is a more thorough test_mmap.py patch that would
have found the bugs in both our patches ;)
--
resolution: -> fixed
status: open -> closed
Added file: http://bugs.python.org/file13522/test_mmap_harder
Jack Diederich added the comment:
Fixed rev 70931. Happy pickling!
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
class MyTelnet(Telnet):
def read_until(self, *args)
txt = Telnet.read_until(self, *args)
sys.stdout.write(txt)
return txt
Hope that helps, closing the bug.
--
nosy: +jackdied
resolution: -> wont fix
status: open ->
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1772
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
New submission from Jack Diederich :
The first part of my telnetlib work is testing what already is.
Attached is a patch to test_telnetlib that tests mosts of the guarantees
of the telnetlib.Telnet.read_* methods (as guaranteed by the docs, at
least).
Theoretically every test I added has a
Jack Diederich added the comment:
added some tests for testing IAC commands and SB data handling.
--
Added file: http://bugs.python.org/file13624/test_telnetlib.patch
___
Python tracker
<http://bugs.python.org/issue5
Changes by Jack Diederich :
Removed file: http://bugs.python.org/file13617/test_telnetlib.patch
___
Python tracker
<http://bugs.python.org/issue5696>
___
___
Python-bug
Changes by Jack Diederich :
--
components: +Tests
stage: -> patch review
type: -> behavior
versions: +Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
This was fixed in r47215
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
Jack Diederich added the comment:
committed in r71302
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
RFC 854 says that DM, like all other commands, is only valid when
preceded by an IAC. telnetlib does filter these out appropriately (I
just added tests for it in r71302 and it behaves appropriately).
--
resolution: -> invalid
status: open ->
Jack Diederich added the comment:
Could you try increasing self.blocking_timeout (in the _setUp function)
to something greater than 0.0 (like 0.1) and see if that works? I
picked a constant that was as small as Worked For Me to keep the total
test time as short as possible.
Unfortunately
Jack Diederich added the comment:
committed some changes in r71377. This uses Queue.join() to [hopefully]
eliminate the race condidtions.
--
___
Python tracker
<http://bugs.python.org/issue5
Jack Diederich added the comment:
except when it doesn't! Still failing on some buildbots. The couple
places where it expects 1% wibble in timing is far too strict. I'm
fixing it.
--
___
Python tracker
<http://bugs.python.
Jack Diederich added the comment:
Try using telnetlib.py from python3.1. It fixes issues in telnet out of
band negotiations.
http://svn.python.org/projects/python/branches/py3k/Lib/telnetlib.py
Here is what I think is happening:
HOST: b'User' + IAC + ECHO + DONT + b'na
Changes by Jack Diederich :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue6106>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Jack Diederich :
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue8847>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jack Diederich added the comment:
I can't reproduce on 3k trunk with Ubuntu 10.04, gcc 4.4.3
namedtuples are just a subclass of tuple with only two dunder methods defined
(a plain __new__ with empty __slots__). Can you provoke the same behavior with
plain tuples, or a subclass of tuple
Jack Diederich added the comment:
Two more probes:
1) does it also have the same strange/crashy behavior when you subclass list
and concat that to a tuple?
2) does dropping the optimization level down to -O help? This has "compiler
quirk" written all over it. The C-code for list
Jack Diederich added the comment:
if the id() of the left operand is identical to the id() of the first element
in the result it would strongly support compiler skulldugerry.
class Crasher(tuple): pass
foo = Crasher()
x = [1]
a = x + foo
b=a[0]
if id(b) == id(x):
raise Exception("It&
New submission from Jack Diederich :
ython 2.7b2+ (trunk:81337, May 19 2010, 12:16:22)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class X(object):
... @property
... def foo(self): pass
Jack Diederich added the comment:
I like it, but I think it would help to give it the same interface as
contextlib.contextmanager (the single function, single yield). Like your mock
library 'patch' both function decorators and context managers have an interface
that reads lik
Jack Diederich added the comment:
Hey Frood, I'll take another look at it tomorrow when I am less addled. But
as to context managers that are actual classes - I've not written a single one;
they are always generator functions with a simple try/yield/except/finally in
the body.
Jack Diederich added the comment:
Raymond,
Short version: This isn't theoretical because I use context managers and
function decorators interchangeably and constantly.
Long Version: Function decorators and context managers have very similar use
cases. They both go something like:
1
1 - 100 of 105 matches
Mail list logo