Commits

Mike Steder  committed a79288b

Removing ropemacs

  • Participants
  • Parent commits bf1fd2d

Comments (0)

Files changed (197)

File rope-0.9/COPYING

-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.

File rope-0.9/MANIFEST.in

-include README.txt COPYING setup.py MANIFEST.in
-recursive-include rope *.py
-recursive-include docs *.txt
-recursive-include ropetest *.py

File rope-0.9/PKG-INFO

-Metadata-Version: 1.0
-Name: rope
-Version: 0.9
-Summary: a python refactoring library...
-Home-page: http://rope.sf.net/
-Author: Ali Gholami Rudi
-Author-email: aligrudi@users.sourceforge.net
-License: GNU GPL
-Description: 
-        ========================================
-        rope, a python refactoring library ...
-        ========================================
-        
-        
-        Overview
-        ========
-        
-        `Rope`_ is a python refactoring library.
-        
-        .. _`rope`: http://rope.sf.net/
-        
-        
-        New Features
-        ============
-        
-        Changes since 0.8.4:
-        
-        * supporting Darcs VCS
-        * handling files with mac line-ending
-        * not searching all files when inlining a local variable
-        * fixed cygwin path problems
-        
-        Some of the changes since 0.8:
-        
-        * inlining variable in other modules
-        * added `rope.contrib.findit.find_definition()`
-        * better extension module handling
-        * added `rope.contrib.findit.find_definition()`
-        * added GIT support in fscommands
-        * inlining parameters
-        * back importing underlined names in move
-        * added `codeassist.get_calltip()`
-        * added `libutils.analyze_modules()`
-        * added ``soa_followed_calls`` project config
-        * `libutils.report_change()` reads `automatic_soa`
-        * handling property decorator
-        
-        
-        
-Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
-Classifier: Operating System :: OS Independent
-Classifier: Environment :: X11 Applications
-Classifier: Environment :: Win32 (MS Windows)
-Classifier: Environment :: MacOS X
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
-Classifier: Natural Language :: English
-Classifier: Programming Language :: Python
-Classifier: Topic :: Software Development

File rope-0.9/README.txt

-========================================
- rope, a python refactoring library ...
-========================================
-
-
-Overview
-========
-
-`Rope`_ is a python refactoring library.
-
-.. _`rope`: http://rope.sf.net/
-
-
-New Features
-============
-
-Changes since 0.8.4:
-
-* supporting Darcs VCS
-* handling files with mac line-ending
-* not searching all files when inlining a local variable
-* fixed cygwin path problems
-
-Some of the changes since 0.8:
-
-* inlining variable in other modules
-* added `rope.contrib.findit.find_definition()`
-* better extension module handling
-* added `rope.contrib.findit.find_definition()`
-* added GIT support in fscommands
-* inlining parameters
-* back importing underlined names in move
-* added `codeassist.get_calltip()`
-* added `libutils.analyze_modules()`
-* added ``soa_followed_calls`` project config
-* `libutils.report_change()` reads `automatic_soa`
-* handling property decorator
-
-
-Getting Started
-===============
-
-* List of features: `docs/rope.txt`_
-* Overview of some of rope's features: `docs/overview.txt`_
-* Using as a library: `docs/library.txt`_
-* Contributing: `docs/contributing.txt`_
-
-To change your project preferences edit
-``$PROJECT_ROOT/.ropeproject/config.py`` where ``$PROJECT_ROOT`` is
-the root folder of your project (this file is created the first time
-you open a project).
-
-
-Bug Reports
-===========
-
-Send your bug reports and feature requests to `rope-dev (at)
-googlegroups.com`_.
-
-.. _`rope-dev (at) googlegroups.com`: http://groups.google.com/group/rope-dev
-
-
-License
-=======
-
-This program is under the terms of GPL (GNU General Public License).
-Have a look at ``COPYING`` file for more information.
-
-
-.. _`docs/rope.txt`: docs/rope.html
-.. _`docs/overview.txt`: docs/overview.html
-.. _`docs/contributing.txt`: docs/contributing.html
-.. _`docs/library.txt`: docs/library.html

File rope-0.9/build/lib/rope/__init__.py

-"""rope, a python refactoring library"""
-
-INFO = __doc__
-VERSION = '0.9'
-COPYRIGHT = """\
-Copyright (C) 2006-2008 Ali Gholami Rudi
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of GNU General Public License as published by the
-Free Software Foundation; either version 2 of the license, or (at your
-opinion) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details."""

File rope-0.9/build/lib/rope/base/__init__.py

-"""Base rope package
-
-This package contains rope core modules that are used by other modules
-and packages.
-
-"""
-
-__all__ = ['project', 'libutils', 'exceptions']

File rope-0.9/build/lib/rope/base/arguments.py

