I am running Django 0.95 . And so far I can't see any problems.
Best regards,
Oliver
--
Oliver Andrich <oliver....@gmail.com> --- http://roughbook.de/
Python 2.5 doesn't break or remove anything, it just adds some new
features. So it should work just fine. Backwards compatibility of
Python releases should be maintained up until Python 3.0, at which
point everything gets thrown out the window :)
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
Has anyone in the django dev team considered answering the call for
projects [1] at http://pybots.org?
[1] http://agiletesting.blogspot.com/2006/09/any-projects-that-need-pybots.html
That's not strictly true. There is a list of porting considerations here:
http://docs.python.org/dev/whatsnew/section-other.html
Nothing major this time around, but the C API changes may be an issue for some
of the database driver dependencies.
There are a few deprecated modules that have been removed as well, but that's
unlikely to affect Django.
John
How'd you do it?
I'm on Windows XP. I installed Python 2.5 from python.org without a
problem.
But then I found that pysqlite Windows binaries for Python 2.5 don't
exist, and neither does setuptools. Trying to install Django 0.95 on
top of Python 2.5 gives me this:
----------------
C:\Documents and Settings\John\Desktop\Django-0.95>setup.py install
---------------------------------------------------------------------------
This script requires setuptools version 0.6c1 to run (even to display
help). I will attempt to download it for you (from
http://cheeseshop.python.org/packages/2.5/s/setuptools/), but
you may need to enable firewall access for this script first.
I will start the download in 15 seconds.
(Note: if this machine does not have network access, please obtain the file
http://cheeseshop.python.org/packages/2.5/s/setuptools/setuptools-0.6c1-py2.5.egg
and place it in this directory before rerunning this script.)
---------------------------------------------------------------------------
Downloading
http://cheeseshop.python.org/packages/2.5/s/setuptools/setuptools-0.6c1-py2.5.egg
Traceback (most recent call last):
File "C:\Documents and Settings\John\Desktop\Django-0.95\setup.py",
line 2, in <module>
ez_setup.use_setuptools()
File "C:\Documents and
Settings\John\Desktop\Django-0.95\ez_setup.py", line 72, in use_setuptools
egg = download_setuptools(version, download_base, to_dir,
download_delay)
File "C:\Documents and
Settings\John\Desktop\Django-0.95\ez_setup.py", line 126, in download_setup
tools
src = urllib2.urlopen(url)
File "C:\Python25\lib\urllib2.py", line 121, in urlopen
return _opener.open(url, data)
File "C:\Python25\lib\urllib2.py", line 380, in open
response = meth(req, response)
File "C:\Python25\lib\urllib2.py", line 491, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python25\lib\urllib2.py", line 418, in error
return self._call_chain(*args)
File "C:\Python25\lib\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\lib\urllib2.py", line 499, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
-----------------
I poked around in http://cheeseshop.python.org/packages/2.5/, and an
.egg file was nowhere to be found.
I could build pysqlite from the sources, but the setuptools problem is a
little more daunting.
John
setuptools 0.6x does not work with python 2.5
try developement version of setuptools from python svn sandbox
http://svn.python.org/projects/sandbox/trunk/setuptools/
Vladimir
On 9/20/06, John DeRosa <stu...@qwest.net> wrote:
> How'd you do it?
>
> I'm on Windows XP. I installed Python 2.5 from python.org without a
> problem.
>
> But then I found that pysqlite Windows binaries for Python 2.5 don't
> exist, and neither does setuptools. Trying to install Django 0.95 on
> top of Python 2.5 gives me this:
I am running Django and Python on Mac OS X, but the situation was
almost identical. I downloaded the ZIP Version of setuptools from
cheeseshop.python.org and did a "python setup.py install". The same
for MySQLdb.
Afterwards the install of Django worked fine and without errors.
And for pysqlite, I think you can just stick to Python 2.5. It
includes the relevant library. May be a small patch to the Django
sqlite backend is required, but this is something I have to check
later.
Hope that helps.
I downloaded the 0.6c2 ZIP File and installed it. No hint, that it is
not working. Can you elaborate a little bit on this?
Thanks Oliver. I did as you suggest with setuptools, and it installed
properly, and I then installed Django. Super!
But I do seem to need pysqlite. Even though the 2.5 documentation says
that pysqlite has been added as "sqlite3", I get this when I try to
start up Django 0.95:
---------------
Traceback (most recent call last):
File "C:\Documents and Settings\John\My
Documents\tm\SVN\trunk\src\webcode\initial_data_load.py", line 3, in
<module>
from webcode.edmonds.models import IS_Category
File "C:\Documents and Settings\John\My
Documents\tm\SVN\trunk\src\webcode\edmonds\models.py", line 1, in <module>
from django.db import models
File
"c:\python25\lib\site-packages\Django-0.95-py2.5.egg\django\db\__init__.py",
line 11, in <module>
backend = __import__('django.db.backends.%s.base' %
settings.DATABASE_ENGINE, '', '', [''])
File
"c:\python25\lib\site-packages\Django-0.95-py2.5.egg\django\db\backends\sqlite3\base.py",
line 10, in <module>
raise ImproperlyConfigured, "Error loading pysqlite2 module: %s" % e
django.core.exceptions.ImproperlyConfigured: Error loading pysqlite2
module: No module named pysqlite2
---------------------
The code in db\backends\sqlite3\base.py does this:
--------
try:
from pysqlite2 import dbapi2 as Database
except ImportError, e:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "Error loading pysqlite2 module: %s" % e
--------
It seems a little screwy for a file in a directory called "sqlite3" to
do an import from "pysqlite2". But that's what it does.
Something's confused here with pysqlite, pysqlite2, pysqlite3... I've
about reached my time limit on this experiment, so I'm going to revert
to Python 2.4. :-(
Thanks again.
John
> The code in db\backends\sqlite3\base.py does this:
>
> --------
> try:
> from pysqlite2 import dbapi2 as Database
> except ImportError, e:
> from django.core.exceptions import ImproperlyConfigured
> raise ImproperlyConfigured, "Error loading pysqlite2 module: %s" % e
> --------
>
> It seems a little screwy for a file in a directory called "sqlite3" to
> do an import from "pysqlite2". But that's what it does.
>
> Something's confused here with pysqlite, pysqlite2, pysqlite3... I've
> about reached my time limit on this experiment, so I'm going to revert
> to Python 2.4. :-(
pysqlite2 has been renamed to sqlite3 in Python 2.5, which is in my
eyes the clearer naming convention. Your problem can be easily fixed,
if you would like to do it.
- I checked out the SVN Version of Django, as I wanted to switch
anyway. For this Version there is a patch available.
- And for the Django 0.95 release, I personally would go as far as
patching it for my own needs. Just change the line
from pysqlite2 import dbapi2 as Database
to
from sqlite3 import dbapi2 as Database
For your own development environment this is more then okay in my
eyes. And I would even deploy with this small change. But this is
personal taste. :)
Probably the best thing for us to do in trunk is what we already do
with threading: try to import the standard module, and if that fails
catch the exception and import the standalone version. So something
like
try:
from sqlite3 import dbapi2 as Database
except ImportError:
from pysqlite2 import dbapi2 as Database
--
On 9/20/06, Oliver Andrich <oliver....@gmail.com> wrote:
> For your own development environment this is more then okay in my
> eyes. And I would even deploy with this small change. But this is
> personal taste. :)
Probably the best thing for us to do in trunk is what we already do
with threading: try to import the standard module, and if that fails
catch the exception and import the standalone version. So something
like
try:
from sqlite3 import dbapi2 as Database
except ImportError:
from pysqlite2 import dbapi2 as Database
It seems that they made 0.6 for python 2.5 and uploaded it to
the cheeseshop just after my "research" :)
regards,
Vladimir
pysqlite2 comes bundled with python 2.5.
John
What you need to realize is that "sqlite" refers to the database,
while "pysqlite" are the python bindings to that database. SQLite is
currently up to version 3.x. The python bindings required to use
SQLite3 are up to version 2.x - thus "pysqlite2".
It would seem that in Python2.5 they tried to avoid this confusion by
naming the python bindings the same as the version of SQLite they are
a wrapper for. While this certainly makes sense, it is not backward
compatable as any existing projects would be importing from pysqlite2
as you found out. It looks this this is being addressed in ticket 2772
[1]. For more info on the new sqlite3 wrapper, see [2].
[1]: http://code.djangoproject.com/ticket/2772
[2]: http://docs.python.org/dev/whatsnew/modules.html#SECTION0001440000000000000000
--
----
Waylan Limberg
way...@gmail.com