[Python-modules-commits] [requests] 02/09: Import requests_2.12.4.orig.tar.gz
Daniele Tricoli
eriol-guest at moszumanska.debian.org
Mon Dec 19 19:35:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
eriol-guest pushed a commit to branch master
in repository requests.
commit 8846c4e00e653018ef879c74950cc90e5fe4c473
Author: Daniele Tricoli <eriol at mornie.org>
Date: Mon Dec 19 19:57:12 2016 +0100
Import requests_2.12.4.orig.tar.gz
---
HISTORY.rst | 9 +++++++++
PKG-INFO | 11 ++++++++++-
requests.egg-info/PKG-INFO | 11 ++++++++++-
requests/__init__.py | 4 ++--
requests/auth.py | 33 +++++++++++++++++++++++++++++++--
5 files changed, 62 insertions(+), 6 deletions(-)
diff --git a/HISTORY.rst b/HISTORY.rst
index 01ec2dd..e377c40 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,6 +3,15 @@
Release History
---------------
+2.12.4 (2016-12-14)
++++++++++++++++++++
+
+**Bugfixes**
+
+- Fixed regression from 2.12.2 where non-string types were rejected in the
+ basic auth parameters. While support for this behaviour has been readded,
+ the behaviour is deprecated and will be removed in the future.
+
2.12.3 (2016-12-01)
+++++++++++++++++++
diff --git a/PKG-INFO b/PKG-INFO
index 66bc07e..4450171 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: requests
-Version: 2.12.3
+Version: 2.12.4
Summary: Python HTTP for Humans.
Home-page: http://python-requests.org
Author: Kenneth Reitz
@@ -111,6 +111,15 @@ Description: Requests: HTTP for Humans
Release History
---------------
+ 2.12.4 (2016-12-14)
+ +++++++++++++++++++
+
+ **Bugfixes**
+
+ - Fixed regression from 2.12.2 where non-string types were rejected in the
+ basic auth parameters. While support for this behaviour has been readded,
+ the behaviour is deprecated and will be removed in the future.
+
2.12.3 (2016-12-01)
+++++++++++++++++++
diff --git a/requests.egg-info/PKG-INFO b/requests.egg-info/PKG-INFO
index 66bc07e..4450171 100644
--- a/requests.egg-info/PKG-INFO
+++ b/requests.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: requests
-Version: 2.12.3
+Version: 2.12.4
Summary: Python HTTP for Humans.
Home-page: http://python-requests.org
Author: Kenneth Reitz
@@ -111,6 +111,15 @@ Description: Requests: HTTP for Humans
Release History
---------------
+ 2.12.4 (2016-12-14)
+ +++++++++++++++++++
+
+ **Bugfixes**
+
+ - Fixed regression from 2.12.2 where non-string types were rejected in the
+ basic auth parameters. While support for this behaviour has been readded,
+ the behaviour is deprecated and will be removed in the future.
+
2.12.3 (2016-12-01)
+++++++++++++++++++
diff --git a/requests/__init__.py b/requests/__init__.py
index c41c54f..f4f1a04 100644
--- a/requests/__init__.py
+++ b/requests/__init__.py
@@ -41,8 +41,8 @@ is at <http://python-requests.org>.
"""
__title__ = 'requests'
-__version__ = '2.12.3'
-__build__ = 0x021203
+__version__ = '2.12.4'
+__build__ = 0x021204
__author__ = 'Kenneth Reitz'
__license__ = 'Apache 2.0'
__copyright__ = 'Copyright 2016 Kenneth Reitz'
diff --git a/requests/auth.py b/requests/auth.py
index 3460c8b..701104d 100644
--- a/requests/auth.py
+++ b/requests/auth.py
@@ -12,10 +12,11 @@ import re
import time
import hashlib
import threading
+import warnings
from base64 import b64encode
-from .compat import urlparse, str
+from .compat import urlparse, str, basestring
from .cookies import extract_cookies_to_jar
from ._internal_utils import to_native_string
from .utils import parse_dict_header
@@ -27,7 +28,35 @@ CONTENT_TYPE_MULTI_PART = 'multipart/form-data'
def _basic_auth_str(username, password):
"""Returns a Basic Auth string."""
-
+
+ # "I want us to put a big-ol' comment on top of it that
+ # says that this behaviour is dumb but we need to preserve
+ # it because people are relying on it."
+ # - Lukasa
+ #
+ # These are here solely to maintain backwards compatibility
+ # for things like ints. This will be removed in 3.0.0.
+ if not isinstance(username, basestring):
+ warnings.warn(
+ "Non-string usernames will no longer be supported in Requests "
+ "3.0.0. Please convert the object you've passed in ({!r}) to "
+ "a string or bytes object in the near future to avoid "
+ "problems.".format(username),
+ category=DeprecationWarning,
+ )
+ username = str(username)
+
+ if not isinstance(password, basestring):
+ warnings.warn(
+ "Non-string passwords will no longer be supported in Requests "
+ "3.0.0. Please convert the object you've passed in ({!r}) to "
+ "a string or bytes object in the near future to avoid "
+ "problems.".format(password),
+ category=DeprecationWarning,
+ )
+ password = str(password)
+ # -- End Removal --
+
if isinstance(username, str):
username = username.encode('latin1')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/requests.git
More information about the Python-modules-commits
mailing list