[tor-commits] [stem/master] Adding copyright headers

atagar at torproject.org atagar at torproject.org
Sun Feb 17 22:02:36 UTC 2013


commit d70a2d394f24e471379906e561d80fb47ecd2230
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Feb 17 13:22:54 2013 -0800

    Adding copyright headers
    
    Uggg I hate IP law. As pointed out by Juan on...
    
    https://trac.torproject.org/7954
    
    ... we need copyright headers to properly comply with the requirements of being
    under the LGPL. I'm not looking forward to keeping this up to date (and likely
    won't), but oh well.
    
    I've added the header to all python source files except the unit and integ
    tests (patches welcome if someone wants to spend the time adding those too).
    These headers...
    
    * Declare a copyright from the year of the file's creation to now (2013).
    
    * Include Sean if he worked on it (he is the only contributor that hasn't made
      his contributions public domain to avoid copyright headaches).
---
 run_tests.py                            |    2 ++
 setup.py                                |    2 ++
 stem/__init__.py                        |    4 ++++
 stem/connection.py                      |    3 +++
 stem/control.py                         |    4 ++++
 stem/descriptor/__init__.py             |    4 ++++
 stem/descriptor/export.py               |    3 +++
 stem/descriptor/extrainfo_descriptor.py |    4 ++++
 stem/descriptor/networkstatus.py        |    3 +++
 stem/descriptor/reader.py               |    3 +++
 stem/descriptor/router_status_entry.py  |    3 +++
 stem/descriptor/server_descriptor.py    |    3 +++
 stem/exit_policy.py                     |    4 ++++
 stem/prereq.py                          |    3 +++
 stem/process.py                         |    3 +++
 stem/response/__init__.py               |    4 ++++
 stem/response/authchallenge.py          |    3 +++
 stem/response/events.py                 |    4 ++++
 stem/response/getconf.py                |    3 +++
 stem/response/getinfo.py                |    3 +++
 stem/response/mapaddress.py             |    3 +++
 stem/response/protocolinfo.py           |    3 +++
 stem/socket.py                          |    4 ++++
 stem/util/__init__.py                   |    3 +++
 stem/util/conf.py                       |    4 ++++
 stem/util/connection.py                 |    3 +++
 stem/util/enum.py                       |    3 +++
 stem/util/log.py                        |    3 +++
 stem/util/proc.py                       |    3 +++
 stem/util/str_tools.py                  |    3 +++
 stem/util/system.py                     |    3 +++
 stem/util/term.py                       |    3 +++
 stem/util/tor_tools.py                  |    4 ++++
 stem/version.py                         |    3 +++
 test/__init__.py                        |    4 ++++
 test/mocking.py                         |    4 ++++
 test/network.py                         |    4 ++++
 test/output.py                          |    3 +++
 test/prompt.py                          |    3 +++
 test/runner.py                          |    4 ++++
 test/settings.cfg                       |    6 +++---
 test/static_checks.py                   |    3 +++
 test/util.py                            |    3 +++
 43 files changed, 141 insertions(+), 3 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index 1154870..4ec2dbd 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -1,4 +1,6 @@
 #!/usr/bin/env python
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
 
 """
 Runs unit and integration tests. For usage information run this with '--help'.
diff --git a/setup.py b/setup.py
index 395f97c..23902b1 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,6 @@
 #!/usr/bin/env python
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
 
 from stem import __version__, \
                  __author__, \
diff --git a/stem/__init__.py b/stem/__init__.py
index ae72ab8..510c46c 100644
--- a/stem/__init__.py
+++ b/stem/__init__.py
@@ -1,3 +1,7 @@
+# Copyright 2011-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Library for working with the tor process.
 
diff --git a/stem/connection.py b/stem/connection.py
index a581c99..688a8a1 100644
--- a/stem/connection.py
+++ b/stem/connection.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Functions for connecting and authenticating to the tor process.
 
diff --git a/stem/control.py b/stem/control.py
index d799922..347dec0 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1,3 +1,7 @@
+# Copyright 2011-2013, Damian Johnson
+# Copyright 2012-2013, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Classes for interacting with the tor control socket.
 
diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index 87872d6..b3cc8c9 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2013, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Package for parsing and processing descriptor data.
 
diff --git a/stem/descriptor/export.py b/stem/descriptor/export.py
index 0643440..eb9ba2b 100644
--- a/stem/descriptor/export.py
+++ b/stem/descriptor/export.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Toolkit for exporting descriptors to other formats.
 
diff --git a/stem/descriptor/extrainfo_descriptor.py b/stem/descriptor/extrainfo_descriptor.py
index 10bd6fd..cc779b8 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Parsing for Tor extra-info descriptors. These are published by relays whenever
 their server descriptor is published and have a similar format. However, unlike
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index 3104cad..c3fac3e 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Parsing for Tor network status documents. This supports both the v2 and v3
 dir-spec. Documents can be obtained from a few sources...
diff --git a/stem/descriptor/reader.py b/stem/descriptor/reader.py
index ffd0289..f3b77ae 100644
--- a/stem/descriptor/reader.py
+++ b/stem/descriptor/reader.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Utilities for reading descriptors from local directories and archives. This is
 mostly done through the :class:`~stem.descriptor.reader.DescriptorReader`
diff --git a/stem/descriptor/router_status_entry.py b/stem/descriptor/router_status_entry.py
index d22dfa3..4bdef70 100644
--- a/stem/descriptor/router_status_entry.py
+++ b/stem/descriptor/router_status_entry.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Parsing for router status entries, the information for individual routers
 within a network status document. This information is provided from a few
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index be63ddf..9cecb23 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Parsing for Tor server descriptors, which contains the infrequently changing
 information about a Tor relay (contact information, exit policy, public keys,
diff --git a/stem/exit_policy.py b/stem/exit_policy.py
index e60f121..475d67e 100644
--- a/stem/exit_policy.py
+++ b/stem/exit_policy.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2013, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Representation of tor exit policies. These can be easily used to check if
 exiting to a destination is permissible or not. For instance...
diff --git a/stem/prereq.py b/stem/prereq.py
index a6eab48..4c0ffcd 100644
--- a/stem/prereq.py
+++ b/stem/prereq.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Checks for stem dependencies. We require python 2.5 or greater (in the 2.x
 series). Other requirements for complete functionality are...
diff --git a/stem/process.py b/stem/process.py
index 52a931e..4c7d118 100644
--- a/stem/process.py
+++ b/stem/process.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Helper functions for working with tor as a process.
 
diff --git a/stem/response/__init__.py b/stem/response/__init__.py
index c413530..838ea89 100644
--- a/stem/response/__init__.py
+++ b/stem/response/__init__.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Parses replies from the control socket.
 
diff --git a/stem/response/authchallenge.py b/stem/response/authchallenge.py
index 58bc48d..c14369b 100644
--- a/stem/response/authchallenge.py
+++ b/stem/response/authchallenge.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 import binascii
 
 import stem.response
diff --git a/stem/response/events.py b/stem/response/events.py
index 861459a..85710c2 100644
--- a/stem/response/events.py
+++ b/stem/response/events.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 import datetime
 import re
 import StringIO
diff --git a/stem/response/getconf.py b/stem/response/getconf.py
index 5d32582..9cebce9 100644
--- a/stem/response/getconf.py
+++ b/stem/response/getconf.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 import stem.response
 import stem.socket
 
diff --git a/stem/response/getinfo.py b/stem/response/getinfo.py
index 4d3e2f2..1d749e4 100644
--- a/stem/response/getinfo.py
+++ b/stem/response/getinfo.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 import stem.response
 import stem.socket
 
diff --git a/stem/response/mapaddress.py b/stem/response/mapaddress.py
index 129eed7..69585bb 100644
--- a/stem/response/mapaddress.py
+++ b/stem/response/mapaddress.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 import stem.response
 import stem.socket
 
diff --git a/stem/response/protocolinfo.py b/stem/response/protocolinfo.py
index df7d9c9..8f8c27c 100644
--- a/stem/response/protocolinfo.py
+++ b/stem/response/protocolinfo.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 import stem.response
 import stem.socket
 import stem.version
diff --git a/stem/socket.py b/stem/socket.py
index 4277fa1..039a2cd 100644
--- a/stem/socket.py
+++ b/stem/socket.py
@@ -1,3 +1,7 @@
+# Copyright 2011-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Supports message based communication with sockets speaking the tor control
 protocol. This lets users send messages as basic strings and receive responses
diff --git a/stem/util/__init__.py b/stem/util/__init__.py
index 53741ae..723eb10 100644
--- a/stem/util/__init__.py
+++ b/stem/util/__init__.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Utility functions used by the stem library.
 """
