Hello community, here is the log from the commit of package python-roman for openSUSE:Factory checked in at 2019-04-18 09:56:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-roman (Old) and /work/SRC/openSUSE:Factory/.python-roman.new.17052 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-roman" Thu Apr 18 09:56:18 2019 rev:11 rq:695026 version:3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-roman/python-roman.changes 2018-12-24 11:47:46.393113744 +0100 +++ /work/SRC/openSUSE:Factory/.python-roman.new.17052/python-roman.changes 2019-04-18 09:56:19.449337501 +0200 @@ -1,0 +2,9 @@ +Wed Apr 17 07:44:28 UTC 2019 - pgaj...@suse.com + +- version update to 3.2 + - expanded test coverage + - Added support for 0 -> N + (see https://en.wikipedia.org/wiki/Roman_numerals#Zero) + - Added support for Python 3.8 + +------------------------------------------------------------------- Old: ---- roman-3.1.tar.gz New: ---- roman-3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-roman.spec ++++++ --- /var/tmp/diff_new_pack.jYEGrA/_old 2019-04-18 09:56:20.393338095 +0200 +++ /var/tmp/diff_new_pack.jYEGrA/_new 2019-04-18 09:56:20.397338098 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-roman # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-roman -Version: 3.1 +Version: 3.2 Release: 0 Summary: Integer to Roman numerals converter License: Python-2.0 ++++++ roman-3.1.tar.gz -> roman-3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/.gitignore new/roman-3.2/.gitignore --- old/roman-3.1/.gitignore 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -*.pyc -__pycache__ -src/*.egg-info -benchmark/*.egg-info - -.installed.cfg -.tox -bin -develop-eggs -docs -parts diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/.travis.yml new/roman-3.2/.travis.yml --- old/roman-3.1/.travis.yml 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -language: python -python: - - 2.7 - - 3.5 - - 3.6 - - pypy - - pypy3 -matrix: - include: - - python: "3.7" - dist: xenial - sudo: true -install: - - pip install . -script: - - python setup.py test -q -notifications: - email: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/CHANGES.txt new/roman-3.2/CHANGES.txt --- old/roman-3.1/CHANGES.txt 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/CHANGES.txt 2019-04-14 19:50:42.000000000 +0200 @@ -1,6 +1,16 @@ -======= -CHANGES -======= +Change log +========== + +3.2 (2019-04-14) +---------------- + +- expanded test coverage + +- Added support for 0 -> N + (see https://en.wikipedia.org/wiki/Roman_numerals#Zero) + +- Added support for Python 3.8 + 3.1 (2018-10-24) ---------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/PKG-INFO new/roman-3.2/PKG-INFO --- old/roman-3.1/PKG-INFO 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/PKG-INFO 2019-04-14 19:56:23.000000000 +0200 @@ -1,14 +1,42 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: roman -Version: 3.1 +Version: 3.2 Summary: Integer to Roman numerals converter Home-page: https://github.com/zopefoundation/roman Author: Mark Pilgrim Author-email: f...@diveintopython.org License: Python 2.1.1 -Description: ======= - CHANGES - ======= +Description: .. image:: https://travis-ci.org/zopefoundation/roman.svg?branch=master + :target: https://travis-ci.org/zopefoundation/roman + + .. image:: https://coveralls.io/repos/github/zopefoundation/roman/badge.svg?branch=master + :target: https://coveralls.io/github/zopefoundation/roman?branch=master + + .. image:: https://img.shields.io/pypi/v/roman.svg + :target: https://pypi.org/project/roman/ + :alt: Current version on PyPI + + .. image:: https://img.shields.io/pypi/pyversions/roman.svg + :target: https://pypi.org/project/roman/ + :alt: Supported Python versions + + roman + ===== + + Small helper library to convert arabic to roman numerals. + /n/nChange log + ========== + + 3.2 (2019-04-14) + ---------------- + + - expanded test coverage + + - Added support for 0 -> N + (see https://en.wikipedia.org/wiki/Roman_numerals#Zero) + + - Added support for Python 3.8 + 3.1 (2018-10-24) ---------------- @@ -48,9 +76,11 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: License :: OSI Approved :: Python Software Foundation License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent +Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/README.rst new/roman-3.2/README.rst --- old/roman-3.1/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/roman-3.2/README.rst 2019-04-14 19:03:37.000000000 +0200 @@ -0,0 +1,18 @@ +.. image:: https://travis-ci.org/zopefoundation/roman.svg?branch=master + :target: https://travis-ci.org/zopefoundation/roman + +.. image:: https://coveralls.io/repos/github/zopefoundation/roman/badge.svg?branch=master + :target: https://coveralls.io/github/zopefoundation/roman?branch=master + +.. image:: https://img.shields.io/pypi/v/roman.svg + :target: https://pypi.org/project/roman/ + :alt: Current version on PyPI + +.. image:: https://img.shields.io/pypi/pyversions/roman.svg + :target: https://pypi.org/project/roman/ + :alt: Supported Python versions + +roman +===== + +Small helper library to convert arabic to roman numerals. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/bootstrap.py new/roman-3.2/bootstrap.py --- old/roman-3.1/bootstrap.py 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/bootstrap.py 2019-04-14 18:14:21.000000000 +0200 @@ -18,7 +18,11 @@ use the -c option to specify an alternate configuration file. """ -import os, shutil, sys, tempfile +import os +import shutil +import sys +import tempfile + from optparse import OptionParser tmpeggs = tempfile.mkdtemp() @@ -31,8 +35,8 @@ Simply run this script in a directory containing a buildout.cfg, using the Python that you want bin/buildout to use. -Note that by using --setup-source and --download-base to point to -local resources, you can keep this script from going over the network. +Note that by using --find-links to point to local resources, you can keep +this script from going over the network. ''' parser = OptionParser(usage=usage) @@ -48,48 +52,63 @@ "bootstrap and buildout will get the newest releases " "even if they are alphas or betas.")) parser.add_option("-c", "--config-file", - help=("Specify the path to the buildout configuration " - "file to be used.")) + help=("Specify the path to the buildout configuration " + "file to be used.")) parser.add_option("-f", "--find-links", - help=("Specify a URL to search for buildout releases")) + help=("Specify a URL to search for buildout releases")) +parser.add_option("--allow-site-packages", + action="store_true", default=False, + help=("Let bootstrap.py use existing site packages")) +parser.add_option("--setuptools-version", + help="use a specific setuptools version") options, args = parser.parse_args() ###################################################################### -# load/install distribute +# load/install setuptools -to_reload = False try: - import pkg_resources, setuptools - if not hasattr(pkg_resources, '_distribute'): - to_reload = True - raise ImportError + if options.allow_site_packages: + import setuptools + import pkg_resources + from urllib.request import urlopen except ImportError: - ez = {} + from urllib2 import urlopen + +ez = {} +exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) - try: - from urllib.request import urlopen - except ImportError: - from urllib2 import urlopen - - exec(urlopen('http://python-distribute.org/distribute_setup.py').read(), ez) - setup_args = dict(to_dir=tmpeggs, download_delay=0, no_fake=True) - ez['use_setuptools'](**setup_args) - - if to_reload: - reload(pkg_resources) - import pkg_resources - # This does not (always?) update the default working set. We will - # do it. - for path in sys.path: - if path not in pkg_resources.working_set.entries: - pkg_resources.working_set.add_entry(path) +if not options.allow_site_packages: + # ez_setup imports site, which adds site packages + # this will remove them from the path to ensure that incompatible versions + # of setuptools are not in the path + import site + # inside a virtualenv, there is no 'getsitepackages'. + # We can't remove these reliably + if hasattr(site, 'getsitepackages'): + for sitepackage_path in site.getsitepackages(): + sys.path[:] = [x for x in sys.path if sitepackage_path not in x] + +setup_args = dict(to_dir=tmpeggs, download_delay=0) + +if options.setuptools_version is not None: + setup_args['version'] = options.setuptools_version + +ez['use_setuptools'](**setup_args) +import setuptools +import pkg_resources + +# This does not (always?) update the default working set. We will +# do it. +for path in sys.path: + if path not in pkg_resources.working_set.entries: + pkg_resources.working_set.add_entry(path) ###################################################################### # Install buildout -ws = pkg_resources.working_set +ws = pkg_resources.working_set cmd = [sys.executable, '-c', 'from setuptools.command.easy_install import main; main()', @@ -104,8 +123,8 @@ if find_links: cmd.extend(['-f', find_links]) -distribute_path = ws.find( - pkg_resources.Requirement.parse('distribute')).location +setuptools_path = ws.find( + pkg_resources.Requirement.parse('setuptools')).location requirement = 'zc.buildout' version = options.version @@ -113,13 +132,19 @@ # Figure out the most recent final version of zc.buildout. import setuptools.package_index _final_parts = '*final-', '*final' + def _final_version(parsed_version): - for part in parsed_version: - if (part[:1] == '*') and (part not in _final_parts): - return False - return True + try: + return not parsed_version.is_prerelease + except AttributeError: + # Older setuptools + for part in parsed_version: + if (part[:1] == '*') and (part not in _final_parts): + return False + return True + index = setuptools.package_index.PackageIndex( - search_path=[distribute_path]) + search_path=[setuptools_path]) if find_links: index.add_find_links((find_links,)) req = pkg_resources.Requirement.parse(requirement) @@ -142,10 +167,9 @@ cmd.append(requirement) import subprocess -if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=distribute_path)) != 0: +if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0: raise Exception( - "Failed to execute command:\n%s", - repr(cmd)[1:-1]) + "Failed to execute command:\n%s" % repr(cmd)[1:-1]) ###################################################################### # Import and run buildout diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/buildout.cfg new/roman-3.2/buildout.cfg --- old/roman-3.1/buildout.cfg 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/buildout.cfg 2019-04-14 18:31:58.000000000 +0200 @@ -1,12 +1,22 @@ [buildout] develop = . -parts = python test +parts = + python + scripts + test [python] recipe = zc.recipe.egg eggs = roman interpreter = python +[scripts] +recipe = zc.recipe.egg +eggs = + tox +scripts = + tox + [test] recipe = zc.recipe.testrunner eggs = roman diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/setup.cfg new/roman-3.2/setup.cfg --- old/roman-3.1/setup.cfg 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/setup.cfg 2019-04-14 19:56:23.000000000 +0200 @@ -1,3 +1,21 @@ +[bdist_wheel] +universal = 1 + +[coverage:run] +branch = True +source = src +omit = + +[coverage:report] +fail_under = 95.0 +ignore_errors = True +precision = 2 +show_missing = False +sort = Name + +[coverage:html] +directory = parts/coverage + [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/setup.py new/roman-3.2/setup.py --- old/roman-3.1/setup.py 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/setup.py 2019-04-14 19:50:49.000000000 +0200 @@ -1,12 +1,15 @@ from setuptools import setup + +desc = ('%s/n/n%s' % (open('README.rst').read(), open('CHANGES.txt').read())) + setup( name='roman', - version='3.1', + version='3.2', author="Mark Pilgrim", author_email="f...@diveintopython.org", description="Integer to Roman numerals converter", - long_description=open('CHANGES.txt').read(), + long_description=desc, license="Python 2.1.1", keywords="roman", classifiers=[ @@ -19,6 +22,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'License :: OSI Approved :: Python Software Foundation License', @@ -27,6 +31,7 @@ 'Operating System :: OS Independent'], url='https://github.com/zopefoundation/roman', package_dir={"": "src"}, + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', py_modules=["roman"], include_package_data=True, test_suite='tests', Binary files old/roman-3.1/src/.roman.py.swp and new/roman-3.2/src/.roman.py.swp differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/src/roman.egg-info/PKG-INFO new/roman-3.2/src/roman.egg-info/PKG-INFO --- old/roman-3.1/src/roman.egg-info/PKG-INFO 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/src/roman.egg-info/PKG-INFO 2019-04-14 19:56:22.000000000 +0200 @@ -1,14 +1,42 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: roman -Version: 3.1 +Version: 3.2 Summary: Integer to Roman numerals converter Home-page: https://github.com/zopefoundation/roman Author: Mark Pilgrim Author-email: f...@diveintopython.org License: Python 2.1.1 -Description: ======= - CHANGES - ======= +Description: .. image:: https://travis-ci.org/zopefoundation/roman.svg?branch=master + :target: https://travis-ci.org/zopefoundation/roman + + .. image:: https://coveralls.io/repos/github/zopefoundation/roman/badge.svg?branch=master + :target: https://coveralls.io/github/zopefoundation/roman?branch=master + + .. image:: https://img.shields.io/pypi/v/roman.svg + :target: https://pypi.org/project/roman/ + :alt: Current version on PyPI + + .. image:: https://img.shields.io/pypi/pyversions/roman.svg + :target: https://pypi.org/project/roman/ + :alt: Supported Python versions + + roman + ===== + + Small helper library to convert arabic to roman numerals. + /n/nChange log + ========== + + 3.2 (2019-04-14) + ---------------- + + - expanded test coverage + + - Added support for 0 -> N + (see https://en.wikipedia.org/wiki/Roman_numerals#Zero) + + - Added support for Python 3.8 + 3.1 (2018-10-24) ---------------- @@ -48,9 +76,11 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: License :: OSI Approved :: Python Software Foundation License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent +Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/src/roman.egg-info/SOURCES.txt new/roman-3.2/src/roman.egg-info/SOURCES.txt --- old/roman-3.1/src/roman.egg-info/SOURCES.txt 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/src/roman.egg-info/SOURCES.txt 2019-04-14 19:56:22.000000000 +0200 @@ -1,11 +1,12 @@ -.gitignore -.travis.yml CHANGES.txt MANIFEST.in +README.rst bootstrap.py buildout.cfg +setup.cfg setup.py tox.ini +src/.roman.py.swp src/roman.py src/tests.py src/roman.egg-info/PKG-INFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/src/roman.py new/roman-3.2/src/roman.py --- old/roman-3.1/src/roman.py 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/src/roman.py 2019-04-14 19:48:25.000000000 +0200 @@ -41,8 +41,12 @@ """convert integer to Roman numeral""" if not isinstance(n, int): raise NotIntegerError("decimals can not be converted") - if not (0 < n < 5000): - raise OutOfRangeError("number out of range (must be 1..4999)") + if not (-1 < n < 5000): + raise OutOfRangeError("number out of range (must be 0..4999)") + + # special case + if n == 0: + return 'N' result = "" for numeral, integer in romanNumeralMap: @@ -68,6 +72,11 @@ """convert Roman numeral to integer""" if not s: raise InvalidRomanNumeralError('Input can not be blank') + + # special case + if s == 'N': + return 0 + if not romanNumeralPattern.search(s): raise InvalidRomanNumeralError('Invalid Roman numeral: %s' % s) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/src/tests.py new/roman-3.2/src/tests.py --- old/roman-3.1/src/tests.py 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/src/tests.py 2019-04-14 19:49:48.000000000 +0200 @@ -1,19 +1,27 @@ import unittest import roman +TEST_MAP = ((0, 'N'), (1, 'I'), (3, 'III'), (4, 'IV'), (9, 'IX'), (14, 'XIV'), + (19, 'XIX'), (24, 'XXIV'), (40, 'XL'), (49, 'XLIX'), (90, 'XC'), + (99, 'XCIX'), (400, 'CD'), (490, 'CDXC'), (499, 'CDXCIX'), + (900, 'CM'), (990, 'CMXC'), (998, 'CMXCVIII'), (999, 'CMXCIX'), + (2013, 'MMXIII')) + class TestRoman(unittest.TestCase): def test_toRoman(self): - self.assertEqual(roman.toRoman(1), 'I') - self.assertEqual(roman.toRoman(2013), 'MMXIII') + for num_arabic, num_roman in TEST_MAP: + self.assertEqual(roman.toRoman(num_arabic), num_roman, + '%s should be %s' % (num_arabic, num_roman)) def test_toRoman_errors(self): self.assertRaises(roman.OutOfRangeError, roman.toRoman, 100000) self.assertRaises(roman.NotIntegerError, roman.toRoman, '1') def test_fromRoman(self): - self.assertEqual(roman.fromRoman('I'), 1) - self.assertEqual(roman.fromRoman('MMXIII'), 2013) + for num_arabic, num_roman in TEST_MAP: + self.assertEqual(roman.fromRoman(num_roman), num_arabic, + '%s should be %s' % (num_roman, num_arabic)) def test_fromRoman_errors(self): self.assertRaises( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roman-3.1/tox.ini new/roman-3.2/tox.ini --- old/roman-3.1/tox.ini 2018-10-24 08:23:59.000000000 +0200 +++ new/roman-3.2/tox.ini 2019-04-14 19:53:35.000000000 +0200 @@ -1,9 +1,35 @@ [tox] envlist = - py27,py35,py36,py37,pypy,pypy3 + py27, + py35, + py36, + py37, + py38, + pypy, + pypy3, + coverage [testenv] commands = - python setup.py test -q + {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap + {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test + coverage run {envbindir}/test {posargs:-cv} deps = + zc.buildout + coverage +setenv = + COVERAGE_FILE=.coverage.{envname} +skip_install = true +[testenv:coverage] +basepython = python3.6 +skip_install = true +deps = coverage +setenv = + COVERAGE_FILE=.coverage +commands = + coverage erase + coverage combine + coverage html + coverage xml + coverage report