Closed ediskandarov closed 9 years ago
Hi @beachmachine,
Django start work better on jython 2.7 beta4, which released in february. (even without patches from django-python project)
My test case:
FYI tl&dr
on jython 2.7 b3 errors were like that
mbp:Django-1.7.5 home$ ~/sandbox/jython2.7b3/bin/django-admin.py startproject test_jython2
Traceback (most recent call last):
File "/Users/home/sandbox/jython2.7b3/bin/django-admin.py", line 5, in <module>
pkg_resources.run_script('Django==1.7.5', 'django-admin.py')
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 489, in run_script
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1207, in run_script
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/EGG-INFO/scripts/django-admin.py", line 2, in <module>
from django.core import management
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/core/management/__init__.py", line 8, in <module>
from django.apps import apps
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/apps/__init__.py", line 1, in <module>
from .config import AppConfig # NOQA
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/apps/config.py", line 4, in <module>
from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/core/exceptions.py", line 8, in <module>
from django.utils.encoding import force_text
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/utils/encoding.py", line 10, in <module>
from django.utils.six.moves.urllib.parse import quote
ImportError: No module named url lib
mbp:test_jython home$ ~/sandbox/jython2.7b3/bin/jython manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/core/management/__init__.py", line 8, in <module>
from django.apps import apps
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/apps/__init__.py", line 1, in <module>
from .config import AppConfig # NOQA
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/apps/config.py", line 4, in <module>
from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/core/exceptions.py", line 8, in <module>
from django.utils.encoding import force_text
File "/Users/home/sandbox/jython2.7b3/Lib/site-packages/Django-1.7.5-py2.7.egg/django/utils/encoding.py", line 10, in <module>
from django.utils.six.moves.urllib.parse import quote
ImportError: No module named url lib
Also it seems that in commit 422d6586cfd239c4fe544cc1b3625085c7f35cea you revert pull request.
I am not sure how it happened that I reverted your commit, but now I reapplied at. So everything should be in place again.
Jython 2.7b4 fixes a lot of bugs of earlier Jython versions. The problem you are describing with Jython 2.7b3 is a bug I could not find a workaround for - I'm not even sure if it's possible to workaround that one. So I guess the most sensible thing to do is to just not support 2.7b3.
However the main purpose of django-jython is not it's workarounds for Jython bugs (I'm hoping to remove all monkey patches as soon as the final Jython 2.7 version is released), but it's database backends. The regular database backends of Django will not work, and they never will. django-jython is reimplementing these backends so they make use of JDBC.
Great. Thanks for explanation.
This week I will try to fix mysql backend.
I've added a monkeypatch fixing the missing tojava methods on datetime objects on Jython 2.7b4. Could you please retry with Jython 2.7b4 and Django>1.71 using the latest revision of django-jython. This combination should work now.