Imported Debian patch 3.1.1-1
Jonathan Carter
6 years ago
0 | # 3.1.1 | |
1 | ||
2 | 2017-10-24 | |
3 | ||
4 | * will now detect bad wrappers around metadata processors | |
5 | * fixed crash in `bw plot` | |
6 | * fixed cut off status lines | |
7 | ||
8 | ||
0 | 9 | # 3.1.0 |
1 | 10 | |
2 | 11 | 2017-10-10 |
0 | 0 | # -*- coding: utf-8 -*- |
1 | 1 | from __future__ import unicode_literals |
2 | 2 | |
3 | VERSION = (3, 1, 0) | |
3 | VERSION = (3, 1, 1) | |
4 | 4 | VERSION_STRING = ".".join([str(v) for v in VERSION]) |
2 | 2 | |
3 | 3 | from os.path import exists, join |
4 | 4 | |
5 | from .exceptions import NoSuchBundle, RepositoryError | |
5 | from .exceptions import BundleError, NoSuchBundle, RepositoryError | |
6 | 6 | from .metadata import DEFAULTS, DONE, RUN_ME_AGAIN, OVERWRITE |
7 | 7 | from .utils import cached_property, get_all_attrs_from_file |
8 | 8 | from .utils.text import bold, mark_for_translation as _ |
95 | 95 | if not exists(self.metadata_file): |
96 | 96 | return [] |
97 | 97 | result = [] |
98 | internal_names = set() | |
98 | 99 | for name, attr in get_all_attrs_from_file( |
99 | 100 | self.metadata_file, |
100 | 101 | base_env={ |
108 | 109 | }, |
109 | 110 | ).items(): |
110 | 111 | if getattr(attr, '__is_a_metadata_processor', False): |
112 | internal_name = getattr(attr, '__name__', name) | |
113 | if internal_name in internal_names: | |
114 | raise BundleError(_( | |
115 | "Metadata processor '{name}' in bundle {bundle} for node {node} has " | |
116 | "__name__ '{internal_name}', which was previously used by another " | |
117 | "metadata processor in the same metadata.py. BundleWrap uses __name__ " | |
118 | "internally to tell metadata processors apart, so this is a problem. " | |
119 | "Perhaps you used a decorator on your metadata processors that " | |
120 | "doesn't use functools.wraps? You should use that." | |
121 | ).format( | |
122 | bundle=self.name, | |
123 | node=self.node.name, | |
124 | internal_name=internal_name, | |
125 | name=name, | |
126 | )) | |
127 | internal_names.add(internal_name) | |
111 | 128 | result.append(attr) |
112 | 129 | return result |
28 | 28 | node = get_node(repo, args['node'], adhoc_nodes=args['adhoc_nodes']) |
29 | 29 | for line in graph_for_items( |
30 | 30 | node.name, |
31 | prepare_dependencies(node.items, node.os, node.os_version), | |
31 | prepare_dependencies(node.items, node.name, node.os, node.os_version), | |
32 | 32 | cluster=args['cluster'], |
33 | 33 | concurrency=args['depends_concurrency'], |
34 | 34 | static=args['depends_static'], |
185 | 185 | def write_db(self): |
186 | 186 | with open(join(self.path, "plugins.json"), 'w') as f: |
187 | 187 | f.write(dumps(self.plugin_db, indent=4, sort_keys=True)) |
188 | f.write("\n") |
416 | 416 | def _write_current_job(self): |
417 | 417 | if self.jobs and TTY: |
418 | 418 | line = "{} ".format(blue(self._spinner_character())) |
419 | # must track line length manually as len() will count ANSI escape codes | |
420 | visible_length = 2 | |
419 | 421 | try: |
420 | 422 | progress = (self.progress / float(self.progress_total)) |
421 | 423 | except ZeroDivisionError: |
422 | 424 | pass |
423 | 425 | else: |
424 | line += bold("{:.1f}% ".format(progress * 100)) | |
425 | line += self.jobs[-1] | |
426 | line += " " | |
427 | write_to_stream(STDOUT_WRITER, line[:term_width() - 1]) | |
426 | progress_text = "{:.1f}% ".format(progress * 100) | |
427 | line += bold(progress_text) | |
428 | visible_length += len(progress_text) | |
429 | line += self.jobs[-1][:term_width() - 1 - visible_length] | |
430 | write_to_stream(STDOUT_WRITER, line) | |
428 | 431 | self._status_line_present = True |
429 | 432 | |
430 | 433 |
0 | bundlewrap (3.1.1-1) unstable; urgency=medium | |
1 | ||
2 | * New upstream release | |
3 | ||
4 | -- Jonathan Carter <jcc@debian.org> Fri, 27 Oct 2017 11:32:30 +0200 | |
5 | ||
0 | 6 | bundlewrap (3.1.0-1) unstable; urgency=medium |
1 | 7 | |
2 | 8 | * New upstream release |
15 | 15 | |
16 | 16 | setup( |
17 | 17 | name="bundlewrap", |
18 | version="3.1.0", | |
18 | version="3.1.1", | |
19 | 19 | description="Config management with Python", |
20 | 20 | long_description=( |
21 | 21 | "By allowing for easy and low-overhead config management, BundleWrap fills the gap between complex deployments using Chef or Puppet and old school system administration over SSH.\n" |