[Python-modules-commits] [usagestats] 01/01: New upstream 0.7

Alastair McKinstry mckinstry at moszumanska.debian.org
Thu Jun 1 15:02:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch upstream
in repository usagestats.

commit ad4fe063bce71e69ed415486acf8b1245ecf02c7
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Jun 1 15:22:55 2017 +0100

    New upstream 0.7
---
 CHANGELOG.md  | 6 ++++++
 PKG-INFO      | 2 +-
 setup.py      | 2 +-
 usagestats.py | 9 +++++++--
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 415eb56..d5836bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,12 @@
 Changelog
 =========
 
+0.7 (2017-05-31)
+----------------
+
+Bugfixes:
+* Stats submission can fail in `requests` on Python 3 if `ssl_verify` is `bytes` and not `str`.
+
 0.6 (2017-04-15)
 ----------------
 
diff --git a/PKG-INFO b/PKG-INFO
index 2981842..cf61743 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: usagestats
-Version: 0.6
+Version: 0.7
 Summary: Anonymous usage statistics collecter
 Home-page: https://github.com/remram44/usagestats
 Author: Remi Rampin
diff --git a/setup.py b/setup.py
index 232d849..baeca98 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ os.chdir(os.path.abspath(os.path.dirname(__file__)))
 with open('README.rst') as fp:
     description = fp.read()
 setup(name='usagestats',
-      version='0.6',
+      version='0.7',
       py_modules=['usagestats'],
       description="Anonymous usage statistics collecter",
       install_requires=['requests'],
diff --git a/usagestats.py b/usagestats.py
index 1ce1bae..7305116 100644
--- a/usagestats.py
+++ b/usagestats.py
@@ -6,7 +6,7 @@ import time
 import sys
 
 
-__version__ = '0.6'
+__version__ = '0.7'
 
 
 logger = logging.getLogger('usagestats')
@@ -134,7 +134,12 @@ class Stats(object):
         """
         self.started_time = time.time()
 
-        self.ssl_verify = ssl_verify
+        if ssl_verify is None or isinstance(ssl_verify, str):
+            self.ssl_verify = ssl_verify
+        elif isinstance(ssl_verify, bytes):  # bytes on PY3
+            self.ssl_verify = ssl_verify.decode('utf-8')
+        else:  # unicode on PY2
+            self.ssl_verify = ssl_verify.encode('utf-8')
 
         self.env_var = env_var
         env_val = os.environ.get(env_var, '').lower()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/usagestats.git



More information about the Python-modules-commits mailing list