[ python-Bugs-1717900 ] Destructor behavior faulty
Bugs item #1717900, was opened at 2007-05-12 20:41 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1717900&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Wolf Rogner (wrogner) Assigned to: Nobody/Anonymous (nobody) Summary: Destructor behavior faulty Initial Comment: I tried example 11.4. from bytesofpython (by C.H. Swaroop). Example works fine. Added a new Person instance 'wolf' -> Program terminated with: Exception exceptions.AttributeError: "'NoneType' object has no attribute 'population'" in > ignored added print list(globals()) -> ['kalam', '__builtins__', '__file__', 'DBGPHideChildren', 'swaroop', 'Person', 'wolf', '__name__', '__doc__'] changed wolf to aaa: print list(globals()) -> ['aaa', 'kalam', '__builtins__', '__file__', 'DBGPHideChildren', 'swaroop', 'Person', '__name__', '__doc__'] Please note the position of 'aaa' at the beginning of the list, before 'Person'. With 'wolf' being after 'Person'. If the destructing code removes items in this order, no wonder I get an error. Person should not get deleted if refcount is still > 0. Wolf Rogner -- Comment By: Alan McIntyre (alanmcintyre) Date: 2007-05-12 23:36 Message: Logged In: YES user_id=1115903 Originator: NO Could you post the code for your entire script? It makes it a lot easier to figure out what's going on. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1717900&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1714773 ] python throws an error when unpacking bz2 file
Bugs item #1714773, was opened at 2007-05-08 08:23 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1714773&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: runnig (runnig) Assigned to: Nobody/Anonymous (nobody) Summary: python throws an error when unpacking bz2 file Initial Comment: C:\work\python>c:\work\python\25\py.exe Python 2.5 (r25:51908, Feb 13 2007, 14:33:20) [MSC v.1400 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. C:\work\python>ez_setup.py wxpython Searching for wxpython Reading http://cheeseshop.python.org/pypi/wxpython/ Couldn't find index page for 'wxpython' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://cheeseshop.python.org/pypi/ Reading http://cheeseshop.python.org/pypi/wxPython/2.6.3.2 Reading http://wxPython.org/ Reading http://wxPython.org/download.php Best match: wxPython src-2.8.3.0 Downloading http://prdownloads.sourceforge.net/wxpython/wxPython-src-2.8.3.0.tar.bz2 Processing wxPython-src-2.8.3.0.tar.bz2 I think, when unpacking bz2, an error occurs and windows shows an error about "python.exe has encountered a problem and needs to close" -- >Comment By: Georg Brandl (gbrandl) Date: 2007-05-13 07:54 Message: Logged In: YES user_id=849994 Originator: NO Can you try to take the .tar.bz2 file and unpack it yourself using Python's bz2 module? We can then find out where exactly the segfault occurs. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1714773&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Feature Requests-1713624 ] commands module
Feature Requests item #1713624, was opened at 2007-05-06 02:11 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1713624&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Windows Group: Python 2.6 >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Joseph Armbruster (joearmbruster) Assigned to: Nobody/Anonymous (nobody) Summary: commands module Initial Comment: In reference to the commands module, and it's simple self :-) Current comments in the module state the following: # Module 'commands' # # Various tools for executing commands and looking at their output and status. # # NB This only works (and is only relevant) for UNIX. Ultimately, I would like to see the following: 1) This comment removed: # NB This only works (and is only relevant) for UNIX. 1) A change to getstatusoutput along these lines: if os.name == 'nt': pipe = os.popen(cmd + ' 2>&1','r') else: pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') * I was going to suggest having a more pythonic getstatus method, that would act reasonably similar across platforms (maybe using some combination of os.listdir and os.stat or something), however, it is being deprecated, so onward! -- >Comment By: Georg Brandl (gbrandl) Date: 2007-05-13 07:54 Message: Logged In: YES user_id=849994 Originator: NO I agree. -- Comment By: Josiah Carlson (josiahcarlson) Date: 2007-05-06 06:46 Message: Logged In: YES user_id=341410 Originator: NO Recent discussions in one of the python development lists has basically stated that the commands module will be deprecated in favor of being replaced by equivalent platform independent versions based on subprocess, which will be placed in the subprocess module. As such, it is doubtful that your request will be fulfilled. Suggested close as 'wont fix'. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1713624&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Feature Requests-840034 ] additions to commands lib
Feature Requests item #840034, was opened at 2003-11-11 15:41 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=840034&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: None >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Mark Hattarki (mindfunk) Assigned to: Nobody/Anonymous (nobody) Summary: additions to commands lib Initial Comment: There currently is a function, commands.getstatusoutput. This, simply, runs a command, returns it's exit code and and output. The problem is, stderr and stdout are mixed. There are many real world examples where this is not desirable. In fact, I've written the following function in various forms many, many times: def run_cmd(cmd): pipe = popen2.Popen3(cmd, 1) ret = pipe.wait() return (ret, pipe.fromchild.readlines(-1), pipe.childerr.readlines(-1)) This is a very simple command. Anyone could write it. But, I still think is should be added because there is a function that is very similar to it (getstatusoutput) that comes extremely close, but does something that renders it useless if one wants to separate the two. It would be a useful addition to the commands lib. Also, I wouldn't nessesarily name it "run_cmd" if added to the lib. I suppose one could have it throw exceptions as well: def getouterr(cmd): if not os.path.exists((cmd.split(' '))[0]): raise ATSCommandPath(cmd, "command not found") return run_cmd(cmd) ... obviously, one could do better error checking (searching $PATH, etc). But, that is the basic point. If you guys/gals will allow it, I would also like to submit the patch. namaste, Mark <[EMAIL PROTECTED] -- >Comment By: Georg Brandl (gbrandl) Date: 2007-05-13 07:55 Message: Logged In: YES user_id=849994 Originator: NO You can/should use the subprocess module for this kind of process handling. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=840034&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Feature Requests-711268 ] A large block of commands after an " if" cannot be
Feature Requests item #711268, was opened at 2003-03-28 10:47 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=711268&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parser/Compiler Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Bram Moolenaar (vimboss) Assigned to: Nobody/Anonymous (nobody) Summary: A large block of commands after an "if" cannot be Initial Comment: A Generated Python script Contains the code: if 1: file = bugreport.vim ... long list of commands Executing this code with: exec cmds in globals(), globals() Results in the error: SystemError: com_backpatch: offset too large Looking into the code for com_backpatch() it appears that the code is more than what can be jumped over. Possible solutions: 1. When there is too much code, use another jump statement that allows for a larger offset. 2. Always use a jump statement with a large offset 3. When "if 1" is used, don't generate a jump statement (not a real fix, but works for the situation where I ran into the bug). It looks like this bug exists in all versions of Python. -- >Comment By: Georg Brandl (gbrandl) Date: 2007-05-13 07:57 Message: Logged In: YES user_id=849994 Originator: NO #3 is already implemented. Note that there are some internal limits to the bytecode interpreter's code sizes etc., they can be circumvented by putting the code in several functions and calling them in order. -- Comment By: Raymond Hettinger (rhettinger) Date: 2005-01-02 02:40 Message: Logged In: YES user_id=80475 Re-classifying this as a feature request for CPython implementation to be expanded to handle larger relative jumps. The current behavior of raising a SystemError is correct, non-buggy behavior. One solution is to introduce a new bytecode for indirect jumps based on an entry into the constants table. Whenever the distance is too large to backpatch a JUMP_FORWARD, that opcode can be replaced with JUMP_INDIRECT and given an offset into the constant table. This solution is easy to implement. (Reminder, the peepholer should skip any code containing the new opcode.) -- Comment By: Jeff Epler (jepler) Date: 2005-01-02 00:33 Message: Logged In: YES user_id=2772 Please see my (unsuitable for inclusion) patch at http://mail.python.org/pipermail/python-list/2004-November/249827.html I think that message suggests some steps that might result in an acceptable patch. -- Comment By: Facundo Batista (facundobatista) Date: 2004-12-27 16:10 Message: Logged In: YES user_id=752496 Also happens in 2.4. I'm reopening the bug, in group 2.4. -- Comment By: Bram Moolenaar (vimboss) Date: 2004-12-27 16:04 Message: Logged In: YES user_id=57665 It appears between Python 2.2 and 2.3 the efficiency of the produced bytecode was improved. You now need to repeat the command 10923 times to produce the error. Thus the problem remains, it's just further away. You can reproduce the problem with this program: cmds = "if 1:\n" for i in xrange(1, 10923): cmds = cmds + " a = 'a'\n" exec cmds in globals(), globals() I verified with Python 2.3.3, don't have a newer version right now. -- Comment By: Brett Cannon (bcannon) Date: 2004-12-26 19:11 Message: Logged In: YES user_id=357491 I can't reproduce it with 2.3, 2.3 maintenance, 2.4 maintenance, or 2.5 in CVS using 8000 lines. Closing as out of date. -- Comment By: Facundo Batista (facundobatista) Date: 2004-12-26 15:00 Message: Logged In: YES user_id=752496 Please, could you verify if this problem persists in Python 2.3.4 or 2.4? If yes, in which version? Can you provide a test case? If the problem is solved, from which version? Note that if you fail to answer in one month, I'll close this bug as "Won't fix". Thank you! .Facundo -- Comment By: Facundo Batista (facundobatista) Date: 2004-12-26 15:00 Message: Logged In: YES user_id=752496 Can not reproduce the problem in Py2.3.4 using the method posted by vimboss. It's already fixed? -- Comment By: Bram Moolenaar (vimboss) Date: 2003-03-28 20:03 Message: Logged In: YES user_id=57665 I can reproduce th
[ python-Feature Requests-1707693 ] Please add .bz2 in encodings_map (in the module mimetypes)
Feature Requests item #1707693, was opened at 2007-04-25 20:46 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1707693&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: None >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: elghinn (elghinn) Assigned to: Nobody/Anonymous (nobody) Summary: Please add .bz2 in encodings_map (in the module mimetypes) Initial Comment: In the module mimetypes, can you add .bz2 in encodings_map = { '.gz': 'gzip', '.Z': 'compress', } please ? -- >Comment By: Georg Brandl (gbrandl) Date: 2007-05-13 08:04 Message: Logged In: YES user_id=849994 Originator: NO Done in rev. 55290. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1707693&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Feature Requests-1705362 ] cannot change cursor color in IDLE
Feature Requests item #1705362, was opened at 2007-04-22 19:14 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1705362&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: zorkin (zorkin) Assigned to: Nobody/Anonymous (nobody) Summary: cannot change cursor color in IDLE Initial Comment: Python 2.5.1 for windows When I change the cursor color to another color, it still stays black, so I can't really make black background. -- Comment By: zorkin (zorkin) Date: 2007-04-23 07:33 Message: Logged In: YES user_id=1741501 Originator: YES The page on the link says you can invert it. As I understand, the caret color is either black or background color. You could force it to be black/white. Also you should hide this option in selector - it's misleading, because I thought i does something. -- Comment By: Gabriel Genellina (gagenellina) Date: 2007-04-23 05:48 Message: Logged In: YES user_id=479790 Originator: NO IDLE on Windows appears to be using an always-black caret (cursor) - not the standard caret behavior, which does its "blinking" by inverting the background color. So something might be improved here, but I doubt you can reliably set the caret color on Windows; see http://support.microsoft.com/kb/84054/en-us -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1705362&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1633621 ] curses should reset curses.{COLS, LINES} when term. resized
Bugs item #1633621, was opened at 2007-01-12 00:38 Message generated for change (Comment added) made by doerwalter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1633621&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Closed Resolution: Fixed Priority: 3 Private: No Submitted By: Matthias Klose (doko) Assigned to: Nobody/Anonymous (nobody) Summary: curses should reset curses.{COLS,LINES} when term. resized Initial Comment: [forwarded from http://bugs.debian.org/366698] The curses module does not reset curses.COLS and curses.LINES when the terminal is resized. -- >Comment By: Walter Dörwald (doerwalter) Date: 2007-05-13 10:07 Message: Logged In: YES user_id=89016 Originator: NO Updating LINES and COLS is done in curses.resize_term() and curses.resizeterm(), so you have to call one of those functions. -- Comment By: blubb (machamalahalaba) Date: 2007-05-12 18:17 Message: Logged In: YES user_id=1791654 Originator: NO I'm still able to reproduce this bug with Python 2.5.1. The following script always gives the same size: import curses while True: scr = curses.initscr() print curses.LINES, curses.COLS scr.getch() scr.getch() curses.endwin() -- Comment By: Walter Dörwald (doerwalter) Date: 2007-03-06 21:47 Message: Logged In: YES user_id=89016 Originator: NO Checked in as revision 54180 and 54181 (2.5) -- Comment By: Scott Dial (geekmug) Date: 2007-03-05 23:14 Message: Logged In: YES user_id=383208 Originator: NO I've reviewed this patch and I believe it to be the correct patch. I believe it would be prudent to add a test case for this. I'm unable to attach, but here is a link to a patch for that: http://scottdial.com/python-dev/curses-test.patch -- Comment By: Walter Dörwald (doerwalter) Date: 2007-02-12 19:59 Message: Logged In: YES user_id=89016 Originator: NO Here's a patch that implements the requested changes. File Added: diff.txt -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1633621&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1718017 ] posixpath and friends have uses that should be documented
Bugs item #1718017, was opened at 2007-05-12 23:21 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1718017&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Gabriel de Perthuis (onyxg7) Assigned to: Nobody/Anonymous (nobody) Summary: posixpath and friends have uses that should be documented Initial Comment: At this page: http://docs.python.org/lib/module-os.html It should be suggested that the modules: posixpath, macpath, ntpath, os2emxpath are available on all platforms to handle the path conventions of that platform. The current phrasing, along with the documentation for each of these modules, does not imply that. In particular, posixpath is useful to handle the URI path conventions in http://tools.ietf.org/html/rfc2396 , for example handling repeated slashes and references to .. and . -- >Comment By: Neal Norwitz (nnorwitz) Date: 2007-05-13 12:53 Message: Logged In: YES user_id=33168 Originator: NO Gabriel, could you try to work up a patch which demonstrates what you would like changed? It would be great if you could do this against the latex source in Doc/lib/libos.tex (presumably). If you don't know latex, that's ok, even a plain text patch would help a lot. Thanks! -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1718017&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com