[issue6121] help('modules ') causes IndexError.

2009-05-27 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- assignee: theller - components: -ctypes nosy: -theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6121 ___

[issue6121] help('modules ') causes IndexError.

2009-05-27 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: Here is a trivial patch for pydoc with a minimal test. -- components: +Library (Lib) keywords: +easy, patch nosy: +r.david.murray priority: - low stage: - patch review versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1,

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: r72961 Fixed for Py3.1. Leaving open until backported to 2.7. -- priority: critical - normal versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue1731717] race condition in subprocess module

2009-05-27 Thread Yonas
Yonas yona...@gmail.com added the comment: I always get a subprocess error when using embedded python 2.6.2: File /usr/lib/python2.6/subprocess.py, line 1123, in wait: pid, sts = os.waitpid(self.pid, 0): OSError: [Errno 10] No child processes Example library and main program are attached.

[issue1731717] race condition in subprocess module

2009-05-27 Thread Yonas
Changes by Yonas yona...@gmail.com: Added file: http://bugs.python.org/file14087/main.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1731717 ___ ___

[issue6122] [Errno 10] No child processes

2009-05-27 Thread Yonas
New submission from Yonas yona...@gmail.com: I always get a subprocess error when using embedded Python 2.6.2: File /usr/lib/python2.6/subprocess.py, line 1123, in wait: pid, sts = os.waitpid(self.pid, 0): OSError: [Errno 10] No child processes Sample library and main files attached.

[issue6122] [Errno 10] No child processes

2009-05-27 Thread Yonas
Changes by Yonas yona...@gmail.com: Added file: http://bugs.python.org/file14089/main.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6122 ___ ___

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Changes by Yonas yona...@gmail.com: -- title: [Errno 10] No child processes - OSError: [Errno 10] No child processes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6122 ___

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Changes by Yonas yona...@gmail.com: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6122 ___ ___ Python-bugs-list mailing list

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The content of exim_local_scan2.py would be useful as well. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6122

[issue6120] zipfile.ZipFile's extractall works inproperly under Windows

2009-05-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file14090/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6120 ___

[issue6102] When the package has non-ascii path and .pyc file, we cannot import them.

2009-05-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Could you test with the 3.1 beta? There's a Windows installer here: http://python.org/download/releases/3.1/ -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6102

[issue6077] Unicode issue with tempfile on Windows

2009-05-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: File descriptors wrapped by the new IO module should be opened in binary mode. The attached patch changes TemporaryFile and NamedTemporaryFile to always call os.open() in binary mode; the mode is really used by the io.open() function.

[issue6120] zipfile.ZipFile's extractall works inproperly under Windows

2009-05-27 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I confirmed error happened on Python2.6, 2.7, 3.0. But not happen on Python3.1. Interesting. -- versions: +Python 2.7, Python 3.0 ___ Python tracker rep...@bugs.python.org

[issue6120] zipfile.ZipFile's extractall works inproperly under Windows

2009-05-27 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is traceback for trunk(Py2.7) Traceback (most recent call last): File b.py, line 3, in module f.extractall() File e:\python-dev\trunk\lib\zipfile.py, line 947, in extractall self.extract(zipinfo, path, pwd) File

[issue6102] When the package has non-ascii path and .pyc file, we cannot import them.

