aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 22:52:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-26 22:52:04 +0000
commit9338f116a900bb17271b947a528ba4c2e67cadde (patch)
tree65638d87f6c7bb85968aeeaddd6b7f8883592123 /python
parent48654c330e14db70c0a8b3736b77ea2738382edd (diff)
downloadpaludis-9338f116a900bb17271b947a528ba4c2e67cadde.tar.gz
paludis-9338f116a900bb17271b947a528ba4c2e67cadde.tar.xz
Remove RepositoryMaskInfo keys
Diffstat (limited to 'python')
-rw-r--r--python/additional_tests.cc7
-rw-r--r--python/metadata_key.cc75
-rwxr-xr-xpython/metadata_key_TEST.py19
3 files changed, 0 insertions, 101 deletions
diff --git a/python/additional_tests.cc b/python/additional_tests.cc
index 89d4958b4..b3ca31633 100644
--- a/python/additional_tests.cc
+++ b/python/additional_tests.cc
@@ -181,12 +181,6 @@ namespace metadata_key
m.value();
}
- void test_metadata_repository_mask_info_key(const MetadataValueKey<std::shared_ptr<const RepositoryMaskInfo> > & m)
- {
- test_metadata_key(m);
- m.value();
- }
-
template <typename C_>
void test_metadata_set_key(const MetadataCollectionKey<C_> & m)
{
@@ -234,7 +228,6 @@ void expose_additional_tests()
bp::def("test_metadata_time_key", &metadata_key::test_metadata_time_key);
bp::def("test_metadata_contents_key", &metadata_key::test_metadata_contents_key);
bp::def("test_metadata_choices_key", &metadata_key::test_metadata_choices_key);
- bp::def("test_metadata_repository_mask_info_key", &metadata_key::test_metadata_repository_mask_info_key);
bp::def("test_metadata_keyword_name_set_key", &metadata_key::test_metadata_set_key<KeywordNameSet>);
bp::def("test_metadata_string_set_key", &metadata_key::test_metadata_set_key<Set<std::string> >);
bp::def("test_metadata_license_spec_tree_key", &metadata_key::test_metadata_spec_tree_key<LicenseSpecTree>);
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index 98b43e771..6d2aa5710 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -85,11 +85,6 @@ class MetadataKeySptrToPythonVisitor
obj = bp::object(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Choices> > >(_m_ptr));
}
- void visit(const MetadataValueKey<std::shared_ptr<const RepositoryMaskInfo> > & k)
- {
- obj = bp::object(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const RepositoryMaskInfo> > >(_m_ptr));
- }
-
void visit(const MetadataValueKey<FSPath> & k)
{
obj = bp::object(std::static_pointer_cast<const MetadataValueKey<FSPath> >(_m_ptr));
@@ -576,52 +571,6 @@ struct MetadataFSPathKeyWrapper :
}
};
-struct MetadataRepositoryMaskInfoKeyWrapper :
- MetadataValueKey<std::shared_ptr<const RepositoryMaskInfo> > ,
- bp::wrapper<MetadataValueKey<std::shared_ptr<const RepositoryMaskInfo> > >
-{
- virtual const std::shared_ptr<const RepositoryMaskInfo> value() const
- PALUDIS_ATTRIBUTE((warn_unused_result))
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("value"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataRepositoryMaskInfoKey", "value");
- }
-
- virtual const std::string raw_name() const
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("raw_name"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataRepositoryMaskInfoKey", "raw_name");
- }
-
- virtual const std::string human_name() const
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("human_name"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataRepositoryMaskInfoKey", "human_name");
- }
-
- virtual MetadataKeyType type() const
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("type"))
- return f();
- else
- throw PythonMethodNotImplemented("MetadataRepositoryMaskInfoKey", "type");
- }
-};
-
template <typename C_>
struct MetadataCollectionKeyWrapper :
MetadataCollectionKey<C_>,
@@ -1276,30 +1225,6 @@ void expose_metadata_key()
/**
- * MetadataRepositoryMaskInfoKey
- */
- bp::register_ptr_to_python<std::shared_ptr<const MetadataValueKey<std::shared_ptr<const RepositoryMaskInfo> > > >();
- bp::implicitly_convertible<std::shared_ptr<MetadataRepositoryMaskInfoKeyWrapper>,
- std::shared_ptr<MetadataKey> >();
- bp::class_<MetadataRepositoryMaskInfoKeyWrapper, std::shared_ptr<MetadataRepositoryMaskInfoKeyWrapper>,
- bp::bases<MetadataKey>, boost::noncopyable>
- (
- "MetadataRepositoryMaskInfoKey",
- "A MetadataRepositoryMaskInfoKey is a MetadataKey that holds\n"
- "RepositoryMaskInfo as its value.\n\n"
-
- "This class can be subclassed in Python.",
- bp::init<>(
- "__init__()"
- )
- )
- .def("value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const RepositoryMaskInfo> > ::value),
- "value() -> RepositoryMaskInfo\n"
- "Fetch our value."
- )
- ;
-
- /**
* MetadataCollectionKeys
*/
class_set_key<KeywordNameSet>("KeywordNameIterable");
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index 23c7dec0d..a13ed6b54 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -145,25 +145,6 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
test_metadata_contents_key(TestKey())
- def test_05_repository_mask_info(self):
- class TestKey(MetadataRepositoryMaskInfoKey):
- def __init__(self):
- MetadataRepositoryMaskInfoKey.__init__(self)
-
- def value(self):
- return RepositoryMaskInfo(["comment"], "/foo", "")
-
- def raw_name(self):
- return "raw"
-
- def human_name(self):
- return "human"
-
- def type(self):
- return MetadataKeyType.NORMAL
-
- test_metadata_repository_mask_info_key(TestKey())
-
def test_06_keyword_name_iterable(self):
class TestKey(MetadataKeywordNameIterableKey):
def __init__(self):