-import rope.base.evaluate
-from rope.base import ast
-
-
-class Arguments(object):
-    """A class for evaluating parameters passed to a function
-
-    You can use the `create_arguments` factory.  It handles implicit
-    first arguments.
-
-    """
-
-    def __init__(self, args, scope):
-        self.args = args
-        self.scope = scope
-        self.instance = None
-
-    def get_arguments(self, parameters):
-        result = []
-        for pyname in self.get_pynames(parameters):
-            if pyname is None:
-                result.append(None)
-            else:
-                result.append(pyname.get_object())
-        return result
-
-    def get_pynames(self, parameters):
-        result = [None] * max(len(parameters), len(self.args))
-        for index, arg in enumerate(self.args):
-            if isinstance(arg, ast.keyword) and arg.arg in parameters:
-                result[parameters.index(arg.arg)] = self._evaluate(arg.value)
-            else:
-                result[index] = self._evaluate(arg)
-        return result
-
-    def get_instance_pyname(self):
-        if self.args:
-            return self._evaluate(self.args[0])
-
-    def _evaluate(self, ast_node):
-        return rope.base.evaluate.eval_node(self.scope, ast_node)
-
-
-def create_arguments(primary, pyfunction, call_node, scope):
-    """A factory for creating `Arguments`"""
-    args = list(call_node.args)
-    args.extend(call_node.keywords)
-    called = call_node.func
-    # XXX: Handle constructors
-    if _is_method_call(primary, pyfunction) and \
-       isinstance(called, ast.Attribute):
-        args.insert(0, called.value)
-    return Arguments(args, scope)
-
-
-class ObjectArguments(object):
-
-    def __init__(self, pynames):
-        self.pynames = pynames
-
-    def get_arguments(self, parameters):
-        result = []
-        for pyname in self.pynames:
-            if pyname is None:
-                result.append(None)
-            else:
-                result.append(pyname.get_object())
-        return result
-
-    def get_pynames(self, parameters):
-        return self.pynames
-
-    def get_instance_pyname(self):
-        return self.pynames[0]
-class MixedArguments(object):
-
-    def __init__(self, pyname, arguments, scope):
-        """`argumens` is an instance of `Arguments`"""
-        self.pyname = pyname
-        self.args = arguments
-
-    def get_pynames(self, parameters):
-        return [self.pyname] + self.args.get_pynames(parameters[1:])
-
-    def get_arguments(self, parameters):
-        result = []
-        for pyname in self.get_pynames(parameters):
-            if pyname is None:
-                result.append(None)
-            else:
-                result.append(pyname.get_object())
-        return result
-
-    def get_instance_pyname(self):
-        return self.pyname
-
-
-def _is_method_call(primary, pyfunction):
-    if primary is None:
-        return False
-    pyobject = primary.get_object()
-    if isinstance(pyobject.get_type(), rope.base.pyobjects.PyClass) and \
-       isinstance(pyfunction, rope.base.pyobjects.PyFunction) and \
-       isinstance(pyfunction.parent, rope.base.pyobjects.PyClass):
-        return True
-    if isinstance(pyobject.get_type(), rope.base.pyobjects.AbstractClass) and \
-       isinstance(pyfunction, rope.base.builtins.BuiltinFunction):
-        return True
-    return False

File rope-0.9/build/lib/rope/base/ast.py

-import _ast
-from _ast import *
-
-from rope.base import fscommands
-
-
-def parse(source, filename='<string>'):
-    # NOTE: the raw string should be given to `compile` function
-    if isinstance(source, unicode):
-        source = fscommands.unicode_to_file_data(source)
-    if '\r' in source:
-        source = source.replace('\r\n', '\n').replace('\r', '\n')
-    if not source.endswith('\n'):
-        source += '\n'
-    try:
-        return compile(source, filename, 'exec', _ast.PyCF_ONLY_AST)
-    except (TypeError, ValueError), e:
-        error = SyntaxError()
-        error.lineno = 1
-        error.filename = filename
-        error.msg = str(e)
-        raise error
-
-
-def walk(node, walker):
-    """Walk the syntax tree"""
-    method_name = '_' + node.__class__.__name__
-    method = getattr(walker, method_name, None)
-    if method is not None:
-        return method(node)
-    for child in get_child_nodes(node):
-        walk(child, walker)
-
-
-def get_child_nodes(node):
-    if isinstance(node, _ast.Module):
-        return node.body
-    result = []
-    if node._fields is not None:
-        for name in node._fields:
-            child = getattr(node, name)
-            if isinstance(child, list):
-                for entry in child:
-                    if isinstance(entry, _ast.AST):
-                        result.append(entry)
-            if isinstance(child, _ast.AST):
-                result.append(child)
-    return result
-
-
-def call_for_nodes(node, callback, recursive=False):
-    """If callback returns `True` the child nodes are skipped"""
-    result = callback(node)
-    if recursive and not result:
-        for child in get_child_nodes(node):
-            call_for_nodes(child, callback, recursive)
-
-
-def get_children(node):
-    result = []
-    if node._fields is not None:
-        for name in node._fields:
-            if name in ['lineno', 'col_offset']:
-                continue
-            child = getattr(node, name)
-            result.append(child)
-    return result

File rope-0.9/build/lib/rope/base/astutils.py

