Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#813 closed defect (fixed)

Move MediaGoblin to Python 3

Reported by: Christopher Allan Webber Owned by:
Priority: major Milestone: 0.8.0
Component: programming Keywords:
Cc: Elrond, joar, berkerpeksag Parent Tickets:

Description

It should be more or less possible to move MediaGoblin to Python 3, which of course means that we should! This bug exists to track the efforts to do so.

Change History (8)

comment:1 by Christopher Allan Webber, 10 years ago

So, current evaluation of dependencies:

| Library            | py3? | notes                               |
|--------------------+------+-------------------------------------|
| setuptools         | X    | Distribute                          |
| PasteScript        |      | not *technically* necessary         |
| wtforms            | X    |                                     |
| py-bcrypt          | X    |                                     |
| pytest>=2.3.1      | X    |                                     |
| pytest-xdist       | ??   |                                     |
| werkzeug>=0.7      | X    |                                     |
| celery>=3.0        | X    |                                     |
| kombu              | X    |                                     |
| jinja2             | X    |                                     |
| sphinx             | X    |                                     |
| Babel<1.0          | X    |                                     |
| argparse           | X    |                                     |
| webtest<2          | X    |                                     |
| ConfigObj          |      | unofficial port exists from 2010... |
| Markdown           | X    |                                     |
| sqlalchemy>=0.8.0  | X    |                                     |
| sqlalchemy-migrate |      | unmaintained anyhow :\              |
| mock               | X    |                                     |
| itsdangerous       | X    |                                     |
| pytz               | X    |                                     |
| six                | X    |                                     |
| oauthlib==0.5.0    | X    |                                     |

Most of these are converted to Python 3. Of the ones that aren't:

  • We technically don't need PasteScript and don't use it for anything other than the entry point to use PasteDeploy with an http server. That's easily replaced, and maybe this should be a gmg command anyway.
  • ConfigObj has an unofficial port but it's not "officially blessed". We could package this and put it on PyPi on our own if we need to, but someone should contact the author(s) about that. (does anyone volunteer?)
  • The biggest headache will be sqlalchemy-migrate. However, sqlalchemy-migrate is unmaintained anyhow, so we should probably move to Alembic. The biggest question with Alembic is whether or not it will support sqlite? (Could someone research this?)

The best way to start this project would be to probably do, in order:

  • Start porting MediaGoblin's code to python 3 generally. Ignore migrations, just support MediaGoblin "starting with the latest database schema", or even easier, set up your database on the python 2 branch before you git checkout the python 3 branch. ;)
  • As for getting an entry point to PasteDeploy, I can help with that.
  • Sort out what to do about packaging ConfigObj for python 3
  • Finally, look at the future of migrations. (That should be its own bug probably?)

comment:2 by Christopher Allan Webber, 10 years ago

exif.py python 3 port also: http://exif-py-3.sourceforge.net/

comment:3 by berkerpeksag, 10 years ago

Cc: berkerpeksag added

comment:4 by berkerpeksag, 10 years ago

Owner: set to berkerpeksag
Status: newin_progress

comment:5 by berkerpeksag, 10 years ago

Update to the original dependency list:

Other blockers

Media types

Plugins:

  • python-ldap: There is python3-ldap package on PyPI, but its API is incompatible with python-ldap.
  • python-openid: python3-openid is compatible with python-openid

comment:6 by berkerpeksag, 10 years ago

There is a single codebase port of exifread on GitHub:

Also, here's my progress so far:

3 failed, 123 passed, 4 skipped in 129.58 seconds

comment:7 by Christopher Allan Webber, 10 years ago

Owner: berkerpeksag removed
Resolution: fixed
Status: in_progressclosed

Done. We've merged this into master.

comment:8 by Christopher Allan Webber, 10 years ago

Milestone: 0.8.0

Also, super exciting! Thank you again Berker! :)

Note: See TracTickets for help on using tickets.