Skip to content

Commit 4cd9385

Browse files
committed
Merge branch 'master' of https://github.com/Veedrac/python-future into develop
2 parents 93a232e + f3e3bed commit 4cd9385

File tree

8 files changed

+41
-13
lines changed

8 files changed

+41
-13
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#
5353
# if 'dev' in release:
5454
# release = release.split('dev')[0] + 'dev'
55-
release = '0.12.0-dev'
55+
release = '0.12.0'
5656
version = release # was: '.'.join(release.split('.')[:2])
5757

5858
# The language for content autogenerated by Sphinx. Refer to documentation

docs/faq.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,15 @@ Maturity
118118
Is 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

127131
Is the API stable?
128132
------------------

docs/whatsnew.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

future/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@
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__)

future/standard_library/misc.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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))

future/tests/test_bytes.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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']

future/types/newbytes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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):

past/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
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

0 commit comments

Comments
 (0)