Author: Matti Picus <[email protected]> Branch: release-2.3.x Changeset: r71062:f76f43f8cc16 Date: 2014-04-29 22:33 +0300 http://bitbucket.org/pypy/pypy/changeset/f76f43f8cc16/
Log: merge default into release branch diff --git a/pypy/doc/release-2.3.0.rst b/pypy/doc/release-2.3.0.rst --- a/pypy/doc/release-2.3.0.rst +++ b/pypy/doc/release-2.3.0.rst @@ -30,15 +30,15 @@ * `NumPy`_ the work done is included in the PyPy 2.2 release. More details below. -_`Py3k`: http://pypy.org/py3donate.html -_`STM`: http://pypy.org/tmdonate2.html -_ `Numpy`: http://pypy.org/numpydonate.html -_`TDD`: http://doc.pypy.org/en/latest/how-to-contribute.html -_`CFFI`: http://cffi.readthedocs.org -_`cryptography`: https://cryptography.io -_`Pillow`: https://pypi.python.org/pypi/Pillow/2.4.0 -_`pygame-cffi`: https://github.com/CTPUG/pygame_cffi -_`uWSGI`: http://uwsgi-docs.readthedocs.org/en/latest/PyPy.html +.. _`Py3k`: http://pypy.org/py3donate.html +.. _`STM`: http://pypy.org/tmdonate2.html +.. _ `Numpy`: http://pypy.org/numpydonate.html +.. _`TDD`: http://doc.pypy.org/en/latest/how-to-contribute.html +.. _`CFFI`: http://cffi.readthedocs.org +.. _`cryptography`: https://cryptography.io +.. _`Pillow`: https://pypi.python.org/pypi/Pillow/2.4.0 +.. _`pygame-cffi`: https://github.com/CTPUG/pygame_cffi +.. _`uWSGI`: http://uwsgi-docs.readthedocs.org/en/latest/PyPy.html What is PyPy? ============= @@ -56,8 +56,8 @@ bit python is still stalling, we would welcome a volunteer to `handle that`_. -_`pypy 2.2 and cpython 2.7.2`: http://speed.pypy.org -_`handle that`: http://doc.pypy.org/en/latest/windows.html#what-is-missing-for-a-full-64-bit-translation +.. _`pypy 2.2 and cpython 2.7.2`: http://speed.pypy.org +.. _`handle that`: http://doc.pypy.org/en/latest/windows.html#what-is-missing-for-a-full-64-bit-translation Highlights ========== @@ -84,7 +84,7 @@ * Fix a rpython bug with loop-unrolling that appeared in the `HippyVM`_ PHP port -`HippyVM`_: http://www.hippyvm.com +.. _`HippyVM`: http://www.hippyvm.com New Platforms and Features -------------------------- diff --git a/pypy/doc/whatsnew-2.3.0.rst b/pypy/doc/whatsnew-2.3.0.rst --- a/pypy/doc/whatsnew-2.3.0.rst +++ b/pypy/doc/whatsnew-2.3.0.rst @@ -152,3 +152,12 @@ .. branch: small-unroll-improvements Improve optimization of small allocation-heavy loops in the JIT + +.. branch: reflex-support + +.. branch: asmosoinio/fixed-pip-installation-url-github-githu-1398674840188 + +.. branch: lexer_token_position_class + +.. branch: refactor-buffer-api +Properly implement old/new buffer API for objects and start work on replacing bufferstr usage diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-head.rst --- a/pypy/doc/whatsnew-head.rst +++ b/pypy/doc/whatsnew-head.rst @@ -3,12 +3,6 @@ ======================= .. this is a revision shortly after release-2.3.x -.. startrev: ba569fe1efdb +.. startrev: 0524dae88c75 -.. branch: small-unroll-improvements -Improve optimiziation of small allocation-heavy loops in the JIT -.. branch: reflex-support - -.. branch: refactor-buffer-api -Properly implement old/new buffer API for objects and start work on replacing bufferstr usage diff --git a/pypy/interpreter/test/test_typedef.py b/pypy/interpreter/test/test_typedef.py --- a/pypy/interpreter/test/test_typedef.py +++ b/pypy/interpreter/test/test_typedef.py @@ -387,3 +387,9 @@ # because it's a regular method, and .__objclass__ # differs from .im_class in case the method is # defined in some parent class of l's actual class + + def test_func_closure(self): + x = 2 + def f(): + return x + assert f.__closure__[0].cell_contents is x diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py --- a/pypy/interpreter/typedef.py +++ b/pypy/interpreter/typedef.py @@ -809,6 +809,7 @@ __dict__ = getset_func_dict, __defaults__ = getset_func_defaults, __globals__ = interp_attrproperty_w('w_func_globals', cls=Function), + __closure__ = GetSetProperty(Function.fget_func_closure), __module__ = getset___module__, __weakref__ = make_weakref_descr(Function), ) diff --git a/pypy/module/sys/version.py b/pypy/module/sys/version.py --- a/pypy/module/sys/version.py +++ b/pypy/module/sys/version.py @@ -14,7 +14,8 @@ if platform.name == 'msvc': COMPILER_INFO = 'MSC v.%d 32 bit' % (platform.version * 10 + 600) -elif platform.cc is not None and platform.cc.startswith(('gcc', 'clang')): +elif platform.cc is not None and \ + os.path.basename(platform.cc).startswith(('gcc', 'clang')): from rpython.rtyper.tool import rffi_platform COMPILER_INFO = 'GCC ' + rffi_platform.getdefinedstring('__VERSION__', '') else: diff --git a/pypy/tool/release/force-builds.py b/pypy/tool/release/force-builds.py --- a/pypy/tool/release/force-builds.py +++ b/pypy/tool/release/force-builds.py @@ -9,7 +9,7 @@ modified by PyPy team """ -import os, sys, pwd, urllib +import os, sys, urllib from twisted.internet import reactor, defer from twisted.python import log @@ -34,6 +34,13 @@ 'build-pypy-c-jit-linux-armel', ] +def get_user(): + if sys.platform == 'win32': + return os.environ['USERNAME'] + else: + import pwd + return pwd.getpwuid(os.getuid())[0] + def main(): #XXX: handle release tags #XXX: handle validity checks @@ -49,7 +56,7 @@ print 'Forcing', builder, '...' url = "http://buildbot.pypy.org/builders/" + builder + "/force" args = [ - ('username', pwd.getpwuid(os.getuid())[0]), + ('username', get_user()), ('revision', ''), ('submit', 'Force Build'), ('branch', branch), diff --git a/rpython/rtyper/module/ll_os_path.py b/rpython/rtyper/module/ll_os_path.py --- a/rpython/rtyper/module/ll_os_path.py +++ b/rpython/rtyper/module/ll_os_path.py @@ -6,26 +6,24 @@ import stat import os -from rpython.tool.staticmethods import ClassMethods # Does a path exist? # This is false for dangling symbolic links. -class BaseOsPath: - __metaclass__ = ClassMethods - +class BaseOsPath(object): + @classmethod def ll_os_path_exists(cls, path): """Test whether a path exists""" try: - st = os.stat(cls.from_rstr_nonnull(path)) + os.stat(cls.from_rstr_nonnull(path)) except OSError: return False return True + @classmethod def ll_os_path_isdir(cls, path): try: st = os.stat(cls.from_rstr_nonnull(path)) except OSError: return False return stat.S_ISDIR(st[0]) - diff --git a/rpython/tool/staticmethods.py b/rpython/tool/staticmethods.py --- a/rpython/tool/staticmethods.py +++ b/rpython/tool/staticmethods.py @@ -10,11 +10,5 @@ class StaticMethods(AbstractMethods): """ Metaclass that turns plain methods into staticmethods. - """ + """ decorator = staticmethod - -class ClassMethods(AbstractMethods): - """ - Metaclass that turns plain methods into classmethods. - """ - decorator = classmethod _______________________________________________ pypy-commit mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-commit
