Permalink
Browse files

Rename module to dangagearman to avoid conflicts with Yelp's gearman …

…2.0 library.
  • Loading branch information...
1 parent fb95a0d commit 9e02b718c9913695507fa7ca8b84de21d4e75cf2 @apparentlymart apparentlymart committed Nov 8, 2011
View
2 bin/gearmand
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from gearman.server import GearmanServer
+from dangagearman.server import GearmanServer
if __name__ == "__main__":
server = GearmanServer()
View
12 dangagearman/__init__.py
@@ -0,0 +1,12 @@
+"""
+Client for the Danga (Perl) Gearman server implementation.
+"""
+
+__author__ = "Samuel Stauffer <samuel@descolada.com>"
+__version__ = "2.0.0"
+__license__ = "MIT"
+
+from dangagearman.client import GearmanClient
+from dangagearman.server import GearmanServer
+from dangagearman.task import Task, Taskset
+from dangagearman.worker import GearmanWorker
View
8 gearman/_twisted.py → dangagearman/_twisted.py
@@ -4,10 +4,10 @@
import time, select, errno
-from gearman.compat import *
-from gearman.connection import GearmanConnection
-from gearman.task import Task, Taskset
-from gearman.client import GearmanClient
+from dangagearman.compat import *
+from dangagearman.connection import GearmanConnection
+from dangagearman.task import Task, Taskset
+from dangagearman.client import GearmanClient
from twisted.internet import abstract, defer, reactor
View
6 gearman/client.py → dangagearman/client.py
@@ -2,9 +2,9 @@
import time, select, errno
-from gearman.compat import *
-from gearman.connection import GearmanConnection
-from gearman.task import Task, Taskset
+from dangagearman.compat import *
+from dangagearman.connection import GearmanConnection
+from dangagearman.task import Task, Taskset
class GearmanBaseClient(object):
class ServerUnavailable(Exception):
View
0 gearman/compat.py → dangagearman/compat.py
File renamed without changes.
View
4 gearman/connection.py → dangagearman/connection.py
@@ -1,9 +1,9 @@
import socket, struct, select, errno, logging
from time import time
-from gearman.protocol import DEFAULT_PORT, pack_command, parse_command
+from dangagearman.protocol import DEFAULT_PORT, pack_command, parse_command
-log = logging.getLogger("gearman")
+log = logging.getLogger("dangagearman")
class GearmanConnection(object):
class ConnectionError(Exception):
View
2 gearman/manager.py → dangagearman/manager.py
@@ -2,7 +2,7 @@
import socket
-from gearman.connection import DEFAULT_PORT, GearmanConnection
+from dangagearman.connection import DEFAULT_PORT, GearmanConnection
ConnectionError = GearmanConnection.ConnectionError
View
0 gearman/protocol.py → dangagearman/protocol.py
File renamed without changes.
View
4 gearman/server.py → dangagearman/server.py
@@ -5,7 +5,7 @@
import asyncore
import socket
from collections import deque
-from gearman.protocol import DEFAULT_PORT, ProtocolError, parse_command, pack_command
+from dangagearman.protocol import DEFAULT_PORT, ProtocolError, parse_command, pack_command
class GearmanServerClient(asyncore.dispatcher):
def __init__(self, sock, addr, server, manager):
@@ -84,7 +84,7 @@ def handle_command(self, func, args):
self.send_buffered("%s\t%d\t%d\t%d\n" % (s['func'], s['num_jobs'], s['num_working'], s['num_workers']))
self.send_buffered(".\n")
elif func == "version":
- from gearman import __version__
+ from dangagearman import __version__
self.send_buffered("%s\n" % __version__)
elif func == "workers":
for client, state in self.manager.states.items():
View
0 gearman/task.py → dangagearman/task.py
File renamed without changes.
View
0 gearman/util.py → dangagearman/util.py
File renamed without changes.
View
6 gearman/worker.py → dangagearman/worker.py
@@ -1,10 +1,10 @@
import random, sys, select, logging
from time import time
-from gearman.compat import *
-from gearman.client import GearmanBaseClient
+from dangagearman.compat import *
+from dangagearman.client import GearmanBaseClient
-log = logging.getLogger("gearman")
+log = logging.getLogger("dangagearman")
class GearmanJob(object):
def __init__(self, conn, func, arg, handle):
View
4 docs/Makefile
@@ -60,9 +60,9 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in _build/qthelp, like this:"
- @echo "# qcollectiongenerator _build/qthelp/python-gearman.qhcp"
+ @echo "# qcollectiongenerator _build/qthelp/danga-gearman.qhcp"
@echo "To view the help file:"
- @echo "# assistant -collectionFile _build/qthelp/python-gearman.qhc"
+ @echo "# assistant -collectionFile _build/qthelp/danga-gearman.qhc"
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
View
8 docs/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# python-gearman documentation build configuration file, created by
+# python-danga-gearman documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 27 14:30:15 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
@@ -43,7 +43,7 @@
master_doc = 'index'
# General information about the project.
-project = u'python-gearman'
+project = u'danga-gearman'
copyright = u'2009, Samuel Stauffer'
# The version info for the project you're documenting, acts as replacement for
@@ -164,7 +164,7 @@
#html_file_suffix = ''
# Output file base name for HTML help builder.
-htmlhelp_basename = 'python-gearmandoc'
+htmlhelp_basename = 'danga-gearmandoc'
# -- Options for LaTeX output --------------------------------------------------
@@ -178,7 +178,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'python-gearman.tex', u'python-gearman Documentation',
+ ('index', 'danga-gearman.tex', u'danga-gearman Documentation',
u'Samuel Stauffer', 'manual'),
]
View
4 docs/make.bat
@@ -73,9 +73,9 @@ if "%1" == "qthelp" (
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in _build/qthelp, like this:
- echo.^> qcollectiongenerator _build\qthelp\python-gearman.qhcp
+ echo.^> qcollectiongenerator _build\qthelp\danga-gearman.qhcp
echo.To view the help file:
- echo.^> assistant -collectionFile _build\qthelp\python-gearman.ghc
+ echo.^> assistant -collectionFile _build\qthelp\danga-gearman.ghc
goto end
)
View
12 gearman/__init__.py
@@ -1,12 +0,0 @@
-"""
-Gearman client.
-"""
-
-__author__ = "Samuel Stauffer <samuel@descolada.com>"
-__version__ = "1.5.0"
-__license__ = "MIT"
-
-from gearman.client import GearmanClient
-from gearman.server import GearmanServer
-from gearman.task import Task, Taskset
-from gearman.worker import GearmanWorker
View
10 setup.py
@@ -2,16 +2,16 @@
from distutils.core import setup
-from gearman import __version__ as version
+from dangagearman import __version__ as version
setup(
- name = 'gearman',
+ name = 'danga-gearman',
version = version,
- description = 'Gearman Library',
+ description = 'Client for the Danga (Perl) Gearman implementation',
author = 'Samuel Stauffer',
author_email = 'samuel@descolada.com',
- url = 'http://github.com/samuel/python-gearman/tree/master',
- packages = ['gearman'],
+ url = 'http://github.com/saymedia/python-danga-gearman/tree/master',
+ packages = ['dangagearman'],
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
View
10 tests.py
@@ -1,11 +1,11 @@
import os, sys, signal
import unittest, time, socket
-from gearman import GearmanClient, GearmanWorker
-from gearman.connection import GearmanConnection
-from gearman.manager import GearmanManager
-from gearman.server import GearmanServer
-from gearman.task import Task
+from dangagearman import GearmanClient, GearmanWorker
+from dangagearman.connection import GearmanConnection
+from dangagearman.manager import GearmanManager
+from dangagearman.server import GearmanServer
+from dangagearman.task import Task
job_servers = ["127.0.0.1"]

0 comments on commit 9e02b71

Please sign in to comment.