[issue10522] test_telnet exception

2012-03-13 Thread Jack Diederich
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

[issue11812] transient test_telnetlib failure

2011-04-09 Thread Jack Diederich
Changes by Jack Diederich : -- nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue11812> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10245] Fix resource warnings in test_telnetlib

2010-10-30 Thread Jack Diederich
Changes by Jack Diederich : -- assignee: -> jackdied nosy: +jackdied versions: +Python 3.2 -Python 3.3 ___ Python tracker <http://bugs.python.org/issu

[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-25 Thread Jack Diederich
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. --

[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-10-24 Thread Jack Diederich
Jack Diederich added the comment: Thanks David, do you want to apply? Looks good to me. -- ___ Python tracker <http://bugs.python.org/issue7761> ___ ___ Pytho

[issue1673007] urllib2 requests history + HEAD support

2010-08-09 Thread Jack Diederich
Changes by Jack Diederich : -- nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1673007> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2521] ABC caches should use weak refs

2010-08-05 Thread Jack Diederich
Jack Diederich added the comment: This is a change in the codepath for instances that don't have __class__ defined. subclass = getattr(instance, '__class__', None) -if subclass in cls._abc_cache: +if subclass is not None and subclass in cls._abc_cach

[issue9269] Cannot pickle self-referencing sets

2010-07-15 Thread Jack Diederich
Jack Diederich added the comment: Mike, it is better to think of database rows as immutable tuples. During the course of a query the contents of the database are considered static - hence all that locking and kvetching about this or that database not having "true" foreign key su

[issue6960] test_telnetlib gives spurious output

2010-07-14 Thread Jack Diederich
Jack Diederich added the comment: r76133 (which came after this bug) fixed most test_telnetlib bugs by using mocks instead of trying to setup full-blown client/server TCP cases. -- ___ Python tracker <http://bugs.python.org/issue6

[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-07-12 Thread Jack Diederich
Jack Diederich added the comment: Can you check this on 3.1.2 or 3.2? There were a few bugfixes of the bytes handling in that timeframe. -- assignee: -> jackdied nosy: +jackdied priority: high -> normal ___ Python tracker <http://bugs.p

[issue9110] contextlib.ContextDecorator

2010-07-09 Thread Jack Diederich
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

[issue9110] contextlib.ContextDecorator

2010-07-09 Thread Jack Diederich
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.

[issue9110] contextlib.ContextDecorator

2010-07-09 Thread Jack Diederich
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

[issue9118] help() on a property descriptor launches interactive help

2010-06-29 Thread Jack Diederich
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

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
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&

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
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

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
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

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
Changes by Jack Diederich : -- nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue8847> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8708] OpenID blunder

2010-05-13 Thread Jack Diederich
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

[issue8707] Duplicated document in telnetlib.

2010-05-13 Thread Jack Diederich
Changes by Jack Diederich : -- assignee: d...@python -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue8707> ___ ___ Python-bugs-lis

[issue8708] OpenID blunder

2010-05-13 Thread Jack Diederich
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

[issue6560] socket sendmsg(), recvmsg() methods

2010-02-23 Thread Jack Diederich
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

[issue6560] socket sendmsg(), recvmsg() methods

2010-02-23 Thread Jack Diederich
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

[issue6560] socket sendmsg(), recvmsg() methods

2010-02-23 Thread Jack Diederich
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

[issue4331] Can't use _functools.partial() created function as method

2010-02-23 Thread Jack Diederich
Jack Diederich added the comment: correction: run = partial(1) should have been run = partial(show_funcs, 1) -- ___ Python tracker <http://bugs.python.org/issue4

[issue4331] Can't use _functools.partial() created function as method

2010-02-23 Thread Jack Diederich
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

[issue6518] Enable 'with' statement in ossaudiodev module

2010-02-23 Thread Jack Diederich
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:

[issue6825] Minor documentation bug with os.path.split

2010-02-23 Thread Jack Diederich
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 _

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2010-02-22 Thread Jack Diederich
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

[issue6886] cgi.py runs python, not python3

2010-02-22 Thread Jack Diederich
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

[issue7196] Clarify str.split() behavior

2010-02-22 Thread Jack Diederich
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

[issue7366] weakref module example relies on behaviour not guaranteed by id()

2010-02-22 Thread Jack Diederich
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

[issue7463] PyDateTime_IMPORT() causes compiler warnings

2010-02-22 Thread Jack Diederich
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

[issue7646] test_telnetlib fails in Windows XP

2010-02-22 Thread Jack Diederich
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 ___

[issue7850] platform.system() should be "macosx" instead of "Darwin" on OSX

2010-02-22 Thread Jack Diederich
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

[issue4331] Can't use _functools.partial() created function as method

2010-02-22 Thread Jack Diederich
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',

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread Jack Diederich
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

[issue7471] GZipFile.readline too slow

2009-12-11 Thread Jack Diederich
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

[issue6748] test_debuglevel from test_telnetlib.py fails

2009-10-31 Thread Jack Diederich
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

[issue7207] test_telnetlib fails on OS X 10.6

2009-10-26 Thread Jack Diederich
Jack Diederich added the comment: Looks good and works for me, please check it in. -- ___ Python tracker <http://bugs.python.org/issue7207> ___ ___ Python-bug

[issue6748] test test_telnetlib failed

2009-09-03 Thread Jack Diederich
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

[issue6582] test_telnetlib doesn't test Telnet.write

2009-09-03 Thread Jack Diederich
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

[issue6582] test_telnetlib doesn't test Telnet.write

2009-08-12 Thread Jack Diederich
Jack Diederich added the comment: Thanks Rodrigo, I'll integrate this and check it in. -- ___ Python tracker <http://bugs.python.org/issue6582> ___ ___

[issue6106] read_until

2009-07-27 Thread Jack Diederich
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

[issue3071] The ValueError raised by failing to unpack sequence should have more information.

2009-07-26 Thread Jack Diederich
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

[issue2874] Remove use of the stat module in the stdlib

2009-07-26 Thread Jack Diederich
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

[issue3071] The ValueError raised by failing to unpack sequence should have more information.

2009-07-26 Thread Jack Diederich
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

[issue6582] test_telnetlib doesn't test Telnet.write

2009-07-26 Thread Jack Diederich
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

[issue1772794] Telnetlib dosn't accept u'only ascii'

2009-07-26 Thread Jack Diederich
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 -

[issue1360221] telnetlib expect() and read_until() do not time out properly

2009-07-26 Thread Jack Diederich
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

[issue5188] telnetlib process_rawq buffer handling is confused

2009-07-26 Thread Jack Diederich
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/

[issue6582] test_telnetlib doesn't test Telnet.write

2009-07-26 Thread Jack Diederich
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

[issue6106] read_until

2009-07-26 Thread Jack Diederich
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

[issue6427] Rename float*.[ch] to double.[ch]

2009-07-06 Thread Jack Diederich
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

[issue6106] read_until

2009-05-26 Thread Jack Diederich
Changes by Jack Diederich : -- type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue6106> ___ ___ Python-bugs-list mailing list Unsubscri

[issue6106] read_until

2009-05-26 Thread Jack Diederich
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

[issue5696] test_telnetlib augmentation

2009-04-07 Thread Jack Diederich
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.

[issue5696] test_telnetlib augmentation

2009-04-07 Thread Jack Diederich
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

[issue5696] test_telnetlib augmentation

2009-04-07 Thread Jack Diederich
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

[issue1737737] telnetlib.Telnet does not process DATA MARK (DM)

2009-04-05 Thread Jack Diederich
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 ->

[issue5696] test_telnetlib augmentation

2009-04-05 Thread Jack Diederich
Jack Diederich added the comment: committed in r71302 -- resolution: -> accepted status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue1252001] Issue with telnetlib read_until not timing out

