scholrly / neo4django

Drop-in Neo4j/Django integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 3.x Comptability

scaryclam opened this issue · comments

I can't currently use this library as it is not up to date for python 3. Is there any interest in getting the library cleaned up for python 3?

+1

I get the feeling this has been abandoned.

I'd be happy to review and merge a PR, but we need someone with time to actively maintain the project going forward.

@shayneoneill not completely :) I'm not going to be able to take on maintaining the project myself (I have a day job that takes up the vast majority of my coding time), but if I can I'll have a look about doing a few small PRs. Is there any resistance to looking at the latest versions of Django/neo4j as well?

Not at all, but I'll caution you that the migration to Neo4j 2.0+ was a big blocker for my work here- I'd start with Python 3 (easiest), then Django 1.8+ (more difficult due to changing framework internals). Django 1.8 includes a number of query-builder improvements that will make the switch to Neo4j 2.0+ much easier.

Thanks for the heads up. I'll take a look and see if I can get the test suite running

@scaryclam I could perhaps help you out getting this up to Python 3 and Django 1.10.

@scaryclam I am also interested in integrating neo4django to be compatible with Python3 and Django 1.10.
Is there any way to participate you?

@mhluongo Do you have any interest in driving the project? If so, you could add a "project," which is GitHub's Trello clone. Then we could start divvying up the work.

I do- happy to advise, review PRs, etc. Started a simple board https://github.com/scholrly/neo4django/projects/1

Python 3 should be fairly easy. Upgrading to the latest Django (do we target 1.10 or 1.8+) will be a bit more difficult, but it'll make maintaining the library far simpler in the future, as newer versions of Django have much cleaner ORM internals.

Is there any progress with your work to get this running with the latest versions of python and django? There doesn't seem to be a working django OGM (which I find very surprising) and this project seems to be one of the better options.

Maybe I can help developping but there doesn't seem to be a lot of progress last months.

Hi

Any chance this can work now on python3. I am trapped between errors on both requirements:

$ python3 -m pip install -U neo4django
Processing /home/mhelal/.cache/pip/wheels/27/42/17/5569fad4a9f775f9e13ea9cbcbd6c445ee0c9f13532ed61076/neo4django-0.1.8-py3-none-any.whl
Processing /home/mhelal/.cache/pip/wheels/75/51/bd/7c0211666dd7a0a12b61e02cfddefb9b1488a8e9a5e9550561/neo4jrestclient-2.1.1-py2.py3-none-any.whl
Processing /home/mhelal/.cache/pip/wheels/7f/17/f6/f0c5ae66da6a47cdcc9064631a682710d5aa512a1cfe56f00c/lucene_querybuilder-0.2-py3-none-any.whl
Collecting Django<1.5,>=1.3
Using cached Django-1.4.22.tar.gz (7.8 MB)
Collecting decorator>=3.3.1
Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting python-dateutil>=2.0
Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting requests>=2.1.0
Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting six>=1.5
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting chardet<4,>=3.0.2
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Using cached urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
Collecting idna<3,>=2.5
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: Django
Building wheel for Django (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/mhelal/quran.helalsoftware.net/q_venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-872yt1xo/django/setup.py'"'"'; file='"'"'/tmp/pip-install-872yt1xo/django/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-6zeje0h6
cwd: /tmp/pip-install-872yt1xo/django/
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-872yt1xo/django/setup.py", line 69, in
raise RuntimeError('Django 1.4 does not support wheel. This error is safe to ignore.')
RuntimeError: Django 1.4 does not support wheel. This error is safe to ignore.

ERROR: Failed building wheel for Django
Running setup.py clean for Django
Failed to build Django
DEPRECATION: Could not build wheels for Django which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at pypa/pip#8368.
Installing collected packages: chardet, certifi, urllib3, idna, requests, neo4jrestclient, lucene-querybuilder, Django, decorator, six, python-dateutil, neo4django
Running setup.py install for Django ... done
Successfully installed Django-1.4.22 certifi-2020.6.20 chardet-3.0.4 decorator-4.4.2 idna-2.10 lucene-querybuilder-0.2 neo4django-0.1.8 neo4jrestclient-2.1.1 python-dateutil-2.8.1 requests-2.24.0 six-1.15.0 urllib3-1.25.10

It seems it fetched the required Django version, 1.4 and the error is safe to ignore, but when I start a project in Django it gives the error:

Traceback (most recent call last):
File "venv/bin/django-admin.py", line 2, in
from django.core import management
File "......venv/lib/python3.8/site-packages/django/core/management/init.py", line 54
except ImportError,e:

which is only solved when I upgrade Django to the latest version:

python3 -m pip install -U Django
Collecting Django
Using cached Django-3.1.1-py3-none-any.whl (7.8 MB)
Collecting asgiref~=3.2.10
Using cached asgiref-3.2.10-py3-none-any.whl (19 kB)
Collecting sqlparse>=0.2.2
Using cached sqlparse-0.3.1-py2.py3-none-any.whl (40 kB)
Collecting pytz
Using cached pytz-2020.1-py2.py3-none-any.whl (510 kB)
Installing collected packages: asgiref, sqlparse, pytz, Django
Attempting uninstall: Django
Found existing installation: Django 1.4.22
Uninstalling Django-1.4.22:
Successfully uninstalled Django-1.4.22
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

neo4django 0.1.8 requires Django<1.5,>=1.3, but you'll have django 3.1.1 which is incompatible.
Successfully installed Django-3.1.1 asgiref-3.2.10 pytz-2020.1 sqlparse-0.3.1

then the models created with neo4j will give the following error:

File "...../venv/lib/python3.8/site-packages/neo4django/db/init.py", line 75
print "after %0.3f seconds..." % time_diff_between_calls
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("after %0.3f seconds..." % time_diff_between_calls)?

Any chance I can still have a Django model running on neo4j database?

thank you in advance

Manal

Hi guys,
After referring the docs, i just planning to use neo4j and this package but after coming here i checked that there are no recent development

  • Should i use this plugin for my projects?
  • Is No, there are any alternatives?