Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django complains about __unicode__ = new_method_proxy(unicode) in Python 3.4 #254

Closed
mattiasostmar opened this issue Aug 8, 2014 · 2 comments

Comments

@mattiasostmar
Copy link

I've started porting neo4django to Python 3.4, but I get stuck at line 251 in functional.py in Django/utils (Note: Django itself, I run Django 1.7 RC 2). Not sure wether the problem can be fixed in neo4django or is located in Django itself. I'm on Mac OS X Mavericks.

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-8-1975d0806423> in <module>()
----> 1 from neo4django.db import models

/Users/mos/.virtualenvs/py3/lib/python3.4/site-packages/neo4django/db/__init__.py in <module>()
  1 __all__ = ['connection', 'connections','DEFAULT_DB_ALIAS']
  2 
----> 3 from django.conf import settings as _settings
  4 from django.core import exceptions
  5 from neo4jrestclient import client as _client

/Users/mos/.virtualenvs/py3/lib/python3.4/site-packages/django/conf/__init__.py in <module>()
 13 
 14 from django.conf import global_settings
---> 15 from django.utils.functional import LazyObject, empty
 16 from django.utils import importlib
 17 

/Users/mos/.virtualenvs/py3/lib/python3.4/site-packages/django/utils/functional.py in <module>()
226 
227 
--> 228 class SimpleLazyObject(LazyObject):
229     """
230     A lazy object initialised from any function.

/Users/mos/.virtualenvs/py3/lib/python3.4/site-packages/django/utils/functional.py in SimpleLazyObject()
249 
250     __str__ = new_method_proxy(str)
--> 251     __unicode__ = new_method_proxy(unicode)
252 
253     def __deepcopy__(self, memo):

NameError: name 'unicode' is not defined
@mattiasostmar mattiasostmar changed the title Port __unicode__ = new_method_proxy(unicode) to Python 3.4 Django complains about __unicode__ = new_method_proxy(unicode) in Python 3.4 Aug 8, 2014
@mhluongo
Copy link
Member

@mattiasostmar the fact that it came from importing settings makes me think the problem is with Django. I believe in Py3k there isn't a unicode function, since it's subsumed by str?

@mhluongo
Copy link
Member

Closing this in favor of #260.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants