[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2009-03-24 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Applied in r70587. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016 ___

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2009-03-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @benjamin.peterson: The second version of my patch works correctly with the bootstraping. I also think we should consider hard adding more modules that are loaded at startup time to py3k already huge list. linecache is not

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2009-03-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I see that setup.py uses warnings and so linecache is loaded by setup.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I also think we should consider hard adding more modules that are loaded at startup time to py3k already huge list. My patch uses tokenize modules in setup.py bootstrap. But it doesn't affect Python classic usage python or

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- priority: - normal stage: - patch review versions: +Python 3.1 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016 ___

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-12 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It was easy to remove the itertools dependency: only itertools.chain() was really used and a simple for ...: yield is enough to get the same behaviour (test_tokenize.py runs fine). With the new version of the patch, the bootstrap

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file11678/linecache_refactor.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016 ___

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This patch looks good. ok and then? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016 ___

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: Applied in r67713. -- nosy: +benjamin.peterson resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: I had to revert this because tokenize imports itertools. This is a problem when building (setup.py) because itertools doesn't exist, yet. I also think we should consider hard adding more modules that are loaded at startup time to

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-10-02 Thread STINNER Victor
New submission from STINNER Victor [EMAIL PROTECTED]: linecache uses it own code to detect a Python script encoding whereas a function tokenize.detect_encoding() already exists. It does also convert bytes = unicode conversion of the file lines whereas open() already supports this feature.

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-10-02 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Added file: http://bugs.python.org/file11679/tokenize_bom_utf8.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4016 ___

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-10-02 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: I wrote a different (and better) patch for tokenize module: moved to the issue4021. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4016 ___

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-10-02 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11679/tokenize_bom_utf8.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4016 ___

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: This patch looks good. -- nosy: +amaury.forgeotdarc ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4016 ___