Skip to content

Commit

Permalink
Relicense as dual MIT/Apache 2
Browse files Browse the repository at this point in the history
Fixes #28
  • Loading branch information
hynek committed Nov 6, 2014
1 parent 9434e44 commit 71e6964
Show file tree
Hide file tree
Showing 32 changed files with 56 additions and 68 deletions.
3 changes: 1 addition & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ Some of them disapprove of the addition of thread local context data. :)
Third Party Code
^^^^^^^^^^^^^^^^

The compatibility code that makes this software run on both Python 2 and 3 is heavily inspired and partly copy and pasted from the MIT_-licensed six_ by Benjamin Peterson.
The compatibility code that makes this software run on both Python 2 and 3 is heavily inspired and partly copy and pasted from the MIT-licensed six_ by Benjamin Peterson.
The only reason why it’s not used as a dependency is to avoid any runtime dependency in the first place.

.. _MIT: http://choosealicense.com/licenses/mit/
.. _six: https://bitbucket.org/gutworth/six/
File renamed without changes.
21 changes: 21 additions & 0 deletions LICENSE.mit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013-2014 Hynek Schlawack

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.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include LICENSE .coveragerc
include LICENSE.apache2 LICENSE.mit .coveragerc
include *.rst
include *.txt
include .travis.yml
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Changelog
=========

- :feature:`28` structlog is now dually licensed under the `Apache License, Version 2 <http://choosealicense.com/licenses/apache-2.0/>`_ and the `MIT <http://choosealicense.com/licenses/mit/>`_ license.
Therefore it is now legal to use structlog with `GPLv2 <http://choosealicense.com/licenses/gpl-2.0/>`_-licensed projects.
- :feature:`22` :class:`structlog.stdlib.BoundLogger` now has an exception function.
- :release:`0.4.2 <2014-07-26>`
- :bug:`8` Fixed a memory leak in greenlet code that emulates thread locals.
Expand Down
16 changes: 7 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
#
# structlog documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 18 13:21:52 2013.
#
# This file is execfile()d with the current directory set to its containing dir
#
# Note that not all possible configuration values are present in this
Expand Down Expand Up @@ -41,12 +38,12 @@ def find_version(*file_paths):
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Expand Down Expand Up @@ -76,7 +73,8 @@ def find_version(*file_paths):

# General information about the project.
project = u'structlog'
copyright = u'2013-{0}, Hynek Schlawack'.format(datetime.date.today().year)
author = u"Hynek Schlawack"
copyright = u'2013-{0}, {1}'.format(datetime.date.today().year, author)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -288,9 +286,9 @@ def find_version(*file_paths):
# -- Options for Epub output --------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = u'structlog'
epub_author = u'Hynek Schlawack'
epub_publisher = u'Hynek Schlawack'
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright

# The language of the text. It defaults to the language option
Expand Down
11 changes: 9 additions & 2 deletions docs/license.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
License and Hall of Fame
========================

structlog is licensed under the permissive `Apache License, Version 2 <http://choosealicense.com/licenses/apache/>`_.
The full license text can be also found in the `source code repository <https://github.com/hynek/structlog/blob/master/LICENSE>`_.
``structlog`` is licensed both under the `Apache License, Version 2 <http://choosealicense.com/licenses/apache/>`_ and the `MIT license <http://choosealicense.com/licenses/mit/>`_.

The reason for that is to be both protected against patent claims by own contributors and still allow the usage within GPLv2 software.
For more legal details, see `this issue <https://github.com/pyca/cryptography/issues/1209>`_ on the bug tracker of PyCA's cryptography.

The full license texts can be also found in the source code repository:

- `Apache <https://github.com/hynek/structlog/blob/master/LICENSE.apache2>`_.
- `MIT <https://github.com/hynek/structlog/blob/master/LICENSE.mit>`_.

.. _authors:

Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -64,23 +62,24 @@ def run_tests(self):
description='Structured logging for Python.',
long_description=read('README.rst'),
url='http://www.structlog.org/',
license='Apache License, Version 2.0',
license='MIT or Apache License, Version 2.0',
author='Hynek Schlawack',
author_email='hs@ox.cx',
packages=find_packages(exclude=['tests*']),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
tests_require=[
Expand Down
14 changes: 11 additions & 3 deletions structlog/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -18,7 +16,17 @@

from __future__ import absolute_import, division, print_function

__version__ = '14.0.0dev'
__version__ = "14.0.0dev"

__title__ = "structlog"
__description__ = "Structured Logging in Python"
__uri__ = "http://www.structlog.org/"

__author__ = "Hynek Schlawack"
__email__ = "hs@ox.cx"

__license__ = "MIT or Apache License, Version 2.0"
__copyright__ = "Copyright (c) 2013-2014 {0}".format(__author__)


from structlog import (
Expand Down
2 changes: 0 additions & 2 deletions structlog/_base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/_compat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/_exc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/_frames.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/_generic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/_loggers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/processors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/stdlib.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/threadlocal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions structlog/twisted.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/additional_frame.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_frames.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_generic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_loggers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_processors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_stdlib.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_threadlocal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_twisted.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 0 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2013 Hynek Schlawack
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down

0 comments on commit 71e6964

Please sign in to comment.