| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,7 +42,7 @@ Features | |||
| 42 | 42 | - ``past.translation`` package supports transparent translation of Python 2 | |
| 43 | 43 | modules to Python 3 upon import. [This feature is currently in alpha.] | |
| 44 | 44 | ||
| 45 | - - 920+ unit tests, including many from the Py3.3 source tree. | ||
| 45 | + - 1000+ unit tests, including many from the Py3.3 source tree. | ||
| 46 | 46 | ||
| 47 | 47 | - ``futurize`` and ``pasteurize`` scripts based on ``2to3`` and parts of | |
| 48 | 48 | ``3to2`` and ``python-modernize``, for automatic conversion from either Py2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1373,7 +1373,7 @@ Tkinter | |||
| 1373 | 1373 | import tkinter | |
| 1374 | 1374 | import tkinter.dialog | |
| 1375 | 1375 | import tkinter.filedialog | |
| 1376 | - import tkinter.scolledtext | ||
| 1376 | + import tkinter.scrolledtext | ||
| 1377 | 1377 | import tkinter.simpledialog | |
| 1378 | 1378 | import tkinter.tix | |
| 1379 | 1379 | import tkinter.constants | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -123,13 +123,13 @@ How well has it been tested? | |||
| 123 | 123 | currently being used to help with porting 800,000 lines of Python 2 code in | |
| 124 | 124 | `Sage <http://sagemath.org>`_ to Python 2/3. | |
| 125 | 125 | ||
| 126 | - Currently ``python-future`` has 990+ unit tests. Many of these are straight | ||
| 126 | + Currently ``python-future`` has over 1000 unit tests. Many of these are straight | ||
| 127 | 127 | from the Python 3.3 and 3.4 test suites. | |
| 128 | 128 | ||
| 129 | 129 | In general, the ``future`` package itself is in good shape, whereas the | |
| 130 | - ``futurize`` script for automatic porting is incomplete and imperfect. | ||
| 131 | - (Chances are it will require some manual cleanup afterwards.) The ``past`` | ||
| 132 | - package also needs to be expanded. | ||
| 130 | + ``futurize`` script for automatic porting is imperfect; chances are it will | ||
| 131 | + require some manual cleanup afterwards. The ``past`` package also needs to be | ||
| 132 | + expanded. | ||
| 133 | 133 | ||
| 134 | 134 | ||
| 135 | 135 | Is the API stable? | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2950,7 +2950,7 @@ | |||
| 2950 | 2950 | "import tkinter\n", | |
| 2951 | 2951 | "import tkinter.dialog\n", | |
| 2952 | 2952 | "import tkinter.filedialog\n", | |
| 2953 | - "import tkinter.scolledtext\n", | ||
| 2953 | + "import tkinter.scrolledtext\n", | ||
| 2954 | 2954 | "import tkinter.simpledialog\n", | |
| 2955 | 2955 | "import tkinter.tix\n", | |
| 2956 | 2956 | "import tkinter.constants\n", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,10 +116,16 @@ follows:: | |||
| 116 | 116 | import test.support | |
| 117 | 117 | ||
| 118 | 118 | ||
| 119 | - The newly exposed ``urllib`` submodules are full backports of those from Py3.x. | ||
| 119 | + The newly exposed ``urllib`` submodules are backports of those from Py3.x. | ||
| 120 | 120 | This means, for example, that ``urllib.parse.unquote()`` now exists and takes | |
| 121 | 121 | an optional ``encoding`` argument on Py2.x as it does on Py3.x. | |
| 122 | 122 | ||
| 123 | + **Limitation:** Note that the ``http``-based backports do not currently support | ||
| 124 | + HTTPS (as of 2015-09-11) because the SSL support changed considerably in Python | ||
| 125 | + 3.x. If you need HTTPS support, please use this idiom for now:: | ||
| 126 | + | ||
| 127 | + from future.moves.urllib.request import urlopen | ||
| 128 | + | ||
| 123 | 129 | Backports also exist of the following features from Python 3.4: | |
| 124 | 130 | ||
| 125 | 131 | - ``math.ceil`` returns an int on Py3 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,12 +5,22 @@ What's New | |||
| 5 | 5 | ||
| 6 | 6 | .. _whats-new-0.15.x: | |
| 7 | 7 | ||
| 8 | + What's new in version 0.15.2 (2015-09-11) | ||
| 9 | + ========================================= | ||
| 10 | + | ||
| 11 | + This is a minor bug-fix release: | ||
| 12 | + | ||
| 13 | + - Fix ``socket.create_connection()`` backport on Py2.6 (issue #162) | ||
| 14 | + - Add more tests of ``urllib.request`` etc. | ||
| 15 | + - Fix ``newsuper()`` calls from the ``__init__`` method of PyQt subclassses | ||
| 16 | + (issue #160, thanks to Christopher Arndt) | ||
| 17 | + | ||
| 8 | 18 | What's new in version 0.15.1 (2015-09-09) | |
| 9 | 19 | ========================================= | |
| 10 | 20 | ||
| 11 | 21 | This is a minor bug-fix release: | |
| 12 | 22 | ||
| 13 | - - Use 3-argument socket.create_connection() backport to restore Py2.6 | ||
| 23 | + - Use 3-argument ``socket.create_connection()`` backport to restore Py2.6 | ||
| 14 | 24 | compatibility in ``urllib.request.urlopen()`` (issue #162) | |
| 15 | 25 | - Remove breakpoint in ``future.backports.http.client`` triggered on certain | |
| 16 | 26 | data (issue #164) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,7 +88,7 @@ | |||
| 88 | 88 | __copyright__ = 'Copyright 2013-2015 Python Charmers Pty Ltd' | |
| 89 | 89 | __ver_major__ = 0 | |
| 90 | 90 | __ver_minor__ = 15 | |
| 91 | - __ver_patch__ = 1 | ||
| 91 | + __ver_patch__ = 2 | ||
| 92 | 92 | __ver_sub__ = '' | |
| 93 | 93 | __version__ = "%d.%d.%d%s" % (__ver_major__, __ver_minor__, | |
| 94 | 94 | __ver_patch__, __ver_sub__) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ | |||
| 21 | 21 | import heapq as _heapq | |
| 22 | 22 | from _weakref import proxy as _proxy | |
| 23 | 23 | from itertools import repeat as _repeat, chain as _chain, starmap as _starmap | |
| 24 | - | ||
| 24 | + from socket import getaddrinfo, SOCK_STREAM, error, socket | ||
| 25 | 25 | ||
| 26 | 26 | from future.utils import iteritems, itervalues, PY26, PY3 | |
| 27 | 27 | ||
@@ -39,10 +39,18 @@ def ceil(x): | |||
| 39 | 39 | ######################################################################## | |
| 40 | 40 | ||
| 41 | 41 | from itertools import islice | |
| 42 | - try: | ||
| 43 | - from _thread import get_ident | ||
| 44 | - except ImportError: | ||
| 45 | - from _dummy_thread import get_ident | ||
| 42 | + | ||
| 43 | + if PY3: | ||
| 44 | + try: | ||
| 45 | + from _thread import get_ident | ||
| 46 | + except ImportError: | ||
| 47 | + from _dummy_thread import get_ident | ||
| 48 | + else: | ||
| 49 | + try: | ||
| 50 | + from thread import get_ident | ||
| 51 | + except ImportError: | ||
| 52 | + from dummy_thread import get_ident | ||
| 53 | + | ||
| 46 | 54 | ||
| 47 | 55 | def recursive_repr(fillvalue='...'): | |
| 48 | 56 | 'Decorator to make a repr function return fillvalue for a recursive call' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,7 +62,7 @@ def newsuper(typ=_SENTINEL, type_or_obj=_SENTINEL, framedepth=1): | |||
| 62 | 62 | try: | |
| 63 | 63 | # Get the MRO so we can crawl it. | |
| 64 | 64 | mro = type_or_obj.__mro__ | |
| 65 | - except AttributeError: | ||
| 65 | + except (AttributeError, RuntimeError): # see issue #160 | ||
| 66 | 66 | try: | |
| 67 | 67 | mro = type_or_obj.__class__.__mro__ | |
| 68 | 68 | except AttributeError: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -332,7 +332,7 @@ def test_urllib_request_ssl_redirect(self): | |||
| 332 | 332 | # pprint(r.read().decode('utf-8')) | |
| 333 | 333 | self.assertTrue(True) | |
| 334 | 334 | ||
| 335 | - def test_urllib_request_http(self): | ||
| 335 | + def test_moves_urllib_request_http(self): | ||
| 336 | 336 | """ | |
| 337 | 337 | This site (python-future.org) uses plain http (as of 2014-09-23). | |
| 338 | 338 | """ | |
@@ -343,6 +343,17 @@ def test_urllib_request_http(self): | |||
| 343 | 343 | data = r.read() | |
| 344 | 344 | self.assertTrue(b'</html>' in data) | |
| 345 | 345 | ||
| 346 | + def test_urllib_request_http(self): | ||
| 347 | + """ | ||
| 348 | + This site (python-future.org) uses plain http (as of 2014-09-23). | ||
| 349 | + """ | ||
| 350 | + import urllib.request as urllib_request | ||
| 351 | + from pprint import pprint | ||
| 352 | + URL = 'http://python-future.org' | ||
| 353 | + r = urllib_request.urlopen(URL) | ||
| 354 | + data = r.read() | ||
| 355 | + self.assertTrue(b'</html>' in data) | ||
| 356 | + | ||
| 346 | 357 | def test_html_import(self): | |
| 347 | 358 | import html | |
| 348 | 359 | import html.entities | |
| Back | FazBrowse Home | New Git URL |
0 commit comments