diff -Nru nwdiag-1.0.4+dfsg/bootstrap.py nwdiag-2.0.0+dfsg/bootstrap.py --- nwdiag-1.0.4+dfsg/bootstrap.py 2013-09-21 02:34:11.000000000 +0000 +++ nwdiag-2.0.0+dfsg/bootstrap.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Bootstrap a buildout-based project - -Simply run this script in a directory containing a buildout.cfg. -The script accepts buildout command-line options, so you can -use the -c option to specify an alternate configuration file. -""" - -import os -import shutil -import sys -import tempfile - -from optparse import OptionParser - -tmpeggs = tempfile.mkdtemp() - -usage = '''\ -[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] - -Bootstraps a buildout-based project. - -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 --find-links to point to local resources, you can keep -this script from going over the network. -''' - -parser = OptionParser(usage=usage) -parser.add_option("-v", "--version", help="use a specific zc.buildout version") - -parser.add_option("-t", "--accept-buildout-test-releases", - dest='accept_buildout_test_releases', - action="store_true", default=False, - help=("Normally, if you do not specify a --version, the " - "bootstrap script and buildout gets the newest " - "*final* versions of zc.buildout and its recipes and " - "extensions for you. If you use this flag, " - "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.")) -parser.add_option("-f", "--find-links", - help=("Specify a URL to search for buildout releases")) - - -options, args = parser.parse_args() - -###################################################################### -# load/install setuptools - -to_reload = False -try: - import pkg_resources - import setuptools -except ImportError: - ez = {} - - try: - from urllib.request import urlopen - except ImportError: - from urllib2 import urlopen - - # XXX use a more permanent ez_setup.py URL when available. - exec(urlopen('http://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py' - ).read(), ez) - setup_args = dict(to_dir=tmpeggs, download_delay=0) - 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) - -###################################################################### -# Install buildout - -ws = pkg_resources.working_set - -cmd = [sys.executable, '-c', - 'from setuptools.command.easy_install import main; main()', - '-mZqNxd', tmpeggs] - -find_links = os.environ.get( - 'bootstrap-testing-find-links', - options.find_links or - ('http://downloads.buildout.org/' - if options.accept_buildout_test_releases else None) - ) -if find_links: - cmd.extend(['-f', find_links]) - -setuptools_path = ws.find( - pkg_resources.Requirement.parse('setuptools')).location - -requirement = 'zc.buildout' -version = options.version -if version is None and not options.accept_buildout_test_releases: - # 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 - index = setuptools.package_index.PackageIndex( - search_path=[setuptools_path]) - if find_links: - index.add_find_links((find_links,)) - req = pkg_resources.Requirement.parse(requirement) - if index.obtain(req) is not None: - best = [] - bestv = None - for dist in index[req.project_name]: - distv = dist.parsed_version - if _final_version(distv): - if bestv is None or distv > bestv: - best = [dist] - bestv = distv - elif distv == bestv: - best.append(dist) - if best: - best.sort() - version = best[-1].version -if version: - requirement = '=='.join((requirement, version)) -cmd.append(requirement) - -import subprocess -if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0: - raise Exception( - "Failed to execute command:\n%s", - repr(cmd)[1:-1]) - -###################################################################### -# Import and run buildout - -ws.add_entry(tmpeggs) -ws.require(requirement) -import zc.buildout.buildout - -if not [a for a in args if '=' not in a]: - args.append('bootstrap') - -# if -c was provided, we push it back into args for buildout' main function -if options.config_file is not None: - args[0:0] = ['-c', options.config_file] - -zc.buildout.buildout.main(args) -shutil.rmtree(tmpeggs) diff -Nru nwdiag-1.0.4+dfsg/buildout.cfg nwdiag-2.0.0+dfsg/buildout.cfg --- nwdiag-1.0.4+dfsg/buildout.cfg 2014-07-03 09:13:25.000000000 +0000 +++ nwdiag-2.0.0+dfsg/buildout.cfg 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -[buildout] -parts = nwdiag test tox static_analysis - -develop = . - -[nwdiag] -recipe = zc.recipe.egg -eggs = - nwdiag - blockdiag -interpreter = py - -[test] -recipe = pbp.recipe.noserunner -eggs = - nwdiag[rst] - nwdiag[testing] - coverage - unittest-xml-reporting - -[tox] -recipe = zc.recipe.egg -eggs = - tox - detox - -[static_analysis] -recipe = zc.recipe.egg -eggs = - coverage - flake8 - pylint - -[test-extra] -recipe = iw.recipe.cmd:py -on_install = true -cmds = - >>> url = "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fvlgothic%2F46966%2FVLGothic-20100416.zip" - >>> buildout_dir = buildout.get('directory', '.') - >>> path = os.path.join(buildout_dir, 'src/nwdiag/tests/truetype') - >>> if not os.path.exists(path): - ... os.makedirs(path) - ... import cStringIO, urllib2, zipfile - ... archive = urllib2.urlopen(url).read() - ... zip = zipfile.ZipFile(cStringIO.StringIO(archive)) - ... ttf = zip.read('VLGothic/VL-PGothic-Regular.ttf') - ... open(os.path.join(path, 'VL-PGothic-Regular.ttf'), 'wb').write(ttf) diff -Nru nwdiag-1.0.4+dfsg/CHANGES.rst nwdiag-2.0.0+dfsg/CHANGES.rst --- nwdiag-1.0.4+dfsg/CHANGES.rst 1970-01-01 00:00:00.000000000 +0000 +++ nwdiag-2.0.0+dfsg/CHANGES.rst 2020-01-26 05:12:59.000000000 +0000 @@ -0,0 +1,221 @@ +Changelog +========= + +2.0.0 (2020-01-26) +------------------ +* Drop python2 and python3.4 support +* Fix a bug + - #23: Crash in antialias mode + +1.0.4 (2015-01-01) +------------------ +* Support blockdiag 1.5.0 core interface +* Fix bugs + + - Fix ascending syntax was disabled on refactoring parser + + +1.0.3 (2014-07-03) +------------------ +* rackdiag: Fix rackheight syntax (cf. rack { 12U }) was disabled + +1.0.2 (2014-07-02) +------------------ +* Change interface of docutils node (for sphinxcontrib module) + +1.0.1 (2014-06-26) +------------------ +* Add options to blockdiag directive (docutils extension) + - :width: + - :height: + - :scale: + - :align: + - :name: + - :class: + - :figwidth: + - :figclass: + +1.0.0 (2013-10-05) +------------------ +* Support python 3.2 and 3.3 (thanks to @masayuko) +* Drop supports for python 2.4 and 2.5 +* Replace dependency: PIL -> Pillow + +0.9.4 (2012-12-20) +------------------ +* Fix bugs + +0.9.3 (2012-12-17) +------------------ +* [rackdiag] Allow multiple rackitems in same level +* Fix bugs + +0.9.2 (2012-11-17) +------------------ +* [rackdiag] Add auto-numbering feature +* Fix bugs + +0.9.1 (2012-10-28) +------------------ +* Fix bugs + +0.9.0 (2012-10-22) +------------------ +* Optimize algorithm for rendering shadow +* Add options to docutils directive +* [packetdiag] represent splitted packets with dashed-line +* Fix bugs + +0.8.2 (2012-09-29) +------------------ +* Fix bugs + +0.8.1 (2012-09-08) +------------------ +* Add packetdiag_sphinxhelper + +0.8.0 (2012-09-06) +------------------ +* Add packetdiag which supports generating packet-header diaagram +* [nwdiag] Add diagram attribute: external_connector +* Update to new package structure (blockdiag >= 1.1.2) +* Allow # to comment syntax +* Fix bugs + +0.7.0 (2011-11-19) +------------------ +* Accept N/A rack-unit +* Add fontfamily attribute for switching fontface +* Fix bugs + +0.6.1 (2011-11-06) +------------------ +* [rackdiag] Support multiple racks rendering +* [rackdiag] Add rack attribute: unit-height, weight, ampere, ascending +* [rackdiag] Support putting multiple items to same rack-unit + +0.6.0 (2011-11-06) +------------------ +* Add rackdiag which supports genarating rack-structure diagram +* Add docutils extension +* Fix bugs + +0.5.3 (2011-11-01) +------------------ +* Add class feature (experimental) + +0.5.2 (2011-11-01) +------------------ +* Follow blockdiag-0.9.7 interface + +0.5.1 (2011-10-19) +------------------ +* Follow blockdiag-0.9.5 interface + +0.5.0 (2011-10-07) +------------------ +* Change shape of trunkline like a pipeline +* Add network attribute: color +* Add diagram attribute: default_network_color + +0.4.2 (2011-09-30) +------------------ +* Add diagram attributes: default_text_color +* Fix bugs + +0.4.1 (2011-09-26) +------------------ +* Add diagram attributes: default_node_color, default_group_color and default_line_color +* Fix bugs + +0.4.0 (2011-08-09) +------------------ +* Add syntax for peer network + +0.3.3 (2011-08-07) +------------------ +* Add syntax for peer network (experimental) +* Fix bugs + +0.3.2 (2011-08-03) +------------------ +* Fix bugs + +0.3.1 (2011-08-01) +------------------ +* Fix bugs + +0.3.0 (2011-07-18) +------------------ +* Upgrade layout engine +* Allow to note ip addresses directly +* Allow node_id including hyphen chars +* Fix bugs + +0.2.7 (2011-07-05) +------------------ +* Fix bugs + +0.2.6 (2011-07-03) +------------------ +* Allow "." to id token +* Support input from stdin +* Support multiple node address (using comma) +* Do not sort networks (ordered as declarations) +* Fix bugs + +0.2.5 (2011-06-29) +------------------ +* Adjust parameters for span and margin + +0.2.4 (2011-05-17) +------------------ +* Add --version option +* Fix bugs + +0.2.3 (2011-05-15) +------------------ +* Fix bugs + +0.2.2 (2011-05-15) +------------------ +* Implement grouping nodes + +0.2.1 (2011-05-14) +------------------ +* Change license to Apache License 2.0 +* Support blockdiag 0.8.1 core interface + +0.2.0 (2011-05-02) +------------------ +* Rename package to nwdiag + +0.1.6 (2011-04-30) +------------------ +* Fix bugs + +0.1.5 (2011-04-26) +------------------ +* Fix bugs + +0.1.4 (2011-04-25) +------------------ +* Implement jumped edge +* Fix bugs + +0.1.3 (2011-04-23) +------------------ +* Fix sphinxcontrib_netdiag was not worked + +0.1.2 (2011-04-23) +------------------ +* Support multi-homed host +* Drop network-bridge sytanx (cf. net_a -- net_b) + +0.1.1 (2011-04-10) +------------------ +* Fix bugs + +0.1.0 (2011-04-09) +------------------ +* First release diff -Nru nwdiag-1.0.4+dfsg/debian/changelog nwdiag-2.0.0+dfsg/debian/changelog --- nwdiag-1.0.4+dfsg/debian/changelog 2019-10-19 00:40:47.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/changelog 2021-02-01 09:37:01.000000000 +0000 @@ -1,3 +1,26 @@ +nwdiag (2.0.0+dfsg-1) unstable; urgency=medium + + * New upstream release. + * debian/control + - Bumps Standards-Version to 4.5.1. + - Build-Depends + * Bumps debhelper-compat to 13. + - Deletes debian/compat + * debian/watch + - Fixes debian-watch-uses-insecure-uri. + - Bumps version to 4. + - Fixes dversionmangles. + - Appends repacksuffix. + * debian/copyright + - Removes + * Files: bootstrap.py paragraph. + * Lices: Zope-2.1 + * debian/patches + - [add] update-egg-info.patch + - [delete] compat-pep8-1.5.7_1.6.x.patch + + -- Kouhei Maeda Mon, 01 Feb 2021 18:37:01 +0900 + nwdiag (1.0.4+dfsg-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru nwdiag-1.0.4+dfsg/debian/compat nwdiag-2.0.0+dfsg/debian/compat --- nwdiag-1.0.4+dfsg/debian/compat 2011-06-11 11:43:46.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -7 diff -Nru nwdiag-1.0.4+dfsg/debian/control nwdiag-2.0.0+dfsg/debian/control --- nwdiag-1.0.4+dfsg/debian/control 2019-10-19 00:37:12.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/control 2021-02-01 09:32:37.000000000 +0000 @@ -2,7 +2,7 @@ Section: python Priority: optional Maintainer: Kouhei Maeda -Build-Depends: debhelper (>= 8.0.0), +Build-Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools, @@ -12,7 +12,7 @@ python3-unittest2, python3-blockdiag (>= 1.5.0), fonts-vlgothic | fonts-japanese-gothic -Standards-Version: 3.9.8 +Standards-Version: 4.5.1 Homepage: http://blockdiag.com/ Package: python3-nwdiag diff -Nru nwdiag-1.0.4+dfsg/debian/copyright nwdiag-2.0.0+dfsg/debian/copyright --- nwdiag-1.0.4+dfsg/debian/copyright 2016-10-11 04:47:37.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/copyright 2021-02-01 09:32:17.000000000 +0000 @@ -14,10 +14,6 @@ Copyright: 2008,2009 Andrey Vlasovskikh License: Expat -Files: bootstrap.py -Copyright: 2006 Zope Foundation and Contributors -License: Zope-2.1 - Files: debian/* Copyright: 2011 Kouhei Maeda License: Apache-2.0 @@ -38,14 +34,6 @@ On Debian systems, the complete text of the Apache version 2.0 license can be found in "/usr/share/common-licenses/Apache-2.0". -License: Zope-2.1 - This software is subject to the provisions of the Zope Public License, - Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. - THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED - WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS - FOR A PARTICULAR PURPOSE. - License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -Nru nwdiag-1.0.4+dfsg/debian/patches/append_test_data.patch nwdiag-2.0.0+dfsg/debian/patches/append_test_data.patch --- nwdiag-1.0.4+dfsg/debian/patches/append_test_data.patch 2013-11-23 09:41:40.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/patches/append_test_data.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,451 +0,0 @@ -Description: Append test data from upstream repository -Forwarded: not-needed -Last-Update: 2013-11-23 - -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/autoexpand_node_width.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/autoexpand_node_width.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,15 @@ -+{ -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ network { A } -+ -+ network { B } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/connected_networks.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/connected_networks.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,8 @@ -+{ -+ network { -+ A; -+ } -+ network { -+ A; B; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/connected_networks2.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/connected_networks2.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,9 @@ -+{ -+ network { -+ A; B; C; D; E; -+ } -+ network { -+ E; Z; -+ } -+} -+ -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/connected_networks3.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/connected_networks3.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,12 @@ -+{ -+ network { -+ A; B; C; D; E; F; G; -+ } -+ -+ network { -+ A; H; I; -+ } -+ network { -+ G; J; K; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/diagram_attributes.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/diagram_attributes.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,15 @@ -+{ -+ node_height = 160; -+ node_width = 160; -+ span_width = 32; -+ span_height = 32; -+ default_fontsize = 16; -+ default_fontfamily = 'serif'; -+ default_network_color = red; -+ default_textcolor = red; -+ default_linecolor = red; -+ -+ network { -+ A; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/errors/peer_network_in_same_node.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/errors/peer_network_in_same_node.diag 2013-06-08 18:35:54.351513540 +0900 -@@ -0,0 +1,3 @@ -+{ -+ a -- a; -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_across_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_across_network.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,13 @@ -+{ -+ group { -+ A; B; C; -+ } -+ -+ network { -+ A; B; -+ } -+ -+ network { -+ A; B; C; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_and_peer_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_and_peer_network.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,9 @@ -+{ -+ A -- B; -+ network { -+ group{ -+ B; -+ } -+ C; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_inner_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_inner_network.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,8 @@ -+{ -+ network { -+ group { -+ A; -+ B; -+ } -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_network.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,16 @@ -+{ -+ network { -+ A; -+ B; -+ } -+ network { -+ B; -+ C; -+ D; -+ E; -+ } -+ -+ group { -+ B; D; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_outer_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/group_outer_network.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,10 @@ -+{ -+ network { -+ A; -+ B; -+ } -+ group { -+ A; -+ B; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_address_attribute.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_address_attribute.diag 2013-06-08 18:36:25.623512681 +0900 -@@ -0,0 +1,6 @@ -+{ -+ network { -+ web01 [address = 192.168.0.1]; -+ web02 [address = 2001:0db8:bd05:01d2:288a:1fc0:0001:10ee]; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_attributes.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_attributes.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,6 @@ -+{ -+ network { -+ A [address = "192.168.0.1"]; -+ B [address = "192.168.0.2, 192.168.0.3"]; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_belongs_to_multiple_networks.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_belongs_to_multiple_networks.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,11 @@ -+{ -+ network { -+ A; -+ } -+ network { -+ A; -+ } -+ network { -+ A; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_including_hyphen.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/node_including_hyphen.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,6 @@ -+{ -+ network { -+ web-01; -+ web-02; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,8 @@ -+{ -+ A [shape = ellipse]; -+ A -- B; -+ -+ network { -+ B; C; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network2.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network2.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,8 @@ -+{ -+ network { -+ A; -+ B; -+ } -+ -+ B -- C; -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network3.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network3.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,8 @@ -+{ -+ network { -+ A; -+ B; -+ } -+ -+ B -- C -- D; -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network4.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network4.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,4 @@ -+{ -+ A -- B; -+ A -- C; -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network5.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network5.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,10 @@ -+{ -+ network { -+ A; B; C; -+ } -+ network { -+ D; -+ } -+ -+ A -- B; -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network_branched.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/peer_network_branched.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,9 @@ -+{ -+ A -- B; -+ B -- C; -+ -+ network { -+ B; -+ D; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/same_peer_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/same_peer_network.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,13 @@ -+{ -+ A -- B -- A -- B; -+ -+ network { -+ B; -+ C; -+ } -+ -+ network { -+ C; -+ D; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/single_network.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/single_network.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,5 @@ -+{ -+ network { -+ A; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/split_group.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/split_group.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,12 @@ -+{ -+ network { -+ A; B; C; D; E; -+ } -+ -+ group { -+ B; D; -+ } -+ group { -+ C; -+ } -+} -Index: nwdiag-0.9.4/src/nwdiag/tests/diagrams/two_networks.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/nwdiag/tests/diagrams/two_networks.diag 2013-06-08 18:36:25.627512681 +0900 -@@ -0,0 +1,9 @@ -+{ -+ network { -+ A; -+ } -+ -+ network { -+ B; -+ } -+} -Index: nwdiag-0.9.4/src/rackdiag/tests/diagrams/autonumber.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/rackdiag/tests/diagrams/autonumber.diag 2013-06-08 18:38:20.395789532 +0900 -@@ -0,0 +1,6 @@ -+{ -+ * server 1 -+ * server 2 -+ * server 3 [2U]; -+ * server 4 -+} -Index: nwdiag-0.9.4/src/rackdiag/tests/diagrams/multi_rackitem.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/rackdiag/tests/diagrams/multi_rackitem.diag 2013-06-08 18:38:20.395789532 +0900 -@@ -0,0 +1,15 @@ -+{ -+ rackheight = 12; -+ -+ 1: UPS 1[3U]; -+ 1: UPS 2[3U]; -+ 4: server 1; -+ 4: server 2 [2U]; -+ 5: server 3 [2U]; -+ 6: server 4 [2U]; -+ 6: server 5 [2U]; -+ 6: server 6 [2U]; -+ 8: server 7 [3U]; -+ 9: server 8; -+ 9: server 9; -+} -Index: nwdiag-0.9.4/src/rackdiag/tests/diagrams/multi_racks.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/rackdiag/tests/diagrams/multi_racks.diag 2013-06-08 18:38:20.395789532 +0900 -@@ -0,0 +1,15 @@ -+{ -+ rack { -+ * server 1; -+ * server 2; -+ * server 3; -+ * server 4; -+ } -+ -+ rack { -+ * server 5; -+ * server 6; -+ * server 7; -+ * server 8; -+ } -+} -Index: nwdiag-0.9.4/src/rackdiag/tests/diagrams/simple.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/rackdiag/tests/diagrams/simple.diag 2013-06-08 18:38:20.395789532 +0900 -@@ -0,0 +1,6 @@ -+{ -+ 1: server 1 -+ 2: server 2 -+ 3: server 3 -+ 4: server 4 -+} -Index: nwdiag-0.9.4/src/packetdiag/tests/diagrams/tcp.diag -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/src/packetdiag/tests/diagrams/tcp.diag 2013-06-08 18:40:10.160876519 +0900 -@@ -0,0 +1,22 @@ -+{ -+ colwidth = 32 -+ node_height = 72 -+ -+ 0-15: Source Port -+ 16-31: Destination Port -+ 32-63: Sequence Number -+ 64-95: Acknowledgment Number -+ 96-99: Data Offset -+ 100-105: Reserved -+ 106: URG [rotate = 270] -+ 107: ACK [rotate = 270] -+ 108: PSH [rotate = 270] -+ 109: RST [rotate = 270] -+ 110: SYN [rotate = 270] -+ 111: FIN [rotate = 270] -+ 112-127: Window -+ 128-143: Checksum -+ 144-159: Urgent Pointer -+ 160-191: (Options and Padding) -+ 192-223: data [colheight = 3] -+} diff -Nru nwdiag-1.0.4+dfsg/debian/patches/compat-pep8-1.5.7_1.6.x.patch nwdiag-2.0.0+dfsg/debian/patches/compat-pep8-1.5.7_1.6.x.patch --- nwdiag-1.0.4+dfsg/debian/patches/compat-pep8-1.5.7_1.6.x.patch 2015-10-28 01:04:29.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/patches/compat-pep8-1.5.7_1.6.x.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -Description: Resolve compatibility problems with the version of the difference of pep8 -Author: Kouhei Maeda -Last-Update: 2015-10-28 -Index: nwdiag-1.0.3/src/nwdiag/tests/test_pep8.py -=================================================================== ---- nwdiag-1.0.3.orig/src/nwdiag/tests/test_pep8.py 2014-07-03 18:13:25.000000000 +0900 -+++ nwdiag-1.0.3/src/nwdiag/tests/test_pep8.py 2015-10-28 09:57:44.406490787 +0900 -@@ -15,7 +15,7 @@ - ['repeat', True], - ['paths', [BASE_DIR]]] - -- pep8style = pep8.StyleGuide(arglist, parse_argv=False, config_file=True) -+ pep8style = pep8.StyleGuide(arglist, parse_argv=False) - options = pep8style.options - if options.doctest: - import doctest -Index: nwdiag-1.0.3/src/packetdiag/tests/test_pep8.py -=================================================================== ---- nwdiag-1.0.3.orig/src/packetdiag/tests/test_pep8.py 2014-07-03 18:13:25.000000000 +0900 -+++ nwdiag-1.0.3/src/packetdiag/tests/test_pep8.py 2015-10-28 09:58:01.311051066 +0900 -@@ -15,7 +15,7 @@ - ['repeat', True], - ['paths', [BASE_DIR]]] - -- pep8style = pep8.StyleGuide(arglist, parse_argv=False, config_file=True) -+ pep8style = pep8.StyleGuide(arglist, parse_argv=False) - options = pep8style.options - if options.doctest: - import doctest -Index: nwdiag-1.0.3/src/rackdiag/tests/test_pep8.py -=================================================================== ---- nwdiag-1.0.3.orig/src/rackdiag/tests/test_pep8.py 2014-07-03 18:13:25.000000000 +0900 -+++ nwdiag-1.0.3/src/rackdiag/tests/test_pep8.py 2015-10-28 09:58:14.751477739 +0900 -@@ -15,7 +15,7 @@ - ['repeat', True], - ['paths', [BASE_DIR]]] - -- pep8style = pep8.StyleGuide(arglist, parse_argv=False, config_file=True) -+ pep8style = pep8.StyleGuide(arglist, parse_argv=False) - options = pep8style.options - if options.doctest: - import doctest -Index: nwdiag-1.0.3/.pep8 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-1.0.3/.pep8 2015-10-28 10:04:27.446133999 +0900 -@@ -0,0 +1,2 @@ -+[pep8] -+ignore = E241,E402,E731,W503 diff -Nru nwdiag-1.0.4+dfsg/debian/patches/manpage_packetdiag_1.patch nwdiag-2.0.0+dfsg/debian/patches/manpage_packetdiag_1.patch --- nwdiag-1.0.4+dfsg/debian/patches/manpage_packetdiag_1.patch 2013-11-23 09:41:10.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/patches/manpage_packetdiag_1.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -Description: Missing packetdiag.1 in MANIFEST.in -Forwarded: not-needed -Last-Update: 2013-11-23 - -Index: nwdiag-0.9.4/packetdiag.1 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ nwdiag-0.9.4/packetdiag.1 2013-06-09 00:11:51.305537476 +0900 -@@ -0,0 +1,67 @@ -+.\" Hey, EMACS: -*- nroff -*- -+.\" First parameter, NAME, should be all caps -+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -+.\" other parameters are allowed: see man(7), man(1) -+.TH NWDIAG 1 "June 11, 2011" -+.\" Please adjust this date whenever revising the manpage. -+.\" -+.\" Some roff macros, for reference: -+.\" .nh disable hyphenation -+.\" .hy enable hyphenation -+.\" .ad l left justify -+.\" .ad b justify to both left and right margins -+.\" .nf disable filling -+.\" .fi enable filling -+.\" .br insert line break -+.\" .sp insert n+1 empty lines -+.\" for manpage-specific macros, see man(7) -+.SH NAME -+packetdiag \- generate packet-header-structure-diagram image file from spec-text file. -+.SH SYNOPSIS -+.B packetdiag -+.RI [ options ] " files" -+.br -+.SH DESCRIPTION -+This manual page documents briefly the -+.B packetdiag -+commands. -+.PP -+.\" TeX users may be more comfortable with the \fB\fP and -+.\" \fI\fP escape sequences to invode bold face and italics, -+.\" respectively. -+\fBpacketdiag\fP is generate sequence-diagram image file from spec-text file. -+.SH OPTIONS -+These programs follow the usual GNU command line syntax, with long -+options starting with two dashes (`-'). -+A summary of options is included below. -+For a complete description, see the Info files. -+.TP -+.B \-h, \-\-help -+show this help message and exit. -+.TP -+.B \-\-version -+show program's version number and exit. -+.TP -+.B \-a, \-\-antialias -+Pass diagram image to anti-alias filter. -+.TP -+.B \-c FILE, \-\-config=FILE -+read configurations from FILE. -+.TP -+.B \-o FILE -+write diagram to FILE. -+.TP -+.B \-f FONT, \-\-font=FONT -+use FONT to draw diagram. -+.TP -+.B \-T TYPE -+Output diagram as TYPE format. -+.SH SEE ALSO -+The programs are documented fully by -+.br -+http://blockdiag.com/en/nwdiag/ -+.SH AUTHOR -+packetdiag was written by Takeshi Komiya -+.PP -+This manual page was written by Kouhei Maeda , -+for the Debian project (and may be used by others). diff -Nru nwdiag-1.0.4+dfsg/debian/patches/series nwdiag-2.0.0+dfsg/debian/patches/series --- nwdiag-1.0.4+dfsg/debian/patches/series 2015-10-28 00:53:49.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/patches/series 2021-02-01 09:37:01.000000000 +0000 @@ -1 +1 @@ -compat-pep8-1.5.7_1.6.x.patch +update-egg-info.patch diff -Nru nwdiag-1.0.4+dfsg/debian/patches/update_egg-info nwdiag-2.0.0+dfsg/debian/patches/update_egg-info --- nwdiag-1.0.4+dfsg/debian/patches/update_egg-info 2012-01-07 02:12:21.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/patches/update_egg-info 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -Index: nwdiag-0.7.0/src/nwdiag.egg-info/PKG-INFO -=================================================================== ---- nwdiag-0.7.0.orig/src/nwdiag.egg-info/PKG-INFO 2012-01-07 11:10:58.466110620 +0900 -+++ nwdiag-0.7.0/src/nwdiag.egg-info/PKG-INFO 2012-01-07 11:11:53.525874078 +0900 -@@ -1,4 +1,4 @@ --Metadata-Version: 1.0 -+Metadata-Version: 1.1 - Name: nwdiag - Version: 0.7.0 - Summary: nwdiag generate network-diagram image file from spec-text file. diff -Nru nwdiag-1.0.4+dfsg/debian/patches/update-egg-info.patch nwdiag-2.0.0+dfsg/debian/patches/update-egg-info.patch --- nwdiag-1.0.4+dfsg/debian/patches/update-egg-info.patch 1970-01-01 00:00:00.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/patches/update-egg-info.patch 2021-02-01 09:37:01.000000000 +0000 @@ -0,0 +1,67 @@ +Description: Removes Files-Excluded from SOURCES.txt, changes dependencies order in requires.txt, and Changes classifies in PKG-INFO. +Author: Kouhei Maeda +Last-Update: 2021-02-01 + +Index: nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/PKG-INFO +=================================================================== +--- nwdiag-2.0.0+dfsg.orig/src/nwdiag.egg-info/PKG-INFO 2021-02-01 18:43:14.922811750 +0900 ++++ nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/PKG-INFO 2021-02-01 18:44:16.306809233 +0900 +@@ -112,6 +112,6 @@ + Classifier: Topic :: Software Development :: Documentation + Classifier: Topic :: Text Processing :: Markup + Description-Content-Type: text/x-rst +-Provides-Extra: testing + Provides-Extra: pdf + Provides-Extra: rst ++Provides-Extra: testing +Index: nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/SOURCES.txt +=================================================================== +--- nwdiag-2.0.0+dfsg.orig/src/nwdiag.egg-info/SOURCES.txt 2021-02-01 18:43:14.922811750 +0900 ++++ nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/SOURCES.txt 2021-02-01 18:44:16.306809233 +0900 +@@ -39,11 +39,6 @@ + src/nwdiag/tests/test_generate_diagram.py + src/nwdiag/tests/test_rst_directives.py + src/nwdiag/tests/utils.py +-src/nwdiag/tests/VLGothic/LICENSE +-src/nwdiag/tests/VLGothic/LICENSE.en +-src/nwdiag/tests/VLGothic/LICENSE_E.mplus +-src/nwdiag/tests/VLGothic/LICENSE_J.mplus +-src/nwdiag/tests/VLGothic/VL-Gothic-Regular.ttf + src/nwdiag/tests/diagrams/autoexpand_node_width.diag + src/nwdiag/tests/diagrams/connected_networks.diag + src/nwdiag/tests/diagrams/connected_networks2.diag +@@ -83,7 +78,6 @@ + src/packetdiag/parser.py + src/packetdiag/tests/test_generate_diagram.py + src/packetdiag/tests/test_rst_directives.py +-src/packetdiag/tests/VLGothic/VL-Gothic-Regular.ttf + src/packetdiag/tests/diagrams/oneliner.diag + src/packetdiag/tests/diagrams/oneliner_with_quoted.diag + src/packetdiag/tests/diagrams/oneliner_without_last_semicolon.diag +@@ -105,7 +99,6 @@ + src/rackdiag/tests/test_builder.py + src/rackdiag/tests/test_generate_diagram.py + src/rackdiag/tests/test_rst_directives.py +-src/rackdiag/tests/VLGothic/VL-Gothic-Regular.ttf + src/rackdiag/tests/diagrams/autonumber.diag + src/rackdiag/tests/diagrams/multi_rackitem.diag + src/rackdiag/tests/diagrams/multi_racks.diag +Index: nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/requires.txt +=================================================================== +--- nwdiag-2.0.0+dfsg.orig/src/nwdiag.egg-info/requires.txt 2021-02-01 18:43:14.922811750 +0900 ++++ nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/requires.txt 2021-02-01 18:44:16.306809233 +0900 +@@ -7,11 +7,11 @@ + docutils + + [testing] +-nose +-pep8>=1.3 ++docutils + flake8 + flake8-coding + flake8-copyright + flake8-isort ++nose ++pep8>=1.3 + reportlab +-docutils diff -Nru nwdiag-1.0.4+dfsg/debian/watch nwdiag-2.0.0+dfsg/debian/watch --- nwdiag-1.0.4+dfsg/debian/watch 2016-10-11 04:47:37.000000000 +0000 +++ nwdiag-2.0.0+dfsg/debian/watch 2021-02-01 09:33:50.000000000 +0000 @@ -1,3 +1,3 @@ -version=3 -opts=dversionmangle=s/\+dfsg// \ -http://pypi.debian.net/nwdiag/nwdiag-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) +version=4 +opts="dversionmangle=s/\+dfsg//,repacksuffix=+dfsg" \ +https://pypi.debian.net/nwdiag/nwdiag-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff -Nru nwdiag-1.0.4+dfsg/MANIFEST.in nwdiag-2.0.0+dfsg/MANIFEST.in --- nwdiag-1.0.4+dfsg/MANIFEST.in 2014-11-15 06:03:20.000000000 +0000 +++ nwdiag-2.0.0+dfsg/MANIFEST.in 2020-01-26 05:03:51.000000000 +0000 @@ -1,5 +1,4 @@ -include buildout.cfg -include bootstrap.py +include CHANGES.rst include MANIFEST.in include README.rst include LICENSE diff -Nru nwdiag-1.0.4+dfsg/PKG-INFO nwdiag-2.0.0+dfsg/PKG-INFO --- nwdiag-1.0.4+dfsg/PKG-INFO 2015-01-01 14:55:00.000000000 +0000 +++ nwdiag-2.0.0+dfsg/PKG-INFO 2020-01-26 05:36:25.477467800 +0000 @@ -1,12 +1,14 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: nwdiag -Version: 1.0.4 +Version: 2.0.0 Summary: nwdiag generates network-diagram image from text Home-page: http://blockdiag.com/ Author: Takeshi Komiya -Author-email: i.tkomiya at gmail.com +Author-email: i.tkomiya@gmail.com License: Apache License 2.0 Download-URL: http://pypi.python.org/pypi/nwdiag +Project-URL: Code, https://github.com/blockdiag/nwdiag +Project-URL: Issue tracker, https://github.com/blockdiag/nwdiag/issues Description: `nwdiag` generate network-diagram image file from spec-text file. .. image:: https://drone.io/bitbucket.org/blockdiag/nwdiag/status.png @@ -28,7 +30,7 @@ * Multilingualization for node-label (utf-8 only). You can get some examples and generated images on - `blockdiag.com `_ . + `blockdiag.com `_ . Setup ===== @@ -54,13 +56,20 @@ simple.diag is simply define nodes and transitions by dot-like text format:: - diagram { - A -> B -> C; - lane you { - A; B; + nwdiag { + network dmz { + address = "210.x.x.x/24" + + web01 [address = "210.x.x.1"]; + web02 [address = "210.x.x.2"]; } - lane me { - C; + network internal { + address = "172.x.x.x/24"; + + web01 [address = "172.x.x.1"]; + web02 [address = "172.x.x.2"]; + db01; + db02; } } @@ -77,8 +86,8 @@ Requirements ============ - * Python 2.6, 2.7, 3.2, 3.3, 3.4 - * Pillow 2.2.1 or later + * Python 3.5 or later + * blockdiag 1.5.0 or later * funcparserlib 0.3.6 or later * reportlab (optional) * wand and imagemagick (optional) @@ -89,229 +98,20 @@ ======= Apache License 2.0 - - History - ======= - - 1.0.4 (2015-01-01) - ------------------ - * Support blockdiag 1.5.0 core interface - * Fix bugs - - - Fix ascending syntax was disabled on refactoring parser - - - 1.0.3 (2014-07-03) - ------------------ - * rackdiag: Fix rackheight syntax (cf. rack { 12U }) was disabled - - 1.0.2 (2014-07-02) - ------------------ - * Change interface of docutils node (for sphinxcontrib module) - - 1.0.1 (2014-06-26) - ------------------ - * Add options to blockdiag directive (docutils extension) - - :width: - - :height: - - :scale: - - :align: - - :name: - - :class: - - :figwidth: - - :figclass: - - 1.0.0 (2013-10-05) - ------------------ - * Support python 3.2 and 3.3 (thanks to @masayuko) - * Drop supports for python 2.4 and 2.5 - * Replace dependency: PIL -> Pillow - - 0.9.4 (2012-12-20) - ------------------ - * Fix bugs - - 0.9.3 (2012-12-17) - ------------------ - * [rackdiag] Allow multiple rackitems in same level - * Fix bugs - - 0.9.2 (2012-11-17) - ------------------ - * [rackdiag] Add auto-numbering feature - * Fix bugs - - 0.9.1 (2012-10-28) - ------------------ - * Fix bugs - - 0.9.0 (2012-10-22) - ------------------ - * Optimize algorithm for rendering shadow - * Add options to docutils directive - * [packetdiag] represent splitted packets with dashed-line - * Fix bugs - - 0.8.2 (2012-09-29) - ------------------ - * Fix bugs - - 0.8.1 (2012-09-08) - ------------------ - * Add packetdiag_sphinxhelper - - 0.8.0 (2012-09-06) - ------------------ - * Add packetdiag which supports generating packet-header diaagram - * [nwdiag] Add diagram attribute: external_connector - * Update to new package structure (blockdiag >= 1.1.2) - * Allow # to comment syntax - * Fix bugs - - 0.7.0 (2011-11-19) - ------------------ - * Accept N/A rack-unit - * Add fontfamily attribute for switching fontface - * Fix bugs - - 0.6.1 (2011-11-06) - ------------------ - * [rackdiag] Support multiple racks rendering - * [rackdiag] Add rack attribute: unit-height, weight, ampere, ascending - * [rackdiag] Support putting multiple items to same rack-unit - - 0.6.0 (2011-11-06) - ------------------ - * Add rackdiag which supports genarating rack-structure diagram - * Add docutils extension - * Fix bugs - - 0.5.3 (2011-11-01) - ------------------ - * Add class feature (experimental) - - 0.5.2 (2011-11-01) - ------------------ - * Follow blockdiag-0.9.7 interface - - 0.5.1 (2011-10-19) - ------------------ - * Follow blockdiag-0.9.5 interface - - 0.5.0 (2011-10-07) - ------------------ - * Change shape of trunkline like a pipeline - * Add network attribute: color - * Add diagram attribute: default_network_color - - 0.4.2 (2011-09-30) - ------------------ - * Add diagram attributes: default_text_color - * Fix bugs - - 0.4.1 (2011-09-26) - ------------------ - * Add diagram attributes: default_node_color, default_group_color and default_line_color - * Fix bugs - - 0.4.0 (2011-08-09) - ------------------ - * Add syntax for peer network - - 0.3.3 (2011-08-07) - ------------------ - * Add syntax for peer network (experimental) - * Fix bugs - - 0.3.2 (2011-08-03) - ------------------ - * Fix bugs - - 0.3.1 (2011-08-01) - ------------------ - * Fix bugs - - 0.3.0 (2011-07-18) - ------------------ - * Upgrade layout engine - * Allow to note ip addresses directly - * Allow node_id including hyphen chars - * Fix bugs - - 0.2.7 (2011-07-05) - ------------------ - * Fix bugs - - 0.2.6 (2011-07-03) - ------------------ - * Allow "." to id token - * Support input from stdin - * Support multiple node address (using comma) - * Do not sort networks (ordered as declarations) - * Fix bugs - - 0.2.5 (2011-06-29) - ------------------ - * Adjust parameters for span and margin - - 0.2.4 (2011-05-17) - ------------------ - * Add --version option - * Fix bugs - - 0.2.3 (2011-05-15) - ------------------ - * Fix bugs - - 0.2.2 (2011-05-15) - ------------------ - * Implement grouping nodes - - 0.2.1 (2011-05-14) - ------------------ - * Change license to Apache License 2.0 - * Support blockdiag 0.8.1 core interface - - 0.2.0 (2011-05-02) - ------------------ - * Rename package to nwdiag - - 0.1.6 (2011-04-30) - ------------------ - * Fix bugs - - 0.1.5 (2011-04-26) - ------------------ - * Fix bugs - - 0.1.4 (2011-04-25) - ------------------ - * Implement jumped edge - * Fix bugs - - 0.1.3 (2011-04-23) - ------------------ - * Fix sphinxcontrib_netdiag was not worked - - 0.1.2 (2011-04-23) - ------------------ - * Support multi-homed host - * Drop network-bridge sytanx (cf. net_a -- net_b) - - 0.1.1 (2011-04-10) - ------------------ - * Fix bugs - - 0.1.0 (2011-04-09) - ------------------ - * First release - Keywords: diagram,generator Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha +Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Programming Language :: Python +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: Topic :: Software Development Classifier: Topic :: Software Development :: Documentation Classifier: Topic :: Text Processing :: Markup +Description-Content-Type: text/x-rst +Provides-Extra: testing +Provides-Extra: pdf +Provides-Extra: rst diff -Nru nwdiag-1.0.4+dfsg/README.rst nwdiag-2.0.0+dfsg/README.rst --- nwdiag-1.0.4+dfsg/README.rst 2015-01-01 13:04:46.000000000 +0000 +++ nwdiag-2.0.0+dfsg/README.rst 2020-01-13 15:46:14.000000000 +0000 @@ -19,7 +19,7 @@ * Multilingualization for node-label (utf-8 only). You can get some examples and generated images on -`blockdiag.com `_ . +`blockdiag.com `_ . Setup ===== @@ -45,13 +45,20 @@ simple.diag is simply define nodes and transitions by dot-like text format:: - diagram { - A -> B -> C; - lane you { - A; B; + nwdiag { + network dmz { + address = "210.x.x.x/24" + + web01 [address = "210.x.x.1"]; + web02 [address = "210.x.x.2"]; } - lane me { - C; + network internal { + address = "172.x.x.x/24"; + + web01 [address = "172.x.x.1"]; + web02 [address = "172.x.x.2"]; + db01; + db02; } } @@ -68,8 +75,8 @@ Requirements ============ -* Python 2.6, 2.7, 3.2, 3.3, 3.4 -* Pillow 2.2.1 or later +* Python 3.5 or later +* blockdiag 1.5.0 or later * funcparserlib 0.3.6 or later * reportlab (optional) * wand and imagemagick (optional) @@ -79,220 +86,3 @@ License ======= Apache License 2.0 - - -History -======= - -1.0.4 (2015-01-01) ------------------- -* Support blockdiag 1.5.0 core interface -* Fix bugs - - - Fix ascending syntax was disabled on refactoring parser - - -1.0.3 (2014-07-03) ------------------- -* rackdiag: Fix rackheight syntax (cf. rack { 12U }) was disabled - -1.0.2 (2014-07-02) ------------------- -* Change interface of docutils node (for sphinxcontrib module) - -1.0.1 (2014-06-26) ------------------- -* Add options to blockdiag directive (docutils extension) - - :width: - - :height: - - :scale: - - :align: - - :name: - - :class: - - :figwidth: - - :figclass: - -1.0.0 (2013-10-05) ------------------- -* Support python 3.2 and 3.3 (thanks to @masayuko) -* Drop supports for python 2.4 and 2.5 -* Replace dependency: PIL -> Pillow - -0.9.4 (2012-12-20) ------------------- -* Fix bugs - -0.9.3 (2012-12-17) ------------------- -* [rackdiag] Allow multiple rackitems in same level -* Fix bugs - -0.9.2 (2012-11-17) ------------------- -* [rackdiag] Add auto-numbering feature -* Fix bugs - -0.9.1 (2012-10-28) ------------------- -* Fix bugs - -0.9.0 (2012-10-22) ------------------- -* Optimize algorithm for rendering shadow -* Add options to docutils directive -* [packetdiag] represent splitted packets with dashed-line -* Fix bugs - -0.8.2 (2012-09-29) ------------------- -* Fix bugs - -0.8.1 (2012-09-08) ------------------- -* Add packetdiag_sphinxhelper - -0.8.0 (2012-09-06) ------------------- -* Add packetdiag which supports generating packet-header diaagram -* [nwdiag] Add diagram attribute: external_connector -* Update to new package structure (blockdiag >= 1.1.2) -* Allow # to comment syntax -* Fix bugs - -0.7.0 (2011-11-19) ------------------- -* Accept N/A rack-unit -* Add fontfamily attribute for switching fontface -* Fix bugs - -0.6.1 (2011-11-06) ------------------- -* [rackdiag] Support multiple racks rendering -* [rackdiag] Add rack attribute: unit-height, weight, ampere, ascending -* [rackdiag] Support putting multiple items to same rack-unit - -0.6.0 (2011-11-06) ------------------- -* Add rackdiag which supports genarating rack-structure diagram -* Add docutils extension -* Fix bugs - -0.5.3 (2011-11-01) ------------------- -* Add class feature (experimental) - -0.5.2 (2011-11-01) ------------------- -* Follow blockdiag-0.9.7 interface - -0.5.1 (2011-10-19) ------------------- -* Follow blockdiag-0.9.5 interface - -0.5.0 (2011-10-07) ------------------- -* Change shape of trunkline like a pipeline -* Add network attribute: color -* Add diagram attribute: default_network_color - -0.4.2 (2011-09-30) ------------------- -* Add diagram attributes: default_text_color -* Fix bugs - -0.4.1 (2011-09-26) ------------------- -* Add diagram attributes: default_node_color, default_group_color and default_line_color -* Fix bugs - -0.4.0 (2011-08-09) ------------------- -* Add syntax for peer network - -0.3.3 (2011-08-07) ------------------- -* Add syntax for peer network (experimental) -* Fix bugs - -0.3.2 (2011-08-03) ------------------- -* Fix bugs - -0.3.1 (2011-08-01) ------------------- -* Fix bugs - -0.3.0 (2011-07-18) ------------------- -* Upgrade layout engine -* Allow to note ip addresses directly -* Allow node_id including hyphen chars -* Fix bugs - -0.2.7 (2011-07-05) ------------------- -* Fix bugs - -0.2.6 (2011-07-03) ------------------- -* Allow "." to id token -* Support input from stdin -* Support multiple node address (using comma) -* Do not sort networks (ordered as declarations) -* Fix bugs - -0.2.5 (2011-06-29) ------------------- -* Adjust parameters for span and margin - -0.2.4 (2011-05-17) ------------------- -* Add --version option -* Fix bugs - -0.2.3 (2011-05-15) ------------------- -* Fix bugs - -0.2.2 (2011-05-15) ------------------- -* Implement grouping nodes - -0.2.1 (2011-05-14) ------------------- -* Change license to Apache License 2.0 -* Support blockdiag 0.8.1 core interface - -0.2.0 (2011-05-02) ------------------- -* Rename package to nwdiag - -0.1.6 (2011-04-30) ------------------- -* Fix bugs - -0.1.5 (2011-04-26) ------------------- -* Fix bugs - -0.1.4 (2011-04-25) ------------------- -* Implement jumped edge -* Fix bugs - -0.1.3 (2011-04-23) ------------------- -* Fix sphinxcontrib_netdiag was not worked - -0.1.2 (2011-04-23) ------------------- -* Support multi-homed host -* Drop network-bridge sytanx (cf. net_a -- net_b) - -0.1.1 (2011-04-10) ------------------- -* Fix bugs - -0.1.0 (2011-04-09) ------------------- -* First release diff -Nru nwdiag-1.0.4+dfsg/setup.cfg nwdiag-2.0.0+dfsg/setup.cfg --- nwdiag-1.0.4+dfsg/setup.cfg 2015-01-01 14:55:00.000000000 +0000 +++ nwdiag-2.0.0+dfsg/setup.cfg 2020-01-26 05:36:25.478027800 +0000 @@ -1,7 +1,6 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 [build] build-base = _build @@ -12,13 +11,13 @@ [wheel] universal = 1 -[aliases] -release = check -r -s register sdist bdist_wheel upload - [check] strict = 1 restructuredtext = 1 [flake8] -ignore = _ +ignore = W504 +copyright-check = True + +[isort] diff -Nru nwdiag-1.0.4+dfsg/setup.py nwdiag-2.0.0+dfsg/setup.py --- nwdiag-1.0.4+dfsg/setup.py 2015-01-01 13:03:20.000000000 +0000 +++ nwdiag-2.0.0+dfsg/setup.py 2020-01-26 05:36:16.000000000 +0000 @@ -1,39 +1,51 @@ # -*- coding: utf-8 -*- -import sys -from setuptools import setup, find_packages +import os -sys.path.insert(0, 'src') -import nwdiag +from setuptools import find_packages, setup classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 5 - Production/Stable", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Software Development", "Topic :: Software Development :: Documentation", "Topic :: Text Processing :: Markup", ] -test_requires = ['nose', - 'pep8>=1.3', - 'reportlab', - 'docutils'] - -# only for Python2.6 -if sys.version_info > (2, 6) and sys.version_info < (2, 7): - test_requires.append('unittest2') + + +def get_version(): + """Get version number of the package from version.py without importing core module.""" + package_dir = os.path.abspath(os.path.dirname(__file__)) + version_file = os.path.join(package_dir, 'src/nwdiag/__init__.py') + + namespace = {} + with open(version_file, 'r') as f: + exec(f.read(), namespace) + + return namespace['__version__'] + setup( name='nwdiag', - version=nwdiag.__version__, + version=get_version(), description='nwdiag generates network-diagram image from text', long_description=open("README.rst").read(), + long_description_content_type='text/x-rst', classifiers=classifiers, keywords=['diagram', 'generator'], author='Takeshi Komiya', - author_email='i.tkomiya at gmail.com', + author_email='i.tkomiya@gmail.com', url='http://blockdiag.com/', download_url='http://pypi.python.org/pypi/nwdiag', + project_urls={ + "Code": "https://github.com/blockdiag/nwdiag", + "Issue tracker": "https://github.com/blockdiag/nwdiag/issues", + }, license='Apache License 2.0', py_modules=[ 'nwdiag_sphinxhelper', @@ -44,13 +56,18 @@ package_dir={'': 'src'}, package_data={'': ['buildout.cfg']}, include_package_data=True, - install_requires=[ - 'setuptools', - 'blockdiag>=1.5.0', - # -*- Extra requirements: -*- - ], + install_requires=['blockdiag>=1.5.0'], extras_require=dict( - testing=test_requires, + testing=[ + 'nose', + 'pep8>=1.3', + 'flake8', + 'flake8-coding', + 'flake8-copyright', + 'flake8-isort', + 'reportlab', + 'docutils' + ], pdf=[ 'reportlab', ], @@ -59,7 +76,6 @@ ], ), test_suite='nose.collector', - tests_require=test_requires, entry_points=""" [console_scripts] nwdiag = nwdiag.command:main diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/builder.py nwdiag-2.0.0+dfsg/src/nwdiag/builder.py --- nwdiag-1.0.4+dfsg/src/nwdiag/builder.py 2013-11-06 09:05:46.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/builder.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,10 +14,12 @@ # limitations under the License. from collections import namedtuple + +from blockdiag.utils import XY, unquote + from nwdiag import parser -from nwdiag.elements import (Diagram, DiagramNode, DiagramEdge, - Network, Route, NodeGroup) -from blockdiag.utils import unquote, XY +from nwdiag.elements import (Diagram, DiagramEdge, DiagramNode, Network, + NodeGroup, Route) class DiagramTreeBuilder: @@ -44,8 +46,10 @@ # show networks including same nodes for nw in self.diagram.networks: if nw.hidden and len(nw.nodes) == 2: + def is_same(x): + return set(nodes) & set(x.nodes) == set(nodes) + nodes = nw.nodes - is_same = lambda x: set(nodes) & set(x.nodes) == set(nodes) for n in self.diagram.networks: if n != nw and is_same(n): nw.hidden = False diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/command.py nwdiag-2.0.0+dfsg/src/nwdiag/command.py --- nwdiag-1.0.4+dfsg/src/nwdiag/command.py 2013-09-26 02:44:17.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/command.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,11 +14,13 @@ # limitations under the License. import sys + +from blockdiag.utils.bootstrap import Application + import nwdiag import nwdiag.builder import nwdiag.drawer import nwdiag.parser -from blockdiag.utils.bootstrap import Application class NwdiagApp(Application): diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/drawer.py nwdiag-2.0.0+dfsg/src/nwdiag/drawer.py --- nwdiag-1.0.4+dfsg/src/nwdiag/drawer.py 2014-07-03 09:13:25.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/drawer.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,9 +14,11 @@ # limitations under the License. from __future__ import division + import blockdiag.drawer +from blockdiag.utils import XY, Box + from nwdiag.metrics import DiagramMetrics -from blockdiag.utils import Box, XY class DiagramDraw(blockdiag.drawer.DiagramDraw): @@ -162,8 +164,11 @@ super(DiagramDraw, self).node(node, **kwargs) def draw_connector(self, connector): - self.drawer.line(connector.line, - fill=connector.network.linecolor, jump=True) + if hasattr(connector, 'subject'): + linecolor = connector.subject.network.linecolor + else: + linecolor = connector.network.linecolor + self.drawer.line(connector.line, fill=linecolor, jump=True) def group_label(self, group): if group.label: diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/elements.py nwdiag-2.0.0+dfsg/src/nwdiag/elements.py --- nwdiag-1.0.4+dfsg/src/nwdiag/elements.py 2014-07-03 09:13:25.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/elements.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,6 +14,7 @@ # limitations under the License. import re + import blockdiag.elements from blockdiag.utils import images, unquote @@ -36,7 +37,7 @@ for attr in attrs: if attr.name == 'address': - address = re.sub('\s*,\s*', '\n', unquote(attr.value)) + address = re.sub(r'\s*,\s*', '\n', unquote(attr.value)) self.address[network] = address else: self.set_attribute(attr) @@ -74,12 +75,14 @@ @classmethod def create_anonymous(cls, nodes, attrs=None): + def is_same(nw): + return set(nodes) & set(nw.nodes) == set(nodes) + if len(set(nodes)) != len(nodes): msg = "Do not connect same node to peer network: %s" raise RuntimeError(msg % nodes[0].id) # search networks including same nodes - is_same = lambda nw: set(nodes) & set(nw.nodes) == set(nodes) if [nw for nw in nodes[0].networks if nw.hidden and is_same(nw)]: return None diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/__init__.py nwdiag-2.0.0+dfsg/src/nwdiag/__init__.py --- nwdiag-1.0.4+dfsg/src/nwdiag/__init__.py 2015-01-01 13:02:47.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/__init__.py 2020-01-26 05:13:20.000000000 +0000 @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = '1.0.4' +__version__ = '2.0.0' diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/metrics.py nwdiag-2.0.0+dfsg/src/nwdiag/metrics.py --- nwdiag-1.0.4+dfsg/src/nwdiag/metrics.py 2013-09-21 02:34:11.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/metrics.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,11 +14,14 @@ # limitations under the License. from __future__ import division + import math from collections import namedtuple + import blockdiag.metrics +from blockdiag.utils import XY, Box + from nwdiag import elements -from blockdiag.utils import Box, XY cellsize = blockdiag.metrics.DiagramMetrics.cellsize diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/parser.py nwdiag-2.0.0+dfsg/src/nwdiag/parser.py --- nwdiag-1.0.4+dfsg/src/nwdiag/parser.py 2014-07-03 09:13:25.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/parser.py 2020-01-26 05:03:51.000000000 +0000 @@ -36,13 +36,12 @@ ''' import io -from re import MULTILINE, DOTALL from collections import namedtuple -from funcparserlib.lexer import make_tokenizer, Token, LexerError -from funcparserlib.parser import (some, a, maybe, many, finished, skip) -from blockdiag.parser import create_mapper, oneplus_to_list -from blockdiag.utils.compat import u +from re import DOTALL, MULTILINE +from blockdiag.parser import create_mapper, oneplus_to_list +from funcparserlib.lexer import LexerError, Token, make_tokenizer +from funcparserlib.parser import a, finished, many, maybe, skip, some Diagram = namedtuple('Diagram', 'id stmts') Network = namedtuple('Network', 'id stmts') @@ -68,8 +67,8 @@ ('Comment', (r'(//|#).*',)), # NOQA ('NL', (r'[\r\n]+',)), # NOQA ('Space', (r'[ \t\r\n]+',)), # NOQA - ('Name', (u('[A-Za-z_\u0080-\uffff]') + # NOQA - u('[A-Za-z_\\-.0-9\u0080-\uffff]*'),)), # NOQA + ('Name', ('[A-Za-z_\u0080-\uffff]' + # NOQA + '[A-Za-z_\\-.0-9\u0080-\uffff]*',)), # NOQA ('Op', (r'([{};,=\[\]]|--|->)',)), # NOQA ('IPAddr', (r'([0-9]+(\.[0-9]+){3}|[:0-9a-fA-F]+)',)), # NOQA ('Number', (r'-?(\.[0-9]+)|([0-9]+(\.[0-9]*)?)',)), # NOQA diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/tests/__init__.py nwdiag-2.0.0+dfsg/src/nwdiag/tests/__init__.py --- nwdiag-1.0.4+dfsg/src/nwdiag/tests/__init__.py 2013-09-26 02:44:15.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/tests/__init__.py 2020-01-13 09:56:08.000000000 +0000 @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# Copyright 2011 Takeshi KOMIYA +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_builder.py nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_builder.py --- nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_builder.py 2013-09-26 02:44:15.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_builder.py 2020-01-13 09:56:08.000000000 +0000 @@ -1,4 +1,17 @@ # -*- coding: utf-8 -*- +# Copyright 2011 Takeshi KOMIYA +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import print_function from nwdiag.tests.utils import BuilderTestCase diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_generate_diagram.py nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_generate_diagram.py --- nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_generate_diagram.py 2013-11-06 06:25:23.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_generate_diagram.py 2020-01-26 05:03:51.000000000 +0000 @@ -1,10 +1,24 @@ # -*- coding: utf-8 -*- +# Copyright 2011 Takeshi KOMIYA +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import os + +from blockdiag.tests.test_generate_diagram import (get_diagram_files, + testcase_generator) + import nwdiag.command -from blockdiag.tests.test_generate_diagram import ( - get_diagram_files, testcase_generator -) def test_generate(): diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_pep8.py nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_pep8.py --- nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_pep8.py 2014-07-03 09:13:25.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_pep8.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- - -from __future__ import print_function -import os -import sys -import pep8 - -CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) -BASE_DIR = os.path.dirname(CURRENT_DIR) - - -def test_pep8(): - arglist = [['statistics', True], - ['show-source', True], - ['repeat', True], - ['paths', [BASE_DIR]]] - - pep8style = pep8.StyleGuide(arglist, parse_argv=False, config_file=True) - options = pep8style.options - if options.doctest: - import doctest - fail_d, done_d = doctest.testmod(report=False, verbose=options.verbose) - fail_s, done_s = pep8.selftest(options) - count_failed = fail_s + fail_d - if not options.quiet: - count_passed = done_d + done_s - count_failed - print("%d passed and %d failed." % (count_passed, count_failed)) - if count_failed: - print("Test failed.") - else: - print("Test passed.") - if count_failed: - sys.exit(1) - if options.testsuite: - pep8.init_tests(pep8style) - report = pep8style.check_files() - if options.statistics: - report.print_statistics() - if options.benchmark: - report.print_benchmark() - if options.testsuite and not options.quiet: - report.print_results() - if report.total_errors: - if options.count: - sys.stderr.write(str(report.total_errors) + '\n') - # sys.exit(1) - - # reporting errors (additional summary) - errors = report.get_count('E') - warnings = report.get_count('W') - message = 'pep8: %d errors / %d warnings' % (errors, warnings) - print(message) - assert report.total_errors == 0, message diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_rst_directives.py nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_rst_directives.py --- nwdiag-1.0.4+dfsg/src/nwdiag/tests/test_rst_directives.py 2014-11-21 07:12:19.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag/tests/test_rst_directives.py 2020-01-26 05:03:51.000000000 +0000 @@ -1,18 +1,28 @@ # -*- coding: utf-8 -*- +# Copyright 2011 Takeshi KOMIYA +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import os import sys -if sys.version_info < (2, 7): - import unittest2 as unittest -else: - import unittest +import unittest -import os -from blockdiag.tests.utils import capture_stderr, with_pil, TemporaryDirectory +from blockdiag.tests.utils import TemporaryDirectory, capture_stderr, with_pil from docutils import nodes from docutils.core import publish_doctree from docutils.parsers.rst import directives as docutils + from nwdiag.utils.rst import directives -from blockdiag.utils.compat import u class TestRstDirectives(unittest.TestCase): @@ -139,7 +149,7 @@ self.assertEqual(1, len(doctree)) self.assertEqual(nodes.image, type(doctree[0])) svg = open(doctree[0]['uri']).read() - self.assertRegexpMatches(svg, '`_ . + `blockdiag.com `_ . Setup ===== @@ -54,13 +56,20 @@ simple.diag is simply define nodes and transitions by dot-like text format:: - diagram { - A -> B -> C; - lane you { - A; B; + nwdiag { + network dmz { + address = "210.x.x.x/24" + + web01 [address = "210.x.x.1"]; + web02 [address = "210.x.x.2"]; } - lane me { - C; + network internal { + address = "172.x.x.x/24"; + + web01 [address = "172.x.x.1"]; + web02 [address = "172.x.x.2"]; + db01; + db02; } } @@ -77,8 +86,8 @@ Requirements ============ - * Python 2.6, 2.7, 3.2, 3.3, 3.4 - * Pillow 2.2.1 or later + * Python 3.5 or later + * blockdiag 1.5.0 or later * funcparserlib 0.3.6 or later * reportlab (optional) * wand and imagemagick (optional) @@ -89,229 +98,20 @@ ======= Apache License 2.0 - - History - ======= - - 1.0.4 (2015-01-01) - ------------------ - * Support blockdiag 1.5.0 core interface - * Fix bugs - - - Fix ascending syntax was disabled on refactoring parser - - - 1.0.3 (2014-07-03) - ------------------ - * rackdiag: Fix rackheight syntax (cf. rack { 12U }) was disabled - - 1.0.2 (2014-07-02) - ------------------ - * Change interface of docutils node (for sphinxcontrib module) - - 1.0.1 (2014-06-26) - ------------------ - * Add options to blockdiag directive (docutils extension) - - :width: - - :height: - - :scale: - - :align: - - :name: - - :class: - - :figwidth: - - :figclass: - - 1.0.0 (2013-10-05) - ------------------ - * Support python 3.2 and 3.3 (thanks to @masayuko) - * Drop supports for python 2.4 and 2.5 - * Replace dependency: PIL -> Pillow - - 0.9.4 (2012-12-20) - ------------------ - * Fix bugs - - 0.9.3 (2012-12-17) - ------------------ - * [rackdiag] Allow multiple rackitems in same level - * Fix bugs - - 0.9.2 (2012-11-17) - ------------------ - * [rackdiag] Add auto-numbering feature - * Fix bugs - - 0.9.1 (2012-10-28) - ------------------ - * Fix bugs - - 0.9.0 (2012-10-22) - ------------------ - * Optimize algorithm for rendering shadow - * Add options to docutils directive - * [packetdiag] represent splitted packets with dashed-line - * Fix bugs - - 0.8.2 (2012-09-29) - ------------------ - * Fix bugs - - 0.8.1 (2012-09-08) - ------------------ - * Add packetdiag_sphinxhelper - - 0.8.0 (2012-09-06) - ------------------ - * Add packetdiag which supports generating packet-header diaagram - * [nwdiag] Add diagram attribute: external_connector - * Update to new package structure (blockdiag >= 1.1.2) - * Allow # to comment syntax - * Fix bugs - - 0.7.0 (2011-11-19) - ------------------ - * Accept N/A rack-unit - * Add fontfamily attribute for switching fontface - * Fix bugs - - 0.6.1 (2011-11-06) - ------------------ - * [rackdiag] Support multiple racks rendering - * [rackdiag] Add rack attribute: unit-height, weight, ampere, ascending - * [rackdiag] Support putting multiple items to same rack-unit - - 0.6.0 (2011-11-06) - ------------------ - * Add rackdiag which supports genarating rack-structure diagram - * Add docutils extension - * Fix bugs - - 0.5.3 (2011-11-01) - ------------------ - * Add class feature (experimental) - - 0.5.2 (2011-11-01) - ------------------ - * Follow blockdiag-0.9.7 interface - - 0.5.1 (2011-10-19) - ------------------ - * Follow blockdiag-0.9.5 interface - - 0.5.0 (2011-10-07) - ------------------ - * Change shape of trunkline like a pipeline - * Add network attribute: color - * Add diagram attribute: default_network_color - - 0.4.2 (2011-09-30) - ------------------ - * Add diagram attributes: default_text_color - * Fix bugs - - 0.4.1 (2011-09-26) - ------------------ - * Add diagram attributes: default_node_color, default_group_color and default_line_color - * Fix bugs - - 0.4.0 (2011-08-09) - ------------------ - * Add syntax for peer network - - 0.3.3 (2011-08-07) - ------------------ - * Add syntax for peer network (experimental) - * Fix bugs - - 0.3.2 (2011-08-03) - ------------------ - * Fix bugs - - 0.3.1 (2011-08-01) - ------------------ - * Fix bugs - - 0.3.0 (2011-07-18) - ------------------ - * Upgrade layout engine - * Allow to note ip addresses directly - * Allow node_id including hyphen chars - * Fix bugs - - 0.2.7 (2011-07-05) - ------------------ - * Fix bugs - - 0.2.6 (2011-07-03) - ------------------ - * Allow "." to id token - * Support input from stdin - * Support multiple node address (using comma) - * Do not sort networks (ordered as declarations) - * Fix bugs - - 0.2.5 (2011-06-29) - ------------------ - * Adjust parameters for span and margin - - 0.2.4 (2011-05-17) - ------------------ - * Add --version option - * Fix bugs - - 0.2.3 (2011-05-15) - ------------------ - * Fix bugs - - 0.2.2 (2011-05-15) - ------------------ - * Implement grouping nodes - - 0.2.1 (2011-05-14) - ------------------ - * Change license to Apache License 2.0 - * Support blockdiag 0.8.1 core interface - - 0.2.0 (2011-05-02) - ------------------ - * Rename package to nwdiag - - 0.1.6 (2011-04-30) - ------------------ - * Fix bugs - - 0.1.5 (2011-04-26) - ------------------ - * Fix bugs - - 0.1.4 (2011-04-25) - ------------------ - * Implement jumped edge - * Fix bugs - - 0.1.3 (2011-04-23) - ------------------ - * Fix sphinxcontrib_netdiag was not worked - - 0.1.2 (2011-04-23) - ------------------ - * Support multi-homed host - * Drop network-bridge sytanx (cf. net_a -- net_b) - - 0.1.1 (2011-04-10) - ------------------ - * Fix bugs - - 0.1.0 (2011-04-09) - ------------------ - * First release - Keywords: diagram,generator Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha +Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Programming Language :: Python +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: Topic :: Software Development Classifier: Topic :: Software Development :: Documentation Classifier: Topic :: Text Processing :: Markup +Description-Content-Type: text/x-rst +Provides-Extra: testing +Provides-Extra: pdf +Provides-Extra: rst diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag.egg-info/requires.txt nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/requires.txt --- nwdiag-1.0.4+dfsg/src/nwdiag.egg-info/requires.txt 2015-01-01 14:54:54.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/requires.txt 2020-01-26 05:36:25.000000000 +0000 @@ -1,4 +1,3 @@ -setuptools blockdiag>=1.5.0 [pdf] @@ -10,5 +9,9 @@ [testing] nose pep8>=1.3 +flake8 +flake8-coding +flake8-copyright +flake8-isort reportlab docutils diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag.egg-info/SOURCES.txt nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/SOURCES.txt --- nwdiag-1.0.4+dfsg/src/nwdiag.egg-info/SOURCES.txt 2015-01-01 14:54:55.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag.egg-info/SOURCES.txt 2020-01-26 05:36:25.000000000 +0000 @@ -1,8 +1,7 @@ +CHANGES.rst LICENSE MANIFEST.in README.rst -bootstrap.py -buildout.cfg nwdiag.1 packetdiag.1 rackdiag.1 @@ -38,7 +37,6 @@ src/nwdiag/tests/__init__.py src/nwdiag/tests/test_builder.py src/nwdiag/tests/test_generate_diagram.py -src/nwdiag/tests/test_pep8.py src/nwdiag/tests/test_rst_directives.py src/nwdiag/tests/utils.py src/nwdiag/tests/VLGothic/LICENSE @@ -84,7 +82,6 @@ src/packetdiag/noderenderers.py src/packetdiag/parser.py src/packetdiag/tests/test_generate_diagram.py -src/packetdiag/tests/test_pep8.py src/packetdiag/tests/test_rst_directives.py src/packetdiag/tests/VLGothic/VL-Gothic-Regular.ttf src/packetdiag/tests/diagrams/oneliner.diag @@ -107,10 +104,8 @@ src/rackdiag/parser.py src/rackdiag/tests/test_builder.py src/rackdiag/tests/test_generate_diagram.py -src/rackdiag/tests/test_pep8.py src/rackdiag/tests/test_rst_directives.py src/rackdiag/tests/VLGothic/VL-Gothic-Regular.ttf -src/rackdiag/tests/diagrams/ascending.diag src/rackdiag/tests/diagrams/autonumber.diag src/rackdiag/tests/diagrams/multi_rackitem.diag src/rackdiag/tests/diagrams/multi_racks.diag diff -Nru nwdiag-1.0.4+dfsg/src/nwdiag_sphinxhelper.py nwdiag-2.0.0+dfsg/src/nwdiag_sphinxhelper.py --- nwdiag-1.0.4+dfsg/src/nwdiag_sphinxhelper.py 2013-10-06 01:43:23.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/nwdiag_sphinxhelper.py 2020-01-26 05:03:51.000000000 +0000 @@ -13,24 +13,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -__all__ = [ - 'core', 'utils' -] +import blockdiag.utils.bootstrap +import blockdiag.utils.fontmap -import nwdiag.parser import nwdiag.builder import nwdiag.drawer -core = nwdiag - -import nwdiag.utils.rst.nodes +import nwdiag.parser import nwdiag.utils.rst.directives -utils = nwdiag.utils +import nwdiag.utils.rst.nodes -import blockdiag.utils.bootstrap +core = nwdiag +utils = nwdiag.utils utils.bootstrap = blockdiag.utils.bootstrap - -import blockdiag.utils.compat -utils.compat = blockdiag.utils.compat - -import blockdiag.utils.fontmap utils.fontmap = blockdiag.utils.fontmap + +__all__ = [ + 'core', 'utils' +] diff -Nru nwdiag-1.0.4+dfsg/src/packetdiag/builder.py nwdiag-2.0.0+dfsg/src/packetdiag/builder.py --- nwdiag-1.0.4+dfsg/src/packetdiag/builder.py 2014-07-03 09:13:25.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/packetdiag/builder.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,9 +14,11 @@ # limitations under the License. from __future__ import division + +from blockdiag.utils import XY, unquote + from packetdiag import parser -from packetdiag.elements import Diagram, FieldItem, DiagramNode -from blockdiag.utils import unquote, XY +from packetdiag.elements import Diagram, DiagramNode, FieldItem class DiagramTreeBuilder: diff -Nru nwdiag-1.0.4+dfsg/src/packetdiag/command.py nwdiag-2.0.0+dfsg/src/packetdiag/command.py --- nwdiag-1.0.4+dfsg/src/packetdiag/command.py 2013-09-30 00:47:57.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/packetdiag/command.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,11 +14,13 @@ # limitations under the License. import sys + +from blockdiag.utils.bootstrap import Application + import packetdiag import packetdiag.builder import packetdiag.drawer import packetdiag.parser -from blockdiag.utils.bootstrap import Application class PacketdiagApp(Application): diff -Nru nwdiag-1.0.4+dfsg/src/packetdiag/drawer.py nwdiag-2.0.0+dfsg/src/packetdiag/drawer.py --- nwdiag-1.0.4+dfsg/src/packetdiag/drawer.py 2013-09-21 02:34:11.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/packetdiag/drawer.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,8 +14,8 @@ # limitations under the License. import blockdiag.drawer + from packetdiag.metrics import DiagramMetrics -from blockdiag.utils.compat import u class DiagramDraw(blockdiag.drawer.DiagramDraw): @@ -39,9 +39,9 @@ box = self.metrics.measure_label(i) if self.diagram.scale_direction == "left_to_right": - label = u(str(i)) + label = str(i) else: - label = u(str(self.diagram.colwidth - i)) + label = str(self.diagram.colwidth - i) self.drawer.textarea(box, label, font, fill=self.diagram.textcolor) diff -Nru nwdiag-1.0.4+dfsg/src/packetdiag/__init__.py nwdiag-2.0.0+dfsg/src/packetdiag/__init__.py --- nwdiag-1.0.4+dfsg/src/packetdiag/__init__.py 2012-08-16 00:18:07.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/packetdiag/__init__.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,4 +14,5 @@ # limitations under the License. from nwdiag import __version__ + __version__ diff -Nru nwdiag-1.0.4+dfsg/src/packetdiag/metrics.py nwdiag-2.0.0+dfsg/src/packetdiag/metrics.py --- nwdiag-1.0.4+dfsg/src/packetdiag/metrics.py 2013-09-21 02:34:11.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/packetdiag/metrics.py 2020-01-26 05:03:51.000000000 +0000 @@ -13,9 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import blockdiag.metrics from collections import defaultdict, namedtuple -from blockdiag.utils import Box, XY + +import blockdiag.metrics +from blockdiag.utils import XY, Box class DiagramMetrics(blockdiag.metrics.DiagramMetrics): diff -Nru nwdiag-1.0.4+dfsg/src/packetdiag/noderenderers.py nwdiag-2.0.0+dfsg/src/packetdiag/noderenderers.py --- nwdiag-1.0.4+dfsg/src/packetdiag/noderenderers.py 2013-09-30 00:48:34.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/packetdiag/noderenderers.py 2020-01-13 15:46:14.000000000 +0000 @@ -13,9 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from blockdiag.noderenderer import NodeShape from blockdiag.noderenderer import install_renderer +try: + from blockdiag.noderenderer.base import NodeShape +except ImportError: + from blockdiag.noderenderer import NodeShape + class PacketNode(NodeShape): def render_shape(self, drawer, _, **kwargs): diff -Nru nwdiag-1.0.4+dfsg/src/packetdiag/parser.py nwdiag-2.0.0+dfsg/src/packetdiag/parser.py --- nwdiag-1.0.4+dfsg/src/packetdiag/parser.py 2014-07-03 09:13:25.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/packetdiag/parser.py 2020-01-26 05:03:51.000000000 +0000 @@ -35,15 +35,14 @@ [1]: http://www.graphviz.org/doc/info/lang.html ''' -import re import io -from re import MULTILINE, DOTALL +import re from collections import namedtuple -from funcparserlib.lexer import make_tokenizer, Token, LexerError -from funcparserlib.parser import (some, a, maybe, many, finished, skip) -from blockdiag.parser import create_mapper, oneplus_to_list -from blockdiag.utils.compat import u +from re import DOTALL, MULTILINE +from blockdiag.parser import create_mapper, oneplus_to_list +from funcparserlib.lexer import LexerError, Token, make_tokenizer +from funcparserlib.parser import a, finished, many, maybe, skip, some Diagram = namedtuple('Diagram', 'id stmts') FieldItem = namedtuple('FieldItem', 'begin end label attrs') @@ -66,8 +65,8 @@ ('QuotedFieldItem', (r'(?<=[:*\-])\s*(?P"|\').*?(?"|\').*?(? 1: - attrs.append(u("%dU") % self.colheight) + attrs.append("%dU" % self.colheight) if self.ampere: - attrs.append(u("%.1fA") % self.ampere) + attrs.append("%.1fA" % self.ampere) if self.weight: - attrs.append(u("%.1fkg") % self.weight) + attrs.append("%.1fkg" % self.weight) labels = [] if self.label: labels.append(self.label) if attrs: - labels.append(u("[%s]") % u("/").join(attrs)) + labels.append("[%s]" % "/".join(attrs)) - return u("\n").join(labels) + return "\n".join(labels) def set_attribute(self, attr): - if re.search('^\d+U$', attr.name): + if re.search(r'^\d+U$', attr.name): self.colheight = int(attr.name[:-1]) - elif re.search('^\d+(\.[0-9]+)?A$', attr.name): + elif re.search(r'^\d+(\.[0-9]+)?A$', attr.name): self.ampere = float(attr.name[:-1]) - elif re.search('^\d+(\.[0-9]+)?kg$', attr.name): + elif re.search(r'^\d+(\.[0-9]+)?kg$', attr.name): self.weight = float(attr.name[:-2]) else: return super(RackItem, self).set_attribute(attr) @@ -83,21 +85,21 @@ attrs = [] for name in self.desctable: if name == 'units': - attrs.append(u("%dU") % self.colheight) + attrs.append("%dU" % self.colheight) elif name == 'ampere': if self.ampere is None: - attrs.append(u("")) + attrs.append("") else: - attrs.append((u("%.1fA") % self.ampere) or u("")) + attrs.append(("%.1fA" % self.ampere) or "") elif name == 'weight': if self.weight is None: - attrs.append(u("")) + attrs.append("") else: - attrs.append((u("%.1fkg") % self.weight) or u("")) + attrs.append(("%.1fkg" % self.weight) or "") else: value = getattr(self, name) if value is None: - attrs.append(u("")) + attrs.append("") elif isinstance(value, int): attrs.append(str(value)) else: @@ -120,15 +122,15 @@ def display_label(self): attrs = [] if self.description or attrs: - attrs.insert(0, u("%dU") % self.colheight) + attrs.insert(0, "%dU" % self.colheight) labels = [] if self.description: labels.append(self.description) if attrs: - labels.append(u("[%s]") % u("/").join(attrs)) + labels.append("[%s]" % "/".join(attrs)) - return u("\n").join(labels) + return "\n".join(labels) def items(self, levels): if isinstance(levels, int): @@ -140,7 +142,7 @@ def get_max_height(self, y): try: return max(n.colheight for n in self.items(y)) - except: + except Exception: return 0 height = get_max_height(self, level) @@ -199,7 +201,7 @@ self.descending = False def set_attribute(self, attr): - if re.search('^\d+U$', attr.name): + if re.search(r'^\d+U$', attr.name): self.colheight = int(attr.name[:-1]) else: return super(Rack, self).set_attribute(attr) diff -Nru nwdiag-1.0.4+dfsg/src/rackdiag/__init__.py nwdiag-2.0.0+dfsg/src/rackdiag/__init__.py --- nwdiag-1.0.4+dfsg/src/rackdiag/__init__.py 2012-08-16 00:17:02.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/rackdiag/__init__.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,4 +14,5 @@ # limitations under the License. from nwdiag import __version__ + __version__ diff -Nru nwdiag-1.0.4+dfsg/src/rackdiag/metrics.py nwdiag-2.0.0+dfsg/src/rackdiag/metrics.py --- nwdiag-1.0.4+dfsg/src/rackdiag/metrics.py 2013-09-21 02:34:11.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/rackdiag/metrics.py 2020-01-26 05:03:51.000000000 +0000 @@ -14,9 +14,12 @@ # limitations under the License. from __future__ import division + from collections import defaultdict + import blockdiag.metrics -from blockdiag.utils import Box, XY +from blockdiag.utils import XY, Box + from rackdiag import elements diff -Nru nwdiag-1.0.4+dfsg/src/rackdiag/parser.py nwdiag-2.0.0+dfsg/src/rackdiag/parser.py --- nwdiag-1.0.4+dfsg/src/rackdiag/parser.py 2014-07-05 04:40:45.000000000 +0000 +++ nwdiag-2.0.0+dfsg/src/rackdiag/parser.py 2020-01-26 05:03:51.000000000 +0000 @@ -36,13 +36,12 @@ ''' import io -from re import MULTILINE, DOTALL from collections import namedtuple -from funcparserlib.lexer import make_tokenizer, Token, LexerError -from funcparserlib.parser import (some, a, maybe, many, finished, skip) -from blockdiag.parser import create_mapper, oneplus_to_list -from blockdiag.utils.compat import u +from re import DOTALL, MULTILINE +from blockdiag.parser import create_mapper, oneplus_to_list +from funcparserlib.lexer import LexerError, Token, make_tokenizer +from funcparserlib.parser import a, finished, many, maybe, skip, some Diagram = namedtuple('Diagram', 'id stmts') RackItem = namedtuple('RackItem', 'number label attrs') @@ -68,8 +67,8 @@ ('RackHeight', (r'[0-9]+U',)), # NOQA ('Units', (r'[0-9]+(?:\.[0-9]+)?(A|kg)',)), # NOQA ('Number', (r'[0-9]+',)), # NOQA - ('Name', (u('[A-Za-z_0-9\u0080-\uffff]') + # NOQA - u('[A-Za-z_\\-.0-9\u0080-\uffff]*'),)), # NOQA + ('Name', ('[A-Za-z_0-9\u0080-\uffff]' + # NOQA + '[A-Za-z_\\-.0-9\u0080-\uffff]*',)), # NOQA ('Op', (r'[{}:;,*\-=\[\]]',)), # NOQA ('String', (r'(?P"|\').*?(?