[Debexpo-devel] [debexpo] 01/01: Rip out all fedmsg support. :(

Nicolas Dandrimont olasd at debian.org
Fri Feb 23 17:00:53 UTC 2018


This is an automated email from the git hooks/post-receive script.

olasd pushed a commit to branch live
in repository debexpo.

commit 12a433279a606b64cdcaf178b51926a4c9cb7e6c
Author: Nicolas Dandrimont <nicolas at dandrimont.eu>
Date:   Fri Feb 23 18:00:25 2018 +0100

    Rip out all fedmsg support. :(
---
 bin/debexpo_importer.py              |  5 ----
 debexpo/controllers/package.py       |  9 ------
 debexpo/cronjobs/removeolduploads.py |  9 ------
 debexpo/message.py                   | 54 ------------------------------------
 development.ini                      |  4 ---
 5 files changed, 81 deletions(-)

diff --git a/bin/debexpo_importer.py b/bin/debexpo_importer.py
index 8b08699..d5afa4d 100755
--- a/bin/debexpo_importer.py
+++ b/bin/debexpo_importer.py
@@ -595,11 +595,6 @@ class Importer(object):
 
         log.debug('Done')
 
-        data = package_version.publish_data
-        data['uploader'] = self.changes["Changed-By"]
-
-        from debexpo.message import publish
-        publish(topic="package.upload", msg=data)
 
 def main():
     parser = OptionParser(usage="%prog -c FILE -i FILE [--skip-email] [--skip-gpg-check]")
diff --git a/debexpo/controllers/package.py b/debexpo/controllers/package.py
index d1dfaf1..7ce5d97 100644
--- a/debexpo/controllers/package.py
+++ b/debexpo/controllers/package.py
@@ -59,7 +59,6 @@ from debexpo.model.binary_packages import BinaryPackage
 from debexpo.model.package_files import PackageFile
 from debexpo.model.package_subscriptions import PackageSubscription
 
-from debexpo.message import publish
 
 log = logging.getLogger(__name__)
 
@@ -254,14 +253,6 @@ class PackageController(BaseController):
 
         version = package = meta.session.query(PackageVersion).filter_by(id=self.form_result['package_version']).first()
 
-        data = version.publish_data
-        data['author_email'] = user.email
-        data['author_name'] = user.name
-        data['content'] = comment.text
-        data['outcome'] = comment.outcome
-
-        publish(topic="package.comment", msg=data)
-
         redirect(url('package', packagename=packagename))
 
     def comment(self, packagename):
diff --git a/debexpo/cronjobs/removeolduploads.py b/debexpo/cronjobs/removeolduploads.py
index 6f5800e..d444787 100644
--- a/debexpo/cronjobs/removeolduploads.py
+++ b/debexpo/cronjobs/removeolduploads.py
@@ -62,15 +62,6 @@ class RemoveOldUploads(BaseCronjob):
                 version=version,
                 reason=reason)
 
-        from debexpo.message import publish
-        for pv in package.package_versions:
-            try:
-                data = pv.publish_data
-                data['reason'] = reason
-                publish(topic='package.remove', msg=data)
-            except Exception as e:
-	        print e
-
         CheckFiles().delete_files_for_package(package)
         meta.session.delete(package)
         meta.session.commit()
diff --git a/debexpo/message.py b/debexpo/message.py
deleted file mode 100644
index 98c6109..0000000
--- a/debexpo/message.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-#   message.py — Setup the fedmsg context for use within Debexpo
-#
-#   This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
-#
-#   Copyright © 2013 Simon Chopin <chopin.simon at gmail.com>
-#
-#   Permission is hereby granted, free of charge, to any person
-#   obtaining a copy of this software and associated documentation
-#   files (the "Software"), to deal in the Software without
-#   restriction, including without limitation the rights to use,
-#   copy, modify, merge, publish, distribute, sublicense, and/or sell
-#   copies of the Software, and to permit persons to whom the
-#   Software is furnished to do so, subject to the following
-#   conditions:
-#
-#   The above copyright notice and this permission notice shall be
-#   included in all copies or substantial portions of the Software.
-#
-#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-#   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-#   OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-#   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-#   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-#   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-#   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-#   OTHER DEALINGS IN THE SOFTWARE.
-
-"""
-Setup a fedmsg context suitable for Debexpo.
-"""
-
-__author__ = 'Simon Chopin'
-__copyright__ = 'Copyright © 2013 Simon Chopin'
-__license__ = 'MIT'
-
-from fedmsg.core import FedMsgContext
-from fedmsg.config import load_config
-from threading import Lock
-import pylons
-
-# We use the fedmsg configuration from /etc/fedmsg.d/
-fedmsg_config = load_config([], None)
-
-fedmsg_config['name'] = pylons.config["debexpo.fedmsg_endpoint_name"]
-
-__context = FedMsgContext(**fedmsg_config)
-__context_lock = Lock()
-
-def publish(**kw):
-    __context_lock.acquire()
-    __context.publish(**kw)
-    __context_lock.release()
diff --git a/development.ini b/development.ini
index dfe5673..1c9b69d 100644
--- a/development.ini
+++ b/development.ini
@@ -109,10 +109,6 @@ debexpo.cronjob_delay = 60
 # NNTP server to connect to fetch mailing list comments/changes
 debexpo.nntp_server = news.gmane.org
 
-# The name of the fedmsg endpoint, i.e. mentors
-# Note that this is different from the actual
-debexpo.fedmsg_endpoint_name = mentors_dev
-
 # Logging configuration
 [loggers]
 keys = root, debexpo

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debexpo/debexpo.git



More information about the Debexpo-devel mailing list