Skip to content

Commit

Permalink
fix prototypes in a few modules, license changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ferringb committed Feb 5, 2010
1 parent b7d2cd7 commit e6a160e
Show file tree
Hide file tree
Showing 53 changed files with 432 additions and 396 deletions.
26 changes: 26 additions & 0 deletions BSD
@@ -0,0 +1,26 @@
Copyright (c) 2008, pkgcore contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the <ORGANIZATION> nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
344 changes: 4 additions & 340 deletions COPYING

Large diffs are not rendered by default.

340 changes: 340 additions & 0 deletions GPL2

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion snakeoil/__init__.py
@@ -1,4 +1,4 @@
# Copyright: 2005 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""misc. utility functions"""
2 changes: 1 addition & 1 deletion snakeoil/caching.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
instance caching metaclass
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/compatibility.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
Compatibility module providing native reimplementations of python2.5 functionality.
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/containers.py
@@ -1,5 +1,5 @@
# Copyright: 2005-2009 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
collection of container classes
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/currying.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
Function currying, generating a functor with a set of args/defaults pre bound.
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/debug_imports.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
# Copyright: 2007 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

import __builtin__

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/demandload.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
# Copyright: 2007 Marien Zwart <marienz@gentoo.org>
# Copyright: 2007 Marien Zwart <marienz@gentoo.org>: GPL2/BSD
# License: GPL2

"""Demand load things when used.
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/dependant_methods.py
@@ -1,5 +1,5 @@
# Copyright: 2005-2008 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""Metaclass to inject dependencies into method calls.
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/descriptors.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


"""Classes implementing the descriptor protocol."""
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/fileutils.py
@@ -1,5 +1,5 @@
# Copyright: 2005-2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
file related operations, mainly reading
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/formatters.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2

"""Classes wrapping a file-like object to do fancy output on it."""

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/iterables.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from collections import deque

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/klass.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from operator import attrgetter
from snakeoil.caching import WeakInstMeta
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/lists.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
sequence related operations
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/mappings.py
@@ -1,5 +1,5 @@
# Copyright: 2005-2009 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
miscellanious mapping/dict related classes
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/modules.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
dynamic import functionality
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/obj.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from operator import attrgetter
from snakeoil.currying import pre_curry
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/osutils/__init__.py
@@ -1,6 +1,6 @@
# Copyright 2004-2007 Brian Harring <ferringb@gmail.com>
# Copyright 2006 Marien Zwart <marienz@gentoo.org>
# Distributed under the terms of the GNU General Public License v2
# License: BSD/GPL2

"""
os specific utilities, FS access mainly
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/osutils/native_readdir.py
@@ -1,6 +1,6 @@
# Copyright: 2006-2007 Brian Harring <ferringb@gmail.com>
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2

"""Wrapper for readdir which grabs file type from d_type."""

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/pickling.py
@@ -1,5 +1,5 @@
# Copyright: 2007 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
convenience module using cPickle if available, else failing back to pickle
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/tar.py
@@ -1,5 +1,5 @@
# Copyright: 2006-2009 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
tar file access
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/__init__.py
@@ -1,6 +1,6 @@
# Copyright: 2006-2007 Brian Harring <ferringb@gmail.com>
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


"""Our unittest extensions."""
Expand Down
4 changes: 2 additions & 2 deletions snakeoil/test/mixins.py
@@ -1,6 +1,6 @@
# Copyright: 2005 Marien Zwart <marienz@gentoo.org>
# Copyright: 2009 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2


import os
Expand Down Expand Up @@ -46,7 +46,7 @@ def mk_named_tempfile(*args, **kwds):
return io.TextIOWrapper(tmp_f)

# Copyright: 2005 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

import os, stat, errno

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_caching.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from snakeoil.test import TestCase
from snakeoil import caching
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_compatibility.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from snakeoil.test import TestCase
from snakeoil import compatibility
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_containers.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


from itertools import chain
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_currying.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2

from snakeoil.test import TestCase
from snakeoil import currying
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_demandload.py
@@ -1,5 +1,5 @@
# Copyright: 2007 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


from snakeoil.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_demandload_usage.py
@@ -1,5 +1,5 @@
# Copyright: 2005-2009 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

import os, stat, errno

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_dependant_methods.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from snakeoil.test import TestCase
from snakeoil import dependant_methods as dm
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_descriptors.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


from snakeoil.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_fileutils.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


import tempfile, os
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_formatters.py
@@ -1,6 +1,6 @@
# Copyright: 2007 Brian Harring <ferringb@gmail.com>
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2

# TODO:
# for PlainTextFormatter, wouldn't be a bad idea to add a method for testing
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_iterables.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

import operator

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_klass.py
@@ -1,5 +1,5 @@
# Copyright: 2006-2007 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from snakeoil.test import TestCase
from snakeoil import klass, currying
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_lists.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


from snakeoil.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_mappings.py
@@ -1,6 +1,6 @@
# Copyright: 2005-2006 Marien Zwart <marienz@gentoo.org>
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

import operator

Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_modules.py
@@ -1,5 +1,5 @@
# Copyright: 2005 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


from snakeoil.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_obj.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2


import operator
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_osutils.py
@@ -1,6 +1,6 @@
# Copyright: 2005-2009 Brian Harring <ferringb@gmail.com>
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2

import os
pjoin = os.path.join
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/test/test_weakrefs.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

from snakeoil.test import TestCase
from snakeoil.weakrefs import WeakValCache
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/version.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
# License: GPL2
# License: BSD/GPL2


"""Version information (tied to bzr)."""
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/weakrefs.py
@@ -1,5 +1,5 @@
# Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

# Unused import
# pylint: disable-msg=W0611
Expand Down
2 changes: 1 addition & 1 deletion snakeoil/xml/__init__.py
@@ -1,5 +1,5 @@
# Copyright: 2006-2009 Brian Harring <ferringb@gmail.com>
# License: GPL2
# License: BSD/GPL2

"""
indirection to load ElementTree
Expand Down
4 changes: 2 additions & 2 deletions src/caching.c
@@ -1,7 +1,7 @@
/*
* Copyright: 2006-2007 Brian Harring <ferringb@gmail.com>
* Copyright: 2006 Marien Zwart <marienz@gentoo.org>
* License: GPL2
* License: GPL2/BSD
*
* C version of some of snakeoil (for extra speed).
*/
Expand Down Expand Up @@ -660,7 +660,7 @@ PyDoc_STRVAR(
"C reimplementation of snakeoil.caching.");

PyMODINIT_FUNC
init_caching()
init_caching(void)
{
/* Create the module and add the functions */
PyObject *m = Py_InitModule3(
Expand Down
8 changes: 7 additions & 1 deletion src/formatters.c
@@ -1,3 +1,9 @@
/*
Copyright: 2007-2010 Charlie Shepherd <masterdriverz@gentoo.org>
Copyright: 2009-2010 Brian Harring <ferringb@gmail.com>
License: BSD/GPL2
*/

#include "Python.h"
#include <snakeoil/common.h>
#include "structmember.h"
Expand Down Expand Up @@ -813,7 +819,7 @@ PyDoc_STRVAR(
"C implementation of snakeoil.formatters.PlainTextFormatter.\n");

PyMODINIT_FUNC
init_formatters()
init_formatters(void)
{
PyObject *tmp;
PyObject *m = Py_InitModule3("_formatters", NULL, formatters_module_doc);
Expand Down

0 comments on commit e6a160e

Please sign in to comment.