diff --git a/stem/util/conf.py b/stem/util/conf.py
index 82677d8..292e3d5 100644
--- a/stem/util/conf.py
+++ b/stem/util/conf.py
@@ -1,3 +1,7 @@
+# Copyright 2011-2013, Damian Johnson
+# Copyright 2013, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Handlers for text configuration files. Configurations are simple string to
 string mappings, with the configuration files using the following rules...
diff --git a/stem/util/connection.py b/stem/util/connection.py
index 86ba49a..90961fc 100644
--- a/stem/util/connection.py
+++ b/stem/util/connection.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Connection and networking based utility functions. This will likely be expanded
 later to have all of `arm's functions
diff --git a/stem/util/enum.py b/stem/util/enum.py
index 4f6d59a..bd983ee 100644
--- a/stem/util/enum.py
+++ b/stem/util/enum.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Basic enumeration, providing ordered types for collections. These can be
 constructed as simple type listings...
diff --git a/stem/util/log.py b/stem/util/log.py
index 7010805..e32c42f 100644
--- a/stem/util/log.py
+++ b/stem/util/log.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Functions to aid library logging. The default logging
 :data:`~stem.util.log.Runlevel` is usually NOTICE and above.
diff --git a/stem/util/proc.py b/stem/util/proc.py
index 2abc840..bf7675d 100644
--- a/stem/util/proc.py
+++ b/stem/util/proc.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Helper functions for querying process and system information from the /proc
 contents. Fetching information this way provides huge performance benefits
diff --git a/stem/util/str_tools.py b/stem/util/str_tools.py
index 2733875..ef69da7 100644
--- a/stem/util/str_tools.py
+++ b/stem/util/str_tools.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Toolkit for various string activity.
 
diff --git a/stem/util/system.py b/stem/util/system.py
index bc598b1..c35e22f 100644
--- a/stem/util/system.py
+++ b/stem/util/system.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Helper functions for working with the underlying system. These are mostly os
 dependent, only working on linux, osx, and bsd. In almost all cases they're
diff --git a/stem/util/term.py b/stem/util/term.py
index 050c485..fee7596 100644
--- a/stem/util/term.py
+++ b/stem/util/term.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Utilities for working with the terminal.
 
diff --git a/stem/util/tor_tools.py b/stem/util/tor_tools.py
index e61a96c..9c0f572 100644
--- a/stem/util/tor_tools.py
+++ b/stem/util/tor_tools.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Miscellaneous utility functions for working with tor.
 
diff --git a/stem/version.py b/stem/version.py
index 00e0769..b138f8b 100644
--- a/stem/version.py
+++ b/stem/version.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Tor versioning information and requirements for its features. These can be
 easily parsed and compared, for instance...
diff --git a/test/__init__.py b/test/__init__.py
index 098ce65..bc7c694 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,3 +1,7 @@
+# Copyright 2011-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Unit and integration tests for the stem library.
 """
diff --git a/test/mocking.py b/test/mocking.py
index f1e863d..d912685 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Helper functions for creating mock objects and monkey patching to help with
 testing. With python's builtin unit testing framework the setUp and test
diff --git a/test/network.py b/test/network.py
index 11bba6f..c8f0e97 100644
--- a/test/network.py
+++ b/test/network.py
@@ -1,3 +1,7 @@
+# Copyright 2012-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Helper functions and classes to support tests which need to connect through
 the tor network.
diff --git a/test/output.py b/test/output.py
index e3b9daf..17c457e 100644
--- a/test/output.py
+++ b/test/output.py
@@ -1,3 +1,6 @@
+# Copyright 2011-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Variety of filters for the python unit testing output, which can be chained
 together for improved readability.
diff --git a/test/prompt.py b/test/prompt.py
index 6ea9aa9..c28c914 100644
--- a/test/prompt.py
+++ b/test/prompt.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Simple helper methods to make troubleshooting with the python interpreter
 easier.
diff --git a/test/runner.py b/test/runner.py
index d9e0def..e5faf1b 100644
--- a/test/runner.py
+++ b/test/runner.py
@@ -1,3 +1,7 @@
+# Copyright 2011-2013, Damian Johnson
+# Copyright 2012, Sean Robinson
+# See LICENSE for licensing information
+
 """
 Runtime context for the integration tests. This is used both by the test runner
 to start and stop tor, and by the integration tests themselves for information
diff --git a/test/settings.cfg b/test/settings.cfg
index b467fd4..9b606c5 100644
--- a/test/settings.cfg
+++ b/test/settings.cfg
@@ -157,9 +157,9 @@ target.torrc RUN_PTRACE   => PORT, PTRACE
 pyflakes.ignore stem/prereq.py => 'RSA' imported but unused
 pyflakes.ignore stem/prereq.py => 'asn1' imported but unused
 pyflakes.ignore stem/prereq.py => 'long_to_bytes' imported but unused
-pyflakes.ignore stem/descriptor/__init__.py => redefinition of unused 'OrderedDict' from line 55
-pyflakes.ignore stem/util/str_tools.py => redefinition of function '_to_bytes' from line 54
-pyflakes.ignore stem/util/str_tools.py => redefinition of function '_to_unicode' from line 60
+pyflakes.ignore stem/descriptor/__init__.py => redefinition of unused 'OrderedDict' from line 59
+pyflakes.ignore stem/util/str_tools.py => redefinition of function '_to_bytes' from line 57
+pyflakes.ignore stem/util/str_tools.py => redefinition of function '_to_unicode' from line 63
 pyflakes.ignore test/mocking.py => undefined name 'builtins'
 pyflakes.ignore test/unit/response/events.py => 'from stem import *' used; unable to detect undefined names
 
diff --git a/test/static_checks.py b/test/static_checks.py
index 2f758b8..43b6866 100644
--- a/test/static_checks.py
+++ b/test/static_checks.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 """
 Performs a check that our python source code follows its whitespace conventions
 which are...
diff --git a/test/util.py b/test/util.py
index 4035a21..467ca91 100644
--- a/test/util.py
+++ b/test/util.py
@@ -1,3 +1,6 @@
+# Copyright 2012-2013, Damian Johnson
+# See LICENSE for licensing information
+
 import socket
 import struct
 





More information about the tor-commits mailing list