diff --git a/.pydevproject b/.pydevproject index b26aeb6..5f4661d 100644 --- a/.pydevproject +++ b/.pydevproject @@ -1,6 +1,6 @@ -ndg-https-client-py3.4 +Default python 3.0 /ndg_httpsclient diff --git a/README.md b/README.md index 3018702..8aef73c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,17 @@ -A HTTPS client implementation for httplib and urllib2 based on -PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation over the -default provided with Python and importantly enables full verification of the -SSL peer. +A HTTPS client implementation for + * ``httplib`` (Python 2), ``http.client`` (Python 3) and + * ``urllib2`` (Python 2) and ``urllib`` (Python 3) + +... based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation +over the default provided with Python and importantly enables full verification +of the SSL peer using ``pyasn1``. Releases ======== 0.4.1 ----- * Added explicit ref to Python 3 in classifier text for Python 3 checking tools. + * Moved LICENSE file into package 0.4.0 ----- @@ -30,13 +34,13 @@ Releases 0.3.1 ----- - * extended utils functions to support keyword for passing additional urllib2 + * extended utils functions to support keyword for passing additional ``urllib2`` handlers. 0.3.0 ----- - * Added ndg.httpsclient.utils.fetch_stream_from_url function and added - parameter for data to post in open_url and fetch_* methods. + * Added ``ndg.httpsclient.utils.fetch_stream_from_url`` function and added + parameter for data to post in ``open_url`` and ``fetch_*`` methods. * fix to ndg.httpsclient.utils module _should_use_proxy and open_url functions 0.2.0 @@ -50,10 +54,10 @@ Initial release Prerequisites ============= -This has been developed and tested for Python 2.6 and 2.7 with pyOpenSSL 0.13 and 0.14. -Version 0.4.0 tested with pyOpenSSL 0.15.1 and Python 2.7 and 3.4. Note that proxy support -is only available from Python 2.6.2 onwards. pyasn1 is required for correct SSL -verification with subjectAltNames. +This has been developed and tested for Python 2.6 and 2.7 with pyOpenSSL 0.13 +and 0.14. Version 0.4.0 tested with ``pyOpenSSL`` 0.15.1 and Python 2.7 and +3.4. Note that proxy support is only available from Python 2.6.2 onwards. +``pyasn1`` is required for correct SSL verification with ``subjectAltNames``. Installation ============ diff --git a/LICENSE b/ndg/httpsclient/LICENSE similarity index 100% rename from LICENSE rename to ndg/httpsclient/LICENSE diff --git a/ndg/httpsclient/utils.py b/ndg/httpsclient/utils.py index a2b0ed3..d55d8f6 100644 --- a/ndg/httpsclient/utils.py +++ b/ndg/httpsclient/utils.py @@ -188,8 +188,8 @@ def open_url(url, config, data=None, handlers=None): # currently only supports http basic auth auth_handler = HTTPBasicAuthHandler_(HTTPPasswordMgrWithDefaultRealm_()) auth_handler.add_password(realm=None, uri=url, - user=config.httpauth[0], - passwd=config.httpauth[1]) + user=config.http_basicauth[0], + passwd=config.http_basicauth[1]) handlers.append(auth_handler) diff --git a/setup.py b/setup.py index d5a7419..86b6844 100644 --- a/setup.py +++ b/setup.py @@ -8,16 +8,20 @@ NAMESPACE_PKGS = ['ndg'] _long_description = ''' -This is a HTTPS client implementation for httplib and urllib2 based on -PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation over the -default provided with Python and importantly enables full verification of the -SSL peer. +A HTTPS client implementation for + * ``httplib`` (Python 2), ``http.client`` (Python 3) and + * ``urllib2`` (Python 2) and ``urllib`` (Python 3) + +... based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation +over the default provided with Python and importantly enables full verification +of the SSL peer using ``pyasn1``. Releases ======== 0.4.1 ----- * Added explicit ref to Python 3 in classifier text for Python 3 checking tools. + * Moved LICENSE file into package 0.4.0 ----- @@ -40,13 +44,13 @@ 0.3.1 ----- - * extended utils functions to support keyword for passing additional urllib2 + * extended utils functions to support keyword for passing additional ``urllib2`` handlers. 0.3.0 ----- - * Added ndg.httpsclient.utils.fetch_stream_from_url function and added - parameter for data to post in open_url and fetch_* methods. + * Added ``ndg.httpsclient.utils.fetch_stream_from_url`` function and added + parameter for data to post in ``open_url`` and ``fetch_*`` methods. * fix to ndg.httpsclient.utils module _should_use_proxy and open_url functions 0.2.0 @@ -60,10 +64,10 @@ Prerequisites ============= -This has been developed and tested for Python 2.6 and 2.7 with pyOpenSSL 0.13 and 0.14. -Version 0.4.0 tested with pyOpenSSL 0.15.1 and Python 2.7 and 3.4. Note that proxy support -is only available from Python 2.6.2 onwards. pyasn1 is required for correct SSL -verification with subjectAltNames. +This has been developed and tested for Python 2.6 and 2.7 with pyOpenSSL 0.13 +and 0.14. Version 0.4.0 tested with ``pyOpenSSL`` 0.15.1 and Python 2.7 and +3.4. Note that proxy support is only available from Python 2.6.2 onwards. +``pyasn1`` is required for correct SSL verification with ``subjectAltNames``. Installation ============ @@ -115,12 +119,13 @@ author_email='Philip.Kershaw@stfc.ac.uk', url='https://github.com/cedadev/ndg_httpsclient/', long_description=_long_description, - license='BSD - See LICENCE file for details', + license='BSD - See ndg/httpsclient/LICENCE file for details', packages=find_packages(), namespace_packages=NAMESPACE_PKGS, # package_dir={'ndg.httpsclient': 'ndg/httpsclient'}, package_data={ 'ndg.httpsclient': [ + 'LICENSE', 'test/README', 'test/scripts/*.sh', 'test/pki/localhost.*', @@ -130,7 +135,7 @@ install_requires=['PyOpenSSL'], extras_require={'subjectAltName_support': 'pyasn1'}, classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: End Users/Desktop',