http403 / pyrit

Automatically exported from code.google.com/p/pyrit
0 stars 0 forks source link

Warning: 'with' will become a reserved keyword in Python 2.6 #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. backtrack "full upgrade"
2. svn
3. version 173
4. maybe Python 2.6

jacob@lappy:~/svn/pyrit_svn/pyrit$ sudo python setup.py install
running install
running build
running build_py
running build_ext
running build_scripts
running install_lib
byte-compiling /usr/lib/python2.5/site-packages/cpyrit/storage.py to
storage.pyc
/usr/lib/python2.5/site-packages/cpyrit/storage.py:53: Warning: 'with' will
become a reserved keyword in Python 2.6
  File "/usr/lib/python2.5/site-packages/cpyrit/storage.py", line 53
    with open(os.path.join(essidpath, 'essid'), 'rb') as f:
            ^
SyntaxError: invalid syntax

writing byte-compilation script '/tmp/tmpPUp_Xs.py'
/usr/bin/python -O /tmp/tmpPUp_Xs.py
/usr/lib/python2.5/site-packages/cpyrit/storage.py:53: Warning: 'with' will
become a reserved keyword in Python 2.6
  File "/usr/lib/python2.5/site-packages/cpyrit/storage.py", line 53
    with open(os.path.join(essidpath, 'essid'), 'rb') as f:
            ^
SyntaxError: invalid syntax

removing /tmp/tmpPUp_Xs.py
running install_scripts
changing mode of /usr/bin/pyrit to 755
running install_egg_info
Removing /usr/lib/python2.5/site-packages/Pyrit-0.2.5.egg-info
Writing /usr/lib/python2.5/site-packages/Pyrit-0.2.5.egg-info
jacob@lappy:~/svn/pyrit_svn/pyrit$

Original issue reported on code.google.com by cha...@gmail.com on 19 Sep 2009 at 9:26

GoogleCodeExporter commented 9 years ago
Hey champ1, I found that I needed to upgrade to the latest python on cygwin, 
not sure
if that applies to backtrack as well. Running python 2.7 seems to run fine for 
me,
but by the looks of it backtrack is still using python 2.5 to compile there. If 
you
haven't already try upgrading and rebooting. Otherwise just look around on the 
net
for some ideas why python 2.5 is still compiling, sorry I'm still a bit of a 
noob so
I can't really help much more.

Original comment by adam.k...@gmail.com on 20 Sep 2009 at 7:07

GoogleCodeExporter commented 9 years ago
will get fixed in next svn. add 'from __future__ import with_statement' to 
storage.py
for a temporary fix to python 2.5

Original comment by lukas.l...@gmail.com on 20 Sep 2009 at 8:10

GoogleCodeExporter commented 9 years ago
should be fixed in r174

Original comment by lukas.l...@gmail.com on 20 Sep 2009 at 1:59