Hello community, here is the log from the commit of package python3-lesscpy for openSUSE:Factory checked in at 2016-03-21 12:45:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-lesscpy (Old) and /work/SRC/openSUSE:Factory/.python3-lesscpy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-lesscpy" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-lesscpy/python3-lesscpy.changes 2015-10-28 17:30:39.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-lesscpy.new/python3-lesscpy.changes 2016-03-21 12:45:47.000000000 +0100 @@ -1,0 +2,9 @@ +Sat Mar 19 21:33:20 UTC 2016 - a...@gmx.de + +- specfile: + * update copyright year + +- update to version 0.11.1: + * No upstream changelog + +------------------------------------------------------------------- Old: ---- lesscpy-0.10.2.tar.gz New: ---- lesscpy-0.11.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-lesscpy.spec ++++++ --- /var/tmp/diff_new_pack.TVJQPP/_old 2016-03-21 12:45:48.000000000 +0100 +++ /var/tmp/diff_new_pack.TVJQPP/_new 2016-03-21 12:45:48.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python3-lesscpy # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python3-lesscpy -Version: 0.10.2 +Version: 0.11.1 Release: 0 Url: https://github.com/robotis/lesscpy Summary: Lesscss compiler @@ -26,8 +26,8 @@ Source: http://pypi.python.org/packages/source/l/lesscpy/lesscpy-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: python3-ply +BuildRequires: python3-setuptools BuildRequires: python3-six # Test requirements: BuildRequires: python3-coverage ++++++ lesscpy-0.10.2.tar.gz -> lesscpy-0.11.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/PKG-INFO new/lesscpy-0.11.1/PKG-INFO --- old/lesscpy-0.10.2/PKG-INFO 2014-11-26 21:50:54.000000000 +0100 +++ new/lesscpy-0.11.1/PKG-INFO 2016-03-17 11:15:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: lesscpy -Version: 0.10.2 +Version: 0.11.1 Summary: Python LESS compiler Home-page: https://github.com/lesscpy/lesscpy Author: Jóhann T Maríusson @@ -38,7 +38,7 @@ input and is considerably slower than the NodeJS compiler. The plan is to utilize this to build in proper syntax checking and perhaps YUI compressing. - This is an early version, so you are likly to find bugs. + This is an early version, so you are likely to find bugs. For more information on LESS: http://lesscss.org/ or https://github.com/cloudhead/less.js @@ -63,7 +63,6 @@ - Color functions (lighten, darken, saturate, desaturate, spin, hue, mix, saturation, lightness) - Other functions (round, increment, decrement, format '%(', ...) - - Keyframe blocks Differences from less.js diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/README.rst new/lesscpy-0.11.1/README.rst --- old/lesscpy-0.10.2/README.rst 2014-11-26 21:28:11.000000000 +0100 +++ new/lesscpy-0.11.1/README.rst 2016-03-17 11:06:46.000000000 +0100 @@ -30,7 +30,7 @@ input and is considerably slower than the NodeJS compiler. The plan is to utilize this to build in proper syntax checking and perhaps YUI compressing. -This is an early version, so you are likly to find bugs. +This is an early version, so you are likely to find bugs. For more information on LESS: http://lesscss.org/ or https://github.com/cloudhead/less.js @@ -55,7 +55,6 @@ - Color functions (lighten, darken, saturate, desaturate, spin, hue, mix, saturation, lightness) - Other functions (round, increment, decrement, format '%(', ...) -- Keyframe blocks Differences from less.js diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/__init__.py new/lesscpy-0.11.1/lesscpy/__init__.py --- old/lesscpy-0.10.2/lesscpy/__init__.py 2014-11-26 21:30:47.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/__init__.py 2016-03-17 11:14:48.000000000 +0100 @@ -1,4 +1,4 @@ -__version_info__ = ('0', '10', '2') +__version_info__ = ('0', '11', '1') __version__ = '.'.join(__version_info__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/lessc/color.py new/lesscpy-0.11.1/lesscpy/lessc/color.py --- old/lesscpy-0.10.2/lesscpy/lessc/color.py 2014-11-26 21:28:11.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/lessc/color.py 2016-03-17 11:06:46.000000000 +0100 @@ -12,6 +12,7 @@ import colorsys import re +import six from . import utility from lesscpy.lib import colors @@ -303,7 +304,7 @@ str """ if color and degree: - if isinstance(degree, str): + if isinstance(degree, six.string_types): degree = float(degree.strip('%')) h, l, s = self._hextohls(color) h = ((h * 360.0) + degree) % 360.0 @@ -347,7 +348,7 @@ str """ if color1 and color2: - if isinstance(weight, str): + if isinstance(weight, six.string_types): weight = float(weight.strip('%')) weight = ((weight / 100.0) * 2) - 1 rgb1 = self._hextorgb(color1) @@ -418,7 +419,7 @@ return colorsys.rgb_to_hls(*[c / 255.0 for c in rgb]) def _ophsl(self, color, diff, idx, operation): - if isinstance(diff, str): + if isinstance(diff, six.string_types): diff = float(diff.strip('%')) hls = list(self._hextohls(color)) hls[idx] = self._clamp(operation(hls[idx], diff / 100.0)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/lessc/lexer.py new/lesscpy-0.11.1/lesscpy/lessc/lexer.py --- old/lesscpy-0.10.2/lesscpy/lessc/lexer.py 2014-11-26 21:28:11.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/lessc/lexer.py 2016-03-17 11:06:46.000000000 +0100 @@ -46,6 +46,7 @@ 'css_vendor_hack', 'css_uri', 'css_ms_filter', + 'css_keyframe_selector', 'css_media_type', 'css_media_feature', @@ -108,7 +109,7 @@ def t_css_filter(self, t): (r'\[[^\]]*\]' '|(not|lang|nth-[a-z\-]+)\(.+\)' - '|and[ \t]\([^><\{]+\)') + '|and[ \t]\([^><=\{]+\)') return t def t_css_ms_filter(self, t): @@ -173,6 +174,8 @@ t.type = 'less_and' elif v == 'not': t.type = 'less_not' + elif v in ('from', 'to'): + t.type = 'css_keyframe_selector' elif v in css.propertys: t.type = 'css_property' t.lexer.in_property_decl = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/lessc/parser.py new/lesscpy-0.11.1/lesscpy/lessc/parser.py --- old/lesscpy-0.10.2/lesscpy/lessc/parser.py 2014-11-26 21:28:11.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/lessc/parser.py 2016-03-17 11:06:46.000000000 +0100 @@ -18,13 +18,14 @@ import tempfile import sys import ply.yacc +import six from . import lexer from . import utility from .scope import Scope from .color import Color from lesscpy.exceptions import CompilationError -from lesscpy.plib import Block, Call, Deferred, Expression, Identifier, Mixin, Property, Statement, Variable, Import +from lesscpy.plib import Block, Call, Deferred, Expression, Identifier, Mixin, NegatedExpression, Property, Statement, Variable, Import, KeyframeSelector class ErrorRegister(object): """ @@ -142,7 +143,7 @@ if filename is not None: raise AssertionError( 'names of file and filename are in conflict') - filename = file.name() + filename = file.name else: filename = '(stream)' @@ -235,7 +236,7 @@ if self.importlvl > 8: raise ImportError( 'Recrusive import level too deep > 8 (circular import ?)') - if isinstance(p[3], str): + if isinstance(p[3], six.string_types): ipath = utility.destring(p[3]) elif isinstance(p[3], list): p[3] = Import(p[3], p.lineno(4)).parse(self.scope) @@ -310,6 +311,12 @@ """ p[0] = Identifier([p[1], p[2]]).parse(self.scope) + def p_keyframe_open(self, p): + """block_open : css_keyframe_selector brace_open + | number brace_open + """ + p[0] = KeyframeSelector([p[1]]).parse(self.scope) + # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # @@ -784,7 +791,7 @@ def p_expression_p_neg(self, p): """ expression : '-' t_popen expression t_pclose """ - p[0] = [p[1], p[3]] + p[0] = NegatedExpression([p[3]], 0) def p_expression_p(self, p): """ expression : t_popen expression t_pclose @@ -1046,4 +1053,3 @@ t(str): Error type """ self.register.register("%s: line: %d: %s\n" % (t, line, e)) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/lessc/scope.py new/lesscpy-0.11.1/lesscpy/lessc/scope.py --- old/lesscpy-0.10.2/lesscpy/lessc/scope.py 2014-02-02 18:34:18.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/lessc/scope.py 2016-03-17 11:06:46.000000000 +0100 @@ -7,6 +7,8 @@ See LICENSE for details. .. moduleauthor:: Johann T. Mariusson <j...@robot.is> """ +import six + from . import utility @@ -193,12 +195,8 @@ var = self.variables('@' + name[2:-1]) if var is False: raise SyntaxError('Unknown escaped variable %s' % name) - try: - if isinstance(var.value[0], basestring): # py3 - var.value[0] = utility.destring(var.value[0]) - except NameError: - if isinstance(var.value[0], str): # py2 - var.value[0] = utility.destring(var.value[0]) + if isinstance(var.value[0], six.string_types): + var.value[0] = utility.destring(var.value[0]) else: var = self.variables(name) if var is False: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/lib/dom.py new/lesscpy-0.11.1/lesscpy/lib/dom.py --- old/lesscpy-0.10.2/lesscpy/lib/dom.py 2014-02-02 13:23:27.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/lib/dom.py 2016-03-17 11:06:46.000000000 +0100 @@ -158,15 +158,6 @@ 'tspan', ] -# Check http://www.w3.org/TR/css3-animations/#keyframes -# Treating them as DOM elements isn't entirely accurate -# but sufficent for our purposes. -css3_animation_keyframe_selectors = [ - 'from', - 'to' -] - elements = html4 elements.extend(html5) elements.extend(svg) -elements.extend(css3_animation_keyframe_selectors) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/plib/__init__.py new/lesscpy-0.11.1/lesscpy/plib/__init__.py --- old/lesscpy-0.10.2/lesscpy/plib/__init__.py 2014-11-26 21:28:11.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/plib/__init__.py 2016-03-17 11:06:46.000000000 +0100 @@ -13,7 +13,9 @@ 'Deferred', 'Expression', 'Identifier', + 'KeyframeSelector', 'Mixin', + 'NegatedExpression', 'Node', 'Property', 'Statement', @@ -25,7 +27,9 @@ from .deferred import Deferred from .expression import Expression from .identifier import Identifier +from .keyframe_selector import KeyframeSelector from .mixin import Mixin +from .negated_expression import NegatedExpression from .node import Node from .property import Property from .statement import Statement diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/plib/call.py new/lesscpy-0.11.1/lesscpy/plib/call.py --- old/lesscpy-0.10.2/lesscpy/plib/call.py 2014-02-02 18:34:18.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/plib/call.py 2016-03-17 11:06:46.000000000 +0100 @@ -13,6 +13,7 @@ from urllib.parse import quote as urlquote except ImportError: from urllib import quote as urlquote +import six from .node import Node import lesscpy.lessc.utility as utility import lesscpy.lessc.color as Color @@ -45,7 +46,7 @@ name = 'escape' color = Color.Color() args = [t for t in parsed - if not isinstance(t, str) or t not in '(),'] + if not isinstance(t, six.string_types) or t not in '(),'] if hasattr(self, name): try: return getattr(self, name)(*args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/plib/expression.py new/lesscpy-0.11.1/lesscpy/plib/expression.py --- old/lesscpy-0.10.2/lesscpy/plib/expression.py 2014-02-02 18:34:18.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/plib/expression.py 2016-03-17 11:06:46.000000000 +0100 @@ -18,7 +18,8 @@ class Expression(Node): """Expression node. Parses all expression except - color expressions, (handled in the color class) + color expressions (handled in the color class) + and unary negation (handled in the NegatedExpression class). """ def parse(self, scope): @@ -32,7 +33,6 @@ """ assert(len(self.tokens) == 3) expr = self.process(self.tokens, scope) - expr = [self.neg(t, scope) for t in expr] A, O, B = [e[0] if isinstance(e, tuple) else e @@ -55,25 +55,6 @@ return out return self.with_units(out, ua, ub) - def neg(self, value, scope): - """Apply negativity. - args: - value (mixed): test value - scope (Scope): Current scope - raises: - SyntaxError - returns: - str - """ - if value and isinstance(value, list) and value[0] == '-': - val = value[1] - if len(value) > 1 and hasattr(value[1], 'parse'): - val = value[1].parse(scope) - if isinstance(val, str): - return '-' + val - return -val - return value - def with_units(self, val, ua, ub): """Return value with unit. args: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/plib/keyframe_selector.py new/lesscpy-0.11.1/lesscpy/plib/keyframe_selector.py --- old/lesscpy-0.10.2/lesscpy/plib/keyframe_selector.py 1970-01-01 01:00:00.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/plib/keyframe_selector.py 2016-03-17 11:06:46.000000000 +0100 @@ -0,0 +1,50 @@ +# -*- coding: utf8 -*- +""" +.. module:: lesscpy.plib.keyframe_selector + :synopsis: Keyframe selector node. + + Copyright (c) + See LICENSE for details. +""" + +from .node import Node + + +class KeyframeSelector(Node): + + """Keyframe selector node. Represents the keyframe selector in an animation + sequence. Keyframes can be identified by the keywords "from" or "to", or by + percentage. + + http://www.w3.org/TR/css3-animations/#keyframes + """ + + def parse(self, scope): + """Parse node. + args: + scope (Scope): Current scope + raises: + SyntaxError + returns: + self + """ + self.keyframe, = [e[0] if isinstance(e, tuple) else e + for e in self.tokens if str(e).strip()] + self.subparse = False + return self + + def copy(self): + """ Return copy of self + Returns: + KeyframeSelector object + """ + return KeyframeSelector(self.tokens, 0) + + def fmt(self, fills): + """Format identifier + args: + fills (dict): replacements + returns: + str (CSS) + """ + return self.keyframe diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/plib/negated_expression.py new/lesscpy-0.11.1/lesscpy/plib/negated_expression.py --- old/lesscpy-0.10.2/lesscpy/plib/negated_expression.py 1970-01-01 01:00:00.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/plib/negated_expression.py 2016-03-17 11:06:46.000000000 +0100 @@ -0,0 +1,23 @@ +# -*- coding: utf8 -*- +""" +.. module:: lesscpy.plib.negated_expression + :synopsis: Node for unary negated expressions. + + Copyright (c) + See LICENSE for details. +""" + +import six + +from .node import Node + + +class NegatedExpression(Node): + + """Expressions preceded by unary negation.""" + + def parse(self, scope): + val, = self.process(self.tokens, scope) + if isinstance(val, six.string_types): + return '-' + val + return -val diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy/scripts/compiler.py new/lesscpy-0.11.1/lesscpy/scripts/compiler.py --- old/lesscpy-0.10.2/lesscpy/scripts/compiler.py 2014-01-21 12:07:38.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy/scripts/compiler.py 2016-03-17 11:06:46.000000000 +0100 @@ -121,6 +121,7 @@ group.add_argument('-N', '--no-css', action="store_true", default=False, help="No css output") aparse.add_argument('target', help="less file or directory") + aparse.add_argument('output', nargs='?', help="output file path") args = aparse.parse_args() try: # @@ -180,6 +181,10 @@ p.scopemap() if not args.no_css and p: out = f.format(p) - print(out) + if args.output: + with open(args.output, "w") as f: + f.write(out) + else: + print(out) except (KeyboardInterrupt, SystemExit, IOError): sys.exit('\nAborting...') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy.egg-info/PKG-INFO new/lesscpy-0.11.1/lesscpy.egg-info/PKG-INFO --- old/lesscpy-0.10.2/lesscpy.egg-info/PKG-INFO 2014-11-26 21:50:54.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy.egg-info/PKG-INFO 2016-03-17 11:15:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: lesscpy -Version: 0.10.2 +Version: 0.11.1 Summary: Python LESS compiler Home-page: https://github.com/lesscpy/lesscpy Author: Jóhann T Maríusson @@ -38,7 +38,7 @@ input and is considerably slower than the NodeJS compiler. The plan is to utilize this to build in proper syntax checking and perhaps YUI compressing. - This is an early version, so you are likly to find bugs. + This is an early version, so you are likely to find bugs. For more information on LESS: http://lesscss.org/ or https://github.com/cloudhead/less.js @@ -63,7 +63,6 @@ - Color functions (lighten, darken, saturate, desaturate, spin, hue, mix, saturation, lightness) - Other functions (round, increment, decrement, format '%(', ...) - - Keyframe blocks Differences from less.js diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/lesscpy.egg-info/SOURCES.txt new/lesscpy-0.11.1/lesscpy.egg-info/SOURCES.txt --- old/lesscpy-0.10.2/lesscpy.egg-info/SOURCES.txt 2014-11-26 21:50:54.000000000 +0100 +++ new/lesscpy-0.11.1/lesscpy.egg-info/SOURCES.txt 2016-03-17 11:15:00.000000000 +0100 @@ -33,7 +33,9 @@ lesscpy/plib/expression.py lesscpy/plib/identifier.py lesscpy/plib/import_.py +lesscpy/plib/keyframe_selector.py lesscpy/plib/mixin.py +lesscpy/plib/negated_expression.py lesscpy/plib/node.py lesscpy/plib/property.py lesscpy/plib/statement.py @@ -178,6 +180,7 @@ test/css/issues/issue4.css test/css/issues/issue5.css test/css/issues/issue6.css +test/css/issues/issue67.css test/less/argb.less test/less/calls.less test/less/colors.less @@ -220,4 +223,5 @@ test/less/issues/issue31.less test/less/issues/issue4.less test/less/issues/issue5.less -test/less/issues/issue6.less \ No newline at end of file +test/less/issues/issue6.less +test/less/issues/issue67.less \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/setup.cfg new/lesscpy-0.11.1/setup.cfg --- old/lesscpy-0.10.2/setup.cfg 2014-11-26 21:50:54.000000000 +0100 +++ new/lesscpy-0.11.1/setup.cfg 2016-03-17 11:15:00.000000000 +0100 @@ -2,7 +2,7 @@ universal = 1 [egg_info] -tag_build = tag_date = 0 tag_svn_revision = 0 +tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/test/css/issues/issue67.css new/lesscpy-0.11.1/test/css/issues/issue67.css --- old/lesscpy-0.10.2/test/css/issues/issue67.css 1970-01-01 01:00:00.000000000 +0100 +++ new/lesscpy-0.11.1/test/css/issues/issue67.css 2016-03-17 11:06:46.000000000 +0100 @@ -0,0 +1,3 @@ +.c { + left: 4; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/test/css/keyframes.css new/lesscpy-0.11.1/test/css/keyframes.css --- old/lesscpy-0.10.2/test/css/keyframes.css 2014-02-02 18:34:18.000000000 +0100 +++ new/lesscpy-0.11.1/test/css/keyframes.css 2016-03-17 11:06:46.000000000 +0100 @@ -22,3 +22,25 @@ background-position: 40px 0; } } +@keyframes using-percentages { + 0% { + top: 0; + } + 50% { + top: 1px; + } + 100% { + top: 2px; + } +} +@keyframes mixed-in { + from { + left: 0; + } + 50% { + left: 1px; + } + to { + left: 2px; + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/test/css/keyframes.min.css new/lesscpy-0.11.1/test/css/keyframes.min.css --- old/lesscpy-0.10.2/test/css/keyframes.min.css 2014-02-02 18:34:18.000000000 +0100 +++ new/lesscpy-0.11.1/test/css/keyframes.min.css 2016-03-17 11:06:46.000000000 +0100 @@ -4,3 +4,9 @@ to{background-position:40px 0;}} @keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}} +@keyframes using-percentages{0%{top:0;} +50%{top:1px;} +100%{top:2px;}} +@keyframes mixed-in{from{left:0;} +50%{left:1px;} +to{left:2px;}} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/test/less/issues/issue67.less new/lesscpy-0.11.1/test/less/issues/issue67.less --- old/lesscpy-0.10.2/test/less/issues/issue67.less 1970-01-01 01:00:00.000000000 +0100 +++ new/lesscpy-0.11.1/test/less/issues/issue67.less 2016-03-17 11:06:46.000000000 +0100 @@ -0,0 +1 @@ +.c { left: -(1 + 1) * -(1 + 1); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/test/less/keyframes.less new/lesscpy-0.11.1/test/less/keyframes.less --- old/lesscpy-0.10.2/test/less/keyframes.less 2014-02-02 18:34:18.000000000 +0100 +++ new/lesscpy-0.11.1/test/less/keyframes.less 2016-03-17 11:06:46.000000000 +0100 @@ -14,4 +14,21 @@ @keyframes progress-bar-stripes { from { background-position: 0 0; } to { background-position: 40px 0; } -} \ No newline at end of file +} + +// using percentages +@keyframes using-percentages { + 0% { top: 0; } + 50% { top: 1px; } + 100% { top: 2px; } +} + +// in a mix-in +.keyframe-mixin() { + from { left: 0; } + 50% { left: 1px; } + to { left: 2px; } +} +@keyframes mixed-in { + .keyframe-mixin(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/test/less/mixin-args-guards.less new/lesscpy-0.11.1/test/less/mixin-args-guards.less --- old/lesscpy-0.10.2/test/less/mixin-args-guards.less 2014-02-02 18:34:18.000000000 +0100 +++ new/lesscpy-0.11.1/test/less/mixin-args-guards.less 2016-03-17 11:06:46.000000000 +0100 @@ -29,6 +29,8 @@ .mixin1(11); .mixin1(-11); } +.eq (@a, @b) when (@a < @b) and (@b = @a) { +} .max (@a, @b) when (@a > @b) { width: @a } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lesscpy-0.10.2/test/test_pycompile.py new/lesscpy-0.11.1/test/test_pycompile.py --- old/lesscpy-0.10.2/test/test_pycompile.py 2014-11-26 21:28:11.000000000 +0100 +++ new/lesscpy-0.11.1/test/test_pycompile.py 2016-03-17 11:06:46.000000000 +0100 @@ -14,7 +14,7 @@ Unit tests for compile """ - def test_compile(self): + def test_compile_from_stream(self): """ It can compile input from a file-like object """ @@ -22,6 +22,18 @@ output = compile(StringIO("a { border-width: 2px * 3; }"), minify=True) self.assertEqual(output, "a{border-width:6px;}"); + def test_compile_from_file(self): + """ + It can compile input from a file object + """ + + import tempfile + in_file = tempfile.NamedTemporaryFile(mode='w+') + in_file.write("a { border-width: 2px * 3; }") + in_file.seek(0) + output = compile(in_file, minify=True) + self.assertEqual(output, "a{border-width:6px;}"); + def test_raises_exception(self): """ Test if a syntax error raises an exception @@ -30,4 +42,3 @@ fail_func = lambda: compile(StringIO("a }"), minify=True) self.assertRaises(CompilationError, fail_func) -