-from rope.base import ast
-
-
-def get_name_levels(node):
-    """Return a list of ``(name, level)`` tuples for assigned names
-
-    The `level` is `None` for simple assignments and is a list of
-    numbers for tuple assignments for example in::
-
-      a, (b, c) = x
-
-    The levels for for `a` is ``[0]``, for `b` is ``[1, 0]`` and for
-    `c` is ``[1, 1]``.
-
-    """
-    visitor = _NodeNameCollector()
-    ast.walk(node, visitor)
-    return visitor.names
-
-
-class _NodeNameCollector(object):
-
-    def __init__(self, levels=None):
-        self.names = []
-        self.levels = levels
-        self.index = 0
-
-    def _add_node(self, node):
-        new_levels = []
-        if self.levels is not None:
-            new_levels = list(self.levels)
-            new_levels.append(self.index)
-        self.index += 1
-        self._added(node, new_levels)
-
-    def _added(self, node, levels):
-        if hasattr(node, 'id'):
-            self.names.append((node.id, levels))
-
-    def _Name(self, node):
-        self._add_node(node)
-
-    def _Tuple(self, node):
-        new_levels = []
-        if self.levels is not None:
-            new_levels = list(self.levels)
-            new_levels.append(self.index)
-        self.index += 1
-        visitor = _NodeNameCollector(new_levels)
-        for child in ast.get_child_nodes(node):
-            ast.walk(child, visitor)
-        self.names.extend(visitor.names)
-
-    def _Subscript(self, node):
-        self._add_node(node)
-
-    def _Attribute(self, node):
-        self._add_node(node)
-
-    def _Slice(self, node):
-        self._add_node(node)

File rope-0.9/build/lib/rope/base/builtins.py

