[Python-modules-commits] [python-pip] 01/08: Import python-pip_8.1.1.orig.tar.gz

Barry Warsaw barry at moszumanska.debian.org
Thu Mar 17 14:29:30 UTC 2016


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

barry pushed a commit to branch master
in repository python-pip.

commit cb678960292d0979061d7c0f180510fa688a6528
Author: Barry Warsaw <barry at python.org>
Date:   Thu Mar 17 10:25:06 2016 -0400

    Import python-pip_8.1.1.orig.tar.gz
---
 AUTHORS.txt           | 2 ++
 CHANGES.txt           | 6 ++++++
 PKG-INFO              | 2 +-
 docs/installing.rst   | 2 +-
 pip.egg-info/PKG-INFO | 2 +-
 pip/__init__.py       | 6 +++++-
 pip/cmdoptions.py     | 2 +-
 pip/utils/encoding.py | 8 ++++++++
 setup.cfg             | 4 ++--
 9 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/AUTHORS.txt b/AUTHORS.txt
index ba76616..6b15087 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -99,6 +99,7 @@ Hugo Lopes Tavares <hltbra at gmail.com>
 Hynek Schlawack <hs at ox.cx>
 Ian Bicking <ianb at colorstudy.com>
 Ian Cordasco <graffatcolmingov at gmail.com>
+Ian Lee <IanLee1521 at gmail.com>
 Ian Wienand <iwienand at redhat.com>
 Igor Sobreira <igor at igorsobreira.com>
 Ilya Baryshev <baryshev at gmail.com>
@@ -261,6 +262,7 @@ Thomas Smith <smithtg at ncbi.nlm.nih.gov>
 Tim Harder <radhermit at gmail.com>
 tim smith <github at tim-smith.us>
 Tomer Chachamu <tomer.chachamu at gmail.com>
+Tony Zhaocheng Tan <tony at tonytan.io>
 Toshio Kuratomi <toshio at fedoraproject.org>
 Travis Swicegood <development at domain51.com>
 Valentin Haenel <valentin.haenel at gmx.de>
diff --git a/CHANGES.txt b/CHANGES.txt
index 1740e26..9394b05 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,9 @@
+**8.1.1 (2016-03-17)**
+
+* Fix regression with non-ascii requirement files on Python 2 and add support
+  for encoding headers in requirement files (:issue:`3548`, :pull:`3547`).
+
+
 **8.1.0 (2016-03-05)**
 
 * Implement PEP 513, which adds support for the manylinux1 platform tag,
diff --git a/PKG-INFO b/PKG-INFO
index 7d986da..6afdcd6 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pip
-Version: 8.1.0
+Version: 8.1.1
 Summary: The PyPA recommended tool for installing Python packages.
 Home-page: https://pip.pypa.io/
 Author: The pip developers
diff --git a/docs/installing.rst b/docs/installing.rst
index 2b9ae7e..119343a 100644
--- a/docs/installing.rst
+++ b/docs/installing.rst
@@ -11,7 +11,7 @@ downloaded from `python.org <https://www.python.org>`_, but you'll need to
 :ref:`upgrade pip <Upgrading pip>`.
 
 Additionally, pip will already be installed if you're working in a :ref:`Virtual
-Envionment <pypug:Creating and using Virtual Environments>` created by
+Environment <pypug:Creating and using Virtual Environments>` created by
 :ref:`pypug:virtualenv` or :ref:`pyvenv <pypug:venv>`.
 
 
diff --git a/pip.egg-info/PKG-INFO b/pip.egg-info/PKG-INFO
index 7d986da..6afdcd6 100644
--- a/pip.egg-info/PKG-INFO
+++ b/pip.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pip
-Version: 8.1.0
+Version: 8.1.1
 Summary: The PyPA recommended tool for installing Python packages.
 Home-page: https://pip.pypa.io/
 Author: The pip developers
diff --git a/pip/__init__.py b/pip/__init__.py
index c688a5a..51e7eaf 100755
--- a/pip/__init__.py
+++ b/pip/__init__.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 from __future__ import absolute_import
 
+import locale
 import logging
 import os
 import optparse
@@ -30,7 +31,7 @@ import pip.cmdoptions
 cmdoptions = pip.cmdoptions
 
 # The version as used in the setup.py and the docs conf.py
-__version__ = "8.1.0"
+__version__ = "8.1.1"
 
 
 logger = logging.getLogger(__name__)
@@ -209,6 +210,9 @@ def main(args=None):
         sys.stderr.write(os.linesep)
         sys.exit(1)
 
+    # Needed for locale.getpreferredencoding(False) to work
+    # in pip.utils.encoding.auto_decode
+    locale.setlocale(locale.LC_ALL, '')
     command = commands_dict[cmd_name](isolated=check_isolated(cmd_args))
     return command.main(cmd_args)
 
diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py
index aced0c0..1fade87 100644
--- a/pip/cmdoptions.py
+++ b/pip/cmdoptions.py
@@ -247,7 +247,7 @@ def find_links():
         default=[],
         metavar='url',
         help="If a url or path to an html file, then parse for links to "
-             "archives. If a local path or file:// url that's a directory,"
+             "archives. If a local path or file:// url that's a directory, "
              "then look for archives in the directory listing.")
 
 
diff --git a/pip/utils/encoding.py b/pip/utils/encoding.py
index b272a0b..2483168 100644
--- a/pip/utils/encoding.py
+++ b/pip/utils/encoding.py
@@ -1,5 +1,6 @@
 import codecs
 import locale
+import re
 
 
 BOMS = [
@@ -12,6 +13,8 @@ BOMS = [
     (codecs.BOM_UTF32_LE, 'utf32-le'),
 ]
 
+ENCODING_RE = re.compile(b'coding[:=]\s*([-\w.]+)')
+
 
 def auto_decode(data):
     """Check a bytes string for a BOM to correctly detect the encoding
@@ -20,4 +23,9 @@ def auto_decode(data):
     for bom, encoding in BOMS:
         if data.startswith(bom):
             return data[len(bom):].decode(encoding)
+    # Lets check the first two lines as in PEP263
+    for line in data.split(b'\n')[:2]:
+        if line[0:1] == b'#' and ENCODING_RE.search(line):
+            encoding = ENCODING_RE.search(line).groups()[0].decode('ascii')
+            return data.decode(encoding)
     return data.decode(locale.getpreferredencoding(False))
diff --git a/setup.cfg b/setup.cfg
index 86639c6..3c9ce7e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,7 @@ addopts = --ignore pip/_vendor --ignore tests/tests_cache
 universal = 1
 
 [egg_info]
-tag_build = 
-tag_date = 0
 tag_svn_revision = 0
+tag_date = 0
+tag_build = 
 

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



More information about the Python-modules-commits mailing list