3980 Commits

Author SHA1 Message Date
Christopher Allan Webber
3c06c3efaf Upgrading gunicorn. Referenced issue is resolved.
Also, upgrading seems to fix weird
"RuntimeError: dictionary changed size during iteration" issues
I was seeing.  (Looked like a gunicorn issue, not ours.)
2014-09-15 11:46:56 -05:00
Christopher Allan Webber
0c32c7fe83 py2.7 compatibility with open(..., encoding="utf-8"), use io.open
This commit sponsored by Peter Baumgarten.  Thank you!
2014-09-12 12:30:09 -05:00
Christopher Allan Webber
9156ab68d0 Explicitly open READMEFILE as utf-8 2014-09-12 10:42:23 -05:00
Christopher Allan Webber
99c466045a Fix unicode error in pdf media type
(we're checking against bytestrings, so make that explicit)
2014-09-12 09:30:46 -05:00
Christopher Allan Webber
b6df960806 Set up tox.ini to run more properly:
- Don't run dbupdate... the tests themselves do this, and we might
   mess up someone's db
 - We shouldn't run setup.py develop because that installs a new
   *live* db... the tests do isolation, so...
 - Install the package's dependencies by the package itself... it
   seems that removing "skipsdist = True" fixes this
 - Run py.test manually rather than use runtests.sh (which itself uses
   ./bin/py.test if it can)
2014-09-12 09:26:01 -05:00
Berker Peksag
39a9035487 Implement ServeCommand.{loadserver, loadapp}.
This is partly port from PasteScript.
2014-08-15 23:07:35 +03:00
Berker Peksag
051c728c6e Add an initial "gmg serve" implementation.
The CLI is similar to "paster serve".
2014-08-15 23:02:22 +03:00
Berker Peksag
f3c1b6ff6d Restore different server options. 2014-08-15 22:35:22 +03:00
Berker Peksag
3dbdb061ea Improve mediagoblin._compat.py2_unicode.
- Encode obj.__repr__() to bytestring if its type is unicode in Python 2.
- Add internal encode_to_utf8() decorator.
- Do not raise an exception if a class does not have an __str__() method,
  just warn.
2014-08-15 18:57:48 +03:00
Berker Peksag
2064ad9450 Move the AlembicMigrationManager to top of the module.
Also, add a simple docstring.
2014-08-15 15:40:35 +03:00
Berker Peksag
de51eca53f Provide a better manager API for Alembic. 2014-08-15 15:39:45 +03:00
Berker Peksag
65f20ca435 Add initial Alembic migrations. 2014-08-13 19:30:23 +03:00
Berker Peksag
7df0793441 Fix dict.keys() in Python 3. 2014-08-13 19:27:49 +03:00
Berker Peksag
4930c2adbd Fix a comment. 2014-08-13 19:27:23 +03:00
Berker Peksag
aaa12d637e Update TODOs in setup.py. 2014-08-07 13:12:38 +03:00
Berker Peksag
cda3055bd6 Fix another tests.
(forgot to commit earlier)
2014-08-07 13:08:42 +03:00
Berker Peksag
a7e1d8829f mbox_message.get_payload() returns bytestring. 2014-08-04 22:08:23 +03:00
Berker Peksag
6fa9782415 Make sort_keys True to avoid hash randomize feature in Python 3. 2014-08-04 22:06:40 +03:00
Berker Peksag
20238f54a6 Use isinstance and six.text_type to check types of an object. 2014-07-28 15:26:13 +03:00
Berker Peksag
7ec6994453 Fix urlparse import. 2014-07-28 15:25:20 +03:00
Berker Peksag
15c3461b1f Disable cache support of LazyProxy.
Since Babel 1.0, there's a enable_cache keyword argument of LazyProxy,
but we can't pass it directly.
2014-07-28 15:24:49 +03:00
Berker Peksag
874439bd80 Update .gitignore. 2014-07-28 13:29:26 +03:00
Berker Peksag
cf3b5926f4 Cleanup mediagoblin._compat and fix translation tests. 2014-07-28 13:27:19 +03:00
Berker Peksag
173099ad2b Update dependency list. 2014-07-28 13:24:17 +03:00
Berker Peksag
88ed537a9e Skip test_sql_migrations on Python 3 for now. 2014-07-28 13:22:42 +03:00
Berker Peksag
fe6f82be23 Remove an usage of deprecated cgi.parse_qs(). 2014-07-28 12:54:59 +03:00
Berker Peksag
98d8b365af func_name removed in Python 3. 2014-07-28 10:35:14 +03:00
Berker Peksag
88a5739d36 Remove paste.server dependency from tests. 2014-07-18 12:39:13 +03:00
Berker Peksag
c9cbc7e8a7 Add tox.ini. 2014-07-18 11:05:11 +03:00
Berker Peksag
9459fa3ced Fix tests on Python 3. 2014-07-14 05:49:38 +03:00
Berker Peksag
19baab1b03 Remove Paste#http, Paste#urlmap and Paste#static dependencies.
Changes:

* Paste#http -> Gunicorn
* Paste#urlmap and Paste#static -> werkzeug.wsgi.SharedDataMiddleware
2014-06-29 04:23:50 +03:00
Berker Peksag
f9d93c0e9a Fix print statements. 2014-06-29 04:13:23 +03:00
Berker Peksag
e2cb0f86fe Remove sqlalchemy-migrate imports from the codebase. Do not touch tests yet. 2014-06-27 03:17:12 +03:00
Berker Peksag
e6aab20dc7 Use new-style class. 2014-06-25 21:10:37 +03:00
Berker Peksag
ef3badb3b4 Use new-style classes. The old-style classes are deprecated in Python 3. 2014-06-08 08:20:17 +03:00
Berker Peksag
bda76c420d Use six.iteritems() in tools/exif.py. 2014-06-08 08:19:32 +03:00
Berker Peksag
03d4be0e39 Fix an usage of file(). 2014-06-08 08:19:04 +03:00
Berker Peksag
f1d9a62a4b Update a comment. 2014-06-07 14:00:27 +03:00
Berker Peksag
d9aced73f1 The file() builtin has been removed in Python 3. Use open() instead. 2014-06-07 13:51:42 +03:00
Berker Peksag
120fa4ae95 Change urllib and urllib import with six.moves.urllib. 2014-06-07 13:49:39 +03:00
Berker Peksag
dce76c3ee7 Sync py2_unicode decorator with Django. 2014-06-03 01:41:44 +03:00
Berker Peksag
f9a7201c32 Use mediagoblin._compat.{ugettext, ungettext} on Python 3. 2014-06-02 22:25:27 +03:00
Berker Peksag
5a239cb7b8 Use six.moves.zip instead of itertools.izip. 2014-06-02 21:03:56 +03:00
Berker Peksag
0b2572b9a8 Add py2_unicode helper to mediagoblin._compat. 2014-06-02 21:01:48 +03:00
Berker Peksag
e49b7e02b2 Use six.text_type instead of unicode().
I will be switch to use ``from __future__ import unicode_literals`` later.
2014-06-02 20:59:28 +03:00
Berker Peksag
a80c74bbcc Add ugettext and ungettext helpers to mediagoblin._compat. 2014-05-26 19:53:10 +03:00
Berker Peksag
fd19da346b Use six.moves.urllib.parse instead of the urlparse module. 2014-05-26 19:52:18 +03:00
Berker Peksag
386c9c7c55 Use six.iteritems() instead of dict.iteritems(). 2014-05-26 19:50:38 +03:00
Berker Peksag
7f342c72f6 Continue to port GMG codebase. 2014-05-08 20:33:14 +03:00
Berker Peksag
74e77c3688 Add mediagoblin._compat module. 2014-05-08 20:33:14 +03:00