[issue3131] 2to3 can't find fixes_dir

2008-08-19 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Fixed in r65853. Hopefully we can do the real refactoring fix after the
betas.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-08-16 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

I reported the same bug with another patch: #3553. I used __import__ 
and module.__file__ attribute (and not realpath).

--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-08-16 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-08-15 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I don't like the patch because it constricts possible fixer dirs. IMO,
refactor.py needs some refactoring its self in order to separate command
line logic from application logic.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-08-11 Thread Haoyu Bai

Haoyu Bai <[EMAIL PROTECTED]> added the comment:

I tried the patch and it works well. Thanks Georgij! So, why the patch
havn't merged into SVN?

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-08-01 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Installation of PatternGrammar pickle is now fixed in r65368 and r65369.

HWJ, please don't report multiple problems in a single tracker issue;
instead, create separate tracker issues for independent problems.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-07-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw <[EMAIL PROTECTED]>:


--
priority: deferred blocker -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-07-15 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

I think we'll defer this as a blocker.  It would be good to get 2to3
working right for the betas, but I don't think it should hold up beta2.

--
nosy: +barry
priority: release blocker -> deferred blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-21 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-21 Thread Georgij Kondratjev

Georgij Kondratjev <[EMAIL PROTECTED]> added the comment:

> when invoked it tries to write to /usr/local/lib/python3.0/lib2to3

2to3 always worked like this. I always had to run it as root. Seems
weird for me too.

> Furthermore, as a test, I copied refactor.py to xxx.py
and ran 2to3 on xxx.py

It seems to be a bug with 2to3 processing refactor.py.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-21 Thread Helmut Jarausch

Helmut Jarausch <[EMAIL PROTECTED]> added the comment:

This patch seems to work, but

when invoked it tries to write to /usr/local/lib/python3.0/lib2to3
( I get 
root: Writing failed:[Errno 13] Permission denied: '/usr/local/lib/
python3.0/lib2to3/PatternGrammar3.0.0.beta.1.pickle'
)

I hope this will be handled during install in future.

Furthermore, as a test, I copied refactor.py to xxx.py
and ran 2to3 on xxx.py

Here I get
RefactoringTool: Can't parse xxx.py: ParseError: bad input: type=22, 
value='=', context=('', (67, 71))

This error message is a bit terse for someone not knowing the details
of 2to3

Thanks for the patch,
Helmut.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

The patch looks good, but I'm going to let Collin deal with it because
I'm not sure if he wants to maintain backwards compatibility with older
version. (os.path.relpath was introduced in 2.6)

--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Georgij Kondratjev

Georgij Kondratjev <[EMAIL PROTECTED]> added the comment:

After uploading the patch I noticed

-#!/usr/bin/env python
+#!/usr/bin/python3.0

in it.
They just should be dropped.

Added file: http://bugs.python.org/file10677/2to3.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Georgij Kondratjev

Georgij Kondratjev <[EMAIL PROTECTED]> added the comment:

Here is the patch (against both current svn and beta 1).

--
keywords: +patch
Added file: http://bugs.python.org/file10676/2to3.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Georgij Kondratjev

Georgij Kondratjev <[EMAIL PROTECTED]> added the comment:

Do what Benjamin Peterson suggested and also edit get_fixers(self) in
refactor.py so fixer_pkg is initialized like this:

fixer_pkg = os.path.relpath(self.fixer_dir,
os.path.join(os.path.dirname(__file__), '..'))
fixer_pkg = fixer_pkg.replace(os.path.sep, ".")

This works for me.

--
nosy: +orivej

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Helmut Jarausch

Helmut Jarausch <[EMAIL PROTECTED]> added the comment:

The suggested fix succeeds but then the next problem occurs

Traceback (most recent call last):
  File "/usr/local/bin/2to3", line 6, in 
sys.exit(refactor.main(fixers))
  File "/usr/local/lib/python3.0/lib2to3/refactor.py", line 81, in main
rt = RefactoringTool(fixer_dir, options)
  File "/usr/local/lib/python3.0/lib2to3/refactor.py", line 160, in 
__init__
self.pre_order, self.post_order = self.get_fixers()
  File "/usr/local/lib/python3.0/lib2to3/refactor.py", line 185, in 
get_fixers
mod = __import__(fixer_pkg + ".fix_" + fix_name, {}, {}, ["*"])
ValueError: Empty module name

--
nosy: +HWJ

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Collin, how does this look?

#!/usr/bin/env python
from lib2to3 import refactor
import sys
import os

fixers = os.path.join(os.path.dirname(refactor.__file__), "fixes")
sys.exit(refactor.main(fixers))

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-06-17 Thread Haoyu Bai

New submission from Haoyu Bai <[EMAIL PROTECTED]>:

After install Python 3.0 r64319 on my Linux system, running 2to3 given
the below error:

$ 2to3 hello23.py
Traceback (most recent call last):
  File "/usr/bin/2to3", line 5, in 
sys.exit(refactor.main("lib2to3/fixes"))
  File "/usr/lib/python3.0/lib2to3/refactor.py", line 81, in main
rt = RefactoringTool(fixer_dir, options)
  File "/usr/lib/python3.0/lib2to3/refactor.py", line 160, in __init__
self.pre_order, self.post_order = self.get_fixers()
  File "/usr/lib/python3.0/lib2to3/refactor.py", line 180, in get_fixers
fix_names = get_all_fix_names(self.fixer_dir)
  File "/usr/lib/python3.0/lib2to3/refactor.py", line 95, in
get_all_fix_names
names = os.listdir(fixer_dir)
OSError: [Errno 2] No such file or directory: 'lib2to3/fixes'

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 68319
nosy: bhy, collinwinter
severity: normal
status: open
title: 2to3 can't find fixes_dir

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com