Commit a7baceb9 authored by Ondřej Nový's avatar Ondřej Nový

Convert git repository from git-dpm to gbp layout

parent 79b28f4e
Metadata-Version: 1.1
Name: rope
Version: 0.10.5
Version: 0.10.2
Summary: a python refactoring library...
Home-page: https://github.com/python-rope/rope
Home-page: http://rope.sf.net/
Author: Ali Gholami Rudi
Author-email: aligrudi@users.sourceforge.net
License: GNU GPL
Description:
**Note:** *Please note that this project has been moved to* `GitHub python-rope / rope`_
.. _GitHub python-rope / rope: https://github.com/python-rope/rope
......@@ -21,15 +23,16 @@ Description:
`Rope`_ is a python refactoring library.
.. _`rope`: https://github.com/python-rope/rope
.. _`rope`: http://rope.sf.net/
Notes
New Features
============
* Nick Smith <nicks@fastmail.fm> takes over maintaining rope. Many thanks to
Matěj Cepl for his work maintaining rope for the past few years!!
* Full python3 support is in progress... stay tuned
* Under new management! Matěj Cepl <mcepl@cepl.eu> takes it hesitantly
over
* Merged all availables pull requests and patches to the main codebase
* Tests are green again
Platform: UNKNOWN
......@@ -42,11 +45,4 @@ Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development
**Note:** *Please note that this project has been moved to* `GitHub python-rope / rope`_
.. _GitHub python-rope / rope: https://github.com/python-rope/rope
......@@ -12,15 +14,16 @@ Overview
`Rope`_ is a python refactoring library.
.. _`rope`: https://github.com/python-rope/rope
.. _`rope`: http://rope.sf.net/
Notes
New Features
============
* Nick Smith <nicks@fastmail.fm> takes over maintaining rope. Many thanks to
Matěj Cepl for his work maintaining rope for the past few years!!
* Full python3 support is in progress... stay tuned
* Under new management! Matěj Cepl <mcepl@cepl.eu> takes it hesitantly
over
* Merged all availables pull requests and patches to the main codebase
* Tests are green again
Getting Started
===============
......@@ -48,15 +51,14 @@ googlegroups.com`_.
License
=======
This program is under the terms of GPL v2 (GNU General Public License).
Have a look at `COPYING`_ for more information.
This program is under the terms of GPL (GNU General Public License).
Have a look at ``COPYING`` file for more information.
.. _`docs/rope.rst`: docs/rope.html
.. _`docs/overview.rst`: docs/overview.html
.. _`docs/contributing.rst`: docs/contributing.html
.. _`docs/library.rst`: docs/library.html
.. _`COPYING`: COPYING
.. image:: https://secure.travis-ci.org/python-rope/rope.png
:alt: Build Status
# see git-dpm(1) from git-dpm package
da4b3278b40a1cf16798771e5b67d918d8693393
da4b3278b40a1cf16798771e5b67d918d8693393
0d2c73dafa27bdee016a7008b8f15afec48ffe20
0d2c73dafa27bdee016a7008b8f15afec48ffe20
rope_0.10.5.orig.tar.gz
9e4dd71acbdd45cbaf3d6493c2298d1e1d5f786c
243931
debianTag="debian/%e%v"
patchedTag="patched/%e%v"
upstreamTag="upstream/%e%u"
......@@ -6,6 +6,7 @@ rope (0.10.5-3) UNRELEASED; urgency=medium
* d/tests: Use AUTOPKGTEST_TMP instead of ADTTMP
* d/control: Remove ancient X-Python-Version field
* d/control: Remove ancient X-Python3-Version field
* Convert git repository from git-dpm to gbp layout
-- Ondřej Nový <onovy@debian.org> Tue, 13 Feb 2018 10:00:17 +0100
......
......@@ -3,19 +3,19 @@
======================
Getting Involved!
=================
Get Involved!
=============
Rope's main goal is being a good refactoring tool for python. It also
provides some IDE helpers. If you would like to contribute, you're
welcome to!
provides some IDE helpers. If you like to contribute, you're welcome!
How to Help Rope?
=================
Rope's mailing list is `rope-dev (at) googlegroups.com`_. Click the
"Join group to post" button to subscribe. Then:
Rope mailing list is `rope-dev (at) googlegroups.com`_. You can send
a mail to ``rope-dev-subscribe (at) googlegroups [dot] com`` to
subscribe.
* Use rope
* Send bug reports and request features
......@@ -28,8 +28,8 @@ Rope's mailing list is `rope-dev (at) googlegroups.com`_. Click the
Wish List
=========
You are welcome to send your patches to the `rope-dev (at)
googlegroups.com`_ mailing list. Here is a list of suggestions.
You are welcome to send your patches to `rope-dev (at)
googlegroups.com`_ mailing list. Here is only a list of suggestions.
Issues
------
......@@ -78,8 +78,12 @@ more information.
Source Repository
=================
Rope uses GitHub_. The repository exists at
`https://github.com/python-rope/rope`_.
Rope uses Mercurial_ CMS:
* Rope main branch: http://bitbucket.org/agr/rope
* Rope py3k branch: http://bitbucket.org/agr/rope_py3k
.. _Mercurial: http://selenic.com/mercurial
Submitting patches
......@@ -87,21 +91,11 @@ Submitting patches
Patches are welcome.
Programming Style
-----------------
Patch style
-----------
* Follow :PEP:`8`.
* Use four spaces for indentation.
* Include good unit-tests when appropriate.
* Include good unit-tests if possible.
* Rope test suite should pass after patching
Sending Patches
---------------
Follow the instructions on GitHub_ on how to setup Git and fork the
`python-rope/rope`_ repository. Once your changes are ready, send a
`pull request`_ for review.
.. _GitHub: http://github.com/
.. _`python-rope/rope`: https://github.com/python-rope/rope
.. _`pull request`: https://help.github.com/articles/using-pull-requests
* Use ``hg export`` format to preserve your identity
This diff is collapsed.
This diff is collapsed.
......@@ -44,7 +44,6 @@ Features implemented so far:
* Static and dynamic object analysis
* Handling built-in container types
* Saving object information on disk and validating them
* Type hints using docstring or type comments PEP 0484
For more information see `overview.rst`_.
......
Metadata-Version: 1.1
Name: rope
Version: 0.10.5
Summary: a python refactoring library...
Home-page: https://github.com/python-rope/rope
Author: Ali Gholami Rudi
Author-email: aligrudi@users.sourceforge.net
License: GNU GPL
Description:
.. _GitHub python-rope / rope: https://github.com/python-rope/rope
========================================
rope, a python refactoring library ...
========================================
Overview
========
`Rope`_ is a python refactoring library.
.. _`rope`: https://github.com/python-rope/rope
Notes
============
* Nick Smith <nicks@fastmail.fm> takes over maintaining rope. Many thanks to
Matěj Cepl for his work maintaining rope for the past few years!!
* Full python3 support is in progress... stay tuned
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: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development
COPYING
MANIFEST.in
README.rst
setup.py
docs/contributing.rst
docs/done.rst
docs/library.rst
docs/overview.rst
docs/rope.rst
docs/dev/issues.rst
docs/dev/todo.rst
rope/__init__.py
rope.egg-info/PKG-INFO
rope.egg-info/SOURCES.txt
rope.egg-info/dependency_links.txt
rope.egg-info/top_level.txt
rope/base/__init__.py
rope/base/arguments.py
rope/base/ast.py
rope/base/astutils.py
rope/base/builtins.py
rope/base/change.py
rope/base/codeanalyze.py
rope/base/default_config.py
rope/base/evaluate.py
rope/base/exceptions.py
rope/base/fscommands.py
rope/base/history.py
rope/base/libutils.py
rope/base/prefs.py
rope/base/project.py
rope/base/pycore.py
rope/base/pynames.py
rope/base/pynamesdef.py
rope/base/pyobjects.py
rope/base/pyobjectsdef.py
rope/base/pyscopes.py
rope/base/resourceobserver.py
rope/base/resources.py
rope/base/simplify.py
rope/base/stdmods.py
rope/base/taskhandle.py
rope/base/worder.py
rope/base/oi/__init__.py
rope/base/oi/doa.py
rope/base/oi/memorydb.py
rope/base/oi/objectdb.py
rope/base/oi/objectinfo.py
rope/base/oi/runmod.py
rope/base/oi/soa.py
rope/base/oi/soi.py
rope/base/oi/transform.py
rope/base/oi/type_hinting/__init__.py
rope/base/oi/type_hinting/evaluate.py
rope/base/oi/type_hinting/factory.py
rope/base/oi/type_hinting/interfaces.py
rope/base/oi/type_hinting/utils.py
rope/base/oi/type_hinting/providers/__init__.py
rope/base/oi/type_hinting/providers/composite.py
rope/base/oi/type_hinting/providers/docstrings.py
rope/base/oi/type_hinting/providers/inheritance.py
rope/base/oi/type_hinting/providers/interfaces.py
rope/base/oi/type_hinting/providers/numpydocstrings.py
rope/base/oi/type_hinting/providers/pep0484_type_comments.py
rope/base/oi/type_hinting/resolvers/__init__.py
rope/base/oi/type_hinting/resolvers/composite.py
rope/base/oi/type_hinting/resolvers/interfaces.py
rope/base/oi/type_hinting/resolvers/types.py
rope/base/utils/__init__.py
rope/base/utils/datastructures.py
rope/base/utils/pycompat.py
rope/contrib/__init__.py
rope/contrib/autoimport.py
rope/contrib/changestack.py
rope/contrib/codeassist.py
rope/contrib/finderrors.py
rope/contrib/findit.py
rope/contrib/fixmodnames.py
rope/contrib/fixsyntax.py
rope/contrib/generate.py
rope/refactor/__init__.py
rope/refactor/change_signature.py
rope/refactor/encapsulate_field.py
rope/refactor/extract.py
rope/refactor/functionutils.py
rope/refactor/inline.py
rope/refactor/introduce_factory.py
rope/refactor/introduce_parameter.py
rope/refactor/localtofield.py
rope/refactor/method_object.py
rope/refactor/move.py
rope/refactor/multiproject.py
rope/refactor/occurrences.py
rope/refactor/patchedast.py
rope/refactor/rename.py
rope/refactor/restructure.py
rope/refactor/similarfinder.py
rope/refactor/sourceutils.py
rope/refactor/suites.py
rope/refactor/topackage.py
rope/refactor/usefunction.py
rope/refactor/wildcards.py
rope/refactor/importutils/__init__.py
rope/refactor/importutils/actions.py
rope/refactor/importutils/importinfo.py
rope/refactor/importutils/module_imports.py
ropetest/__init__.py
ropetest/advanced_oi_test.py
ropetest/builtinstest.py
ropetest/codeanalyzetest.py
ropetest/historytest.py
ropetest/objectdbtest.py
ropetest/objectinfertest.py
ropetest/projecttest.py
ropetest/pycoretest.py
ropetest/pyscopestest.py
ropetest/runmodtest.py
ropetest/simplifytest.py
ropetest/testutils.py
ropetest/type_hinting_test.py
ropetest/contrib/__init__.py
ropetest/contrib/autoimporttest.py
ropetest/contrib/changestacktest.py
ropetest/contrib/codeassisttest.py
ropetest/contrib/finderrorstest.py
ropetest/contrib/findittest.py
ropetest/contrib/fixmodnamestest.py
ropetest/contrib/generatetest.py
ropetest/refactor/__init__.py
ropetest/refactor/change_signature_test.py
ropetest/refactor/extracttest.py
ropetest/refactor/importutilstest.py
ropetest/refactor/inlinetest.py
ropetest/refactor/movetest.py
ropetest/refactor/multiprojecttest.py
ropetest/refactor/patchedasttest.py
ropetest/refactor/renametest.py
ropetest/refactor/restructuretest.py
ropetest/refactor/similarfindertest.py
ropetest/refactor/suitestest.py
ropetest/refactor/usefunctiontest.py
\ No newline at end of file
"""rope, a python refactoring library"""
INFO = __doc__
VERSION = '0.10.5'
VERSION = '0.10.2'
COPYRIGHT = """\
Copyright (C) 2015-2016 Nicholas Smith
Copyright (C) 2014-2015 Matej Cepl
Copyright (C) 2006-2012 Ali Gholami Rudi
Copyright (C) 2009-2012 Anton Gritsay
......
......@@ -3,23 +3,18 @@ from _ast import *
from rope.base import fscommands
try:
unicode
except NameError:
unicode = str
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 b'\r' in source:
source = source.replace(b'\r\n', b'\n').replace(b'\r', b'\n')
if not source.endswith(b'\n'):
source += b'\n'
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) as e:
except (TypeError, ValueError), e:
error = SyntaxError()
error.lineno = 1
error.filename = filename
......
......@@ -40,9 +40,6 @@ class _NodeNameCollector(object):
def _Name(self, node):
self._add_node(node)
def _ExceptHandler(self, node):
self.names.append((node.name, []))
def _Tuple(self, node):
new_levels = []
if self.levels is not None:
......
"""This module trys to support builtin types and functions."""
import inspect
try:
raw_input
except NameError:
raw_input = input
import rope.base.evaluate
from rope.base.utils import pycompat
from rope.base import pynames, pyobjects, arguments, utils
from rope.base import pynames, pyobjects, arguments, utils, ast
class BuiltinModule(pyobjects.AbstractModule):
......@@ -37,7 +32,7 @@ class BuiltinModule(pyobjects.AbstractModule):
result.update(self.initial)
if self.pycore is not None:
submodules = self.pycore._builtin_submodules(self.name)
for name, module in submodules.items():
for name, module in submodules.iteritems():
result[name] = rope.base.builtins.BuiltinName(module)
return result
......@@ -87,9 +82,6 @@ class BuiltinClass(_BuiltinElement, pyobjects.AbstractClass):
result.update(self.initial)
return result
def get_module(self):
return builtins
class BuiltinFunction(_BuiltinElement, pyobjects.AbstractFunction):
......@@ -274,10 +266,7 @@ class List(BuiltinClass):
# Getting methods
collector('__getitem__', function=self._list_get)
collector('pop', function=self._list_get)
try:
collector('__getslice__', function=self._list_get)
except AttributeError:
pass
collector('__getslice__', function=self._self_get)
super(List, self).__init__(list, collector.attributes)
......@@ -301,10 +290,6 @@ class List(BuiltinClass):
def _list_get(self, context):
if self.holding is not None:
args = context.get_arguments(['self', 'key'])
if (len(args) > 1 and args[1] is not None and
args[1].get_type() == builtins['slice'].get_object()):
return get_list(self.holding)
return self.holding
return context.get_per_name()
......@@ -422,7 +407,7 @@ class Tuple(BuiltinClass):
if objects:
first = objects[0]
attributes = {
'__getitem__': BuiltinName(BuiltinFunction(first)), # TODO: add slice support
'__getitem__': BuiltinName(BuiltinFunction(first)),
'__getslice__':
BuiltinName(BuiltinFunction(pyobjects.PyObject(self))),
'__new__': BuiltinName(BuiltinFunction(function=self._new_tuple)),
......@@ -502,21 +487,14 @@ class Str(BuiltinClass):
collector = _AttributeCollector(str)
collector('__iter__', get_iterator(self_object), check_existence=False)
self_methods = ['__getitem__', 'capitalize', 'center',
'encode', 'expandtabs', 'join', 'ljust',
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)
py2_self_methods = ["__getslice__", "decode"]
for method in py2_self_methods:
try:
collector(method, self_object)
except AttributeError:
pass
for method in ['rsplit', 'split', 'splitlines']:
collector(method, get_list(self_object))
......@@ -590,7 +568,7 @@ class File(BuiltinClass):
attributes = {}
def add(name, returned=None, function=None):
builtin = getattr(open, name, None)
builtin = getattr(file, name, None)
attributes[name] = BuiltinName(
BuiltinFunction(returned=returned, function=function,
builtin=builtin))
......@@ -600,7 +578,7 @@ class File(BuiltinClass):
for method in ['close', 'flush', 'lineno', 'isatty', 'seek', 'tell',
'truncate', 'write', 'writelines']:
add(method)
super(File, self).__init__(open, attributes)
super(File, self).__init__(file, attributes)
get_file = _create_builtin_getter(File)
......@@ -664,12 +642,12 @@ class Lambda(pyobjects.AbstractFunction):
return 'lambda'
def get_param_names(self, special_args=True):
result = [pycompat.get_ast_arg_arg(node) for node in self.arguments.args
if isinstance(node, pycompat.ast_arg_type)]
result = [node.id for node in self.arguments.args
if isinstance(node, ast.Name)]
if self.arguments.vararg:
result.append('*' + pycompat.get_ast_arg_arg(self.arguments.vararg))
result.append('*' + self.arguments.vararg)
if self.arguments.kwarg:
result.append('**' + pycompat.get_ast_arg_arg(self.arguments.kwarg))
result.append('**' + self.arguments.kwarg)
return result
@property
......@@ -809,4 +787,4 @@ _initial_builtins = {
builtin=raw_input)),
}
builtins = BuiltinModule(pycompat.builtins.__name__, initial=_initial_builtins)
builtins = BuiltinModule('__builtin__', initial=_initial_builtins)
......@@ -369,7 +369,7 @@ class _ResourceOperations(object):
fscommands.create_file(resource_path)
else:
fscommands.create_folder(resource_path)
except IOError as e:
except IOError, e:
raise exceptions.RopeError(e)
......
......@@ -19,7 +19,9 @@ class ChangeCollector(object):
if not self.changes:
return None
self.changes.sort(key=lambda x: x[:2])
def compare_changes(change1, change2):
return cmp(change1[:2], change2[:2])
self.changes.sort(compare_changes)
pieces = []
last_changed = 0
for change in self.changes:
......@@ -129,31 +131,31 @@ class _CustomGenerator(object):
i += 1
return result
# Matches all backslashes before the token, to detect escaped quotes
_main_tokens = re.compile(r'(\\*)((\'\'\'|"""|\'|")|#|\[|\]|\{|\}|\(|\))')
_main_chars = re.compile(r'[\'|"|#|\\|\[|\]|\{|\}|\(|\)]')
def _analyze_line(self, line):
token = None
for match in self._main_tokens.finditer(line):
prefix = match.group(1)
token = match.group(2)
# Skip any tokens which are escaped
if len(prefix) % 2 == 1:
continue
if token in ["'''", '"""', "'", '"']:
char = None
for match in self._main_chars.finditer(line):
char = match.group()
i = match.start()
if char in '\'"':
if not self.in_string:
self.in_string = token
elif self.in_string == token:
self.in_string = char
if char * 3 == line[i:i + 3]:
self.in_string = char * 3
elif self.in_string == line[i:i + len(self.in_string)] and \
not (i > 0 and line[i - 1] == '\\' and
not (i > 1 and line[i - 2] == '\\')):
self.in_string = ''
if self.in_string:
continue
if token == '#':
if char == '#':
break
if token in '([{':
if char in '([{':
self.open_count += 1
elif token in ')]}':
elif char in ')]}':
self.open_count -= 1
if line and token != '#' and line.endswith('\\'):
if line and char != '#' and line.endswith('\\'):
self.continuation = True
else:
self.continuation = False
......@@ -175,7 +177,7 @@ class LogicalLineFinder(object):
block_start = get_block_start(self.lines, line_number, indents)
try:
return self._block_logical_line(block_start, line_number)
except IndentationError as e:
except IndentationError, e:
tries += 1
if tries == 5:
raise e
......@@ -220,7 +222,7 @@ class LogicalLineFinder(object):
if line_number <= end:
return (start, end)
last_end = end + 1
except tokenize.TokenError as e:
except tokenize.TokenError, e:
current = e.args[1][0]
return (last_end, max(last_end, current - 1))
return (last_end, None)
......@@ -353,7 +355,7 @@ def count_line_indents(line):
def get_string_pattern():
start = r'(\b[uU]?[rR]?)?'
longstr = r'%s"""(\\.|"(?!"")|\\\n|[^"\\])*"""' % start
shortstr = r'%s"(\\.|\\\n|[^"\\])*"' % start
shortstr = r'%s"(\\.|[^"\\\n])*"' % start
return '|'.join([longstr, longstr.replace('"', "'"),
shortstr, shortstr.replace('"', "'")])
......
# The default ``config.py``
# flake8: noqa
def set_prefs(prefs):
......@@ -80,32 +79,6 @@ def set_prefs(prefs):
# appear in the importing namespace.
prefs['ignore_bad_imports'] = False
# If `True`, rope will insert new module imports as
# `from <package> import <module>` by default.
prefs['prefer_module_from_imports'] = False
# If `True`, rope will transform a comma list of imports into
# multiple separate import statements when organizing
# imports.
prefs['split_imports'] = False
# If `True`, rope will remove all top-level import statements and
# reinsert them at the top of the module when making changes.
prefs['pull_imports_to_top'] = True
# If `True`, rope will sort imports alphabetically by module name instead of
# alphabetically by import statement, with from imports after normal
# imports.
prefs['sort_imports_alphabetically'] = False
# Location of implementation of rope.base.oi.type_hinting.interfaces.ITypeHintingFactory
# In general case, you don't have to change this value, unless you're an rope expert.
# Change this value to inject you own implementations of interfaces