2009-04-05 Thread Jack Diederich
Jack Diederich added the comment: This was fixed in r47215 -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue5696] test_telnetlib augmentation

2009-04-05 Thread Jack Diederich
Changes by Jack Diederich : -- components: +Tests stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/

[issue5696] test_telnetlib augmentation

2009-04-05 Thread Jack Diederich
Changes by Jack Diederich : Removed file: http://bugs.python.org/file13617/test_telnetlib.patch ___ Python tracker <http://bugs.python.org/issue5696> ___ ___ Python-bug

[issue5696] test_telnetlib augmentation

2009-04-05 Thread Jack Diederich
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

[issue5696] test_telnetlib augmentation

2009-04-04 Thread Jack Diederich
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

[issue1772794] Telnetlib dosn't accept u'only ascii'

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- assignee: -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1

[issue1737737] telnetlib.Telnet does not process DATA MARK (DM)

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- assignee: -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1

[issue1772788] chr(128) in u'only ascii' -> TypeError with misleading msg

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1772

[issue1678077] improve telnetlib.Telnet so option negotiation becomes easie

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- assignee: -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1

[issue708007] TelnetPopen3, TelnetBase, Expect split

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- assignee: -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue

[issue1049450] Solaris: EINTR exception in select/socket calls in telnetlib

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- assignee: -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1

