summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-04-14 18:00:31 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-04-14 18:00:31 -0400
commita1dc7581b29ed01ad006276f7cf08dad80b4ea46 (patch)
tree57236dd294b3ebbe7b8af6afa38e00364c0eb636
parent83fb66a9b5605c0d3b3bdaabf4ca9c4e866edfea (diff)
downloaddogpile-core-a1dc7581b29ed01ad006276f7cf08dad80b4ea46.tar.gz
renaming to dogpile.core so that we are doing a more traditional namespace
package setup
-rw-r--r--CHANGES8
-rw-r--r--README.rst7
-rw-r--r--docs/build/api.rst10
-rw-r--r--docs/build/conf.py14
-rw-r--r--docs/build/front.rst22
-rw-r--r--docs/build/index.rst10
-rw-r--r--docs/build/usage.rst10
-rw-r--r--dogpile/core/__init__.py (renamed from dogpile/__init__.py)2
-rw-r--r--dogpile/core/dogpile.py (renamed from dogpile/dogpile.py)0
-rw-r--r--dogpile/core/nameregistry.py (renamed from dogpile/nameregistry.py)0
-rw-r--r--dogpile/core/readwrite_lock.py (renamed from dogpile/readwrite_lock.py)0
-rw-r--r--dogpile/core/util.py (renamed from dogpile/util.py)0
-rw-r--r--nose_logging_config.ini6
-rw-r--r--setup.py9
-rw-r--r--tests/core/__init__.py (renamed from tests/__init__.py)0
-rw-r--r--tests/core/test_dogpile.py (renamed from tests/test_dogpile.py)4
-rw-r--r--tests/core/test_nameregistry.py (renamed from tests/test_nameregistry.py)2
17 files changed, 57 insertions, 47 deletions
diff --git a/CHANGES b/CHANGES
index f746b50..db84b96 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+0.3.0
+=====
+
+- Renamed the project again - to dogpile.core.
+ Package has been reorganized so that "dogpile"
+ is a pure namespace package. The base dogpile
+ features are now in "dogpile.core".
+
0.2.2
=====
diff --git a/README.rst b/README.rst
index 8266e09..e317a85 100644
--- a/README.rst
+++ b/README.rst
@@ -1,5 +1,6 @@
-dogpile
-========
+dogpile.core
+============
+
A "dogpile" lock, one which allows a single thread to generate
an expensive resource while other threads use the "old" value, until the
"new" value is ready.
@@ -12,7 +13,7 @@ Usage
A simple example::
- from dogpile import Dogpile
+ from dogpile.core import Dogpile
# store a reference to a "resource", some
# object that is expensive to create.
diff --git a/docs/build/api.rst b/docs/build/api.rst
index 23c993f..57c90d2 100644
--- a/docs/build/api.rst
+++ b/docs/build/api.rst
@@ -2,22 +2,22 @@
API
===
-Dogpile
-========
+dogpile.core
+=============
-.. automodule:: dogpile.dogpile
+.. automodule:: dogpile.core
:members:
NameRegistry
=============
-.. automodule:: dogpile.nameregistry
+.. automodule:: dogpile.core.nameregistry
:members:
Utilities
==========
-.. automodule:: dogpile.readwrite_lock
+.. automodule:: dogpile.core.readwrite_lock
:members:
diff --git a/docs/build/conf.py b/docs/build/conf.py
index 94015f1..0de0a19 100644
--- a/docs/build/conf.py
+++ b/docs/build/conf.py
@@ -23,7 +23,7 @@ import sys, os
# absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../'))
-import dogpile
+import dogpile.core
# -- General configuration -----------------------------------------------------
@@ -44,17 +44,17 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'Dogpile'
-copyright = u'2011, Mike Bayer'
+project = u'dogpile.core'
+copyright = u'2011, 2012 Mike Bayer'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = dogpile.__version__
+version = dogpile.core.__version__
# The full version, including alpha/beta/rc tags.
-release = dogpile.__version__
+release = dogpile.core.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
@@ -166,7 +166,7 @@ html_static_path = ['_static']
#html_file_suffix = ''
# Output file base name for HTML help builder.
-htmlhelp_basename = 'dogpiledoc'
+htmlhelp_basename = 'dogpile.coredoc'
# -- Options for LaTeX output --------------------------------------------------
@@ -180,7 +180,7 @@ htmlhelp_basename = 'dogpiledoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'dogpile.tex', u'Dogpile Documentation',
+ ('index', 'dogpile.core.tex', u'dogpile.core Documentation',
u'Mike Bayer', 'manual'),
]
diff --git a/docs/build/front.rst b/docs/build/front.rst
index af5a1df..1b01641 100644
--- a/docs/build/front.rst
+++ b/docs/build/front.rst
@@ -2,24 +2,24 @@
Front Matter
============
-Information about the Dogpile project.
+Information about the dogpile.core project.
Project Homepage
================
-Dogpile is hosted on `Bitbucket <http://bitbucket.org>`_ - the lead project page is at https://bitbucket.org/zzzeek/dogpile. Source
+dogpile.core is hosted on `Bitbucket <http://bitbucket.org>`_ - the lead project page is at https://bitbucket.org/zzzeek/dogpile.core. Source
code is tracked here using `Mercurial <http://mercurial.selenic.com/>`_.
-Releases and project status are available on Pypi at http://pypi.python.org/pypi/dogpile.
+Releases and project status are available on Pypi at http://pypi.python.org/pypi/dogpile.core.
-The most recent published version of this documentation should be at http://readthedocs.org/docs/dogpile/.
+The most recent published version of this documentation should be at http://dogpilecore.readthedocs.org.
Installation
============
-Install released versions of Dogpile from the Python package index with `pip <http://pypi.python.org/pypi/pip>`_ or a similar tool::
+Install released versions of dogpile.core from the Python package index with `pip <http://pypi.python.org/pypi/pip>`_ or a similar tool::
- pip install dogpile
+ pip install dogpile.core
Installation via source distribution is via the ``setup.py`` script::
@@ -28,19 +28,19 @@ Installation via source distribution is via the ``setup.py`` script::
Community
=========
-Dogpile is developed by `Mike Bayer <http://techspot.zzzeek.org>`_, and is
+dogpile.core is developed by `Mike Bayer <http://techspot.zzzeek.org>`_, and is
loosely associated with the `Pylons Project <http://www.pylonsproject.org/>`_.
-As Dogpile's usage increases, it is anticipated that the Pylons mailing list and IRC channel
+As usage of dogpile.core and dogpile.cache increases, it is anticipated that the Pylons mailing list and IRC channel
will become the primary channels for support.
Bugs
====
-Bugs and feature enhancements to Dogpile should be reported on the `Bitbucket
+Bugs and feature enhancements to dogpile.core should be reported on the `Bitbucket
issue tracker
<https://bitbucket.org/zzzeek/dogpile/issues?status=new&status=open>`_. If you're not sure
-that a particular issue is specific to either dogpile.cache or Dogpile, posting to the `dogpile.cache issue tracker <https://bitbucket.org/zzzeek/dogpile.cache/issues?status=new&status=open>`_
+that a particular issue is specific to either dogpile.cache or dogpile.core, posting to the `dogpile.cache issue tracker <https://bitbucket.org/zzzeek/dogpile.cache/issues?status=new&status=open>`_
is likely the better place to post first, but it's not critical either way.
* `dogpile.cache issue tracker <https://bitbucket.org/zzzeek/dogpile.cache/issues?status=new&status=open>`_ (post here if unsure)
-* `dogpile issue tracker <https://bitbucket.org/zzzeek/dogpile/issues?status=new&status=open>`_
+* `dogpile.core issue tracker <https://bitbucket.org/zzzeek/dogpile.core/issues?status=new&status=open>`_
diff --git a/docs/build/index.rst b/docs/build/index.rst
index 721d7bf..a0d28e1 100644
--- a/docs/build/index.rst
+++ b/docs/build/index.rst
@@ -1,13 +1,13 @@
-===================================
-Welcome to Dogpile's documentation!
-===================================
+========================================
+Welcome to dogpile.core's documentation!
+========================================
-`Dogpile <http://bitbucket.org/zzzeek/dogpile>`_ provides the *dogpile* lock,
+`dogpile.core <http://bitbucket.org/zzzeek/dogpile>`_ provides the *dogpile* lock,
one which allows a single thread or process to generate
an expensive resource while other threads/processes use the "old" value, until the
"new" value is ready.
-Dogpile is at the core of the `dogpile.cache <http://bitbucket.org/zzzeek/dogpile.cache>`_ package
+dogpile.core is at the core of the `dogpile.cache <http://bitbucket.org/zzzeek/dogpile.cache>`_ package
which provides for a basic cache API and sample backends based on the dogpile concept.
diff --git a/docs/build/usage.rst b/docs/build/usage.rst
index 6d4b9f9..3895137 100644
--- a/docs/build/usage.rst
+++ b/docs/build/usage.rst
@@ -35,7 +35,7 @@ Rudimentary Usage
A simple example::
- from dogpile import Dogpile
+ from dogpile.core import Dogpile
# store a reference to a "resource", some
# object that is expensive to create.
@@ -110,7 +110,7 @@ To use this mode, the steps are as follows:
Example::
- from dogpile import Dogpile, NeedRegenerationException
+ from dogpile.core import Dogpile, NeedRegenerationException
def get_value_from_cache():
value = my_cache.get("some key")
@@ -149,7 +149,7 @@ this one function/key::
import pylibmc
mc_pool = pylibmc.ThreadMappedPool(pylibmc.Client("localhost"))
- from dogpile import Dogpile, NeedRegenerationException
+ from dogpile.core import Dogpile, NeedRegenerationException
def cached(key, expiration_time):
"""A decorator that will cache the return value of a function
@@ -234,7 +234,7 @@ the cache backend::
import pylibmc
import time
- from dogpile import Dogpile, NeedRegenerationException, NameRegistry
+ from dogpile.core import Dogpile, NeedRegenerationException, NameRegistry
mc_pool = pylibmc.ThreadMappedPool(pylibmc.Client("localhost"))
@@ -389,7 +389,7 @@ To enable this feature, use :class:`.SyncReaderDogpile`.
for the critical section where readers should be blocked::
- from dogpile import SyncReaderDogpile
+ from dogpile.core import SyncReaderDogpile
dogpile = SyncReaderDogpile(3600)
diff --git a/dogpile/__init__.py b/dogpile/core/__init__.py
index 3eda763..49a3b9e 100644
--- a/dogpile/__init__.py
+++ b/dogpile/core/__init__.py
@@ -1,4 +1,4 @@
from dogpile import Dogpile, SyncReaderDogpile, NeedRegenerationException
-__version__ = '0.2.2'
+__version__ = '0.3.0'
diff --git a/dogpile/dogpile.py b/dogpile/core/dogpile.py
index 84360ef..84360ef 100644
--- a/dogpile/dogpile.py
+++ b/dogpile/core/dogpile.py
diff --git a/dogpile/nameregistry.py b/dogpile/core/nameregistry.py
index ab3ad7b..ab3ad7b 100644
--- a/dogpile/nameregistry.py
+++ b/dogpile/core/nameregistry.py
diff --git a/dogpile/readwrite_lock.py b/dogpile/core/readwrite_lock.py
index da83215..da83215 100644
--- a/dogpile/readwrite_lock.py
+++ b/dogpile/core/readwrite_lock.py
diff --git a/dogpile/util.py b/dogpile/core/util.py
index ac40554..ac40554 100644
--- a/dogpile/util.py
+++ b/dogpile/core/util.py
diff --git a/nose_logging_config.ini b/nose_logging_config.ini
index daffa3f..e9a8e16 100644
--- a/nose_logging_config.ini
+++ b/nose_logging_config.ini
@@ -1,6 +1,6 @@
# nose specific logging
[loggers]
-keys = root, dogpile, tests
+keys = root, dogpilecore, tests
[handlers]
keys = console
@@ -12,9 +12,9 @@ keys = generic
level = CRITICAL
handlers = console
-[logger_dogpile]
+[logger_dogpilecore]
level = DEBUG
-qualname = dogpile
+qualname = dogpile.core
handlers =
[logger_tests]
diff --git a/setup.py b/setup.py
index 1780641..2ef2e17 100644
--- a/setup.py
+++ b/setup.py
@@ -10,16 +10,16 @@ if sys.version_info >= (3, 0):
use_2to3=True,
)
-v = open(os.path.join(os.path.dirname(__file__), 'dogpile', '__init__.py'))
+v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'core', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
-setup(name='dogpile',
+setup(name='dogpile.core',
version=VERSION,
description="A 'dogpile' lock, typically used as a component of a larger caching solution",
- long_description=file(readme).read(),
+ long_description=open(readme).read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
@@ -30,9 +30,10 @@ setup(name='dogpile',
keywords='caching',
author='Mike Bayer',
author_email='mike_mp@zzzcomputing.com',
- url='http://bitbucket.org/zzzeek/dogpile',
+ url='http://bitbucket.org/zzzeek/dogpile.core',
license='BSD',
packages=find_packages(exclude=['ez_setup', 'tests']),
+ namespace_packages=['dogpile'],
zip_safe=False,
install_requires=[],
test_suite='nose.collector',
diff --git a/tests/__init__.py b/tests/core/__init__.py
index e69de29..e69de29 100644
--- a/tests/__init__.py
+++ b/tests/core/__init__.py
diff --git a/tests/test_dogpile.py b/tests/core/test_dogpile.py
index 55386e0..4ba8556 100644
--- a/tests/test_dogpile.py
+++ b/tests/core/test_dogpile.py
@@ -1,8 +1,8 @@
from unittest import TestCase
import time
import threading
-from dogpile import Dogpile, SyncReaderDogpile, NeedRegenerationException
-from dogpile.nameregistry import NameRegistry
+from dogpile.core import Dogpile, SyncReaderDogpile, NeedRegenerationException
+from dogpile.core.nameregistry import NameRegistry
import contextlib
import math
import logging
diff --git a/tests/test_nameregistry.py b/tests/core/test_nameregistry.py
index 8d2859d..73bcbfb 100644
--- a/tests/test_nameregistry.py
+++ b/tests/core/test_nameregistry.py
@@ -1,7 +1,7 @@
from unittest import TestCase
import time
import threading
-from dogpile.nameregistry import NameRegistry
+from dogpile.core.nameregistry import NameRegistry
import random
import logging