Drop 2to3 mechanism

Takayuki Shimizukawa avatarTakayuki Shimizukawa created an issue

There is some way to complete to drop 2to3.

(see also #1220 discussion)

Comments (11)

  1. Takayuki Shimizukawa

    The python-future does not support Python-3.2 because py32 does not support unicode literal. They said Adding support for Python 3.2 to future would likely impose a penalty with performance and/or maintainability,.. (see also python-future FAQ).

    I think we need to decide whether drop Python-3.2 or not. If we decided to drop py32, we may not need to be dependent on six/future.

  2. Georg Brandl

    For that it would be nice to know what python-future offers on top of six, and if it's worth using it. If yes, I'm not opposed to requiring Python 3.3.

  3. Georg Brandl

    I've just finished porting Pygments to single-source, and I have two observations:

    • python-future's conversion tool is nice, but otherwise I prefer six: less magic. future even reimplements the "int" type which is definitely too much compatibility.

    • The u"" literal from Python 3.3+ is not definitely needed; modules with many literals can use from __future__ import unicode_literals while others can use a u() wrapper. For Pygments, I did not use unicode_literals since it pretty much changes all lexers. Therefore I require 3.3+ there.

  4. Dmitry Shachnev

    I have just created pull request #208 for the first part of refactoring. Please review it carefully, I may have missed some bugs.

    I have a question about tests/etree13. Is it still needed? Can we use xml.etree.ElementTree instead (which is available in Python 2.5+)?

  5. Dmitry Shachnev

    Re etree13, the tests work with Python 2 but not Python 3, I get lots of failures like this one:

    FAIL: test_build_html.test_html(<xml.etree.ElementTree.ElementTree object at 0xb5f2f3ec>, 'subdir/includes.html', ".//a[@href='../_downloads/img.png']", '')
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
      File "/home/dmitry/sphinx-hg/sphinx/build/lib/tests/test_build_html.py", line 302, in check_xpath
        '%r in file %s' % (path, fname))
    AssertionError: did not find any node matching xpath ".//a[@href='../_downloads/img.png']" in file subdir/includes.html
  6. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.