Remove support for 2.6 and support for 3.5

This is a step in the direction of refactoring to modernity.
This commit is contained in:
Chris Dent
2015-12-28 12:30:14 +00:00
parent b388c00912
commit 11edb84b43
5 changed files with 8 additions and 17 deletions

View File

@@ -1,9 +1,9 @@
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
- 3.5
script: make test
install:

View File

@@ -4,7 +4,7 @@ python3-wsgi-intercept
[![travis](https://secure.travis-ci.org/cdent/python3-wsgi-intercept.png)](https://secure.travis-ci.org/cdent/python3-wsgi-intercept)
Python3 port of the important bits of wsgi-intercept, now working for
2.6, 2.7, 3.3 and 3.4.
2.7, 3.3, 3.4 and 3.5.
Documentation is available on [Read The
Docs](http://wsgi-intercept.readthedocs.org/en/latest/).
@@ -40,4 +40,3 @@ to keep in mind is that interceptor code from earlier versions,
such as the interceptor for `mechanize` ought to work when imported
independently (see [related
conversation](https://github.com/cdent/wsgi-intercept/issues/16).

View File

@@ -8,11 +8,11 @@ Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
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 :: 3.5
Topic :: Internet :: WWW/HTTP :: WSGI
Topic :: Software Development :: Testing
""".strip().splitlines()

View File

@@ -68,7 +68,7 @@ it into all of the *other* Python Web testing frameworks.
The Python 2 version of wsgi-intercept was the result. Kumar McMillan
later took over maintenance.
The current version works with Python 2.6, 2.7, 3.3 and 3.4 and was assembled
The current version works with Python 2.7, 3.3, 3.4 and 3.5 and was assembled
by `Chris Dent`_. Testing and documentation improvements from `Sasha Hart`_.
.. _twill: http://www.idyll.org/~t/www-tools/twill.html

View File

@@ -20,12 +20,8 @@ class HTTP_WSGIInterceptorWithTimeout(HTTPInterceptorMixin,
# In Python3 strict is deprecated
if sys.version_info[0] < 3:
try:
HTTPConnection.__init__(self, host, port=port, strict=strict,
timeout=timeout, source_address=source_address)
except TypeError: # Python 2.6 doesn't have source_address
HTTPConnection.__init__(self, host, port=port, strict=strict,
timeout=timeout)
HTTPConnection.__init__(self, host, port=port, strict=strict,
timeout=timeout, source_address=source_address)
else:
HTTPConnection.__init__(self, host, port=port,
timeout=timeout, source_address=source_address)
@@ -40,12 +36,8 @@ class HTTPS_WSGIInterceptorWithTimeout(HTTPSInterceptorMixin,
# ignore proxy_info and ca_certs
# In Python3 strict is deprecated
if sys.version_info[0] < 3:
try:
HTTPSConnection.__init__(self, host, port=port, strict=strict,
timeout=timeout, source_address=source_address)
except TypeError: # Python 2.6 doesn't have source_address
HTTPSConnection.__init__(self, host, port=port, strict=strict,
timeout=timeout)
HTTPSConnection.__init__(self, host, port=port, strict=strict,
timeout=timeout, source_address=source_address)
else:
HTTPSConnection.__init__(self, host, port=port,
timeout=timeout, source_address=source_address)