Author: Philip Jenvey <pjen...@underboss.org> Branch: release-pypy3.3-v5 Changeset: r84824:40497617ae91 Date: 2016-05-29 13:38 -0700 http://bitbucket.org/pypy/pypy/changeset/40497617ae91/
Log: merge py3k diff --git a/pypy/doc/whatsnew-pypy3-head.rst b/pypy/doc/whatsnew-pypy3-head.rst --- a/pypy/doc/whatsnew-pypy3-head.rst +++ b/pypy/doc/whatsnew-pypy3-head.rst @@ -8,3 +8,28 @@ .. branch: py3k-memoryview Implement new memoryview features. + +.. branch: py3.3 + +.. branch: py3.3-hashfix + +Use intobject hash function for specialisedtuple + +.. branch: follow_symlinks + +Add support for dir_fd and follow_symlinks in posix.stat() + +.. branch: stat_ns + +Implement the st_xtime_ns fields in stat_result() + +.. branch: 33_fix_itertools + +Add pickling support for the itertools classes + +.. branch: py3k-update + +.. branch: py3k-get_clock_info + +.. branch: py3k-update + diff --git a/pypy/interpreter/unicodehelper.py b/pypy/interpreter/unicodehelper.py --- a/pypy/interpreter/unicodehelper.py +++ b/pypy/interpreter/unicodehelper.py @@ -67,10 +67,11 @@ uni = runicode.str_decode_utf_8( bytes, len(bytes), 'surrogateescape', errorhandler=state.decode_error_handler)[0] - elif state.codec_need_encodings: - # bootstrap check: if the filesystem codec is implemented in - # Python we cannot use it before the codecs are ready. use the - # locale codec instead + elif space.sys.filesystemencoding is None or state.codec_need_encodings: + # bootstrap check: if the filesystemencoding isn't initialized + # or the filesystem codec is implemented in Python we cannot + # use it before the codecs are ready. use the locale codec + # instead from pypy.module._codecs.locale import ( str_decode_locale_surrogateescape) bytes = space.bytes_w(w_string) @@ -95,10 +96,11 @@ bytes = runicode.unicode_encode_utf_8( uni, len(uni), 'surrogateescape', errorhandler=state.encode_error_handler) - elif state.codec_need_encodings: - # bootstrap check: if the filesystem codec is implemented in - # Python we cannot use it before the codecs are ready. use the - # locale codec instead + elif space.sys.filesystemencoding is None or state.codec_need_encodings: + # bootstrap check: if the filesystemencoding isn't initialized + # or the filesystem codec is implemented in Python we cannot + # use it before the codecs are ready. use the locale codec + # instead from pypy.module._codecs.locale import ( unicode_encode_locale_surrogateescape) uni = space.unicode_w(w_uni) diff --git a/pypy/module/__builtin__/test/test_functional.py b/pypy/module/__builtin__/test/test_functional.py --- a/pypy/module/__builtin__/test/test_functional.py +++ b/pypy/module/__builtin__/test/test_functional.py @@ -587,9 +587,9 @@ raises(TypeError, min, 1, 2, key=lambda x: x, bar=2) assert type(min(1, 1.0)) is int assert type(min(1.0, 1)) is float - assert type(min(1, 1.0, 1L)) is int - assert type(min(1.0, 1L, 1)) is float - assert type(min(1L, 1, 1.0)) is long + assert type(min(1, 1.0, 1)) is int + assert type(min(1.0, 1, 1)) is float + assert type(min(1, 1, 1.0)) is int def test_max(self): assert max(1, 2) == 2 @@ -599,6 +599,6 @@ raises(TypeError, max, 1, 2, key=lambda x: x, bar=2) assert type(max(1, 1.0)) is int assert type(max(1.0, 1)) is float - assert type(max(1, 1.0, 1L)) is int - assert type(max(1.0, 1L, 1)) is float - assert type(max(1L, 1, 1.0)) is long + assert type(max(1, 1.0, 1)) is int + assert type(max(1.0, 1, 1)) is float + assert type(max(1, 1, 1.0)) is int _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit