File tree 6 files changed +16
-14
lines changed
6 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ Example:
243
243
244
244
$ python3
245
245
246
- >>> from past import autotranslate
246
+ >>> from past.translation import autotranslate
247
247
>>> autotranslate([' plotrique' ])
248
248
>>> import plotrique
249
249
@@ -270,7 +270,7 @@ Licensing
270
270
271
271
:Sponsors: Python Charmers Pty Ltd, Australia, and Python Charmers Pte
272
272
Ltd, Singapore. http://pythoncharmers.com
273
-
273
+
274
274
Pinterest https://opensource.pinterest.com/
275
275
276
276
:Licence: MIT. See ``LICENSE.txt `` or `here <http://python-future.org/credits.html >`_.
Original file line number Diff line number Diff line change @@ -616,10 +616,10 @@ it like this::
616
616
$ pip3 install plotrique==0.2.5-7 --no-compile # to ignore SyntaxErrors
617
617
$ python3
618
618
619
- Then pass in a whitelist of module name prefixes to the `` past.autotranslate() ``
620
- function. Example::
619
+ Then pass in a whitelist of module name prefixes to the
620
+ `` past.translation.autotranslate() `` function. Example::
621
621
622
- >>> from past import autotranslate
622
+ >>> from past.translation import autotranslate
623
623
>>> autotranslate(['plotrique'])
624
624
>>> import plotrique
625
625
@@ -949,8 +949,8 @@ v0.11.3:
949
949
objects as on Py3.
950
950
951
951
v0.11.2:
952
- * The ``past.autotranslate `` feature now finds modules to import more
953
- robustly and works with Python eggs.
952
+ * The ``past.translation. autotranslate `` feature now finds modules to import
953
+ more robustly and works with Python eggs.
954
954
955
955
v0.11.1:
956
956
* Update to ``requirements_py26.txt `` for Python 2.6. Small updates to
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ environment::
132
132
Then add the following code at the top of your (Py3 or Py2/3-compatible)
133
133
code::
134
134
135
- from past import autotranslate
135
+ from past.translation import autotranslate
136
136
autotranslate(['mypackagename'])
137
137
import mypackagename
138
138
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ Here is how to use it::
21
21
$ python3
22
22
23
23
Then pass in a whitelist of module name prefixes to the
24
- ``past.autotranslate() `` function. Example::
24
+ ``past.translation. autotranslate() `` function. Example::
25
25
26
- >>> from past import autotranslate
26
+ >>> from past.translation import autotranslate
27
27
>>> autotranslate(['plotrique'])
28
28
>>> import plotrique
29
29
Original file line number Diff line number Diff line change 61
61
62
62
$ python3
63
63
64
- >>> from past import autotranslate
64
+ >>> from past.translation import autotranslate
65
65
>>> authotranslate('mypy2module')
66
66
>>> import mypy2module
67
67
84
84
The software is distributed under an MIT licence. See LICENSE.txt.
85
85
"""
86
86
87
-
88
- from past .translation import install_hooks as autotranslate
89
87
from future import __version__ , __copyright__ , __license__
90
88
91
89
__title__ = 'past'
Original file line number Diff line number Diff line change 16
16
Once your Py2 package is installed in the usual module search path, the import
17
17
hook is invoked as follows:
18
18
19
- >>> from past import autotranslate
19
+ >>> from past.translation import autotranslate
20
20
>>> autotranslate('mypackagename')
21
21
22
22
Or:
@@ -479,3 +479,7 @@ def __enter__(self):
479
479
def __exit__ (self , * args ):
480
480
if self .hooks_were_installed :
481
481
install_hooks ()
482
+
483
+
484
+ # alias
485
+ autotranslate = install_hooks
You can’t perform that action at this time.
0 commit comments