-"""This module trys to support builtin types and functions."""
-import inspect
-
-import rope.base.evaluate
-from rope.base import pynames, pyobjects, arguments, utils
-
-
-class BuiltinModule(pyobjects.AbstractModule):
-
-    def __init__(self, name, pycore=None, initial={}):
-        super(BuiltinModule, self).__init__()
-        self.name = name
-        self.pycore = pycore
-        self.initial = initial
-
-    parent = None
-
-    def get_attributes(self):
-        return self.attributes
-
-    def get_doc(self):
-        if self.module:
-            return self.module.__doc__
-
-    def get_name(self):
-        return self.name.split('.')[-1]
-
-    @property
-    @utils.saveit
-    def attributes(self):
-        result = _object_attributes(self.module, self)
-        result.update(self.initial)
-        if self.pycore is not None:
-            submodules = self.pycore._builtin_submodules(self.name)
-            for name, module in submodules.iteritems():
-                result[name] = rope.base.builtins.BuiltinName(module)
-        return result
-
-    @property
-    @utils.saveit
-    def module(self):
-        try:
-            result = __import__(self.name)
-            for token in self.name.split('.')[1:]:
-                result = getattr(result, token, None)
-            return result
-        except ImportError:
-            return
-
-
-class _BuiltinElement(object):
-
-    def __init__(self, builtin, parent=None):
-        self.builtin = builtin
-        self._parent = parent
-
-    def get_doc(self):
-        if self.builtin:
-            return self.builtin.__doc__
-
-    def get_name(self):
-        if self.builtin:
-            return self.builtin.__name__
-
-    @property
-    def parent(self):
-        if self._parent is None:
-            return builtins
-        return self._parent
-
-
-class BuiltinClass(_BuiltinElement, pyobjects.AbstractClass):
-
-    def __init__(self, builtin, attributes, parent=None):
-        _BuiltinElement.__init__(self, builtin, parent)
-        pyobjects.AbstractClass.__init__(self)
-        self.initial = attributes
-
-    @utils.saveit
-    def get_attributes(self):
-        result = _object_attributes(self.builtin, self)
-        result.update(self.initial)
-        return result
-
-
-class BuiltinFunction(_BuiltinElement, pyobjects.AbstractFunction):
-
-    def __init__(self, returned=None, function=None, builtin=None,
-                 argnames=[], parent=None):
-        _BuiltinElement.__init__(self, builtin, parent)
-        pyobjects.AbstractFunction.__init__(self)
-        self.argnames = argnames
-        self.returned = returned
-        self.function = function
-
-    def get_returned_object(self, args):
-        if self.function is not None:
-            return self.function(_CallContext(self.argnames, args))
-        else:
-            return self.returned
-
-    def get_param_names(self, special_args=True):
-        return self.argnames
-
-
-def _object_attributes(obj, parent):
-    attributes = {}
-    for name in dir(obj):
-        if name == 'None':
-            continue
-        child = getattr(obj, name)
-        pyobject = None
-        if inspect.isclass(child):
-            pyobject = BuiltinClass(child, {}, parent=parent)
-        elif inspect.isroutine(child):
-            pyobject = BuiltinFunction(builtin=child, parent=parent)
-        else:
-            pyobject = pyobjects.get_unknown()
-        attributes[name] = BuiltinName(pyobject)
-    return attributes
-
-
-def _create_builtin_type_getter(cls):
-    def _get_builtin(*args):
-        if not hasattr(cls, '_generated'):
-            cls._generated = {}
-        if args not in cls._generated:
-            cls._generated[args] = cls(*args)
-        return cls._generated[args]
-    return _get_builtin
-
-def _create_builtin_getter(cls):
-    type_getter = _create_builtin_type_getter(cls)
-    def _get_builtin(*args):
-        return pyobjects.PyObject(type_getter(*args))
-    return _get_builtin
-
-
-class _CallContext(object):
-
-    def __init__(self, argnames, args):
-        self.argnames = argnames
-        self.args = args
-
-    def _get_scope_and_pyname(self, pyname):
-        if pyname is not None and isinstance(pyname, pynames.AssignedName):
-            pymodule, lineno = pyname.get_definition_location()
-            if pymodule is None:
-                return None, None
-            if lineno is None:
-                lineno = 1
-            scope = pymodule.get_scope().get_inner_scope_for_line(lineno)
-            name = None
-            while name is None and scope is not None:
-                for current in scope.get_names():
-                    if scope[current] is pyname:
-                        name = current
-                        break
-                else:
-                    scope = scope.parent
-            return scope, name
-        return None, None
-
-    def get_argument(self, name):
-        if self.args:
-            args = self.args.get_arguments(self.argnames)
-            return args[self.argnames.index(name)]
-
-    def get_pyname(self, name):
-        if self.args:
-            args = self.args.get_pynames(self.argnames)
-            if name in self.argnames:
-                return args[self.argnames.index(name)]
-
-    def get_arguments(self, argnames):
-        if self.args:
-            return self.args.get_arguments(argnames)
-
-    def get_pynames(self, argnames):
-        if self.args:
-            return self.args.get_pynames(argnames)
-
-    def get_per_name(self):
-        if self.args is None:
-            return None
-        pyname = self.args.get_instance_pyname()
-        scope, name = self._get_scope_and_pyname(pyname)
-        if name is not None:
-            pymodule = pyname.get_definition_location()[0]
-            return pymodule.pycore.object_info.get_per_name(scope, name)
-        return None
-
-    def save_per_name(self, value):
-        if self.args is None:
-            return None
-        pyname = self.args.get_instance_pyname()
-        scope, name = self._get_scope_and_pyname(pyname)
-        if name is not None:
-            pymodule = pyname.get_definition_location()[0]
-            pymodule.pycore.object_info.save_per_name(scope, name, value)
-
-
-class _AttributeCollector(object):
-
-    def __init__(self, type):
-        self.attributes = {}
-        self.type = type
-
-    def __call__(self, name, returned=None, function=None,
-                 argnames=['self'], check_existence=True):
-        try:
-            builtin = getattr(self.type, name)
-        except AttributeError:
-            if check_existence:
-                raise
-            builtin=None
-        self.attributes[name] = BuiltinName(
-            BuiltinFunction(returned=returned, function=function,
-                            argnames=argnames, builtin=builtin))
-
-    def __setitem__(self, name, value):
-        self.attributes[name] = value
-
-
-class List(BuiltinClass):
-
-    def __init__(self, holding=None):
-        self.holding = holding
-        collector = _AttributeCollector(list)
-
-        collector('__iter__', function=self._iterator_get)
-        collector('__new__', function=self._new_list)
-
-        # Adding methods
-        collector('append', function=self._list_add, argnames=['self', 'value'])
-        collector('__setitem__', function=self._list_add,
-                  argnames=['self', 'index', 'value'])
-        collector('insert', function=self._list_add,
-                  argnames=['self', 'index', 'value'])
-        collector('extend', function=self._self_set,
-                  argnames=['self', 'iterable'])
-
-        # Getting methods
-        collector('__getitem__', function=self._list_get)
-        collector('pop', function=self._list_get)
-        collector('__getslice__', function=self._self_get)
-
-        super(List, self).__init__(list, collector.attributes)
-
-    def _new_list(self, args):
-        return _create_builtin(args, get_list)
-
-    def _list_add(self, context):
-        if self.holding is not None:
-            return
-        holding = context.get_argument('value')
-        if holding is not None and holding != pyobjects.get_unknown():
-            context.save_per_name(holding)
-
-    def _self_set(self, context):
-        if self.holding is not None:
-            return
-        iterable = context.get_pyname('iterable')
-        holding = _infer_sequence_for_pyname(iterable)
-        if holding is not None and holding != pyobjects.get_unknown():
-            context.save_per_name(holding)
-
-    def _list_get(self, context):
-        if self.holding is not None:
-            return self.holding
-        return context.get_per_name()
-
-    def _iterator_get(self, context):
-        return get_iterator(self._list_get(context))
-
-    def _self_get(self, context):
-        return get_list(self._list_get(context))
-
-
-get_list = _create_builtin_getter(List)
-get_list_type = _create_builtin_type_getter(List)
-
-
-class Dict(BuiltinClass):
-
-    def __init__(self, keys=None, values=None):
-        self.keys = keys
-        self.values = values
-        item = get_tuple(self.keys, self.values)
-        collector = _AttributeCollector(dict)
-        collector('__new__', function=self._new_dict)
-        collector('__setitem__', function=self._dict_add)
-        collector('popitem', function=self._item_get)
-        collector('pop', function=self._value_get)
-        collector('get', function=self._key_get)
-        collector('keys', function=self._key_list)
-        collector('values', function=self._value_list)
-        collector('items', function=self._item_list)
-        collector('copy', function=self._self_get)
-        collector('__getitem__', function=self._value_get)
-        collector('__iter__', function=self._key_iter)
-        collector('update', function=self._self_set)
-        super(Dict, self).__init__(dict, collector.attributes)
-
-    def _new_dict(self, args):
-        def do_create(holding=None):
-            if holding is None:
-                return get_dict()
-            type = holding.get_type()
-            if isinstance(type, Tuple) and len(type.get_holding_objects()) == 2:
-                return get_dict(*type.get_holding_objects())
-        return _create_builtin(args, do_create)
-
-    def _dict_add(self, context):
-        if self.keys is not None:
-            return
-        key, value = context.get_arguments(['self', 'key', 'value'])[1:]
-        if key is not None and key != pyobjects.get_unknown():
-            context.save_per_name(get_tuple(key, value))
-
-    def _item_get(self, context):
-        if self.keys is not None:
-            return get_tuple(self.keys, self.values)
-        item = context.get_per_name()
-        if item is None or not isinstance(item.get_type(), Tuple):
-            return get_tuple(self.keys, self.values)
-        return item
-
-    def _value_get(self, context):
-        item = self._item_get(context).get_type()
-        return item.get_holding_objects()[1]
-
-    def _key_get(self, context):
-        item = self._item_get(context).get_type()
-        return item.get_holding_objects()[0]
-
-    def _value_list(self, context):
-        return get_list(self._value_get(context))
-
-    def _key_list(self, context):
-        return get_list(self._key_get(context))
-
-    def _item_list(self, context):
-        return get_list(self._item_get(context))
-
-    def _value_iter(self, context):
-        return get_iterator(self._value_get(context))
-
-    def _key_iter(self, context):
-        return get_iterator(self._key_get(context))
-
-    def _item_iter(self, context):
-        return get_iterator(self._item_get(context))
-
-    def _self_get(self, context):
-        item = self._item_get(context).get_type()
-        key, value = item.get_holding_objects()[:2]
-        return get_dict(key, value)
-
-    def _self_set(self, context):
-        if self.keys is not None:
-            return
-        new_dict = context.get_pynames(['self', 'd'])[1]
-        if new_dict and isinstance(new_dict.get_object().get_type(), Dict):
-            args = arguments.ObjectArguments([new_dict])
-            items = new_dict.get_object()['popitem'].\
-                    get_object().get_returned_object(args)
-            context.save_per_name(items)
-        else:
-            holding = _infer_sequence_for_pyname(new_dict)
-            if holding is not None and isinstance(holding.get_type(), Tuple):
-                context.save_per_name(holding)
-
-
-get_dict = _create_builtin_getter(Dict)
-get_dict_type = _create_builtin_type_getter(Dict)
-
-
-class Tuple(BuiltinClass):
-
-    def __init__(self, *objects):
-        self.objects = objects
-        first = None
-        if objects:
-            first = objects[0]
-        attributes = {
-            '__getitem__': BuiltinName(BuiltinFunction(first)),
-            '__getslice__': BuiltinName(BuiltinFunction(pyobjects.PyObject(self))),
-            '__new__': BuiltinName(BuiltinFunction(function=self._new_tuple)),
-            '__iter__': BuiltinName(BuiltinFunction(get_iterator(first)))}
-        super(Tuple, self).__init__(tuple, attributes)
-
-    def get_holding_objects(self):
-        return self.objects
-
-    def _new_tuple(self, args):
-        return _create_builtin(args, get_tuple)
-
-
-get_tuple = _create_builtin_getter(Tuple)
-get_tuple_type = _create_builtin_type_getter(Tuple)
-
-
-class Set(BuiltinClass):
-
-    def __init__(self, holding=None):
-        self.holding = holding
-        collector = _AttributeCollector(set)
-        collector('__new__', function=self._new_set)
-
-        self_methods = ['copy', 'difference', 'intersection',
-                        'symmetric_difference', 'union']
-        for method in self_methods:
-            collector(method, function=self._self_get)
-        collector('add', function=self._set_add)
-        collector('update', function=self._self_set)
-        collector('update', function=self._self_set)
-        collector('symmetric_difference_update', function=self._self_set)
-        collector('difference_update', function=self._self_set)
-
-        collector('pop', function=self._set_get)
-        collector('__iter__', function=self._iterator_get)
-        super(Set, self).__init__(set, collector.attributes)
-
-    def _new_set(self, args):
-        return _create_builtin(args, get_set)
-
-    def _set_add(self, context):
-        if self.holding is not None:
-            return
-        holding = context.get_arguments(['self', 'value'])[1]
-        if holding is not None and holding != pyobjects.get_unknown():
-            context.save_per_name(holding)
-
-    def _self_set(self, context):
-        if self.holding is not None:
-            return
-        iterable = context.get_pyname('iterable')
-        holding = _infer_sequence_for_pyname(iterable)
-        if holding is not None and holding != pyobjects.get_unknown():
-            context.save_per_name(holding)
-
-    def _set_get(self, context):
-        if self.holding is not None:
-            return self.holding
-        return context.get_per_name()
-
-    def _iterator_get(self, context):
-        return get_iterator(self._set_get(context))
-
-    def _self_get(self, context):
-        return get_list(self._set_get(context))
-
-
-get_set = _create_builtin_getter(Set)
-get_set_type = _create_builtin_type_getter(Set)
-
-
-class Str(BuiltinClass):
-
-    def __init__(self):
-        self_object = pyobjects.PyObject(self)
-        collector = _AttributeCollector(str)
-        collector('__iter__', get_iterator(self_object), check_existence=False)
-
-        self_methods = ['__getitem__', '__getslice__', 'capitalize', 'center',
-                        'decode', 'encode', 'expandtabs', 'join', 'ljust',
-                        'lower', 'lstrip', 'replace', 'rjust', 'rstrip', 'strip',
-                        'swapcase', 'title', 'translate', 'upper', 'zfill']
-        for method in self_methods:
-            collector(method, self_object)
-
-        for method in ['rsplit', 'split', 'splitlines']:
-            collector(method, get_list(self_object))
-
-        super(Str, self).__init__(str, collector.attributes)
-
-    def get_doc(self):
-        return str.__doc__
-
-
-get_str = _create_builtin_getter(Str)
-get_str_type = _create_builtin_type_getter(Str)
-
-
-class BuiltinName(pynames.PyName):
-
-    def __init__(self, pyobject):
-        self.pyobject = pyobject
-
-    def get_object(self):
-        return self.pyobject
-
-    def get_definition_location(self):
-        return (None, None)
-
-class Iterator(pyobjects.AbstractClass):
-
-    def __init__(self, holding=None):
-        super(Iterator, self).__init__()
-        self.holding = holding
-        self.attributes = {
-            'next': BuiltinName(BuiltinFunction(self.holding)),
-            '__iter__': BuiltinName(BuiltinFunction(self))}
-
-    def get_attributes(self):
-        return self.attributes
-
-    def get_returned_object(self, args):
-        return self.holding
-
-get_iterator = _create_builtin_getter(Iterator)
-
-
-class Generator(pyobjects.AbstractClass):
-
-    def __init__(self, holding=None):
-        super(Generator, self).__init__()
-        self.holding = holding
-        self.attributes = {
-            'next': BuiltinName(BuiltinFunction(self.holding)),
-            '__iter__': BuiltinName(BuiltinFunction(get_iterator(self.holding))),
-            'close': BuiltinName(BuiltinFunction()),
-            'send': BuiltinName(BuiltinFunction()),
-            'throw': BuiltinName(BuiltinFunction())}
-
-    def get_attributes(self):
-        return self.attributes
-
-    def get_returned_object(self, args):
-        return self.holding
-
-get_generator = _create_builtin_getter(Generator)
-
-
-class File(BuiltinClass):
-
-    def __init__(self):
-        self_object = pyobjects.PyObject(self)
-        str_object = get_str()
-        str_list = get_list(get_str())
-        attributes = {}
-        def add(name, returned=None, function=None):
-            builtin = getattr(file, name, None)
-            attributes[name] = BuiltinName(
-                BuiltinFunction(returned=returned, function=function,
-                                builtin=builtin))
-        add('__iter__', get_iterator(str_object))
-        for method in ['next', 'read', 'readline', 'readlines']:
-            add(method, str_list)
-        for method in ['close', 'flush', 'lineno', 'isatty', 'seek', 'tell',
-                       'truncate', 'write', 'writelines']:
-            add(method)
-        super(File, self).__init__(file, attributes)
-
-
-get_file = _create_builtin_getter(File)
-get_file_type = _create_builtin_type_getter(File)
-
-
-class Property(BuiltinClass):
-
-    def __init__(self, fget=None, fset=None, fdel=None, fdoc=None):
-        self._fget = fget
-        self._fdoc = fdoc
-        attributes = {
-            'fget': BuiltinName(BuiltinFunction()),
-            'fset': BuiltinName(pynames.UnboundName()),
-            'fdel': BuiltinName(pynames.UnboundName()),
-            '__new__': BuiltinName(BuiltinFunction(function=_property_function))}
-        super(Property, self).__init__(property, attributes)
-
-    def get_property_object(self, args):
-        if isinstance(self._fget, pyobjects.AbstractFunction):
-            return self._fget.get_returned_object(args)
-
-
-def _property_function(args):
-    parameters = args.get_arguments(['fget', 'fset', 'fdel', 'fdoc'])
-    return pyobjects.PyObject(Property(parameters[0]))
-
-
-class Lambda(pyobjects.AbstractFunction):
-
-    def __init__(self, node, scope):
-        super(Lambda, self).__init__()
-        self.node = node
-        self.scope = scope
-
-    def get_returned_object(self, args):
-        result = rope.base.evaluate.eval_node(self.scope, self.node.body)
-        if result is not None:
-            return result.get_object()
-        else:
-            return pyobjects.get_unknown()
-
-    def get_pattributes(self):
-        return {}
-
-
-class BuiltinObject(BuiltinClass):
-
-    def __init__(self):
-        super(BuiltinObject, self).__init__(object, {})
-
-
-class BuiltinType(BuiltinClass):
-
-    def __init__(self):
-        super(BuiltinType, self).__init__(type, {})
-
-
-def _infer_sequence_for_pyname(pyname):
-    if pyname is None:
-        return None
-    seq = pyname.get_object()
-    args = arguments.ObjectArguments([pyname])
-    if '__iter__' in seq:
-        iter = seq['__iter__'].get_object().\
-               get_returned_object(args)
-        if iter is not None and 'next' in iter:
-            holding = iter['next'].get_object().\
-                      get_returned_object(args)
-            return holding
-
-
-def _create_builtin(args, creator):
-    passed = args.get_pynames(['sequence'])[0]
-    if passed is None:
-        holding = None
-    else:
-        holding = _infer_sequence_for_pyname(passed)
-    if holding is not None:
-        return creator(holding)
-    else:
-        return creator()
-
-
-def _range_function(args):
-    return get_list()
-
-def _reversed_function(args):
-    return _create_builtin(args, get_iterator)
-
-def _sorted_function(args):
-    return _create_builtin(args, get_list)
-
-def _super_function(args):
-    passed_class, passed_self = args.get_arguments(['type', 'self'])
-    if passed_self is None:
-        return passed_class
-    else:
-        #pyclass = passed_self.get_type()
-        pyclass = passed_class
-        if isinstance(pyclass, pyobjects.AbstractClass):
-            supers = pyclass.get_superclasses()
-            if supers:
-                return pyobjects.PyObject(supers[0])
-        return passed_self
-
-def _zip_function(args):
-    args = args.get_pynames(['sequence'])
-    objects = []
-    for seq in args:
-        if seq is None:
-            holding = None
-        else:
-            holding = _infer_sequence_for_pyname(seq)
-        objects.append(holding)
-    tuple = get_tuple(*objects)
-    return get_list(tuple)
-
-def _enumerate_function(args):
-    passed = args.get_pynames(['sequence'])[0]
-    if passed is None:
-        holding = None
-    else:
-        holding = _infer_sequence_for_pyname(passed)
-    tuple = get_tuple(None, holding)
-    return get_iterator(tuple)
-
-def _iter_function(args):
-    passed = args.get_pynames(['sequence'])[0]
-    if passed is None:
-        holding = None
-    else:
-        holding = _infer_sequence_for_pyname(passed)
-    return get_iterator(holding)
-
-def _input_function(args):
-    return get_str()
-
-
-_initial_builtins = {
-    'list': BuiltinName(get_list_type()),
-    'dict': BuiltinName(get_dict_type()),
-    'tuple': BuiltinName(get_tuple_type()),
-    'set': BuiltinName(get_set_type()),
-    'str': BuiltinName(get_str_type()),
-    'file': BuiltinName(get_file_type()),
-    'open': BuiltinName(get_file_type()),
-    'unicode': BuiltinName(get_str_type()),
-    'range': BuiltinName(BuiltinFunction(function=_range_function, builtin=range)),
-    'reversed': BuiltinName(BuiltinFunction(function=_reversed_function, builtin=reversed)),
-    'sorted': BuiltinName(BuiltinFunction(function=_sorted_function, builtin=sorted)),
-    'super': BuiltinName(BuiltinFunction(function=_super_function, builtin=super)),
-    'property': BuiltinName(BuiltinFunction(function=_property_function, builtin=property)),
-    'zip': BuiltinName(BuiltinFunction(function=_zip_function, builtin=zip)),
-    'enumerate': BuiltinName(BuiltinFunction(function=_enumerate_function, builtin=enumerate)),
-    'object': BuiltinName(BuiltinObject()),
-    'type': BuiltinName(BuiltinType()),
-    'iter': BuiltinName(BuiltinFunction(function=_iter_function, builtin=iter)),
-    'raw_input': BuiltinName(BuiltinFunction(function=_input_function, builtin=raw_input)),
-    }
-
-builtins = BuiltinModule('__builtin__', initial=_initial_builtins)

