Update to py 1.4.34 (#6789)
* Update to the latest version of py * Revert back to py 1.4.34
This commit is contained in:
		
							
								
								
									
										24
									
								
								lib/spack/external/py/AUTHORS
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								lib/spack/external/py/AUTHORS
									
									
									
									
										vendored
									
									
								
							@@ -1,24 +0,0 @@
 | 
			
		||||
Holger Krekel, holger at merlinux eu
 | 
			
		||||
Benjamin Peterson, benjamin at python org
 | 
			
		||||
Ronny Pfannschmidt, Ronny.Pfannschmidt at gmx de
 | 
			
		||||
Guido Wesdorp, johnny at johnnydebris net 
 | 
			
		||||
Samuele Pedroni, pedronis at openend se 
 | 
			
		||||
Carl Friedrich Bolz, cfbolz at gmx de
 | 
			
		||||
Armin Rigo, arigo at tunes org 
 | 
			
		||||
Maciek Fijalkowski, fijal at genesilico pl
 | 
			
		||||
Brian Dorsey, briandorsey at gmail com 
 | 
			
		||||
Floris Bruynooghe, flub at devork be
 | 
			
		||||
merlinux GmbH, Germany, office at merlinux eu
 | 
			
		||||
 | 
			
		||||
Contributors include:: 
 | 
			
		||||
 | 
			
		||||
Ross Lawley
 | 
			
		||||
Ralf Schmitt
 | 
			
		||||
Chris Lamb 
 | 
			
		||||
Harald Armin Massa
 | 
			
		||||
Martijn Faassen
 | 
			
		||||
Ian Bicking 
 | 
			
		||||
Jan Balster
 | 
			
		||||
Grig Gheorghiu
 | 
			
		||||
Bob Ippolito
 | 
			
		||||
Christian Tismer
 | 
			
		||||
							
								
								
									
										19
									
								
								lib/spack/external/py/LICENSE
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								lib/spack/external/py/LICENSE
									
									
									
									
										vendored
									
									
								
							@@ -1,19 +0,0 @@
 | 
			
		||||
 | 
			
		||||
  Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
  of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
  in the Software without restriction, including without limitation the rights
 | 
			
		||||
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
  copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
  furnished to do so, subject to the following conditions:
 | 
			
		||||
     
 | 
			
		||||
  The above copyright notice and this permission notice shall be included in all
 | 
			
		||||
  copies or substantial portions of the Software.
 | 
			
		||||
 
 | 
			
		||||
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
			
		||||
  SOFTWARE.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										21
									
								
								lib/spack/external/py/README.rst
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								lib/spack/external/py/README.rst
									
									
									
									
										vendored
									
									
								
							@@ -1,21 +0,0 @@
 | 
			
		||||
.. image:: https://img.shields.io/pypi/pyversions/pytest.svg
 | 
			
		||||
  :target: https://pypi.org/project/py
 | 
			
		||||
.. image:: https://img.shields.io/travis/pytest-dev/py.svg
 | 
			
		||||
   :target: https://travis-ci.org/pytest-dev/py
 | 
			
		||||
 | 
			
		||||
The py lib is a Python development support library featuring
 | 
			
		||||
the following tools and modules:
 | 
			
		||||
 | 
			
		||||
* ``py.path``:  uniform local and svn path objects
 | 
			
		||||
* ``py.apipkg``:  explicit API control and lazy-importing
 | 
			
		||||
* ``py.iniconfig``:  easy parsing of .ini files
 | 
			
		||||
* ``py.code``: dynamic code generation and introspection
 | 
			
		||||
 | 
			
		||||
NOTE: prior to the 1.4 release this distribution used to
 | 
			
		||||
contain py.test which is now its own package, see http://pytest.org
 | 
			
		||||
 | 
			
		||||
For questions and more information please visit http://pylib.readthedocs.org
 | 
			
		||||
 | 
			
		||||
Bugs and issues: https://github.com/pytest-dev/py
 | 
			
		||||
 | 
			
		||||
Authors: Holger Krekel and others, 2004-2016
 | 
			
		||||
							
								
								
									
										6
									
								
								lib/spack/external/py/__init__.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								lib/spack/external/py/__init__.py
									
									
									
									
										vendored
									
									
								
							@@ -1,5 +1,5 @@
 | 
			
		||||
"""
 | 
			
		||||
py.test and pylib: rapid testing and development utils
 | 
			
		||||
pylib: rapid testing and development utils
 | 
			
		||||
 | 
			
		||||
this module uses apipkg.py for lazy-loading sub modules
 | 
			
		||||
and classes.  The initpkg-dictionary  below specifies
 | 
			
		||||
@@ -8,13 +8,15 @@
 | 
			
		||||
 | 
			
		||||
(c) Holger Krekel and others, 2004-2014
 | 
			
		||||
"""
 | 
			
		||||
__version__ = '1.4.32'
 | 
			
		||||
__version__ = '1.4.34'
 | 
			
		||||
 | 
			
		||||
from py import _apipkg
 | 
			
		||||
 | 
			
		||||
# so that py.error.* instances are picklable
 | 
			
		||||
import sys
 | 
			
		||||
sys.modules['py.error'] = _apipkg.AliasModule("py.error", "py._error", 'error')
 | 
			
		||||
import py.error  # "Dereference" it now just to be safe (issue110)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
_apipkg.initpkg(__name__, attr={'_apipkg': _apipkg}, exportdefs={
 | 
			
		||||
    # access to all standard lib modules
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								lib/spack/external/py/_code/code.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								lib/spack/external/py/_code/code.py
									
									
									
									
										vendored
									
									
								
							@@ -419,7 +419,7 @@ def __str__(self):
 | 
			
		||||
    def __unicode__(self):
 | 
			
		||||
        entry = self.traceback[-1]
 | 
			
		||||
        loc = ReprFileLocation(entry.path, entry.lineno + 1, self.exconly())
 | 
			
		||||
        return unicode(loc)
 | 
			
		||||
        return loc.__unicode__()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class FormattedExcinfo(object):
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/spack/external/py/_path/common.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								lib/spack/external/py/_path/common.py
									
									
									
									
										vendored
									
									
								
							@@ -1,6 +1,7 @@
 | 
			
		||||
"""
 | 
			
		||||
"""
 | 
			
		||||
import os, sys, posixpath
 | 
			
		||||
import fnmatch
 | 
			
		||||
import py
 | 
			
		||||
 | 
			
		||||
# Moved from local.py.
 | 
			
		||||
@@ -169,11 +170,16 @@ def read(self, mode='r'):
 | 
			
		||||
    def readlines(self, cr=1):
 | 
			
		||||
        """ read and return a list of lines from the path. if cr is False, the
 | 
			
		||||
newline will be removed from the end of each line. """
 | 
			
		||||
        if sys.version_info < (3, ):
 | 
			
		||||
            mode = 'rU'
 | 
			
		||||
        else:  # python 3 deprecates mode "U" in favor of "newline" option
 | 
			
		||||
            mode = 'r'
 | 
			
		||||
 | 
			
		||||
        if not cr:
 | 
			
		||||
            content = self.read('rU')
 | 
			
		||||
            content = self.read(mode)
 | 
			
		||||
            return content.split('\n')
 | 
			
		||||
        else:
 | 
			
		||||
            f = self.open('rU')
 | 
			
		||||
            f = self.open(mode)
 | 
			
		||||
            try:
 | 
			
		||||
                return f.readlines()
 | 
			
		||||
            finally:
 | 
			
		||||
@@ -378,7 +384,7 @@ def samefile(self, other):
 | 
			
		||||
        return self.strpath == str(other)
 | 
			
		||||
 | 
			
		||||
    def __fspath__(self):
 | 
			
		||||
        return str(self)
 | 
			
		||||
        return self.strpath
 | 
			
		||||
 | 
			
		||||
class Visitor:
 | 
			
		||||
    def __init__(self, fil, rec, ignore, bf, sort):
 | 
			
		||||
@@ -436,4 +442,4 @@ def __call__(self, path):
 | 
			
		||||
            name = str(path) # path.strpath # XXX svn?
 | 
			
		||||
            if not os.path.isabs(pattern):
 | 
			
		||||
                pattern = '*' + path.sep + pattern
 | 
			
		||||
        return py.std.fnmatch.fnmatch(name, pattern)
 | 
			
		||||
        return fnmatch.fnmatch(name, pattern)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/spack/external/py/_path/local.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								lib/spack/external/py/_path/local.py
									
									
									
									
										vendored
									
									
								
							@@ -10,7 +10,7 @@
 | 
			
		||||
from py._path.common import iswin32, fspath
 | 
			
		||||
from stat import S_ISLNK, S_ISDIR, S_ISREG
 | 
			
		||||
 | 
			
		||||
from os.path import abspath, normpath, isabs, exists, isdir, isfile, islink, dirname
 | 
			
		||||
from os.path import abspath, normcase, normpath, isabs, exists, isdir, isfile, islink, dirname
 | 
			
		||||
 | 
			
		||||
if sys.version_info > (3,0):
 | 
			
		||||
    def map_as_list(func, iter):
 | 
			
		||||
@@ -205,14 +205,14 @@ def remove(self, rec=1, ignore_errors=False):
 | 
			
		||||
            if rec:
 | 
			
		||||
                # force remove of readonly files on windows
 | 
			
		||||
                if iswin32:
 | 
			
		||||
                    self.chmod(448, rec=1) # octcal 0700
 | 
			
		||||
                    self.chmod(0o700, rec=1)
 | 
			
		||||
                py.error.checked_call(py.std.shutil.rmtree, self.strpath,
 | 
			
		||||
                    ignore_errors=ignore_errors)
 | 
			
		||||
            else:
 | 
			
		||||
                py.error.checked_call(os.rmdir, self.strpath)
 | 
			
		||||
        else:
 | 
			
		||||
            if iswin32:
 | 
			
		||||
                self.chmod(448) # octcal 0700
 | 
			
		||||
                self.chmod(0o700)
 | 
			
		||||
            py.error.checked_call(os.remove, self.strpath)
 | 
			
		||||
 | 
			
		||||
    def computehash(self, hashtype="md5", chunksize=524288):
 | 
			
		||||
@@ -801,12 +801,13 @@ def make_numbered_dir(cls, prefix='session-', rootdir=None, keep=3,
 | 
			
		||||
        if rootdir is None:
 | 
			
		||||
            rootdir = cls.get_temproot()
 | 
			
		||||
 | 
			
		||||
        nprefix = normcase(prefix)
 | 
			
		||||
        def parse_num(path):
 | 
			
		||||
            """ parse the number out of a path (if it matches the prefix) """
 | 
			
		||||
            bn = path.basename
 | 
			
		||||
            if bn.startswith(prefix):
 | 
			
		||||
            nbasename = normcase(path.basename)
 | 
			
		||||
            if nbasename.startswith(nprefix):
 | 
			
		||||
                try:
 | 
			
		||||
                    return int(bn[len(prefix):])
 | 
			
		||||
                    return int(nbasename[len(nprefix):])
 | 
			
		||||
                except ValueError:
 | 
			
		||||
                    pass
 | 
			
		||||
 | 
			
		||||
@@ -898,6 +899,7 @@ def try_remove_lockfile():
 | 
			
		||||
        return udir
 | 
			
		||||
    make_numbered_dir = classmethod(make_numbered_dir)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def copymode(src, dest):
 | 
			
		||||
    """ copy permission from src to dst. """
 | 
			
		||||
    py.std.shutil.copymode(src, dest)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								lib/spack/external/py/_path/svnurl.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								lib/spack/external/py/_path/svnurl.py
									
									
									
									
										vendored
									
									
								
							@@ -315,7 +315,7 @@ class InfoSvnCommand:
 | 
			
		||||
    # locked, see 'svn help ls'
 | 
			
		||||
    lspattern = re.compile(
 | 
			
		||||
        r'^ *(?P<rev>\d+) +(?P<author>.+?) +(0? *(?P<size>\d+))? '
 | 
			
		||||
            '*(?P<date>\w+ +\d{2} +[\d:]+) +(?P<file>.*)$')
 | 
			
		||||
            r'*(?P<date>\w+ +\d{2} +[\d:]+) +(?P<file>.*)$')
 | 
			
		||||
    def __init__(self, line):
 | 
			
		||||
        # this is a typical line from 'svn ls http://...'
 | 
			
		||||
        #_    1127      jum        0 Jul 13 15:28 branch/
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								lib/spack/external/py/_path/svnwc.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								lib/spack/external/py/_path/svnwc.py
									
									
									
									
										vendored
									
									
								
							@@ -327,7 +327,7 @@ def fixlocale():
 | 
			
		||||
    return ''
 | 
			
		||||
 | 
			
		||||
# some nasty chunk of code to solve path and url conversion and quoting issues
 | 
			
		||||
ILLEGAL_CHARS = '* | \ / : < > ? \t \n \x0b \x0c \r'.split(' ')
 | 
			
		||||
ILLEGAL_CHARS = '* | \\ / : < > ? \t \n \x0b \x0c \r'.split(' ')
 | 
			
		||||
if os.sep in ILLEGAL_CHARS:
 | 
			
		||||
    ILLEGAL_CHARS.remove(os.sep)
 | 
			
		||||
ISWINDOWS = sys.platform == 'win32'
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user