2009-05-27 Thread Suzumizaki
Suzumizaki suzumiz...@free.japandesign.ne.jp added the comment: Thanks for reply. I tried Python 3.1 Beta, and the testcode goes fine. (and my current work also.) I checked with Windows XP, I told before. My problem seems resolved, and here is answers only to make sure. (What is the value of

[issue6120] zipfile.ZipFile's extractall works inproperly under Windows

2009-05-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I think this was fixed by r72893: Issue #6050: Don't fail extracting a directory from a zipfile if the directory already exists. -- nosy: +amaury.forgeotdarc resolution: - duplicate status: open - pending

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- components: +Library (Lib) type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6122 ___

[issue6123] tarfile:

2009-05-27 Thread Evan Jones
New submission from Evan Jones ev...@mit.edu: tarfile.open() with an empty tar archive fails with a ReadError exception. GNU tar refuses to create empty archives, but tarfile allows it. See the following code which reproduces the error. I used the version of tarfile.py from subversion (revision

[issue6123] tarfile: opening an empty tar file fails

2009-05-27 Thread Evan Jones
Changes by Evan Jones ev...@mit.edu: -- title: tarfile: - tarfile: opening an empty tar file fails ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6123 ___

[issue6120] zipfile.ZipFile's extractall works inproperly under Windows

2009-05-27 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Oops, sorry. I forgot to update working copy. I confirmed this was fixed already. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6120

[issue5851] Add a stream parameter to gc.set_debug

2009-05-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Would you like to work on a patch? -- components: +Interpreter Core -Extension Modules nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5851

[issue6124] Tkinter should support the OS X zoom button

2009-05-27 Thread Marc Culler
New submission from Marc Culler cul...@math.uic.edu: As far as I can tell, no Tkinter event or pseudo event is generated by clicking the green zoom button on Mac OS X windows. This makes it impossible to support that OS X paradigm in a Tkinter application. I would like to be able to bind Zoom

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2009-05-27 Thread Peter Simanyi
Peter Simanyi psima...@namcobandaigames.com added the comment: Re: chmod 0666 inappropriate: I agree that leaving a file 0666 is inappropriate, however theoretically the code should never leave the file 0666 since the unlink will delete the file. The code was intended to show what the problem

[issue6106] read_until

2009-05-27 Thread Pal Subbiah
Pal Subbiah pal.subb...@gmail.com added the comment: Thanks for your support. But the telnetlib from 3.1 also behaves in the same way. read_until always times out and returns b''. The problem seems to be with the byte string expected. The string after letter b is not passed properly.

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Yonas yona...@gmail.com added the comment: The test doesn't fail when run directly from ./main, but it fails when run from exim4 mail server. exim will dlopen() mylib and run local_scan(). Besides using Popen, I haven't had any problems. -- Added file:

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: your program works for me. How did you compile the files? I used the following commands: $ gcc -fPIC -I/usr/local/include/python2.6/ mylib.c -L /usr/local/lib -lpython2.6 --shared -o mylib.so $ gcc main.c -ldl $ ./a.out test (after

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Yonas yona...@gmail.com added the comment: Thanks for testing, it works when running ./main, but not when run through exim. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6122 ___

[issue6081] str.format_from_mapping()

2009-05-27 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I think this would be useful. I don't fee terribly strongly about it, but I think I'd like the name str.format_using_mapping(). When I initially saw this, I thought from the name it was creating a format object (whatever that would be) from a

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Yonas yona...@gmail.com added the comment: I didn't find anything unusual about how exim uses dlopen, but if you want to see the code, it's here: http://pastebin.com/m52398b30 Line 166 is the actual call. Again, no problems except with Python's Popen(). --

[issue6125] 2to3 mishandles from module_name import when module_name includes an underscore

2009-05-27 Thread Mitchell Model
New submission from Mitchell Model m...@acm.org: 2to3 -f import l.py --- l.py (original) File p.py (the four modules exist in the same directory as p.py): from mod_a import a from modb import b from mod_c import * from modd import * % 2to3 -f import p.py +++ p.py (refactored) @@ -1,5 +1,5 @@

[issue6116] frame.f_locals keeps references to things for too long

2009-05-27 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Oh, I forgot dictionaries aren't weakrefable. That's such a pain, I thought the third solution would be a good balance between easy and good. :/ Regarding the first solution, my only question right now is whether this should be a new

[issue6116] frame.f_locals keeps references to things for too long

2009-05-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Regarding the first solution, my only question right now is whether this should be a new attribute/method, or if the behavior of f_locals should just be changed. The former would be nicer, I think, and perhaps f_locals can be deprecated in

[issue6126] Python 3 pdb: shows internal code, breakpoints don't work

2009-05-27 Thread Eric Promislow
New submission from Eric Promislow er...@activestate.com: I have a simple test file, test01.py, with this output: $ cat test01.py #!/usr/bin/env python print(Line 1) print(Line 2) print(Line 3) $ $ # Now try debugging it. $ python3.0 -mpdb test01.py --Return--

[issue6121] help('modules ') causes IndexError.

2009-05-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Looks good, please apply. -- assignee: - r.david.murray nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6121 ___

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Yonas yona...@gmail.com added the comment: Could this be a permissions issue? I have no idea how permissions would effect it, though... r...@yonas-laptop:/usr/lib/exim4/local_scan# ls -la /usr/sbin/exim4 -rwsr-xr-x 1 root root 824440 2009-02-11 08:53 /usr/sbin/exim4 --

[issue6001] Test discovery for unittest

2009-05-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Would you like to upload your patch to Rietveld? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6001 ___

[issue6073] threading.Timer and gtk.main are not compatible

2009-05-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well I'm not a gtk user, but try to do something else than a print in the timer. Perhaps gtk redirects all standard IO or something. It sounds very strange that threads would stop working when gtk is imported. --

[issue6073] threading.Timer and gtk.main are not compatible

2009-05-27 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: pygtk doesn't release the GIL around its internal calls unless you call threads_init. So I think this is pretty clearly just a misuse of the pygtk library. There's nothing at all Python can do about it. If an extension library doesn't

[issue6003] ZipFile.writestr compression_type argument

2009-05-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch looks ok. It can certainly go in trunk, as for 3.1 it's up to Benjamin to decide. Note: the docs should state that the new argument appeared in 2.7. -- ___ Python tracker

[issue6127] Unexpected universal newline behavior (newline duplication) in Windows

2009-05-27 Thread Jason R. Coombs
New submission from Jason R. Coombs jar...@jaraco.com: Per http://bugs.python.org/issue5265, I'm opening up a new ticket. Universal newline behavior works as expected under Linux but differently under Windows. PS C:\Users\jaraco python Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC

[issue5265] StringIO can duplicate newlines in universal newlines mode

2009-05-27 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I've filed the Windows issue as http://bugs.python.org/issue6127 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5265 ___

[issue6127] Unexpected universal newline behavior (newline duplication) in Windows

2009-05-27 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6127 ___ ___ Python-bugs-list

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Yonas yona...@gmail.com added the comment: os.system() works: os.system(echo `date` /tmp/myfile) r...@yonas-laptop:/usr/lib/exim4/local_scan# cat /tmp/myfile Wed May 27 16:04:54 EDT 2009 Wed May 27 16:04:54 EDT 2009 -- ___ Python tracker

[issue6128] Consequences of using Py_TPFLAGS_HAVE_GC are incompletely explained

2009-05-27 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: Creation of GC'd types is explained at http://docs.python.org/c-api/gcsupport.html. The docs claim that PyObject_GC_Track must be called once an object created with PyObject_GC_New is initialized. The docs fail to explain what should

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Yonas yona...@gmail.com added the comment: Here's another test, taken from the docs: http://docs.python.org/library/subprocess.html#subprocess-replacements: This is slightly better than Popen because the program executes and shows output, but worse than os.system(), because it still shows the

[issue6125] 2to3 mishandles from module_name import when module_name includes an underscore

2009-05-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I'm sorry; I don't see why this is a bug. Could you elaborate, please? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6125

[issue6129] 2to3 does not convert imports of the form 'import sub.mod' to relative import

2009-05-27 Thread Mitchell Model
New submission from Mitchell Model m...@acm.org: 2to3 changes import m to from . import m but it doesn't change import sub.s. The directory q.py is in has a file m.py and a subdirectory sub. The subdirectory sub has a file s.py. File q.py contains two lines: import m import sub.s % 2to3 -f

[issue6122] OSError: [Errno 10] No child processes

2009-05-27 Thread Yonas
Changes by Yonas yona...@gmail.com: -- versions: +Python 2.5, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6122 ___ ___

[issue6129] 2to3 does not convert imports of the form 'import sub.mod' to relative import

2009-05-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Is there also a sub/__init__.py? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6129 ___

[issue6130] There ought to be a way for extension types to associate documentation with their tp_new or tp_init methods

2009-05-27 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: If an extension type supplies a tp_new or tp_init, these will be invoked by the normal instantiation logic. They will also be exposed as `__new__´ and `__init__´ attributes of the type. However, there is no way to supply a docstring

[issue6129] 2to3 does not convert imports of the form 'import sub.mod' to relative import

2009-05-27 Thread Mitchell Model
Mitchell Model m...@acm.org added the comment: Yes, I meant to mention that: the directory sub does contain an __init__.py with __all__ = ['s']. I'm attaching a zip of the test package pkg that contains the sub-package sub. It wasn't clear to me what import sub.s should be converted to. By

[issue6001] Test discovery for unittest

2009-05-27 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: http://codereview.appspot.com/63157 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6001 ___

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-27 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: When run independently, test_modulefinder doesn't leak: $ ./python -m test.regrtest -R 3:2 test_modulefinder test_modulefinder beginning 5 repetitions 12345 . 1 test OK. [93448 refs] But it does leak if test_distutils was run before it: $

[issue6129] 2to3 does not convert imports of the form 'import sub.mod' to relative import

2009-05-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This is a case that 2to3 cannot handle. There is no way to do a relative import and get the module package.module behavior of absolute import. 2to3 cannot guess how to fix this. -- nosy: +benjamin.peterson resolution: - wont fix

[issue6129] 2to3 does not convert imports of the form 'import sub.mod' to relative import

2009-05-27 Thread Mitchell Model
Mitchell Model m...@acm.org added the comment: Thanks. I sure couldn't find a way! I encountered this trying to convert someone else's code. There is a main directory and a subdirectory, both with __init__.py files. The files in the main directory import each other just by import othermodule.

[issue6132] Implement the GIL with critical sections in Windows

2009-05-27 Thread Phillip Sitbon
New submission from Phillip Sitbon phillip.sitbon+python-...@gmail.com: At the suggestion of others on the Python-Dev list, I'm going to outline what I've been doing with the GIL and where I see possiblity for improvement. Discussion:

[issue6132] Implement the GIL with critical sections in Windows

2009-05-27 Thread Phillip Sitbon
Changes by Phillip Sitbon phillip.sitbon+python-...@gmail.com: Added file: http://bugs.python.org/file14097/LockingTest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6132 ___

[issue6129] 2to3 does not convert imports of the form 'import sub.mod' to relative import

2009-05-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: The bug tracker is not really the correct forum for this. [See the python-porting list.] You will either have to change the code to use absolute from imports and change the usage of the module in the code base (I would suggest this), or

[issue6121] help('modules ') causes IndexError.

2009-05-27 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Applied in r72966, r72967 and r72968, r72970. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
New submission from Alex alex.gay...@gmail.com: Basically whenever you have a LOAD_CONST opcode, follwed by a LOAD_ATTR you can replace both with a single LOAD_CONST. This optimizes things like , .join or {} {}.format (in my totally unscientific byte code hackery it's about a 30% speedup on the

[issue6125] 2to3 mishandles from module_name import when module_name includes an underscore

2009-05-27 Thread Mitchell Model
Mitchell Model m...@acm.org added the comment: I apologize. This example evolved from my attempt to simplify things from the actual code, and I oversimplified to the point where I misread the 2to3 results. I thought there was a space after the period for the modules without the underscores in

[issue1564508] RFC 2965 BaseCookie does not support $Port

2009-05-27 Thread Ben Anhalt
Ben Anhalt ben.anh...@gmail.com added the comment: Actually, I was just bit by this. In fact, RFC 2965 prohibits clients from sending $Port if the port attribute was not included in the Set-Cookie header. But, it turns out that the mono System.Net library (at least) will add the attribute any

[issue6132] Implement the GIL with critical sections in Windows

2009-05-27 Thread Collin Winter
Changes by Collin Winter coll...@gmail.com: -- nosy: +collinwinter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6132 ___ ___ Python-bugs-list

[issue1564508] RFC 2965 BaseCookie does not support $Port

2009-05-27 Thread Ben Anhalt
Ben Anhalt ben.anh...@gmail.com added the comment: Grrr, the link in my last comment should have been http://www.nabble.com/System.Net.CookieContainer-adding-inappropriate-%24Port-attribute-to-cookies--td23752882ef1367.html Yuck. -- ___ Python

[issue6125] 2to3 mishandles from module_name import when module_name includes an underscore

2009-05-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6125 ___

[issue6132] Implement the GIL with critical sections in Windows

2009-05-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm not competent to review Windows-specific stuff, but some style notes: - your indentation is inconsistent with the original file (you should use tabs) - please don't use any C++-style comments -- nosy: +pitrou

[issue5673] Add timeout option to subprocess.Popen

2009-05-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___

[issue5673] Add timeout option to subprocess.Popen

2009-05-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-05-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: gpolo - r.david.murray priority: - low stage: - needs patch versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5450

[issue2986] difflib.SequenceMatcher not matching long sequences

2009-05-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- components: +Documentation, Library (Lib) -Extension Modules priority: - normal stage: - test needed type: - feature request versions: +Python 3.2 -Python 2.5 ___ Python tracker

[issue5353] Improve IndexError messages with actual values

2009-05-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: -r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5353 ___ ___

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex alex.gay...@gmail.com added the comment: Here's my work so far, it seems to work as described. Except for the fact that pyc creation with anything containign something with this optimization will give a valueerror on bad marshall data, from trying to marshall the method I assume.

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex alex.gay...@gmail.com added the comment: Small update so I don't change whitespace all over the plcae. -- Added file: http://bugs.python.org/file14099/python_const_fold.diff ___ Python tracker rep...@bugs.python.org

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex alex.gay...@gmail.com added the comment: Switch to using memset instead of a forloop. -- Added file: http://bugs.python.org/file14100/python_const_fold.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6133

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex alex.gay...@gmail.com added the comment: I now *almost* have PyCFunctions marshalling, they seem to marhshall ok but fail on unmarshalling. I think the whitespace stuff may have crept back in, sorry :( -- Added file: http://bugs.python.org/file14101/python_const_fold.diff

[issue6134] 2to3 tests fail on Windows due to line endings

2009-05-27 Thread James Abbatiello
New submission from James Abbatiello abb...@gmail.com: The tests for 2to3 currently fail on Windows. Data is read from a file in binary mode and then written to a temporary file in text mode which doubles up the carriage returns. Additionally, several files are missing the svn:eol-style

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-27 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is workaround for reference leak. I'm not sure what exactly leaks references yet. -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file14103/workaround.patch