|
1 | 1 | What's new |
2 | 2 | ********** |
3 | 3 |
|
| 4 | + |
| 5 | +.. whats-new-0.9: |
| 6 | +
|
| 7 | +What's new in version 0.9 |
| 8 | +========================= |
| 9 | + |
| 10 | +Looser type-checking for the backported ``str`` object? |
| 11 | +------------------------------------------------------- |
| 12 | + |
| 13 | +This is to work around some bugs / sloppiness in the Python 2 standard library. |
| 14 | + |
| 15 | +Overridden ``isinstance`` builtin deprecated? |
| 16 | +--------------------------------------------- |
| 17 | + |
| 18 | +``isinstance`` checks with the backported types now work correctly using |
| 19 | +``__subclasshook__``? |
| 20 | + |
| 21 | + |
| 22 | +``futurize``: minimal imports by default |
| 23 | +---------------------------------------- |
| 24 | + |
| 25 | +By default, the ``futurize`` script now only adds the minimal set of |
| 26 | +imports deemed necessary. |
| 27 | + |
| 28 | +There is now an ``--all-imports`` option to the ``futurize`` script which |
| 29 | +gives the previous behaviour, which is to add all ``__future__`` imports |
| 30 | +and ``from future.builtins import *`` imports to every module. (This even |
| 31 | +applies to an empty ``__init__.py`` file. |
| 32 | + |
| 33 | + |
| 34 | +suspend_hooks() context manager added to ``future.standard_library`` |
| 35 | +-------------------------------------------------------------------- |
| 36 | + |
| 37 | +Pychecker (as of v0.6.1)'s ``checker.py`` attempts to import the ``builtins`` |
| 38 | +module as a way of determining whether Python 3 is running. Since this |
| 39 | +succeeds when ``from future import standard_library`` is in effect, this |
| 40 | +check does not work and the wrong value for pychecker's internal ``PY2`` |
| 41 | +flag is set. |
| 42 | + |
| 43 | +To work around this, ``future`` now provides the following context manager:: |
| 44 | + |
| 45 | + from future import standard_library |
| 46 | + ... |
| 47 | + with standard_library.suspend_hooks(): |
| 48 | + from pychecker.checker import Checker |
| 49 | + |
| 50 | + |
4 | 51 | .. whats-new-0.8: |
5 | 52 |
|
6 | 53 | What's new in version 0.8 |
@@ -46,31 +93,6 @@ The utility functions ``isint``, ``istext``, and ``isbytes`` provided before for |
46 | 93 | compatible type-checking across Python 2 and 3 in :mod:`future.utils` are now |
47 | 94 | deprecated. |
48 | 95 |
|
49 | | ---all-imports option added to ``futurize`` script (v0.8.3) |
50 | | ----------------------------------------------------------- |
51 | | - |
52 | | -By default, the ``futurize`` script now only adds the minimal set of |
53 | | -imports deemed necessary. The previous behaviour, which added all |
54 | | -``__future__`` and ``future`` imports to every module, even an empty |
55 | | -``__init__.py`` file, can be obtained by passing the ``--all-imports`` |
56 | | -command-line argument to ``futurize``. |
57 | | - |
58 | | -suspend_hooks() context manager added to ``future.standard_library`` (v0.8.3) |
59 | | ------------------------------------------------------------------------------ |
60 | | - |
61 | | -Currently (v0.6.1) Pychecker's ``checker.py`` attempts to import the ``builtins`` |
62 | | -module as a way of determining whether Python 3 is running. Since this |
63 | | -succeeds when ``from future import standard_library`` is in effect, this |
64 | | -check does not work and the wrong value for pychecker's internal ``PY2`` |
65 | | -flag is set. |
66 | | - |
67 | | -To work around this, ``future`` now provides the following context manager:: |
68 | | - |
69 | | - from future import standard_library |
70 | | - ... |
71 | | - with standard_library.suspend_hooks(): |
72 | | - from pychecker.checker import Checker |
73 | | - |
74 | 96 |
|
75 | 97 | .. changelog: |
76 | 98 |
|
|
0 commit comments