File tree Expand file tree Collapse file tree 8 files changed +41
-13
lines changed
Expand file tree Collapse file tree 8 files changed +41
-13
lines changed Original file line number Diff line number Diff line change 5252#
5353# if 'dev' in release:
5454# release = release.split('dev')[0] + 'dev'
55- release = '0.12.0-dev '
55+ release = '0.12.0'
5656version = release # was: '.'.join(release.split('.')[:2])
5757
5858# The language for content autogenerated by Sphinx. Refer to documentation
Original file line number Diff line number Diff line change @@ -118,11 +118,15 @@ Maturity
118118Is it tested?
119119-------------
120120
121- ``future `` is used by ``mezzanine ``, among other projects. Currently
122- ``future `` has 640+ unit tests. Many of these are straight from the Python 3.3
123- test suite. In general, the ``future `` package itself is in good shape, whereas
124- the ``futurize `` script for automatic porting is incomplete and imperfect.
125- (Chances are it will require some manual cleanup afterwards.)
121+ ``future `` is used by ``mezzanine `` and ``ObsPy ``. It has also been used to
122+ help with the port of 800,000 lines of Python 2 code in Sage to Python 2/3
123+ (currently underway).
124+
125+ Currently ``future `` has 800+ unit tests. Many of these are straight from the
126+ Python 3.3 test suite. In general, the ``future `` package itself is in good
127+ shape, whereas the ``futurize `` script for automatic porting is incomplete and
128+ imperfect. (Chances are it will require some manual cleanup afterwards.) The
129+ ``past `` package also needs further work.
126130
127131Is the API stable?
128132------------------
Original file line number Diff line number Diff line change @@ -247,9 +247,9 @@ Many small improvements and fixes have been made across the project. Some highli
247247
248248- Improved compatibility with py2exe (`issue #31 <https://github.com/PythonCharmers/python-future/issues/31 >`_).
249249
250- - The ``future.utils.bytes_to_native_str `` function now returns a ``newbytes ``
251- object on Py2. (` Issue #47
252- <https://github.com/PythonCharmers/python-future/issues/47> `_).
250+ - The ``future.utils.bytes_to_native_str `` function now returns a ``native_str ``
251+ object and `` future.utils.native_str_to_bytes `` returns a `` newbytes `` on Py2.
252+ (` Issue #47 <https://github.com/PythonCharmers/python-future/issues/47 >`_).
253253
254254- The backported ``http.client `` module and related modules use other new
255255 backported modules such as ``email ``. As a result they are more compliant
Original file line number Diff line number Diff line change 7878__ver_major__ = 0
7979__ver_minor__ = 12
8080__ver_patch__ = 0
81- __ver_sub__ = '-dev '
81+ __ver_sub__ = ''
8282__version__ = "%d.%d.%d%s" % (__ver_major__ , __ver_minor__ ,
8383 __ver_patch__ , __ver_sub__ )
Original file line number Diff line number Diff line change 1+ """
2+ Miscellaneous function (re)definitions from the Py3.3 standard library for
3+ Python 2.6/2.7.
4+ """
5+ from math import ceil as oldceil
6+
7+ def ceil (x ):
8+ """
9+ Return the ceiling of x as an int.
10+ This is the smallest integral value >= x.
11+ """
12+ return int (oldceil (x ))
Original file line number Diff line number Diff line change @@ -168,6 +168,18 @@ def test_bytes_plus_bytes(self):
168168 self .assertEqual (b4 , b'ZYXWABCD' )
169169 self .assertTrue (isinstance (b4 , bytes ))
170170
171+ def test_find_not_found (self ):
172+ self .assertEqual (- 1 , bytes (b'ABCDE' ).find (b':' ))
173+
174+ def test_find_found (self ):
175+ self .assertEqual (2 , bytes (b'AB:CD:E' ).find (b':' ))
176+
177+ def test_rfind_not_found (self ):
178+ self .assertEqual (- 1 , bytes (b'ABCDE' ).rfind (b':' ))
179+
180+ def test_rfind_found (self ):
181+ self .assertEqual (5 , bytes (b'AB:CD:E' ).rfind (b':' ))
182+
171183 def test_bytes_join_bytes (self ):
172184 b = bytes (b' * ' )
173185 strings = [b'AB' , b'EFGH' , b'IJKL' ]
Original file line number Diff line number Diff line change @@ -165,11 +165,11 @@ def fromhex(cls, string):
165165
166166 @no (unicode )
167167 def find (self , sub , * args ):
168- return newbytes ( super (newbytes , self ).find (sub , * args ) )
168+ return super (newbytes , self ).find (sub , * args )
169169
170170 @no (unicode )
171171 def rfind (self , sub , * args ):
172- return newbytes ( super (newbytes , self ).rfind (sub , * args ) )
172+ return super (newbytes , self ).rfind (sub , * args )
173173
174174 @no (unicode , (1 , 2 ))
175175 def replace (self , old , new , * args ):
Original file line number Diff line number Diff line change 104104__ver_major__ = 0
105105__ver_minor__ = 12
106106__ver_patch__ = 0
107- __ver_sub__ = '-dev '
107+ __ver_sub__ = ''
108108__version__ = "%d.%d.%d%s" % (__ver_major__ , __ver_minor__ ,
109109 __ver_patch__ , __ver_sub__ )
110110
You can’t perform that action at this time.
0 commit comments