Merge branch 'master' into patch-1

This commit is contained in:
Alvaro Gutierrez Perez
2017-10-21 03:24:55 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
import platform
import sys
import time
from collections import Mapping
from datetime import timedelta
@@ -38,7 +38,7 @@ from .status_codes import codes
from .models import REDIRECT_STATI
# Preferred clock, based on which one is more accurate on a given system.
if platform.system() == 'Windows':
if sys.platform == 'win32':
try: # Python 3.4+
preferred_clock = time.perf_counter
except AttributeError: # Earlier than Python 3.
+2 -2
View File
@@ -14,10 +14,10 @@ import collections
import contextlib
import io
import os
import platform
import re
import socket
import struct
import sys
import warnings
from .__version__ import __version__
@@ -39,7 +39,7 @@ NETRC_FILES = ('.netrc', '_netrc')
DEFAULT_CA_BUNDLE_PATH = certs.where()
if platform.system() == 'Windows':
if sys.platform == 'win32':
# provide a proxy_bypass version on Windows without DNS lookups
def proxy_bypass_registry(host):