[issue1252001] Issue with telnetlib read_until not timing out

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- assignee: -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1

[issue1360221] telnetlib expect() and read_until() do not time out properly

2009-04-01 Thread Jack Diederich
Jack Diederich added the comment: assigning all open telnetlib items to myself -- assignee: -> jackdied nosy: +jackdied ___ Python tracker <http://bugs.python.org/issue1

[issue1730959] telnetlib: A callback for monitoring the telnet session

2009-03-31 Thread Jack Diederich
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 ->

[issue5228] multiprocessing not compatible with functools.partial

2009-03-31 Thread Jack Diederich
Jack Diederich added the comment: Fixed rev 70931. Happy pickling! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Jack Diederich
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

[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Jack Diederich
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", "

[issue5131] pprint doesn't know how to print a set or a defaultdict

2009-03-30 Thread Jack Diederich
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

[issue3266] Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared

2009-03-26 Thread Jack Diederich
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

[issue4889] difflib

2009-03-26 Thread Jack Diederich
Jack Diederich added the comment: closing, Garbriel's explanation is sufficient. -- nosy: +jackdied resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python

[issue5028] tokenize.generate_tokens doesn't always return logical line

2009-03-26 Thread Jack Diederich
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

[issue5131] pprint doesn't know how to print a set or a defaultdict

2009-03-26 Thread Jack Diederich
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

[issue5148] gzip.open breaks with 'U' flag

2009-03-26 Thread Jack Diederich
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

[issue5188] telnetlib process_rawq buffer handling is confused

2009-03-26 Thread Jack Diederich
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

[issue5387] mmap.move crashes by integer overflow

2009-03-26 Thread Jack Diederich
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

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2009-03-26 Thread Jack Diederich
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

[issue2366] Fixer for new metaclass syntax is needed

2008-08-21 Thread Jack Diederich
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

[issue2676] email/message.py [Message.get_content_type]: Trivial regex hangs on pathological input

2008-08-15 Thread Jack Diederich
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

[issue2951] ElementTree parsing bus error (but only from mod_python)

2008-08-01 Thread Jack Diederich
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

[issue3228] mailbox.mbox creates files with execute bit set

2008-08-01 Thread Jack Diederich
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--&#x

[issue2935] rfc822.py line 395 strings connection

2008-08-01 Thread Jack Diederich
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 _

[issue2688] Error when nesting many while loops

2008-08-01 Thread Jack Diederich
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

[issue2676] email/message.py [Message.get_content_type]: Trivial regex hangs on pathological input

2008-07-31 Thread Jack Diederich
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

[issue2260] conditional jump to a POP_TOP optimization

2008-07-31 Thread Jack Diederich
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

[issue2366] Fixer for new metaclass syntax is needed

2008-07-31 Thread Jack Diederich
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

[issue2366] Fixer for new metaclass syntax is needed

2008-07-31 Thread Jack Diederich
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

[issue2357] sys.exc_{type, values, traceback} should raise a Py3K warning

2008-03-25 Thread Jack Diederich
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: > >

[issue2366] Fixer for new metaclass syntax is needed

2008-03-20 Thread Jack Diederich
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

[issue2366] Fixer for new metaclass syntax is needed

2008-03-19 Thread Jack Diederich
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:/

  1   2   >