<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mediagoblin.org/index.php?action=history&amp;feed=atom&amp;title=User%3ABreton%2FGSoC2014%2FMelange</id>
	<title>User:Breton/GSoC2014/Melange - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mediagoblin.org/index.php?action=history&amp;feed=atom&amp;title=User%3ABreton%2FGSoC2014%2FMelange"/>
	<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=User:Breton/GSoC2014/Melange&amp;action=history"/>
	<updated>2026-06-07T05:11:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=User:Breton/GSoC2014/Melange&amp;diff=1515&amp;oldid=prev</id>
		<title>Breton: Created page with &quot;This application was submitted to Melange with compliance to GNU template. Pasting it here.  &lt;pre&gt; Your name     Boris Bobrov  Your email address     breton@cynicmansion.ru  T...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=User:Breton/GSoC2014/Melange&amp;diff=1515&amp;oldid=prev"/>
		<updated>2014-03-20T21:26:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This application was submitted to Melange with compliance to GNU template. Pasting it here.  &amp;lt;pre&amp;gt; Your name     Boris Bobrov  Your email address     breton@cynicmansion.ru  T...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This application was submitted to Melange with compliance to GNU template. Pasting it here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Your name&lt;br /&gt;
    Boris Bobrov&lt;br /&gt;
&lt;br /&gt;
Your email address&lt;br /&gt;
    breton@cynicmansion.ru&lt;br /&gt;
&lt;br /&gt;
The name of the project&lt;br /&gt;
    Mediagoblin: Python 3 port + switch to Alembic&lt;br /&gt;
&lt;br /&gt;
Summary&lt;br /&gt;
    Port all of MediaGoblin&amp;#039;s code to python 3: https://issues.mediagoblin.org/ticket/813&lt;br /&gt;
    Currently MediaGoblin uses sqlalchemy-migrate, but it&amp;#039;s fairly outdated and unmaintained.&lt;br /&gt;
    Port the migration infrastructure to using Alembic instead. Which is also python3-compatible.&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
    Python 3 is a new modern language that gaines popularity.&lt;br /&gt;
    Also sqlalchemy-migrate used there is old and should be changed to a new shiny Alembic&lt;br /&gt;
&lt;br /&gt;
Deliverables&lt;br /&gt;
    All code will be python3.3-compatible, it means, that there the whole codebase will work with python 2.6, 2.7, 3.3+, maybe 3.2.&lt;br /&gt;
    Minimal requirements&amp;#039; versions will be determined and the code will be ported to use them.&lt;br /&gt;
    Alembic will be switched to sqlalchemy-migrate. Alembic is a database-schema migration tool.&lt;br /&gt;
