nknganda / django-mailer

Automatically exported from code.google.com/p/django-mailer
MIT License
0 stars 0 forks source link

with syntax error #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When trying to run the send_loop from the README, a syntax error is thrown.
 I am using the code from SVN at revision 25.

python manage.py shell

Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) 
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from mailer.engine import send_loop 
/Users/jstockdi/Applications/django-mailer/mailerdev/mailer/lockfile.py:674: 
Warning:
'with' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File
"/Users/jstockdi/Applications/django-mailer/mailerdev/mailer/engine.py",
line 2, in <module>
    from lockfile import FileLock
  File
"/Users/jstockdi/Applications/django-mailer/mailerdev/mailer/lockfile.py",
line 674
    with lock:
            ^
SyntaxError: invalid syntax

Original issue reported on code.google.com by jon.stoc...@gmail.com on 28 Jul 2008 at 1:46

GoogleCodeExporter commented 8 years ago
I can't seem to replicate this. with was added in Python 2.5. I am running 
2.5.1. Wonder what exactly is going on 
here since your Python version indicates 2.5. Hrm.

Original comment by bros...@gmail.com on 28 Jul 2008 at 4:39

GoogleCodeExporter commented 8 years ago
I upgraded to 2.5.2 and all is well.

Original comment by jon.stoc...@gmail.com on 28 Jul 2008 at 5:21

GoogleCodeExporter commented 8 years ago
I am still not sure what exactly the problem is here. I suspect maybe that you 
were indeed using the wrong 
Python binary pre-2.5. PEP 343 indicates Python 2.5 does indeed have this 
support. http://www.python.org/dev/peps/pep-0343/.

Glad to see you fixed it, but based on the info here it seems odd why it just 
starting working ;)

Marking invalid.

Original comment by bros...@gmail.com on 5 Aug 2008 at 5:00