File rope-0.9/build/lib/rope/base/change.py

-import datetime
-import difflib
-import os
-import time
-import warnings
-
-import rope.base.fscommands
-from rope.base import taskhandle, exceptions, utils
-
-
-class Change(object):
-    """The base class for changes
-
-    Rope refactorings return `Change` objects.  They can be previewed,
-    committed or undone.
-    """
-
-    def do(self, job_set=None):
-        """Perform the change
-        
-        .. note:: Do use this directly.  Use `Project.do()` instead.
-        """
-
-    def undo(self, job_set=None):
-        """Perform the change
-        
-        .. note:: Do use this directly.  Use `History.undo()` instead.
-        """
-
-    def get_description(self):
-        """Return the description of this change
-
-        This can be used for previewing the changes.
-        """
-        return str(self)
-
-    def get_changed_resources(self):
-        """Return the list of resources that will be changed"""
-        return []
-
-    @property
-    @utils.saveit
-    def _operations(self):
-        return _ResourceOperations(self.resource.project)
-
-
-class ChangeSet(Change):
-    """A collection of `Change` objects
-
-    This class holds a collection of changes.  This class provides
-    these fields:
-
-    * `changes`: the list of changes
-    * `description`: the goal of these changes
-    """
-
-    def __init__(self, description, timestamp=None):
-        self.changes = []
-        self.description = description
-        self.time = timestamp
-
-    def do(self, job_set=taskhandle.NullJobSet()):
-        try:
-            done = []
-            for change in self.changes:
-                change.do(job_set)
-                done.append(change)
-            self.time = time.time()
-        except Exception:
-            for change in done:
-                change.undo()
-            raise
-
-    def undo(self, job_set=taskhandle.NullJobSet()):
-        try:
-            done = []
-            for change in reversed(self.changes):
-                change.undo(job_set)
-                done.append(change)
-        except Exception:
-            for change in done:
-                change.do()
-            raise
-
-    def add_change(self, change):
-        self.changes.append(change)
-
-    def get_description(self):
-        result = [str(self) + ':\n\n\n']
-        for change in self.changes:
-            result.append(change.get_description())
-            result.append('\n')
-        return ''.join(result)
-
-    def __str__(self):
-        if self.time is not None:
-            date = datetime.datetime.fromtimestamp(self.time)
-            if date.date() == datetime.date.today():
-                string_date = 'today'
-            elif date.date() == (datetime.date.today() - datetime.timedelta(1)):
-                string_date = 'yesterday'
-            elif date.year == datetime.date.today().year:
-                string_date = date.strftime('%b %d')
-            else:
-                string_date = date.strftime('%d %b, %Y')
-            string_time = date.strftime('%H:%M:%S')
-            string_time = '%s %s ' % (string_date, string_time)
-            return self.description + ' - ' + string_time
-        return self.description
-
-    def get_changed_resources(self):
-        result = set()
-        for change in self.changes:
-            result.update(change.get_changed_resources())
-        return result
-
-
-def _handle_job_set(function):
-    """A decorator for handling `taskhandle.JobSet`\s
-
-    A decorator for handling `taskhandle.JobSet`\s for `do` and `undo`
-    methods of `Change`\s.
-    """
-    def call(self, job_set=taskhandle.NullJobSet()):
-        job_set.started_job(str(self))
-        function(self)
-        job_set.finished_job()
-    return call
-
-
-class ChangeContents(Change):
-    """A class to change the contents of a file
-
-    Fields:
-
-    * `resource`: The `rope.base.resources.File` to change
-    * `new_contents`: What to write in the file
-    """
-
-    def __init__(self, resource, new_contents, old_contents=None):
-        self.resource = resource
-        # IDEA: Only saving diffs; possible problems when undo/redoing
-        self.new_contents = new_contents
-        self.old_contents = old_contents
-
-    @_handle_job_set
-    def do(self):
-        if self.old_contents is None:
-            self.old_contents = self.resource.read()
-        self._operations.write_file(self.resource, self.new_contents)
-
-    @_handle_job_set
-    def undo(self):
-        if self.old_contents is None:
-            raise exceptions.HistoryError(
-                'Undoing a change that is not performed yet!')
-        self._operations.write_file(self.resource, self.old_contents)
-
-    def __str__(self):
-        return 'Change <%s>' % self.resource.path
-
-    def get_description(self):
-        new = self.new_contents
-        old = self.old_contents
-        if old is None:
-            if self.resource.exists():
-                old = self.resource.read()
-            else:
-                old = ''
-        result = difflib.unified_diff(
-            old.splitlines(True), new.splitlines(True),
-            'a/' + self.resource.path, 'b/' + self.resource.path)
-        return ''.join(list(result))
-
-    def get_changed_resources(self):
-        return [self.resource]
-
-
-class MoveResource(Change):
-    """Move a resource to a new location
-
-    Fields:
-
-    * `resource`: The `rope.base.resources.Resource` to move
-    * `new_resource`: The destination for move; It is the moved
-      resource not the folder containing that resource.
-    """
-
-    def __init__(self, resource, new_location, exact=False):
-        self.project = resource.project
-        self.resource = resource
-        if not exact:
-            new_location = _get_destination_for_move(resource, new_location)
-        if resource.is_folder():
-            self.new_resource = self.project.get_folder(new_location)
-        else:
-            self.new_resource = self.project.get_file(new_location)
-
-    @_handle_job_set
-    def do(self):
-        self._operations.move(self.resource, self.new_resource)
-
-    @_handle_job_set
-    def undo(self):
-        self._operations.move(self.new_resource, self.resource)
-
-    def __str__(self):
-        return 'Move <%s>' % self.resource.path
-
-    def get_description(self):
-        return 'rename from %s\nrename to %s' % (self.resource.path,
-                                                 self.new_resource.path)
-
-    def get_changed_resources(self):
-        return [self.resource, self.new_resource]
-
-
-class CreateResource(Change):
-    """A class to create a resource
-
-    Fields:
-
-    * `resource`: The resource to create
-    """
-
-    def __init__(self, resource):
-        self.resource = resource
-
-    @_handle_job_set
-    def do(self):
-        self._operations.create(self.resource)
-
-    @_handle_job_set
-    def undo(self):
-        self._operations.remove(self.resource)
-
-    def __str__(self):
-        return 'Create Resource <%s>' % (self.resource.path)
-
-    def get_description(self):
-        return 'new file %s' % (self.resource.path)
-
-    def get_changed_resources(self):
-        return [self.resource]
-
-    def _get_child_path(self, parent, name):
-        if parent.path == '':
-            return name
-        else:
-            return parent.path + '/' + name
-
-
-class CreateFolder(CreateResource):
-    """A class to create a folder
-
-    See docs for `CreateResource`.
-    """
-
-    def __init__(self, parent, name):
-        resource = parent.project.get_folder(self._get_child_path(parent, name))
-        super(CreateFolder, self).__init__(resource)
-
-
-class CreateFile(CreateResource):
-    """A class to create a file
-
-    See docs for `CreateResource`.
-    """
-
-    def __init__(self, parent, name):
-        resource = parent.project.get_file(self._get_child_path(parent, name))
-        super(CreateFile, self).__init__(resource)
-
-
-class RemoveResource(Change):
-    """A class to remove a resource
-
-    Fields:
-
-    * `resource`: The resource to be removed
-    """
-
-    def __init__(self, resource):
-        self.resource = resource
-
-    @_handle_job_set
-    def do(self):
-        self._operations.remove(self.resource)
-
-    # TODO: Undoing remove operations
-    @_handle_job_set
-    def undo(self):
-        raise NotImplementedError(
-            'Undoing `RemoveResource` is not implemented yet.')
-
-    def __str__(self):
-        return 'Remove <%s>' % (self.resource.path)
-
-    def get_changed_resources(self):
-        return [self.resource]
-
-