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

Does not work in python3 #3

Open
guziy opened this issue Jun 5, 2015 · 5 comments
Open

Does not work in python3 #3

guziy opened this issue Jun 5, 2015 · 5 comments

Comments

@guziy
Copy link

guziy commented Jun 5, 2015

when trying to execute the following

./manage.py migrate slideshow

I get the error messages below:

File "/Users/huziy/virtualenvs/django-cms-test/lib/python3.4/site-packages/cms/admin/__init__.py", line 11, in <module>
    plugin_pool.plugin_pool.discover_plugins()
  File "/Users/huziy/virtualenvs/django-cms-test/lib/python3.4/site-packages/cms/plugin_pool.py", line 34, in discover_plugins
    load('cms_plugins')
  File "/Users/huziy/virtualenvs/django-cms-test/lib/python3.4/site-packages/cms/utils/django_load.py", line 57, in load
    get_module(app, modname, verbose, failfast)
  File "/Users/huziy/virtualenvs/django-cms-test/lib/python3.4/site-packages/cms/utils/django_load.py", line 41, in get_module
    module = import_module(module_name)
  File "/Users/huziy/virtualenvs/django-cms-test/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/Users/huziy/virtualenvs/django-cms-test/lib/python3.4/site-packages/slideshow/cms_plugins.py", line 4, in <module>
    from adminsortable.admin import SortableAdmin
  File "/Users/huziy/virtualenvs/django-cms-test/lib/python3.4/site-packages/adminsortable/admin.py", line 114
    except IndexError, ValueError:
                     ^
SyntaxError: invalid syntax
@guziy
Copy link
Author

guziy commented Jun 5, 2015

A OK, I see that it is not supposed to ))

@guziy guziy closed this as completed Jun 5, 2015
@driesdesmet
Copy link
Contributor

Well, a python3 version wouldn't hurt of course. I'm too busy right now to do anything about it, but if you want, don't hesitate to file a Pull Request.

@guziy
Copy link
Author

guziy commented Jun 8, 2015

Actually the problem is in the 2 packages slideshow depends on:

  • adminsortable
Running django-admin-sortable-1.6.7/setup.py -q bdist_egg --dist-dir /var/folders/2w/9n_4bv2x2cx2mq1z8ds10kkw0000gn/T/easy_install-raozn_1d/django-admin-sortable-1.6.7/egg-dist-tmp-ve76vm95
no previously-included directories found matching 'sample_project'
  File "build/bdist.macosx-10.10-x86_64/egg/adminsortable/admin.py", line 114
    except IndexError, ValueError:
                     ^
SyntaxError: invalid syntax

  File "/Users/san/Python/virtualenvs/djangocms-dev/lib/python3.4/site-packages/django_admin_sortable-1.6.7-py3.4.egg/adminsortable/admin.py", line 114
    except IndexError, ValueError:
                     ^
SyntaxError: invalid syntax
  • easy_thumbnails
  no previously-included directories found matching 'docs/_build'
  File "build/bdist.macosx-10.10-x86_64/egg/easy_thumbnails/management/commands/thumbnail_cleanup.py", line 33
    print "Something went wrong when checking existance of %s:" % path
                                                              ^
 SyntaxError: Missing parentheses in call to 'print'

I get these exceptions when after doing pip install djangocms-slideshow (when it tries to satisfy dependencies). What is interesting is that even with those errors pip list shows those packages as installed...

And I also did not find any code in the slideshow plugin that would not work in python3.

I'll try look at the 2 plugins and test the slideshow in python3, when I can find some time...

Cheers

@guziy
Copy link
Author

guziy commented Jun 8, 2015

I have just found out a cool way to see if python3 could be used (though it does not detect the problem with easy_thumbnails):

$ python setup.py caniusepython3
running caniusepython3
Finding and checking dependencies ...
[WARNING] Stale overrides: {'djangocms-admin-style', 'unicodecsv', 'bcdoc'}

You need 1 project to transition to Python 3.
Of that 1 project, 1 has no direct dependencies blocking its transition:

  django-admin-sortable

@driesdesmet
Copy link
Contributor

Interesting, I did not know about the caniusepython3 tool. I'll re-open the issue as a reminder.

@driesdesmet driesdesmet reopened this Jun 8, 2015
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