Author: Jasper Schulz <jasper.sch...@student.hpi.uni-potsdam.de> Branch: numpypy-complex2 Changeset: r55799:49c09598a171 Date: 2012-06-24 15:10 +0200 http://bitbucket.org/pypy/pypy/changeset/49c09598a171/
Log: merged default 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 @@ -11,7 +11,8 @@ .. branch: reflex-support Provides cppyy module (disabled by default) for access to C++ through Reflex. See doc/cppyy.rst for full details and functionality. - +.. branch: nupypy-axis-arg-check +Check that axis arg is valid in _numpypy .. "uninteresting" branches that we should just ignore for the whatsnew: .. branch: slightly-shorter-c diff --git a/pypy/rlib/parsing/parsing.py b/pypy/rlib/parsing/parsing.py --- a/pypy/rlib/parsing/parsing.py +++ b/pypy/rlib/parsing/parsing.py @@ -107,14 +107,12 @@ error = None # for the annotator if self.parser.is_nonterminal(symbol): rule = self.parser.get_rule(symbol) - lastexpansion = len(rule.expansions) - 1 subsymbol = None error = None for expansion in rule.expansions: curr = i children = [] - for j in range(len(expansion)): - subsymbol = expansion[j] + for subsymbol in expansion: node, next, error2 = self.match_symbol(curr, subsymbol) if node is None: error = combine_errors(error, error2) diff --git a/pypy/rpython/module/ll_os.py b/pypy/rpython/module/ll_os.py --- a/pypy/rpython/module/ll_os.py +++ b/pypy/rpython/module/ll_os.py @@ -133,24 +133,18 @@ _WIN32 = True else: _WIN32 = False + if _WIN32: underscore_on_windows = '_' else: underscore_on_windows = '' -_DARWIN = sys.platform.startswith('darwin') - includes = [] if not _WIN32: # XXX many of these includes are not portable at all includes += ['dirent.h', 'sys/stat.h', 'sys/times.h', 'utime.h', 'sys/types.h', 'unistd.h', 'signal.h', 'sys/wait.h', 'fcntl.h'] - if _DARWIN: - includes += ['util.h'] - else: - includes += ['pty.h'] - else: includes += ['sys/utime.h'] diff --git a/pypy/tool/sourcetools.py b/pypy/tool/sourcetools.py --- a/pypy/tool/sourcetools.py +++ b/pypy/tool/sourcetools.py @@ -224,6 +224,7 @@ if func.func_dict: f.func_dict = {} f.func_dict.update(func.func_dict) + f.func_doc = func.func_doc return f def func_renamer(newname): diff --git a/pypy/tool/test/test_sourcetools.py b/pypy/tool/test/test_sourcetools.py --- a/pypy/tool/test/test_sourcetools.py +++ b/pypy/tool/test/test_sourcetools.py @@ -22,3 +22,15 @@ assert f.func_name == "g" assert f.func_defaults == (5,) assert f.prop is int + +def test_func_rename_decorator(): + def bar(): + 'doc' + + bar2 = func_with_new_name(bar, 'bar2') + assert bar.func_doc == bar2.func_doc == 'doc' + + bar.func_doc = 'new doc' + bar3 = func_with_new_name(bar, 'bar3') + assert bar3.func_doc == 'new doc' + assert bar2.func_doc != bar3.func_doc _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit