Hello community, here is the log from the commit of package python-pip for openSUSE:Factory checked in at 2019-03-12 09:46:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pip (Old) and /work/SRC/openSUSE:Factory/.python-pip.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pip" Tue Mar 12 09:46:23 2019 rev:41 rq:683720 version:19.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pip/python-pip.changes 2019-02-24 17:03:51.084667449 +0100 +++ /work/SRC/openSUSE:Factory/.python-pip.new.28833/python-pip.changes 2019-03-12 09:46:25.687621624 +0100 @@ -1,0 +2,10 @@ +Sun Mar 10 16:35:47 UTC 2019 - Arun Persaud <[email protected]> + +- update to version 19.0.3: + * Fix an IndexError crash when a legacy build of a wheel + fails. (#6252) + * Fix a regression introduced in 19.0.2 where the filename in a + RECORD file of an installed file would not be updated when + installing a wheel. (#6266) + +------------------------------------------------------------------- Old: ---- pip-19.0.2.tar.gz New: ---- pip-19.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pip.spec ++++++ --- /var/tmp/diff_new_pack.B6HaHG/_old 2019-03-12 09:46:26.183621524 +0100 +++ /var/tmp/diff_new_pack.B6HaHG/_new 2019-03-12 09:46:26.187621524 +0100 @@ -21,7 +21,7 @@ # enable testing with a build conditional (off by default): %bcond_with test Name: python-pip -Version: 19.0.2 +Version: 19.0.3 Release: 0 Summary: A Python package management system License: MIT @@ -61,8 +61,8 @@ %setup -q -n pip-%{version} %patch0 -p1 # remove shebangs verbosely (if only sed would offer a verbose mode...) -for f in $(find src -name \*.py -exec grep -l '^#!/usr/bin/env' {} \;); do - sed -i 's|^#!/usr/bin/env .*$||g' $f +for f in $(find src -name \*.py -exec grep -l '^#!%{_bindir}/env' {} \;); do + sed -i 's|^#!%{_bindir}/env .*$||g' $f done rm src/pip/_vendor/certifi/cacert.pem ++++++ pip-19.0.2.tar.gz -> pip-19.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-19.0.2/NEWS.rst new/pip-19.0.3/NEWS.rst --- old/pip-19.0.2/NEWS.rst 2019-02-09 05:55:22.000000000 +0100 +++ new/pip-19.0.3/NEWS.rst 2019-02-20 18:12:28.000000000 +0100 @@ -7,6 +7,17 @@ .. towncrier release notes start +19.0.3 (2019-02-20) +=================== + +Bug Fixes +--------- + +- Fix an ``IndexError`` crash when a legacy build of a wheel fails. (`#6252 <https://github.com/pypa/pip/issues/6252>`_) +- Fix a regression introduced in 19.0.2 where the filename in a RECORD file + of an installed file would not be updated when installing a wheel. (`#6266 <https://github.com/pypa/pip/issues/6266>`_) + + 19.0.2 (2019-02-09) =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-19.0.2/PKG-INFO new/pip-19.0.3/PKG-INFO --- old/pip-19.0.2/PKG-INFO 2019-02-09 05:58:59.000000000 +0100 +++ new/pip-19.0.3/PKG-INFO 2019-02-20 18:14:57.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: pip -Version: 19.0.2 +Version: 19.0.3 Summary: The PyPA recommended tool for installing Python packages. Home-page: https://pip.pypa.io/ Author: The pip developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-19.0.2/src/pip/__init__.py new/pip-19.0.3/src/pip/__init__.py --- old/pip-19.0.2/src/pip/__init__.py 2019-02-09 05:55:22.000000000 +0100 +++ new/pip-19.0.3/src/pip/__init__.py 2019-02-20 18:12:18.000000000 +0100 @@ -1 +1 @@ -__version__ = "19.0.2" +__version__ = "19.0.3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-19.0.2/src/pip/_internal/wheel.py new/pip-19.0.3/src/pip/_internal/wheel.py --- old/pip-19.0.2/src/pip/_internal/wheel.py 2019-02-07 14:22:20.000000000 +0100 +++ new/pip-19.0.3/src/pip/_internal/wheel.py 2019-02-20 18:00:55.000000000 +0100 @@ -267,16 +267,23 @@ lib_dir, # type: str ): # type: (...) -> List[InstalledCSVRow] + """ + :param installed: A map from archive RECORD path to installation RECORD + path. + """ installed_rows = [] # type: List[InstalledCSVRow] for row in old_csv_rows: if len(row) > 3: logger.warning( 'RECORD line has more than three elements: {}'.format(row) ) - fpath = row[0] - fpath = installed.pop(fpath, fpath) - if fpath in changed: - digest, length = rehash(fpath) + # Make a copy because we are mutating the row. + row = list(row) + old_path = row[0] + new_path = installed.pop(old_path, old_path) + row[0] = new_path + if new_path in changed: + digest, length = rehash(new_path) row[1] = digest row[2] = length installed_rows.append(tuple(row)) @@ -779,6 +786,63 @@ return True +def format_command( + command_args, # type: List[str] + command_output, # type: str +): + # type: (...) -> str + """ + Format command information for logging. + """ + text = 'Command arguments: {}\n'.format(command_args) + + if not command_output: + text += 'Command output: None' + elif logger.getEffectiveLevel() > logging.DEBUG: + text += 'Command output: [use --verbose to show]' + else: + if not command_output.endswith('\n'): + command_output += '\n' + text += ( + 'Command output:\n{}' + '-----------------------------------------' + ).format(command_output) + + return text + + +def get_legacy_build_wheel_path( + names, # type: List[str] + temp_dir, # type: str + req, # type: InstallRequirement + command_args, # type: List[str] + command_output, # type: str +): + # type: (...) -> Optional[str] + """ + Return the path to the wheel in the temporary build directory. + """ + # Sort for determinism. + names = sorted(names) + if not names: + msg = ( + 'Legacy build of wheel for {!r} created no files.\n' + ).format(req.name) + msg += format_command(command_args, command_output) + logger.warning(msg) + return None + + if len(names) > 1: + msg = ( + 'Legacy build of wheel for {!r} created more than one file.\n' + 'Filenames (choosing first): {}\n' + ).format(req.name, names) + msg += format_command(command_args, command_output) + logger.warning(msg) + + return os.path.join(temp_dir, names[0]) + + class WheelBuilder(object): """Build wheels from a RequirementSet.""" @@ -888,14 +952,21 @@ wheel_args += ["--python-tag", python_tag] try: - call_subprocess(wheel_args, cwd=req.setup_py_dir, - show_stdout=False, spinner=spinner) + output = call_subprocess(wheel_args, cwd=req.setup_py_dir, + show_stdout=False, spinner=spinner) except Exception: spinner.finish("error") logger.error('Failed building wheel for %s', req.name) return None - # listdir's return value is sorted to be deterministic - return os.path.join(tempd, sorted(os.listdir(tempd))[0]) + names = os.listdir(tempd) + wheel_path = get_legacy_build_wheel_path( + names=names, + temp_dir=tempd, + req=req, + command_args=wheel_args, + command_output=output, + ) + return wheel_path def _clean_one(self, req): base_args = self._base_setup_args(req) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-19.0.2/src/pip.egg-info/PKG-INFO new/pip-19.0.3/src/pip.egg-info/PKG-INFO --- old/pip-19.0.2/src/pip.egg-info/PKG-INFO 2019-02-09 05:58:58.000000000 +0100 +++ new/pip-19.0.3/src/pip.egg-info/PKG-INFO 2019-02-20 18:14:57.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: pip -Version: 19.0.2 +Version: 19.0.3 Summary: The PyPA recommended tool for installing Python packages. Home-page: https://pip.pypa.io/ Author: The pip developers
