[issue10522] test_telnet exception
Jack Diederich jackd...@gmail.com 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 status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10522 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient test_telnetlib failure
Changes by Jack Diederich jackd...@gmail.com: -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10245] Fix resource warnings in test_telnetlib
Changes by Jack Diederich jackd...@gmail.com: -- assignee: - jackdied nosy: +jackdied versions: +Python 3.2 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10245 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10176] telnetlib.Telnet.read_very_eager() performance
Jack Diederich jackd...@gmail.com 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. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7761] telnetlib Telnet.interact fails on Windows but not Linux
Jack Diederich jackd...@gmail.com added the comment: Thanks David, do you want to apply? Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7761 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673007] urllib2 requests history + HEAD support
Changes by Jack Diederich jackd...@gmail.com: -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673007 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2521] ABC caches should use weak refs
Jack Diederich jackd...@gmail.com 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_cache: I think the same thing happens in either case (from visual inspection of the code) but I'd rather not change it if we don't need to. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9269] Cannot pickle self-referencing sets
Jack Diederich jackd...@gmail.com 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 support. If database rows were mutable the results of a JOIN could be nonsensical. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6960] test_telnetlib gives spurious output
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue6960 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7761] telnetlib Telnet.interact fails on Windows but not Linux
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue7761 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9110] contextlib.ContextDecorator
Jack Diederich jackd...@gmail.com 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 like do this before the real work, do the real work, and then do this after the real work pattern. The fact that the examples and test cases all require an almost empty class feels heavy to me. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9110] contextlib.ContextDecorator
Jack Diederich jackd...@gmail.com 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. After all state-is-state, and writing an __init__, __enter__, and __exit__ is just extra boilerplate for my common uses. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9110] contextlib.ContextDecorator
Jack Diederich jackd...@gmail.com 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) add optional extra state 2) execute the original function (decorator) or block (context manager) 3) add optional extra exception handling or do something special based on the extra state. Frood's mock library does this in a very sane way. ex/ @mock.patch(sys, 'stdio', someStringIOInstance) def test_blah(self): pass # this test uses context instead of decorators def test_blaise(self): # test setup here with @mock.patch(sys, 'stdin', someStringIOInstance): dummy = 'something particular to this setup' # more tests here So the use isn't theoretical [at a minimum he's doing it and I'm doing it], now we're just talking about what is the most obvious interface. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9118] help() on a property descriptor launches interactive help
New submission from Jack Diederich jackd...@gmail.com: 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 ... help(X.foo.fset) Welcome to Python 2.7! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type quit. To get a list of available modules, keywords, or topics, type modules, keywords, or topics. Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as spam, type modules spam. help ^D You are now leaving help and returning to the Python interpreter. If you want to ask for help on a particular object directly from the interpreter, you can type help(object). Executing help('string') has the same effect as typing a particular string at the help prompt. -- components: Library (Lib) messages: 108928 nosy: jackdied priority: low severity: normal stage: needs patch status: open title: help() on a property descriptor launches interactive help type: behavior versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8847] crash appending list and namedtuple
Changes by Jack Diederich jackd...@gmail.com: -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8847] crash appending list and namedtuple
Jack Diederich jackd...@gmail.com 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 that looks like one of these? class Crasher(tuple): pass class Crasher(tuple): __slots__ = () class Crasher(tuple): def __new__(cls,): return tuple.__new__(cls,) __slots__ = () -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8847] crash appending list and namedtuple
Jack Diederich jackd...@gmail.com 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 and tuple concat are almost identical, and both start with a type check. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8847] crash appending list and namedtuple
Jack Diederich jackd...@gmail.com 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's the C compiler what did it!) The only way I can think of this coming about is the right_op getting new'd and then .extend'ing(left_op). That extend() must be going batsh*t and inserting the left_op instead of it's contained items. The C-code for extend is more fiddly than the code for concatenation so there is more room for the compiler to generate bad code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8708] OpenID blunder
New submission from Jack Diederich jackd...@gmail.com: 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 the end I just reset my password and logged in as the original jackdied TIA, -Jack -- messages: 105672 nosy: Jack.Diederich priority: normal severity: normal status: open title: OpenID blunder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8708 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8707] Duplicated document in telnetlib.
Changes by Jack Diederich jackd...@gmail.com: -- assignee: d...@python - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8707 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8708] OpenID blunder
Jack Diederich jackd...@gmail.com added the comment: Woops, didn't know that email would create a new bug. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8708 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6825] Minor documentation bug with os.path.split
Jack Diederich jackd...@gmail.com 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6825 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6518] Enable 'with' statement in ossaudiodev module
Jack Diederich jackd...@gmail.com 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: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6518 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Can't use _functools.partial() created function as method
Jack Diederich jackd...@gmail.com 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 what about partial(ob.run, 2)(3) Alternatives: partial is a convenience function not an optimization (it doesn't offer a speedup. So you can write a lambda or named function that has the exact semantics you want without suffering a speed penalty. So unless there are a lot of good use cases with obvious behavior, we should refuse the temptation to guess and leave partial as-is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Can't use _functools.partial() created function as method
Jack Diederich jackd...@gmail.com added the comment: correction: run = partial(1) should have been run = partial(show_funcs, 1) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6560] socket sendmsg(), recvmsg() methods
Jack Diederich jackd...@gmail.com 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 when recvmsg() only returns a single value (it only creates 1 iovec under the covers). Python doesn't have readv like methods so making sendmsg/recvmsg work like recv/send (straight strings) seems like the way to go. Also, the y* format character for packing/unpacking tuples is no longer supported - I'm assuming it used to mean buffers. Does anyone have a good reference for using recvmsg/sendmsg? I read the man pages and googled around but couldn't find anything. I have no experience with using the calls in-the-wild. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6560] socket sendmsg(), recvmsg() methods
Jack Diederich jackd...@gmail.com 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Can't use _functools.partial() created function as method
Jack Diederich jackd...@gmail.com 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 (A object at 0x1234, 'argA', 'argB') and not ('argA', A object at 0x1234, 'argB') The patch seems to prefer the first form but if you are using a partial shouldn't you expect 'argA' to always be the first argument to the partial-ized function? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7850] platform.system() should be macosx instead of Darwin on OSX
Jack Diederich jackd...@gmail.com 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7646] test_telnetlib fails in Windows XP
Jack Diederich jackd...@gmail.com 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7463] PyDateTime_IMPORT() causes compiler warnings
Jack Diederich jackd...@gmail.com 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 tried changing it on the 2.x trunk and it compiles with no warnings. +1, any other opinions? -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7366] weakref module example relies on behaviour not guaranteed by id()
Jack Diederich jackd...@gmail.com 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 status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7366 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7196] Clarify str.split() behavior
Jack Diederich jackd...@gmail.com 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 of sep.join(), that is txt == sep.join(txt.split(sep)) -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7196 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6886] cgi.py runs python, not python3
Jack Diederich jackd...@gmail.com 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 to get it to work on my machine. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6931] dreadful performance in difflib: ndiff and HtmlDiff
Jack Diederich jackd...@gmail.com 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 calls) in 248.779 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 10660375 70.5160.000 70.5160.000 :0(__contains__) 1144821.0480.0001.0480.000 :0(append) 4434776 29.2540.000 29.2540.000 :0(get) 685047/6850424.4000.0004.4000.000 :0(len) 1973491.5120.0001.5120.000 :0(min) 1971331.4520.0001.4520.000 difflib.py:228(set_seq1) 25001.6320.0013.0920.001 difflib.py:299(__chain_b) 10822.5200.0024.7680.004 difflib.py:350(find_longest_match) 3391432.5800.0002.5800.000 difflib.py:40(_calculate_ratio) 141727 120.5990.001 220.9700.002 difflib.py:661(quick_ratio) 1967366.9560.000 12.5490.000 difflib.py:690(real_quick_ratio) 8974/7945.0520.001 248.4310.313 difflib.py:945(_fancy_replace) -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7471] GZipFile.readline too slow
Jack Diederich jackd...@gmail.com 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 killed it. The default starts at 100 and quickly maxes to 512, which seems to be a sweet spot (thanks whomever figured that out!). I profiled it and function overhead seems to be the real killer. 30% of the time is spent in readline(). The next() function does almost nothing and consumes 1/4th the time of readline(). Ditto for read() and _unread(). Even lowly len() consumes 1/3rd the time of readline() because it is called over 2million times. There doesn't seem to be any way to speed this up without rewriting the whole thing as a C module. I'm closing the bug WONTFIX. -- nosy: +jackdied resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7455] cPickle: stack underflow in load_pop()
Jack Diederich jackd...@gmail.com 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 in pickle.py and never used but cPickle.c uses it frequently. -- nosy: +collinwinter, jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6748] test_debuglevel from test_telnetlib.py fails
Jack Diederich jackd...@gmail.com 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 testing the telnetlib. It is the test server (which started simple and then grew cruft) which seems to have OS specific problems. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7207] test_telnetlib fails on OS X 10.6
Jack Diederich jackd...@gmail.com added the comment: Looks good and works for me, please check it in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7207 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6582] test_telnetlib doesn't test Telnet.write
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue6582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6748] test test_telnetlib failed
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue6748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6582] test_telnetlib doesn't test Telnet.write
Jack Diederich jackd...@gmail.com added the comment: Thanks Rodrigo, I'll integrate this and check it in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6106] read_until
Jack Diederich jackd...@gmail.com added the comment: Thanks for the update Irek (and the help!). You are now listed in Misc/ACKS. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6106] read_until
Jack Diederich jackd...@gmail.com 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 instead of testing the bug directly. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6582] test_telnetlib doesn't test Telnet.write
New submission from Jack Diederich jackd...@gmail.com: 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, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5188] telnetlib process_rawq buffer handling is confused
Jack Diederich jackd...@gmail.com added the comment: between r71434 and r74217 this should be fixed for 3.2. Marking as closed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5188 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1360221] telnetlib expect() and read_until() do not time out properly
Jack Diederich jackd...@gmail.com added the comment: this was fixed in r47215 (circa 2006). Marking closed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1360221 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1772794] Telnetlib dosn't accept u'only ascii'
Jack Diederich jackd...@gmail.com 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 - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1772794 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6582] test_telnetlib doesn't test Telnet.write
Jack Diederich jackd...@gmail.com 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_sent = b'' def sendall(self, data): self._raw_sent += data class TelnetSockSendall(telnetlib.Telnet): def open(self, *args, **opts): ''' a near-exact copy of Telnet.open ''' # copy 5 lines from Telnet.open here self.sock = SocketSendall(*args, **opts) then add a unit test that checks the ONLY thing Telnet.write() does, which is change IAC to IAC+IAC. -- components: +Tests keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3071] The ValueError raised by failing to unpack sequence should have more information.
Jack Diederich jackd...@gmail.com 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 known non-infinite iterators (tuples, lists, etc) it would have to do a big if/else for all the core types (but excluding their subclasses!). If someone wants to submit that patch and a benchmark that shows no slowdown I'll reopen the bug. Until then I'm closing as WONTFIX. -- nosy: +jackdied resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2874] Remove use of the stat module in the stdlib
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue2874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3071] The ValueError raised by failing to unpack sequence should have more information.
Jack Diederich jackd...@gmail.com 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 doesn't give any more information about known-length builtins than anything else. The same error is raised for million-item lists as three item lists if the expected number to unpack is two. The original feature request was that the error message be better if, say the left hand side wanted three arguments and the right hand side provided four. The ceval.c code is different between 2.x and 3.x but they both only check for 'exactly the right number, or one or more too many.' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6427] Rename float*.[ch] to double.[ch]
New submission from Jack Diederich jackd...@gmail.com: 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 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6106] read_until
Jack Diederich jackd...@gmail.com 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'name:\nPassword\n:' read_until: times out on Username match, returns all HOST text so far. You: *send username* HOST: read_until: times out on Password match, returns '' You: *send password* read_until: times out on '' match, returns '' This is the only way I could repeat the problem using a local Echo server. Please let me know if using the telnetlib.py from 3.1 works for you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6106] read_until
Changes by Jack Diederich jackd...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
Jack Diederich jackd...@gmail.com 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 select() is called in the guts of Telnet so slipping in a mock object is difficult. I could also add more synchronization primitives but that is also icky. Hopefully just upping the constant a little does the trick. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
Jack Diederich jackd...@gmail.com added the comment: committed some changes in r71377. This uses Queue.join() to [hopefully] eliminate the race condidtions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
Changes by Jack Diederich jackd...@gmail.com: Removed file: http://bugs.python.org/file13617/test_telnetlib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
Changes by Jack Diederich jackd...@gmail.com: -- components: +Tests stage: - patch review type: - behavior versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1252001] Issue with telnetlib read_until not timing out
Jack Diederich jackd...@gmail.com added the comment: This was fixed in r47215 -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1252001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
Jack Diederich jackd...@gmail.com added the comment: committed in r71302 -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1737737] telnetlib.Telnet does not process DATA MARK (DM)
Jack Diederich jackd...@gmail.com 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 - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1737737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5696] test_telnetlib augmentation
New submission from Jack Diederich jackd...@gmail.com: 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 race condition. ReadTests.blocking_timeout is currently set to 0.1 seconds and works on my platform (it also works at 0.0 seconds). Is this acceptable or do I need to include semaphores will 100% predictable behavior? TIA -- assignee: jackdied files: test_telnetlib.patch keywords: patch messages: 85460 nosy: jackdied severity: normal status: open title: test_telnetlib augmentation Added file: http://bugs.python.org/file13617/test_telnetlib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1360221] telnetlib expect() and read_until() do not time out properly
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1360221 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1252001] Issue with telnetlib read_until not timing out
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1252001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue708007] TelnetPopen3, TelnetBase, Expect split
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue708007 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1049450] Solaris: EINTR exception in select/socket calls in telnetlib
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1049450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1678077] improve telnetlib.Telnet so option negotiation becomes easie
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1678077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1772788] chr(128) in u'only ascii' - TypeError with misleading msg
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1772788 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1737737] telnetlib.Telnet does not process DATA MARK (DM)
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1737737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1772794] Telnetlib dosn't accept u'only ascii'
Jack Diederich jackd...@gmail.com added the comment: assigning all open telnetlib items to myself -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1772794 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5387] mmap.move crashes by integer overflow
Jack Diederich jackd...@gmail.com added the comment: running a fresh 2.7 trunk a mmap.mmap object at 0xb7d9f9c0 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, credits or license for more information. import mmap a = mmap.mmap(-1, 1000) a.move(0, 0, 0) a.move(-1, -1, 1) Segmentation fault -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5387] mmap.move crashes by integer overflow
Jack Diederich jackd...@gmail.com 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.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5228] multiprocessing not compatible with functools.partial
Jack Diederich jackd...@gmail.com added the comment: Fixed rev 70931. Happy pickling! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1730959] telnetlib: A callback for monitoring the telnet session
Jack Diederich jackd...@gmail.com 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 - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1730959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime
Jack Diederich jackd...@gmail.com 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 the start of the memory location. No? With this patch only same-struct objects are memcmpared. -- nosy: +jackdied Added file: http://bugs.python.org/file13419/issue5516_trunk.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5387] mmap.move crashes by integer overflow
Jack Diederich jackd...@gmail.com 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/issue_5387.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5188] telnetlib process_rawq buffer handling is confused
Jack Diederich jackd...@gmail.com added the comment: I assigned this to me. I'll be sprinting on telnetlib. -- assignee: - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5188 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5148] gzip.open breaks with 'U' flag
Jack Diederich jackd...@gmail.com 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5131] pprint doesn't know how to print a set or a defaultdict
Jack Diederich jackd...@gmail.com 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5028] tokenize.generate_tokens doesn't always return logical line
Jack Diederich jackd...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5028 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4889] difflib
Jack Diederich jackd...@gmail.com added the comment: closing, Garbriel's explanation is sufficient. -- nosy: +jackdied resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3266] Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared
Jack Diederich jackd...@gmail.com 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 ifdef check, but fcntl.h not at all. -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2676] email/message.py [Message.get_content_type]: Trivial regex hangs on pathological input
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 constant factor) and also adds a function that returns two things, one of which is thrown away after having a str.strip performed on it. If my patch was deficient please let me know. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2688] Error when nesting many while loops
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 status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2688 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2935] rfc822.py line 395 strings connection
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 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3228] mailbox.mbox creates files with execute bit set
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--' So you probably want to change your default umask when creating mailboxes. Or submit a patch to mailbox.py to allow a different default mode ;) -- nosy: +jackdied ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2951] ElementTree parsing bus error (but only from mod_python)
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 tend to step on each others toes .. and then segfault. IIRC the only way to resolve this is to figure out which loaded apache modules are using expat and recompile them all against the same version. Not fun. -- nosy: +jackdied resolution: - invalid status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2951 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2366] Fixer for new metaclass syntax is needed
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 tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2366] Fixer for new metaclass syntax is needed
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 classes. I wasn't sure what to do with __metaclass__ at the module level (which is now a NOP, I think). Added file: http://bugs.python.org/file11020/fix_metaclass.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2260] conditional jump to a POP_TOP optimization
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 patch to Lib/test/test_peepholer.py * Deeply nested ifs suffer a flat penalty because the unconditional jump peepholer figures this out after the first extra POP_TOP (notice the JUMP_ABSOLUTE in your second disassembly). * I noticed the NOP assignment is commented out in your patch, was that unsafe? I searched for old threads on the peephole optimizer and came up with these: Skip Montanaro's paper http://www.webfast.com/~skip/python/spam7/optimizer.html Two old python-dev threads http://www.gossamer-threads.com/lists/python/dev/645669 http://www.gossamer-threads.com/lists/python/dev/645669 I was hoping to find out if writing a bytecode optimizer in python had been discussed because a generic version of your optimization would be really easy to write in pure python (using a dict for the jump table, for instance). I found nothing; my search terms might have been insufficient. -- nosy: +jackdied ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2676] email/message.py [Message.get_content_type]: Trivial regex hangs on pathological input
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 does the strip() before the lower() which helps with evilly long strings. I didn't remove the module global paramre because an external module might be using it. I did update its comment. Do bugfixes get applied to 2.6 or 3.0? I'm a bit out of practice. -- nosy: +jackdied Added file: http://bugs.python.org/file11022/email.message.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2357] sys.exc_{type, values, traceback} should raise a Py3K warning
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: Brett Cannon [EMAIL PROTECTED] added the comment: I agree with Georg; a 2to3 fixer is enough. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2357 __ __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2357 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2366] Fixer for new metaclass syntax is needed
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 nothing. Thanks. Added file: http://bugs.python.org/file9797/fix_metaclass.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2346] Py3K warn against using __members__
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__ attribute that is not used. -- assignee: - jackdied keywords: +patch nosy: +jackdied Added file: http://bugs.python.org/file9768/methods_members.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2346 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2357] sys.exc_{type, values, traceback} should raise a Py3K warning
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'll look into it. -- nosy: +jackdied __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2357 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2366] Fixer for new metaclass syntax is needed
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://bugs.python.org/file9778/fix_metaclass.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2328] Class **kwds broken (PEP 3115)
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 nosy: jackdied priority: normal severity: normal status: open title: Class **kwds broken (PEP 3115) type: behavior versions: Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2328 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com