&lt;br /&gt;
Plan&lt;br /&gt;
    A rough plan:&lt;br /&gt;
        1. do something about Paste. Paste as well as pastescript is python3-incompatible.&lt;br /&gt;
            - Drop it!&lt;br /&gt;
        2. sort out versions of dependencies. Babel &amp;lt; 1.0 does not support py3. Maybe switch to newer versions of babel? Etc.&lt;br /&gt;
        3. adopt tox -- https://bitbucket.org/hpk42/tox, use it for different Python versions and interpreters.&lt;br /&gt;
        4. follow suggestion on #813: &amp;quot;Start porting MediaGoblin&amp;#039;s code to python 3 generally. Ignore migrations, just support MediaGoblin &amp;quot;starting with the latest database schema&amp;quot;, or even easier, set up your database on the python 2 branch before you git checkout the python 3 branch. ;)&amp;quot;&lt;br /&gt;
            - There is an option to use &amp;quot;six&amp;quot;. I suggest not to use it, for code cleanness. If some compatibility code will be required, it will be shipped in _compat module.&lt;br /&gt;
            - http://python3porting.com/noconv.html suggests to convert to python3 and then convert back to python2. I agree with that and will do so.&lt;br /&gt;
            - Hold up to ideas listed on http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/, like &amp;quot;Test for 2.x not 3.x&amp;quot;.&lt;br /&gt;
            - The conversion will look like this: 3.3 -&amp;gt; 2.7 -&amp;gt; 2.6 [-&amp;gt; 3.2] [-&amp;gt; 3.4?].&lt;br /&gt;
            - To minimize the number of errors need to be fixed during an iteration, the conversion will be done by a number of fixes. A fix is a line from &amp;quot;2to3 -l&amp;quot;. Every &amp;quot;fix&amp;quot; will be tested in order mentioned above, after it gives 0 errors, another one will be applied.&lt;br /&gt;
        5. Write migrations&lt;br /&gt;
            - Switch to Alembic&lt;br /&gt;
            - It still doesn&amp;#039;t support hacks around SQLite migrations.&lt;br /&gt;
            - But there is a workaround which looks small and which we could use perhaps -- https://github.com/klugjohannes/alembic-sqlite&lt;br /&gt;
        6. if time left, backport to 3.2&lt;br /&gt;
    A little script involving 2to3 shows that these types of changes are required:&lt;br /&gt;
        import, set_literal, input, idioms, print, dict, ws_comma (sorted asc).&lt;br /&gt;
    Timeline:&lt;br /&gt;
        Bonding period: getting to know architecture better, reading requirements&amp;#039; changelogs, experimenting.&lt;br /&gt;
        19 May -- 27 May: drop Paste, drop sqlalchemy-migrate, getting dependencies, fix tests&lt;br /&gt;
        28 May -- 1 June: adopting tox, making current tests pass and getting failures on python 3.&lt;br /&gt;
        2 June -- 15 June: porting&lt;br /&gt;
        15 June -- 27 June (mid-term): if everything is done, porting to python 3.2. Else finishing what remains. Or start switching to Alembic.&lt;br /&gt;
        30 June -- 20 Jule: integrating Alembic&lt;br /&gt;
        31 Jule -- 11 August: backporting old migrations to Alembic&lt;br /&gt;
&lt;br /&gt;
Communication&lt;br /&gt;
    We are going to chat in email, mailing lists and IRC. My nick in IRC is breton, I already hang out in #mediagoblin on freenode.&lt;br /&gt;
    I use git, mediagoblin is stored in git, we shall work using it.&lt;br /&gt;
&lt;br /&gt;
Qualification&lt;br /&gt;
    Experience:&lt;br /&gt;
        3.5 years of Python&lt;br /&gt;
        3 years of Django&lt;br /&gt;
        3.5 years of C in university&lt;br /&gt;
        1.5 years of C++ in university&lt;br /&gt;
        4 years of javascript (though I don&amp;#039;t write too much in it); with jQuery and pure&lt;br /&gt;
        6 years of HTML and CSS&lt;br /&gt;
        1.5 year of Scheme and 12 months of Common Lisp&lt;br /&gt;
        basic knowledge of system administration (set up nginx, uwsgi etc, familiar with cron, shell scripting)&lt;br /&gt;
        a couple of FreeBSD kernel modules&lt;br /&gt;
    I use&lt;br /&gt;
        Debian as main OS&lt;br /&gt;
        git (mercurial where required)&lt;br /&gt;
        vim&lt;br /&gt;
    I liked the project because it&amp;#039;s:&lt;br /&gt;
        1. MediaGoblin. I like it&amp;#039;s idea and what people do there;&lt;br /&gt;
        2. Python;&lt;br /&gt;
        3. Python 3. I don&amp;#039;t have too much experience in Python 3, and I want to a) learn it better and b) learn how to port to it.&lt;br /&gt;
    You can find my github repo here: https://github.com/bretonium/&lt;br /&gt;
    I don&amp;#039;t know some of the tools used there, such as Paste. I don&amp;#039;t think it&amp;#039;s a problem, because one of the subtasks is to drop it.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Breton</name></author>
	</entry>
</feed>