Add urlparse fix for Python 3.6.x . Deprecate support for Python 3.5.x (#278)

* Add fix required to run on Python 3.6.  Python 3.5.x is no longer supported as it reports syntax error and no longer recognize typing syntax

* Prepare for v2.1.2
This commit is contained in:
Abhinav Singh 2020-01-30 22:35:41 -08:00 committed by GitHub
parent 87a54a0781
commit 434e2502ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -8,5 +8,5 @@
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE for more details.
"""
VERSION = (2, 1, 1)
VERSION = (2, 1, 2)
__version__ = '.'.join(map(str, VERSION[0:3]))

View File

@ -111,6 +111,10 @@ class HttpParser:
def set_line_attributes(self) -> None:
if self.type == httpParserTypes.REQUEST_PARSER:
if self.method == httpMethods.CONNECT and self.url:
if self.url.scheme == b'':
u = urlparse.urlsplit(b'//' + self.url.path)
self.host, self.port = u.hostname, u.port
else:
self.host = self.url.scheme
self.port = 443 if self.url.path == b'' else \
int(self.url.path)

View File

@ -10,7 +10,7 @@
"""
from setuptools import setup, find_packages
VERSION = (2, 1, 1)
VERSION = (2, 1, 2)
__version__ = '.'.join(map(str, VERSION[0:3]))
__description__ = '''⚡⚡⚡Fast, Lightweight, Pluggable, TLS interception capable proxy server
focused on Network monitoring, controls & Application development, testing, debugging.'''
@ -32,7 +32,7 @@ if __name__ == '__main__':
long_description_content_type='text/markdown',
download_url=__download_url__,
license=__license__,
python_requires='!=2.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
python_requires='!=2.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
zip_safe=False,
packages=find_packages(exclude=['tests', 'tests.*']),
package_data={'proxy': ['py.typed']},