Hello community, here is the log from the commit of package python-ruamel.yaml for openSUSE:Factory checked in at 2019-03-01 16:50:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ruamel.yaml (Old) and /work/SRC/openSUSE:Factory/.python-ruamel.yaml.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ruamel.yaml" Fri Mar 1 16:50:24 2019 rev:13 rq:680514 version:0.15.89 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ruamel.yaml/python-ruamel.yaml.changes 2019-02-02 21:48:47.544004565 +0100 +++ /work/SRC/openSUSE:Factory/.python-ruamel.yaml.new.28833/python-ruamel.yaml.changes 2019-03-01 16:50:30.457729316 +0100 @@ -1,0 +2,8 @@ +Fri Mar 1 14:17:32 UTC 2019 - Ondřej Súkup <[email protected]> + +- update to 0.15.89 + * fix for items with flow-mapping in block sequence output on single line + * fix for safe dumping erroring in creation of representereror when dumping namedtuple + * fix inclusing of python code from the subpackage data + +------------------------------------------------------------------- Old: ---- ruamel.yaml-0.15.87.tar.gz New: ---- ruamel.yaml-0.15.89.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ruamel.yaml.spec ++++++ --- /var/tmp/diff_new_pack.Ut2XCl/_old 2019-03-01 16:50:31.033729098 +0100 +++ /var/tmp/diff_new_pack.Ut2XCl/_new 2019-03-01 16:50:31.037729097 +0100 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-ruamel.yaml -Version: 0.15.87 +Version: 0.15.89 Release: 0 Summary: Python YAML parser License: MIT ++++++ ruamel.yaml-0.15.87.tar.gz -> ruamel.yaml-0.15.89.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/CHANGES new/ruamel.yaml-0.15.89/CHANGES --- old/ruamel.yaml-0.15.87/CHANGES 2019-01-22 22:24:55.000000000 +0100 +++ new/ruamel.yaml-0.15.89/CHANGES 2019-02-27 22:55:01.000000000 +0100 @@ -1,3 +1,17 @@ +[0, 15, 89]: 2019-02-27 + - fix for items with flow-mapping in block sequence output on single line + (reported by `Zahari Dim <https://bitbucket.org/zahari_dim/>`__) + - fix for safe dumping erroring in creation of representereror when dumping namedtuple + (reported and solution by `Jaakko Kantojärvi <https://bitbucket.org/raphendyr/>`__) + +[0, 15, 88]: 2019-02-12 + - fix inclusing of python code from the subpackage data (containing extra tests, + reported by `Florian Apolloner <https://bitbucket.org/apollo13/>`__) + +[0, 15, 88]: 2019-02-12 + - fix inclusing of python code from the subpackage data (containing extra tests, + reported by `Florian Apolloner <https://bitbucket.org/apollo13/>`__) + [0, 15, 87]: 2019-01-22 - fix problem with empty lists and the code to reinsert merge keys (reported via email by Zaloo) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/PKG-INFO new/ruamel.yaml-0.15.89/PKG-INFO --- old/ruamel.yaml-0.15.87/PKG-INFO 2019-01-22 22:25:14.000000000 +0100 +++ new/ruamel.yaml-0.15.89/PKG-INFO 2019-02-27 22:58:06.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: ruamel.yaml -Version: 0.15.87 +Version: 0.15.89 Summary: ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order Home-page: https://bitbucket.org/ruamel/yaml Author: Anthon van der Neut @@ -12,8 +12,8 @@ ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. - :version: 0.15.87 - :updated: 2019-01-22 + :version: 0.15.89 + :updated: 2019-02-27 :documentation: http://yaml.readthedocs.io :repository: https://bitbucket.org/ruamel/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -62,6 +62,16 @@ .. should insert NEXT: at the beginning of line for next key (with empty line) + 0.15.89 (2019-02-27): + - fix for items with flow-mapping in block sequence output on single line + (reported by `Zahari Dim <https://bitbucket.org/zahari_dim/>`__) + - fix for safe dumping erroring in creation of representereror when dumping namedtuple + (reported and solution by `Jaakko Kantojärvi <https://bitbucket.org/raphendyr/>`__) + + 0.15.88 (2019-02-12): + - fix inclusing of python code from the subpackage data (containing extra tests, + reported by `Florian Apolloner <https://bitbucket.org/apollo13/>`__) + 0.15.87 (2019-01-22): - fix problem with empty lists and the code to reinsert merge keys (reported via email by Zaloo) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/README.rst new/ruamel.yaml-0.15.89/README.rst --- old/ruamel.yaml-0.15.87/README.rst 2019-01-22 22:24:55.000000000 +0100 +++ new/ruamel.yaml-0.15.89/README.rst 2019-02-27 22:55:01.000000000 +0100 @@ -4,8 +4,8 @@ ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. -:version: 0.15.87 -:updated: 2019-01-22 +:version: 0.15.89 +:updated: 2019-02-27 :documentation: http://yaml.readthedocs.io :repository: https://bitbucket.org/ruamel/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -54,6 +54,16 @@ .. should insert NEXT: at the beginning of line for next key (with empty line) +0.15.89 (2019-02-27): + - fix for items with flow-mapping in block sequence output on single line + (reported by `Zahari Dim <https://bitbucket.org/zahari_dim/>`__) + - fix for safe dumping erroring in creation of representereror when dumping namedtuple + (reported and solution by `Jaakko Kantojärvi <https://bitbucket.org/raphendyr/>`__) + +0.15.88 (2019-02-12): + - fix inclusing of python code from the subpackage data (containing extra tests, + reported by `Florian Apolloner <https://bitbucket.org/apollo13/>`__) + 0.15.87 (2019-01-22): - fix problem with empty lists and the code to reinsert merge keys (reported via email by Zaloo) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/__init__.py new/ruamel.yaml-0.15.89/__init__.py --- old/ruamel.yaml-0.15.87/__init__.py 2019-01-22 22:24:55.000000000 +0100 +++ new/ruamel.yaml-0.15.89/__init__.py 2019-02-27 22:55:40.000000000 +0100 @@ -7,8 +7,8 @@ _package_data = dict( full_package_name='ruamel.yaml', - version_info=(0, 15, 87), - __version__='0.15.87', + version_info=(0, 15, 89), + __version__='0.15.89', author='Anthon van der Neut', author_email='[email protected]', description='ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order', # NOQA diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/compat.py new/ruamel.yaml-0.15.89/compat.py --- old/ruamel.yaml-0.15.87/compat.py 2019-01-11 07:52:49.000000000 +0100 +++ new/ruamel.yaml-0.15.89/compat.py 2019-02-12 22:11:45.000000000 +0100 @@ -65,6 +65,8 @@ else: + if False: + unicode = str def utf8(s): # type: (unicode) -> str diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/data/__init__.py new/ruamel.yaml-0.15.89/data/__init__.py --- old/ruamel.yaml-0.15.87/data/__init__.py 2018-11-15 15:46:06.000000000 +0100 +++ new/ruamel.yaml-0.15.89/data/__init__.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -# coding: utf-8 - -from __future__ import print_function, absolute_import, division, unicode_literals - -_package_data = dict( - full_package_name='ruamel.yaml.data', - version_info=(0, 1, 0, 'dev'), - __version__='0.1.0.dev', - author='Anthon van der Neut', - author_email='[email protected]', - description='YAML test data', - keywords='pypi statistics', - entry_points='data=ruamel.yaml.data.__main__:main', - # entry_points=None, - license='Copyright Ruamel bvba 2007-2018', - since=2018, - # status="α|β|stable", # the package status on PyPI - # data_files="", - # universal=True, - install_requires=['ruamel.appconfig', 'ruamel.std.argparse>=0.8'], - # py27=["ruamel.ordereddict"], - tox=dict(env='23'), # *->all p->pypy -) - - -version_info = _package_data['version_info'] -__version__ = _package_data['__version__'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/data/__main__.py new/ruamel.yaml-0.15.89/data/__main__.py --- old/ruamel.yaml-0.15.87/data/__main__.py 2018-11-15 15:46:06.000000000 +0100 +++ new/ruamel.yaml-0.15.89/data/__main__.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,97 +0,0 @@ -# coding: utf-8 - -from __future__ import print_function, absolute_import, division, unicode_literals - -import sys -import os # NOQA - -from ruamel.std.argparse import ( - ProgramBase, - option, - CountAction, - SmartFormatter, - sub_parser, - version, -) -from ruamel.appconfig import AppConfig -from . import __version__, _package_data -from .data import Data - - -def to_stdout(*args): - sys.stdout.write(' '.join(args)) - - -class DataCmd(ProgramBase): - def __init__(self): - super(DataCmd, self).__init__( - formatter_class=SmartFormatter, - # aliases=True, - # usage="""""", # auto generated - # description="""""", # before options in help - # epilog="""""", # after options in help - full_package_name=_package_data['full_package_name'], - ) - - # you can put these on __init__, but subclassing DataCmd - # will cause that to break - # mt: off - @option( - '--verbose', - '-v', - help='increase verbosity level', - action=CountAction, - const=1, - nargs=0, - default=0, - global_option=True, - ) - # mt: on - @version('version: ' + __version__) - def _pb_init(self): - # special name for which attribs are included in help - pass - - def run(self): - self.data = Data(self._args, self._config) - if hasattr(self._args, 'func'): # not there if subparser selected - return self._args.func() - self._parse_args(['--help']) # replace if you use not subparsers - - def parse_args(self): - self._config = AppConfig( - 'ruamel_yaml_data', - filename=AppConfig.check, - parser=self._parser, # sets --config option - warning=to_stdout, - add_save=False, # add a --save-defaults (to config) option - ) - # self._config._file_name can be handed to objects that need - # to get other information from the configuration directory - self._config.set_defaults() - self._parse_args( - # default_sub_parser="", - ) - - @sub_parser(help='some command specific help') - # @option('--session-name', default='abc') - def show(self): - # self.redirect() - pass - - def redirect(self, *args, **kw): - """ - redirect to a method on self.develop, with the same name as the - method name of calling method - """ - getattr(self.data, sys._getframe(1).f_code.co_name)(*args, **kw) - - -def main(): - n = DataCmd() - n.parse_args() - sys.exit(n.run()) - - -if __name__ == '__main__': - main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/data/data.py new/ruamel.yaml-0.15.89/data/data.py --- old/ruamel.yaml-0.15.87/data/data.py 2018-11-15 15:46:06.000000000 +0100 +++ new/ruamel.yaml-0.15.89/data/data.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -# coding: utf-8 - -from __future__ import print_function, absolute_import, division, unicode_literals - - -class Data(object): - def __init__(self, args, config): - self._args = args - self._config = config diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/data/setup.py new/ruamel.yaml-0.15.89/data/setup.py --- old/ruamel.yaml-0.15.87/data/setup.py 2018-11-15 15:46:06.000000000 +0100 +++ new/ruamel.yaml-0.15.89/data/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,1010 +0,0 @@ -# # header -# coding: utf-8 - -from __future__ import print_function, absolute_import, division, unicode_literals - -# # __init__.py parser - -import sys -import os -import datetime -import traceback - -sys.path = [path for path in sys.path if path not in [os.getcwd(), ""]] -import platform # NOQA -from _ast import * # NOQA -from ast import parse # NOQA - -from setuptools import setup, Extension, Distribution # NOQA -from setuptools.command import install_lib # NOQA -from setuptools.command.sdist import sdist as _sdist # NOQA - - -if __name__ != '__main__': - raise NotImplementedError('should never include setup.py') - -# # definitions - -full_package_name = None - -if __name__ != '__main__': - raise NotImplementedError('should never include setup.py') - -if sys.version_info < (3,): - string_type = basestring -else: - string_type = str - - -if sys.version_info < (3, 4): - - class Bytes: - pass - - class NameConstant: - pass - - -if sys.version_info < (3,): - open_kw = dict() -else: - open_kw = dict(encoding='utf-8') - - -if sys.version_info < (2, 7) or platform.python_implementation() == 'Jython': - - class Set: - pass - - -if os.environ.get('DVDEBUG', "") == "": - - def debug(*args, **kw): - pass - - -else: - - def debug(*args, **kw): - with open(os.environ['DVDEBUG'], 'a') as fp: - kw1 = kw.copy() - kw1['file'] = fp - print('{:%Y-%d-%mT%H:%M:%S}'.format(datetime.datetime.now()), file=fp, end=' ') - print(*args, **kw1) - - -def literal_eval(node_or_string): - """ - Safely evaluate an expression node or a string containing a Python - expression. The string or node provided may only consist of the following - Python literal structures: strings, bytes, numbers, tuples, lists, dicts, - sets, booleans, and None. - - Even when passing in Unicode, the resulting Str types parsed are 'str' in Python 2. - I don't now how to set 'unicode_literals' on parse -> Str is explicitly converted. - """ - _safe_names = {'None': None, 'True': True, 'False': False} - if isinstance(node_or_string, string_type): - node_or_string = parse(node_or_string, mode='eval') - if isinstance(node_or_string, Expression): - node_or_string = node_or_string.body - else: - raise TypeError('only string or AST nodes supported') - - def _convert(node): - if isinstance(node, Str): - if sys.version_info < (3,) and not isinstance(node.s, unicode): - return node.s.decode('utf-8') - return node.s - elif isinstance(node, Bytes): - return node.s - elif isinstance(node, Num): - return node.n - elif isinstance(node, Tuple): - return tuple(map(_convert, node.elts)) - elif isinstance(node, List): - return list(map(_convert, node.elts)) - elif isinstance(node, Set): - return set(map(_convert, node.elts)) - elif isinstance(node, Dict): - return dict((_convert(k), _convert(v)) for k, v in zip(node.keys, node.values)) - elif isinstance(node, NameConstant): - return node.value - elif sys.version_info < (3, 4) and isinstance(node, Name): - if node.id in _safe_names: - return _safe_names[node.id] - elif ( - isinstance(node, UnaryOp) - and isinstance(node.op, (UAdd, USub)) - and isinstance(node.operand, (Num, UnaryOp, BinOp)) - ): # NOQA - operand = _convert(node.operand) - if isinstance(node.op, UAdd): - return +operand - else: - return -operand - elif ( - isinstance(node, BinOp) - and isinstance(node.op, (Add, Sub)) - and isinstance(node.right, (Num, UnaryOp, BinOp)) - and isinstance(node.left, (Num, UnaryOp, BinOp)) - ): # NOQA - left = _convert(node.left) - right = _convert(node.right) - if isinstance(node.op, Add): - return left + right - else: - return left - right - elif isinstance(node, Call): - func_id = getattr(node.func, 'id', None) - if func_id == 'dict': - return dict((k.arg, _convert(k.value)) for k in node.keywords) - elif func_id == 'set': - return set(_convert(node.args[0])) - elif func_id == 'date': - return datetime.date(*[_convert(k) for k in node.args]) - elif func_id == 'datetime': - return datetime.datetime(*[_convert(k) for k in node.args]) - err = SyntaxError('malformed node or string: ' + repr(node)) - err.filename = '<string>' - err.lineno = node.lineno - err.offset = node.col_offset - err.text = repr(node) - err.node = node - raise err - - return _convert(node_or_string) - - -# parses python ( "= dict( )" ) or ( "= {" ) -def _package_data(fn): - data = {} - with open(fn, **open_kw) as fp: - parsing = False - lines = [] - for line in fp.readlines(): - if sys.version_info < (3,): - line = line.decode('utf-8') - if line.startswith('_package_data'): - if 'dict(' in line: - parsing = 'python' - lines.append('dict(\n') - elif line.endswith('= {\n'): - parsing = 'python' - lines.append('{\n') - else: - raise NotImplementedError - continue - if not parsing: - continue - if parsing == 'python': - if line.startswith(')') or line.startswith('}'): - lines.append(line) - try: - data = literal_eval("".join(lines)) - except SyntaxError as e: - context = 2 - from_line = e.lineno - (context + 1) - to_line = e.lineno + (context - 1) - w = len(str(to_line)) - for index, line in enumerate(lines): - if from_line <= index <= to_line: - print( - '{0:{1}}: {2}'.format(index, w, line).encode('utf-8'), - end="", - ) - if index == e.lineno - 1: - print( - '{0:{1}} {2}^--- {3}'.format( - ' ', w, ' ' * e.offset, e.node - ) - ) - raise - break - lines.append(line) - else: - raise NotImplementedError - return data - - -# make sure you can run "python ../some/dir/setup.py install" -pkg_data = _package_data(__file__.replace('setup.py', '__init__.py')) - -exclude_files = ['setup.py'] - - -# # helper -def _check_convert_version(tup): - """Create a PEP 386 pseudo-format conformant string from tuple tup.""" - ret_val = str(tup[0]) # first is always digit - next_sep = '.' # separator for next extension, can be "" or "." - nr_digits = 0 # nr of adjacent digits in rest, to verify - post_dev = False # are we processig post/dev - for x in tup[1:]: - if isinstance(x, int): - nr_digits += 1 - if nr_digits > 2: - raise ValueError('too many consecutive digits after ' + ret_val) - ret_val += next_sep + str(x) - next_sep = '.' - continue - first_letter = x[0].lower() - next_sep = "" - if first_letter in 'abcr': - if post_dev: - raise ValueError('release level specified after ' 'post/dev: ' + x) - nr_digits = 0 - ret_val += 'rc' if first_letter == 'r' else first_letter - elif first_letter in 'pd': - nr_digits = 1 # only one can follow - post_dev = True - ret_val += '.post' if first_letter == 'p' else '.dev' - else: - raise ValueError('First letter of "' + x + '" not recognised') - # .dev and .post need a number otherwise setuptools normalizes and complains - if nr_digits == 1 and post_dev: - ret_val += '0' - return ret_val - - -version_info = pkg_data['version_info'] -version_str = _check_convert_version(version_info) - - -class MyInstallLib(install_lib.install_lib): - def install(self): - fpp = pkg_data['full_package_name'].split('.') # full package path - full_exclude_files = [os.path.join(*(fpp + [x])) for x in exclude_files] - alt_files = [] - outfiles = install_lib.install_lib.install(self) - for x in outfiles: - for full_exclude_file in full_exclude_files: - if full_exclude_file in x: - os.remove(x) - break - else: - alt_files.append(x) - return alt_files - - -class MySdist(_sdist): - def initialize_options(self): - _sdist.initialize_options(self) - # see pep 527, new uploads should be tar.gz or .zip - # fmt = getattr(self, 'tarfmt', None) - # because of unicode_literals - # self.formats = fmt if fmt else [b'bztar'] if sys.version_info < (3, ) else ['bztar'] - dist_base = os.environ.get('PYDISTBASE') - fpn = getattr(getattr(self, 'nsp', self), 'full_package_name', None) - if fpn and dist_base: - print('setting distdir {}/{}'.format(dist_base, fpn)) - self.dist_dir = os.path.join(dist_base, fpn) - - -# try except so this doesn't bomb when you don't have wheel installed, implies -# generation of wheels in ./dist -try: - from wheel.bdist_wheel import bdist_wheel as _bdist_wheel # NOQA - - class MyBdistWheel(_bdist_wheel): - def initialize_options(self): - _bdist_wheel.initialize_options(self) - dist_base = os.environ.get('PYDISTBASE') - fpn = getattr(getattr(self, 'nsp', self), 'full_package_name', None) - if fpn and dist_base: - print('setting distdir {}/{}'.format(dist_base, fpn)) - self.dist_dir = os.path.join(dist_base, fpn) - - _bdist_wheel_available = True - -except ImportError: - _bdist_wheel_available = False - - -class InMemoryZipFile(object): - def __init__(self, file_name=None): - try: - from cStringIO import StringIO - except ImportError: - from io import BytesIO as StringIO - import zipfile - - self.zip_file = zipfile - # Create the in-memory file-like object - self._file_name = file_name - self.in_memory_data = StringIO() - # Create the in-memory zipfile - self.in_memory_zip = self.zip_file.ZipFile( - self.in_memory_data, 'w', self.zip_file.ZIP_DEFLATED, False - ) - self.in_memory_zip.debug = 3 - - def append(self, filename_in_zip, file_contents): - """Appends a file with name filename_in_zip and contents of - file_contents to the in-memory zip.""" - self.in_memory_zip.writestr(filename_in_zip, file_contents) - return self # so you can daisy-chain - - def write_to_file(self, filename): - """Writes the in-memory zip to a file.""" - # Mark the files as having been created on Windows so that - # Unix permissions are not inferred as 0000 - for zfile in self.in_memory_zip.filelist: - zfile.create_system = 0 - self.in_memory_zip.close() - with open(filename, 'wb') as f: - f.write(self.in_memory_data.getvalue()) - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - if self._file_name is None: - return - self.write_to_file(self._file_name) - - def delete_from_zip_file(self, pattern=None, file_names=None): - """ - zip_file can be a string or a zipfile.ZipFile object, the latter will be closed - any name in file_names is deleted, all file_names provided have to be in the ZIP - archive or else an IOError is raised - """ - if pattern and isinstance(pattern, string_type): - import re - - pattern = re.compile(pattern) - if file_names: - if not isinstance(file_names, list): - file_names = [file_names] - else: - file_names = [] - with self.zip_file.ZipFile(self._file_name) as zf: - for l in zf.infolist(): - if l.filename in file_names: - file_names.remove(l.filename) - continue - if pattern and pattern.match(l.filename): - continue - self.append(l.filename, zf.read(l)) - if file_names: - raise IOError( - '[Errno 2] No such file{}: {}'.format( - "" if len(file_names) == 1 else 's', - ', '.join([repr(f) for f in file_names]), - ) - ) - - -class NameSpacePackager(object): - def __init__(self, pkg_data): - assert isinstance(pkg_data, dict) - self._pkg_data = pkg_data - self.full_package_name = self.pn(self._pkg_data['full_package_name']) - self._split = None - self.depth = self.full_package_name.count('.') - self.nested = self._pkg_data.get('nested', False) - self.command = None - self.python_version() - self._pkg = [None, None] # required and pre-installable packages - if ( - sys.argv[0] == 'setup.py' - and sys.argv[1] == 'install' - and '--single-version-externally-managed' not in sys.argv - ): - if os.environ.get('READTHEDOCS', None) == 'True': - os.system('pip install .') - sys.exit(0) - if not os.environ.get('RUAMEL_NO_PIP_INSTALL_CHECK', False): - print('error: you have to install with "pip install ."') - sys.exit(1) - # If you only support an extension module on Linux, Windows thinks it - # is pure. That way you would get pure python .whl files that take - # precedence for downloading on Linux over source with compilable C code - if self._pkg_data.get('universal'): - Distribution.is_pure = lambda *args: True - else: - Distribution.is_pure = lambda *args: False - for x in sys.argv: - if x[0] == '-' or x == 'setup.py': - continue - self.command = x - break - - def pn(self, s): - if sys.version_info < (3,) and isinstance(s, unicode): - return s.encode('utf-8') - return s - - @property - def split(self): - """split the full package name in list of compontents traditionally - done by setuptools.find_packages. This routine skips any directories - with __init__.py that start with "_" or ".", or contain a - setup.py/tox.ini (indicating a subpackage) - """ - if self._split is None: - fpn = self.full_package_name.split('.') - self._split = [] - while fpn: - self._split.insert(0, '.'.join(fpn)) - fpn = fpn[:-1] - for d in os.listdir('.'): - if not os.path.isdir(d) or d == self._split[0] or d[0] in '._': - continue - # prevent sub-packages in namespace from being included - x = os.path.join(d, '__init__.py') - if os.path.exists(x): - pd = _package_data(x) - if pd.get('nested', False): - continue - self._split.append(self.full_package_name + '.' + d) - if sys.version_info < (3,): - self._split = [ - (y.encode('utf-8') if isinstance(y, unicode) else y) for y in self._split - ] - return self._split - - @property - def namespace_packages(self): - return self.split[: self.depth] - - def namespace_directories(self, depth=None): - """return list of directories where the namespace should be created / - can be found - """ - res = [] - for index, d in enumerate(self.split[:depth]): - # toplevel gets a dot - if index > 0: - d = os.path.join(*d.split('.')) - res.append('.' + d) - return res - - @property - def package_dir(self): - d = { - # don't specify empty dir, clashes with package_data spec - self.full_package_name: '.' - } - if 'extra_packages' in self._pkg_data: - return d - if len(self.split) > 1: # only if package namespace - d[self.split[0]] = self.namespace_directories(1)[0] - return d - - def create_dirs(self): - """create the directories necessary for namespace packaging""" - directories = self.namespace_directories(self.depth) - if not directories: - return - if not os.path.exists(directories[0]): - for d in directories: - os.mkdir(d) - with open(os.path.join(d, '__init__.py'), 'w') as fp: - fp.write( - 'import pkg_resources\n' 'pkg_resources.declare_namespace(__name__)\n' - ) - - def python_version(self): - supported = self._pkg_data.get('supported') - if supported is None: - return - if len(supported) == 1: - minimum = supported[0] - else: - for x in supported: - if x[0] == sys.version_info[0]: - minimum = x - break - else: - return - if sys.version_info < minimum: - print('minimum python version(s): ' + str(supported)) - sys.exit(1) - - def check(self): - try: - from pip.exceptions import InstallationError - except ImportError: - return - # arg is either develop (pip install -e) or install - if self.command not in ['install', 'develop']: - return - - # if hgi and hgi.base are both in namespace_packages matching - # against the top (hgi.) it suffices to find minus-e and non-minus-e - # installed packages. As we don't know the order in namespace_packages - # do some magic - prefix = self.split[0] - prefixes = set([prefix, prefix.replace('_', '-')]) - for p in sys.path: - if not p: - continue # directory with setup.py - if os.path.exists(os.path.join(p, 'setup.py')): - continue # some linked in stuff might not be hgi based - if not os.path.isdir(p): - continue - if p.startswith('/tmp/'): - continue - for fn in os.listdir(p): - for pre in prefixes: - if fn.startswith(pre): - break - else: - continue - full_name = os.path.join(p, fn) - # not in prefixes the toplevel is never changed from _ to - - if fn == prefix and os.path.isdir(full_name): - # directory -> other, non-minus-e, install - if self.command == 'develop': - raise InstallationError( - 'Cannot mix develop (pip install -e),\nwith ' - 'non-develop installs for package name {0}'.format(fn) - ) - elif fn == prefix: - raise InstallationError('non directory package {0} in {1}'.format(fn, p)) - for pre in [x + '.' for x in prefixes]: - if fn.startswith(pre): - break - else: - continue # hgiabc instead of hgi. - if fn.endswith('-link') and self.command == 'install': - raise InstallationError( - 'Cannot mix non-develop with develop\n(pip install -e)' - ' installs for package name {0}'.format(fn) - ) - - def entry_points(self, script_name=None, package_name=None): - """normally called without explicit script_name and package name - the default console_scripts entry depends on the existence of __main__.py: - if that file exists then the function main() in there is used, otherwise - the in __init__.py. - - the _package_data entry_points key/value pair can be explicitly specified - including a "=" character. If the entry is True or 1 the - scriptname is the last part of the full package path (split on '.') - if the ep entry is a simple string without "=", that is assumed to be - the name of the script. - """ - - def pckg_entry_point(name): - return '{0}{1}:main'.format( - name, '.__main__' if os.path.exists('__main__.py') else "" - ) - - ep = self._pkg_data.get('entry_points', True) - if isinstance(ep, dict): - return ep - if ep is None: - return None - if ep not in [True, 1]: - if '=' in ep: - # full specification of the entry point like - # entry_points=['yaml = ruamel.yaml.cmd:main'], - return {'console_scripts': [ep]} - # assume that it is just the script name - script_name = ep - if package_name is None: - package_name = self.full_package_name - if not script_name: - script_name = package_name.split('.')[-1] - return { - 'console_scripts': [ - '{0} = {1}'.format(script_name, pckg_entry_point(package_name)) - ] - } - - @property - def url(self): - if self.full_package_name.startswith('ruamel.'): - sp = self.full_package_name.split('.', 1) - else: - sp = ['ruamel', self.full_package_name] - return 'https://bitbucket.org/{0}/{1}'.format(*sp) - - @property - def author(self): - return self._pkg_data['author'] # no get needs to be there - - @property - def author_email(self): - return self._pkg_data['author_email'] # no get needs to be there - - @property - def license(self): - """return the license field from _package_data, None means MIT""" - lic = self._pkg_data.get('license') - if lic is None: - # lic_fn = os.path.join(os.path.dirname(__file__), 'LICENSE') - # assert os.path.exists(lic_fn) - return 'MIT license' - return lic - - def has_mit_lic(self): - return 'MIT' in self.license - - @property - def description(self): - return self._pkg_data['description'] # no get needs to be there - - @property - def status(self): - # αβ - status = self._pkg_data.get('status', 'β').lower() - if status in ['α', 'alpha']: - return (3, 'Alpha') - elif status in ['β', 'beta']: - return (4, 'Beta') - elif 'stable' in status.lower(): - return (5, 'Production/Stable') - raise NotImplementedError - - @property - def classifiers(self): - """this needs more intelligence, probably splitting the classifiers from _pkg_data - and only adding defaults when no explicit entries were provided. - Add explicit Python versions in sync with tox.env generation based on python_requires? - """ - return sorted( - set( - [ - 'Development Status :: {0} - {1}'.format(*self.status), - 'Intended Audience :: Developers', - 'License :: ' - + ('OSI Approved :: MIT' if self.has_mit_lic() else 'Other/Proprietary') - + ' License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - ] - + [self.pn(x) for x in self._pkg_data.get('classifiers', [])] - ) - ) - - @property - def keywords(self): - return self.pn(self._pkg_data.get('keywords', [])) - - @property - def install_requires(self): - """list of packages required for installation""" - return self._analyse_packages[0] - - @property - def install_pre(self): - """list of packages required for installation""" - return self._analyse_packages[1] - - @property - def _analyse_packages(self): - """gather from configuration, names starting with * need - to be installed explicitly as they are not on PyPI - install_requires should be dict, with keys 'any', 'py27' etc - or a list (which is as if only 'any' was defined - - ToDo: update with: pep508 conditional dependencies - """ - if self._pkg[0] is None: - self._pkg[0] = [] - self._pkg[1] = [] - - ir = self._pkg_data.get('install_requires') - if ir is None: - return self._pkg # these will be both empty at this point - if isinstance(ir, list): - self._pkg[0] = ir - return self._pkg - # 'any' for all builds, 'py27' etc for specifics versions - packages = ir.get('any', []) - if isinstance(packages, string_type): - packages = packages.split() # assume white space separated string - if self.nested: - # parent dir is also a package, make sure it is installed (need its .pth file) - parent_pkg = self.full_package_name.rsplit('.', 1)[0] - if parent_pkg not in packages: - packages.append(parent_pkg) - implementation = platform.python_implementation() - if implementation == 'CPython': - pyver = 'py{0}{1}'.format(*sys.version_info) - elif implementation == 'PyPy': - pyver = 'pypy' if sys.version_info < (3,) else 'pypy3' - elif implementation == 'Jython': - pyver = 'jython' - packages.extend(ir.get(pyver, [])) - for p in packages: - # package name starting with * means use local source tree, non-published - # to PyPi or maybe not latest version on PyPI -> pre-install - if p[0] == '*': - p = p[1:] - self._pkg[1].append(p) - self._pkg[0].append(p) - return self._pkg - - @property - def extras_require(self): - """dict of conditions -> extra packages informaton required for installation - as of setuptools 33 doing `package ; python_version<=2.7' in install_requires - still doesn't work - - https://www.python.org/dev/peps/pep-0508/ - https://wheel.readthedocs.io/en/latest/index.html#defining-conditional-dependencies - https://hynek.me/articles/conditional-python-dependencies/ - """ - ep = self._pkg_data.get('extras_require') - return ep - - @property - def data_files(self): - df = self._pkg_data.get('data_files', []) - if self.has_mit_lic(): - df.append('LICENSE') - if not df: - return None - return [('.', df)] - - @property - def package_data(self): - df = self._pkg_data.get('data_files', []) - if self.has_mit_lic(): - # include the file - df.append('LICENSE') - # but don't install it - exclude_files.append('LICENSE') - pd = self._pkg_data.get('package_data', {}) - if df: - pd[self.full_package_name] = df - if sys.version_info < (3,): - # python2 doesn't seem to like unicode package names as keys - # maybe only when the packages themselves are non-unicode - for k in pd: - if isinstance(k, unicode): - pd[str(k)] = pd.pop(k) - # for k in pd: - # pd[k] = [e.encode('utf-8') for e in pd[k]] # de-unicode - return pd - - @property - def packages(self): - s = self.split - # fixed this in package_data, the keys there must be non-unicode for py27 - # if sys.version_info < (3, 0): - # s = [x.encode('utf-8') for x in self.split] - return s + self._pkg_data.get('extra_packages', []) - - @property - def python_requires(self): - return self._pkg_data.get('python_requires', None) - - @property - def ext_modules(self): - """ - Check if all modules specified in the value for 'ext_modules' can be build. - That value (if not None) is a list of dicts with 'name', 'src', 'lib' - Optional 'test' can be used to make sure trying to compile will work on the host - - creates and return the external modules as Extensions, unless that - is not necessary at all for the action (like --version) - - test existence of compiler by using export CC=nonexistent; export CXX=nonexistent - """ - - if hasattr(self, '_ext_modules'): - return self._ext_modules - if '--version' in sys.argv: - return None - if platform.python_implementation() == 'Jython': - return None - try: - plat = sys.argv.index('--plat-name') - if 'win' in sys.argv[plat + 1]: - return None - except ValueError: - pass - self._ext_modules = [] - no_test_compile = False - if '--restructuredtext' in sys.argv: - no_test_compile = True - elif 'sdist' in sys.argv: - no_test_compile = True - if no_test_compile: - for target in self._pkg_data.get('ext_modules', []): - ext = Extension( - self.pn(target['name']), - sources=[self.pn(x) for x in target['src']], - libraries=[self.pn(x) for x in target.get('lib')], - ) - self._ext_modules.append(ext) - return self._ext_modules - - print('sys.argv', sys.argv) - import tempfile - import shutil - from textwrap import dedent - - import distutils.sysconfig - import distutils.ccompiler - from distutils.errors import CompileError, LinkError - - for target in self._pkg_data.get('ext_modules', []): # list of dicts - ext = Extension( - self.pn(target['name']), - sources=[self.pn(x) for x in target['src']], - libraries=[self.pn(x) for x in target.get('lib')], - ) - # debug('test in target', 'test' in target, target) - if 'test' not in target: # no test, just hope it works - self._ext_modules.append(ext) - continue - if sys.version_info[:2] == (3, 4) and platform.system() == 'Windows': - # this is giving problems on appveyor, so skip - if 'FORCE_C_BUILD_TEST' not in os.environ: - self._ext_modules.append(ext) - continue - # write a temporary .c file to compile - c_code = dedent(target['test']) - try: - tmp_dir = tempfile.mkdtemp(prefix='tmp_ruamel_') - bin_file_name = 'test' + self.pn(target['name']) - print('test compiling', bin_file_name) - file_name = os.path.join(tmp_dir, bin_file_name + '.c') - with open(file_name, 'w') as fp: # write source - fp.write(c_code) - # and try to compile it - compiler = distutils.ccompiler.new_compiler() - assert isinstance(compiler, distutils.ccompiler.CCompiler) - # do any platform specific initialisations - distutils.sysconfig.customize_compiler(compiler) - # make sure you can reach header files because compile does change dir - compiler.add_include_dir(os.getcwd()) - if sys.version_info < (3,): - tmp_dir = tmp_dir.encode('utf-8') - # used to be a different directory, not necessary - compile_out_dir = tmp_dir - try: - compiler.link_executable( - compiler.compile([file_name], output_dir=compile_out_dir), - bin_file_name, - output_dir=tmp_dir, - libraries=ext.libraries, - ) - except CompileError: - debug('compile error:', file_name) - print('compile error:', file_name) - continue - except LinkError: - debug('libyaml link error', file_name) - print('libyaml link error', file_name) - continue - self._ext_modules.append(ext) - except Exception as e: # NOQA - debug('Exception:', e) - print('Exception:', e) - if sys.version_info[:2] == (3, 4) and platform.system() == 'Windows': - traceback.print_exc() - finally: - shutil.rmtree(tmp_dir) - return self._ext_modules - - @property - def test_suite(self): - return self._pkg_data.get('test_suite') - - def wheel(self, kw, setup): - """temporary add setup.cfg if creating a wheel to include LICENSE file - https://bitbucket.org/pypa/wheel/issues/47 - """ - if 'bdist_wheel' not in sys.argv: - return - file_name = 'setup.cfg' - if os.path.exists(file_name): # add it if not in there? - return - with open(file_name, 'w') as fp: - if os.path.exists('LICENSE'): - fp.write('[metadata]\nlicense-file = LICENSE\n') - else: - print('\n\n>>>>>> LICENSE file not found <<<<<\n\n') - if self._pkg_data.get('universal'): - fp.write('[bdist_wheel]\nuniversal = 1\n') - try: - setup(**kw) - except Exception: - raise - finally: - os.remove(file_name) - return True - - -# # call setup -def main(): - dump_kw = '--dump-kw' - if dump_kw in sys.argv: - import wheel - import distutils - import setuptools - - print('python: ', sys.version) - print('setuptools:', setuptools.__version__) - print('distutils: ', distutils.__version__) - print('wheel: ', wheel.__version__) - nsp = NameSpacePackager(pkg_data) - nsp.check() - nsp.create_dirs() - MySdist.nsp = nsp - if pkg_data.get('tarfmt'): - MySdist.tarfmt = pkg_data.get('tarfmt') - - cmdclass = dict(install_lib=MyInstallLib, sdist=MySdist) - if _bdist_wheel_available: - MyBdistWheel.nsp = nsp - cmdclass['bdist_wheel'] = MyBdistWheel - - kw = dict( - name=nsp.full_package_name, - namespace_packages=nsp.namespace_packages, - version=version_str, - packages=nsp.packages, - python_requires=nsp.python_requires, - url=nsp.url, - author=nsp.author, - author_email=nsp.author_email, - cmdclass=cmdclass, - package_dir=nsp.package_dir, - entry_points=nsp.entry_points(), - description=nsp.description, - install_requires=nsp.install_requires, - extras_require=nsp.extras_require, # available since setuptools 18.0 / 2015-06 - license=nsp.license, - classifiers=nsp.classifiers, - keywords=nsp.keywords, - package_data=nsp.package_data, - ext_modules=nsp.ext_modules, - test_suite=nsp.test_suite, - ) - - if '--version' not in sys.argv and ('--verbose' in sys.argv or dump_kw in sys.argv): - for k in sorted(kw): - v = kw[k] - print(' "{0}": "{1}",'.format(k, v)) - if dump_kw in sys.argv: - sys.argv.remove(dump_kw) - try: - with open('README.rst') as fp: - kw['long_description'] = fp.read() - except Exception: - pass - if nsp.wheel(kw, setup): - return - for x in ['-c', 'egg_info', '--egg-base', 'pip-egg-info']: - if x not in sys.argv: - break - else: - # we're doing a tox setup install any starred package by searching up the source tree - # until you match your/package/name for your.package.name - for p in nsp.install_pre: - import subprocess - - # search other source - setup_path = os.path.join(*p.split('.') + ['setup.py']) - try_dir = os.path.dirname(sys.executable) - while len(try_dir) > 1: - full_path_setup_py = os.path.join(try_dir, setup_path) - if os.path.exists(full_path_setup_py): - pip = sys.executable.replace('python', 'pip') - cmd = [pip, 'install', os.path.dirname(full_path_setup_py)] - # with open('/var/tmp/notice', 'a') as fp: - # print('installing', cmd, file=fp) - subprocess.check_output(cmd) - break - try_dir = os.path.dirname(try_dir) - setup(**kw) - if nsp.nested and sys.argv[:2] == ['-c', 'bdist_wheel']: - d = sys.argv[sys.argv.index('-d') + 1] - for x in os.listdir(d): - if x.endswith('.whl'): - # remove .pth file from the wheel - full_name = os.path.join(d, x) - with InMemoryZipFile(full_name) as imz: - imz.delete_from_zip_file(nsp.full_package_name + '.*.pth') - break - - -main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/emitter.py new/ruamel.yaml-0.15.89/emitter.py --- old/ruamel.yaml-0.15.87/emitter.py 2019-01-08 08:12:28.000000000 +0100 +++ new/ruamel.yaml-0.15.89/emitter.py 2019-02-27 22:43:41.000000000 +0100 @@ -321,11 +321,11 @@ self.write_stream_start() self.state = self.expect_first_document_start else: - raise EmitterError('expected StreamStartEvent, but got %s' % self.event) + raise EmitterError('expected StreamStartEvent, but got %s' % (self.event,)) def expect_nothing(self): # type: () -> None - raise EmitterError('expected nothing, but got %s' % self.event) + raise EmitterError('expected nothing, but got %s' % (self.event,)) # Document handlers. @@ -372,7 +372,7 @@ self.write_stream_end() self.state = self.expect_nothing else: - raise EmitterError('expected DocumentStartEvent, but got %s' % self.event) + raise EmitterError('expected DocumentStartEvent, but got %s' % (self.event,)) def expect_document_end(self): # type: () -> None @@ -384,7 +384,7 @@ self.flush_stream() self.state = self.expect_document_start else: - raise EmitterError('expected DocumentEndEvent, but got %s' % self.event) + raise EmitterError('expected DocumentEndEvent, but got %s' % (self.event,)) def expect_document_root(self): # type: () -> None @@ -448,7 +448,7 @@ else: self.expect_block_mapping() else: - raise EmitterError('expected NodeEvent, but got %s' % self.event) + raise EmitterError('expected NodeEvent, but got %s' % (self.event,)) def expect_alias(self): # type: () -> None @@ -546,6 +546,8 @@ if self.event.comment and self.event.comment[0]: # eol comment on empty mapping self.write_post_comment(self.event) + elif self.flow_level == 0: + self.write_line_break() self.state = self.states.pop() else: if self.canonical or self.column > self.best_width: @@ -574,6 +576,8 @@ if self.event.comment and self.event.comment[0]: # eol comment on flow mapping, never reached on empty mappings self.write_post_comment(self.event) + else: + self.no_newline = False self.state = self.states.pop() else: self.write_indicator(u',', False) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/representer.py new/ruamel.yaml-0.15.89/representer.py --- old/ruamel.yaml-0.15.87/representer.py 2019-01-22 22:15:57.000000000 +0100 +++ new/ruamel.yaml-0.15.89/representer.py 2019-02-27 22:11:55.000000000 +0100 @@ -389,7 +389,7 @@ def represent_undefined(self, data): # type: (Any) -> None - raise RepresenterError('cannot represent an object: %s' % data) + raise RepresenterError('cannot represent an object: %s' % (data,)) SafeRepresenter.add_representer(type(None), SafeRepresenter.represent_none) @@ -573,7 +573,7 @@ elif hasattr(data, '__reduce__'): reduce = data.__reduce__() else: - raise RepresenterError('cannot represent object: %r' % data) + raise RepresenterError('cannot represent object: %r' % (data,)) reduce = (list(reduce) + [None] * 5)[:5] function, args, state, listitems, dictitems = reduce args = list(args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/resolver.py new/ruamel.yaml-0.15.89/resolver.py --- old/ruamel.yaml-0.15.87/resolver.py 2018-11-15 15:46:06.000000000 +0100 +++ new/ruamel.yaml-0.15.89/resolver.py 2019-02-27 22:13:12.000000000 +0100 @@ -186,7 +186,7 @@ node_check = element[0] index_check = True else: - raise ResolverError('Invalid path element: %s' % element) + raise ResolverError('Invalid path element: %s' % (element,)) else: node_check = None index_check = element @@ -201,9 +201,9 @@ and not isinstance(node_check, string_types) and node_check is not None ): - raise ResolverError('Invalid node checker: %s' % node_check) + raise ResolverError('Invalid node checker: %s' % (node_check,)) if not isinstance(index_check, (string_types, int)) and index_check is not None: - raise ResolverError('Invalid index checker: %s' % index_check) + raise ResolverError('Invalid index checker: %s' % (index_check,)) new_path.append((node_check, index_check)) if kind is str: kind = ScalarNode @@ -212,7 +212,7 @@ elif kind is dict: kind = MappingNode elif kind not in [ScalarNode, SequenceNode, MappingNode] and kind is not None: - raise ResolverError('Invalid node kind: %s' % kind) + raise ResolverError('Invalid node kind: %s' % (kind,)) cls.yaml_path_resolvers[tuple(new_path), kind] = tag def descend_resolver(self, current_node, current_index): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/ruamel.yaml.egg-info/PKG-INFO new/ruamel.yaml-0.15.89/ruamel.yaml.egg-info/PKG-INFO --- old/ruamel.yaml-0.15.87/ruamel.yaml.egg-info/PKG-INFO 2019-01-22 22:25:14.000000000 +0100 +++ new/ruamel.yaml-0.15.89/ruamel.yaml.egg-info/PKG-INFO 2019-02-27 22:58:03.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: ruamel.yaml -Version: 0.15.87 +Version: 0.15.89 Summary: ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order Home-page: https://bitbucket.org/ruamel/yaml Author: Anthon van der Neut @@ -12,8 +12,8 @@ ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. - :version: 0.15.87 - :updated: 2019-01-22 + :version: 0.15.89 + :updated: 2019-02-27 :documentation: http://yaml.readthedocs.io :repository: https://bitbucket.org/ruamel/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -62,6 +62,16 @@ .. should insert NEXT: at the beginning of line for next key (with empty line) + 0.15.89 (2019-02-27): + - fix for items with flow-mapping in block sequence output on single line + (reported by `Zahari Dim <https://bitbucket.org/zahari_dim/>`__) + - fix for safe dumping erroring in creation of representereror when dumping namedtuple + (reported and solution by `Jaakko Kantojärvi <https://bitbucket.org/raphendyr/>`__) + + 0.15.88 (2019-02-12): + - fix inclusing of python code from the subpackage data (containing extra tests, + reported by `Florian Apolloner <https://bitbucket.org/apollo13/>`__) + 0.15.87 (2019-01-22): - fix problem with empty lists and the code to reinsert merge keys (reported via email by Zaloo) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/ruamel.yaml.egg-info/SOURCES.txt new/ruamel.yaml-0.15.89/ruamel.yaml.egg-info/SOURCES.txt --- old/ruamel.yaml-0.15.87/ruamel.yaml.egg-info/SOURCES.txt 2019-01-22 22:25:14.000000000 +0100 +++ new/ruamel.yaml-0.15.89/ruamel.yaml.egg-info/SOURCES.txt 2019-02-27 22:58:03.000000000 +0100 @@ -32,10 +32,6 @@ ./timestamp.py ./tokens.py ./util.py -./data/__init__.py -./data/__main__.py -./data/data.py -./data/setup.py .ruamel/__init__.py ext/_ruamel_yaml.c ext/_ruamel_yaml.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/scanner.py new/ruamel.yaml-0.15.89/scanner.py --- old/ruamel.yaml-0.15.87/scanner.py 2019-01-08 18:09:48.000000000 +0100 +++ new/ruamel.yaml-0.15.89/scanner.py 2019-02-27 22:14:50.000000000 +0100 @@ -1065,7 +1065,7 @@ ch = srp(length) if not length: raise ScannerError( - 'while scanning an %s' % name, + 'while scanning an %s' % (name,), start_mark, 'expected alphabetic or numeric character, but found %r' % utf8(ch), self.reader.get_mark(), @@ -1077,7 +1077,7 @@ # assert ch1 == ch if ch not in '\0 \t\r\n\x85\u2028\u2029?:,[]{}%@`': raise ScannerError( - 'while scanning an %s' % name, + 'while scanning an %s' % (name,), start_mark, 'expected alphabetic or numeric character, but found %r' % utf8(ch), self.reader.get_mark(), @@ -1638,7 +1638,7 @@ ch = srp() if ch != '!': raise ScannerError( - 'while scanning a %s' % name, + 'while scanning a %s' % (name,), start_mark, "expected '!', but found %r" % utf8(ch), self.reader.get_mark(), @@ -1652,7 +1652,7 @@ if ch != '!': self.reader.forward(length) raise ScannerError( - 'while scanning a %s' % name, + 'while scanning a %s' % (name,), start_mark, "expected '!', but found %r" % utf8(ch), self.reader.get_mark(), @@ -1690,7 +1690,7 @@ length = 0 if not chunks: raise ScannerError( - 'while parsing a %s' % name, + 'while parsing a %s' % (name,), start_mark, 'expected URI, but found %r' % utf8(ch), self.reader.get_mark(), @@ -1709,7 +1709,7 @@ for k in range(2): if srp(k) not in '0123456789ABCDEFabcdef': raise ScannerError( - 'while scanning a %s' % name, + 'while scanning a %s' % (name,), start_mark, 'expected URI escape sequence of 2 hexdecimal numbers,' ' but found %r' % utf8(srp(k)), @@ -1726,7 +1726,7 @@ else: value = unicode(b"".join(code_bytes), 'utf-8') except UnicodeDecodeError as exc: - raise ScannerError('while scanning a %s' % name, start_mark, str(exc), mark) + raise ScannerError('while scanning a %s' % (name,), start_mark, str(exc), mark) return value def scan_line_break(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruamel.yaml-0.15.87/setup.py new/ruamel.yaml-0.15.89/setup.py --- old/ruamel.yaml-0.15.87/setup.py 2019-01-22 22:24:49.000000000 +0100 +++ new/ruamel.yaml-0.15.89/setup.py 2019-02-27 22:54:55.000000000 +0100 @@ -424,16 +424,17 @@ def split(self): """split the full package name in list of compontents traditionally done by setuptools.find_packages. This routine skips any directories - with __init__.py that start with "_" or ".", or contain a + with __init__.py, for which the name starts with "_" or ".", or contain a setup.py/tox.ini (indicating a subpackage) """ + skip = [] if self._split is None: fpn = self.full_package_name.split('.') self._split = [] while fpn: self._split.insert(0, '.'.join(fpn)) fpn = fpn[:-1] - for d in os.listdir('.'): + for d in sorted(os.listdir('.')): if not os.path.isdir(d) or d == self._split[0] or d[0] in '._': continue # prevent sub-packages in namespace from being included @@ -441,12 +442,17 @@ if os.path.exists(x): pd = _package_data(x) if pd.get('nested', False): + skip.append(d) continue self._split.append(self.full_package_name + '.' + d) if sys.version_info < (3,): self._split = [ (y.encode('utf-8') if isinstance(y, unicode) else y) for y in self._split ] + if skip: + # this interferes with output checking + # print('skipping sub-packages:', ', '.join(skip)) + pass return self._split @property
