Skip to content

Commit 730855e

Browse files
authored
Merge pull request #14 from retornam/retornam/strictfix
Resolve DeprecationWarning: distutils
2 parents c6439af + 89a3315 commit 730855e

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build/
2+
dist/
3+
forcediphttpsadapter.egg-info/*

‎forcediphttpsadapter/adapters.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
# if it's <2.7.9 decide to use the old "http://$IP/ technique. If Python is
6969
# >2.7.9 and the adapter doesn't work, unfortunately, there's nothing that can
7070
# be done :(
71-
from distutils.version import StrictVersion
71+
from packaging.version import Version
7272
from socket import error as SocketError, timeout as SocketTimeout
7373

7474
import requests
@@ -90,7 +90,7 @@
9090
# Requests older than 2.4.0's VerifiedHHTPSConnection is broken and doesn't
9191
# properly use _new_conn. On these versions, use UnverifiedHTTPSConnection
9292
# instead.
93-
if StrictVersion(requests.__version__) < StrictVersion('2.4.0'):
93+
if Version(requests.__version__) < Version('2.4.0'):
9494
from requests.packages.urllib3.connection import (
9595
UnverifiedHTTPSConnection as HTTPSConnection
9696
)

‎setup.py‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
from setuptools import setup, find_packages
99

1010

11-
PACKAGE_NAME = 'forcediphttpsadapter'
12-
PACKAGE_VERSION = '1.0.2'
13-
AUTHOR = 'Roadmaster'
14-
EMAIL = 'daniel@tomechangosubanana.com'
15-
URL = 'https://github.com/Roadmaster/forcediphttpsadapter'
11+
PACKAGE_NAME = "forcediphttpsadapter"
12+
PACKAGE_VERSION = "1.0.2"
13+
AUTHOR = "Roadmaster"
14+
EMAIL = "daniel@tomechangosubanana.com"
15+
URL = "https://github.com/Roadmaster/forcediphttpsadapter"
1616

1717

1818
setup(
@@ -24,19 +24,15 @@
2424
url=URL,
2525
# classifiers=CLASSIFIERS,
2626
# platforms=PLATFORMS,
27-
provides=['adapters'],
28-
install_requires=['requests'],
27+
provides=["adapters"],
28+
install_requires=["packaging", "requests"],
2929
# dependency_links=dependency_links,
30-
3130
packages=find_packages(),
3231
# include_package_data=True,
3332
# package_data=package_data,
34-
35-
download_url='{}/archive/master.zip'.format(URL),
33+
download_url="{}/archive/master.zip".format(URL),
3634
# keywords=KEYWORDS,
3735
# scripts=scripts,
38-
3936
# entry_points={},
40-
4137
zip_safe=False,
4238
)

0 commit comments

Comments
 (0)