Commits

Jason R. Coombs committed 3f9ebfe

Updated the documentation in preparation for the 1.3 release
Cleaned up the setup script.

  • Participants
  • Parent commits 65af6e4
  • Tags 1.3

Comments (0)

Files changed (4)

+.. -*- restructuredtext -*-
+
+jaraco.net
+==========
+
+.. contents::
+
+Status and License
+------------------
+
+``jaraco.net`` provides miscellaneous utility functions used across
+projects developed by the author.
+
+``jaraco.net`` is written by Jason R. Coombs.  It is licensed under an
+`MIT-style permissive license
+<http://www.opensource.org/licenses/mit-license.php>`_.
+
+You can install it with ``easy_install jaraco.net``, or from the
+`mercurial repository
+<http://bitbucket.org/jaraco/jaraco.net/tip/get.zip#egg=jaraco.net-dev>`_ with
+``easy_install jaraco.net==dev``.
+
+DNS Forwarding Service
+----------------------
+
+``jaraco.net`` includes a DNS forwarding service for Windows. This is
+because Microsoft appears to be unable to bind to 6 to 4 and Teredo
+addresses with their production DNS Server. After installing
+``jaraco.net``, the service executable is available as
+`%PYTHON%\Scripts\dns-forwarding-service.exe`. In addition to the
+documented install/uninstall/start/stop commands, it's also possible
+to configure a bind address with the -b option. For example::
+
+    dns-forwarding-service -b 2002:41de:a625::41de:a625 install
+
+The service will be installed and the bind address will be stored in
+`HKLM\Software\jaraco.net\DNS Forwarding Service\Listen Address`. Note
+that the service must be restarted to recognize an updated bind address.
+
+Changes
+-------
+
+1.3
+~~~
+
+* Added jaraco.net.devices package. Includes a Manager class for
+  retrieving MAC addresses and IP addresses on the host.
+* Created jaraco.net.http package (from module of the same name)
+* Added jaraco.net.http.caching, an early attempt at providing a
+  CachingHandler for urllib2 with HTTP protocol support.
+* Added a simple echo server.
+* Added http-headers command.
+
+1.2
+~~~
+
+* Added function wait_for_host to icmp lib
+* Added support for a custom bind address to the DNS Forwarding Service
+
+1.1
+~~~
+
+* Added rss module (migrated from jaraco.util)
+
+1.0
+~~~
+
+* Initial release.

File docs/index.txt

-jaraco.net
-==========
-
-.. contents::
-
-Status and License
-------------------
-
-``jaraco.net`` provides miscellaneous utility functions used across
-projects developed by the author.
-
-``jaraco.net`` is written by Jason R. Coombs.  It is licensed under an
-`MIT-style permissive license
-<http://www.opensource.org/licenses/mit-license.php>`_.
-
-You can install it with ``easy_install jaraco.net``, or from the
-`mercurial repository
-<http://bitbucket.org/jaraco/jaraco.net/tip/get.zip#egg=jaraco.net-dev>`_ with
-``easy_install jaraco.net==dev``.
-
-DNS Forwarding Service
-----------------------
-
-``jaraco.net`` includes a DNS forwarding service for Windows. This is
-because Microsoft appears to be unable to bind to 6 to 4 and Teredo
-addresses with their production DNS Server. After installing
-``jaraco.net``, the service executable is available as
-`%PYTHON%\Scripts\dns-forwarding-service.exe`. In addition to the
-documented install/uninstall/start/stop commands, it's also possible
-to configure a bind address with the -b option. For example::
-
-    dns-forwarding-service -b 2002:41de:a625::41de:a625 install
-
-The service will be installed and the bind address will be stored in
-`HKLM\Software\jaraco.net\DNS Forwarding Service\Listen Address`. Note
-that the service must be restarted to recognize an updated bind address.
-
-Changes
--------
-
-1.3
-~~~
-
-* Added jaraco.net.devices package. Includes a Manager class for
-  retrieving MAC addresses and IP addresses on the host.
-
-1.2
-~~~
-
-* Added function wait_for_host to icmp lib
-* Added support for a custom bind address to the DNS Forwarding Service
-
-1.1
-~~~
-
-* Added rss module (migrated from jaraco.util)
-
-1.0
-~~~
-
-* Initial release.

File jaraco/net/http/caching.py

 	"""
 	cached = True
 	def __init__(self, response):
-		#super(CachedResponse, self).__init__(response.read())
 		StringIO.__init__(self, response.read())
 		self.seek(0)
 		self.headers = response.info()
 		self.msg = response.msg
 
 	def save(self):
+		"Produce a serialized version of this response"
 		self.headers['x-urllib2-cache'] = 'Stored'
 		return pickle.dumps(self)
 
 	@classmethod
 	def load(cls, payload):
+		"Construct a CachedResponse from a serialized payload"
 		if payload is None:
 			return None
 		result = pickle.loads(payload)
 except ImportError:
 	from distutils.command.build_py import build_py
 
-from setuptools import setup, find_packages
+from setuptools import find_packages
 
-try:
-	from jaraco.util.package import read_long_description
-	long_description = read_long_description()
-except:
-	long_description = None
+name = 'jaraco.net'
 
-setup(
-	name = 'jaraco.net',
+setup_params = dict(
+	name = name,
 	use_hg_version_increment='0.1',
 	description = 'Networking tools by jaraco',
-	long_description = long_description,
+	long_description = open('README').read(),
 	author = 'Jason R. Coombs',
 	author_email = 'jaraco@jaraco.com',
-	url = 'http://www.jaraco.com/',
-	packages = find_packages(exclude=['ez_setup', 'tests', 'examples']),
+	url = 'http://bitbucket.org/' + name,
+	packages = find_packages(),
 	namespace_packages = ['jaraco',],
 	license = 'MIT',
 	classifiers = [
 	dependency_links = [
 	],
 	tests_require=[
-		'nose>=0.11',
 	],
-	test_suite = "nose.collector",
 	cmdclass=dict(build_py=build_py),
 	setup_requires = [
-		'hgtools >= 0.4',
+		'hgtools',
 	],
 )
+
+if __name__ == '__main__':
+	from setuptools import setup
+	setup(**setup_params)