Barnhunt

Latest version: v1.2.1rc3

Safety actively analyzes 688823 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 7

1.2.0rc3

Extension/Symbols Installer

- Make code for deducing Inkscape profile directory more robust.
(There's now a beter chance this will actually work on Windows.)
- Support setting Inkscape profile directory via `$INKSCAPE_PROFILE_DIR`.

1.2.0rc2

Extension and Symbol Set Installation

- This release add a `barnhunt install` (and `uninstall`) sub-command
to simplify installation of the
[inkex-bh](https://github.com/barnhunt/inkex-bh) Inkscape extensions
and [bh-symbols](https://github.com/barnhunt/bh-symbols) symbol
sets.

Testing

- Update to `mypy==0.982` for testing. Fix spurious mypy errors.

1.2.0rc1

First public release to PyPI. Moved project to
[GitHub](https://github.com/barnhunt/barnhunt).

- Dropped support for python 3.6
- Changed license to GPL version 3
- We now do rudimentary testing under Windows and macOS.

Dependencies

- Use [pikepdf](https://pypi.org/project/pikepdf/) instead of
[pdfrw](https://pypi.org/project/pdfrw/) to manipulate PDFs. (Pdfrw
seems not to be very actively maintained.) The only possible
downside of this is that `pikepdf` is not pure-python. It claims to
be easily installable on Windows and _x86_64_ Macs, but is not
(easily) installable on Macs with Apple silicon.

- Generated PDFs are now [linearized][qpdf-linearize] and
[compressed][qpdf-object-streams].

- Add test dependency on
[pdfminer.six](https://pypi.org/project/pdfminer.six/) (but drop
dependency on [PyPDF2](https://pypi.org/project/PyPDF2/)).


Compatibility

- Refactor `barnhunt.inkscape.runner` to support running
Inkscape >= 1.0 (as well as continuing to support Inkscape 0.9x).

- Add `--inkscape-command` parameter to the `barnhunt pdfs` command
to specify the name/path of the Inkscape binary to run to export PDFs.
This also supports setting the Inkscape executable via the `$INKSCAPE_COMMAND`
environment variable. Default executable is not `inkscape.exe` on Windows
(and `inkscape` everywhere else).

- Use `pexpect.popen_spawn.PopenSpawn` instead of `pexpect.spawn` to
run Inkscape in shell-mode. Due to `pexpect.spawn`'s use of ptys, it
[will not work][pexpect-windows] on Windows.

- **MacOS**: our code for running Inkscape in shell-mode appears to be broken.
For now, on _macOS_ we default to not using shell-mode.

Packaging

- Added a stub `barnhunt.__main__` module to allow running via `python
-m barnhunt`.

Testing

- Add type annotations.

Bit Rot

- Fix up tests to address deprecations in PyPDF2.

[qpdf-linearize]: https://qpdf.readthedocs.io/en/latest/cli.html?highlight=linearize#option-linearize
[qpdf-object-streams]: https://qpdf.readthedocs.io/en/latest/cli.html?highlight=object-streams#option-object-streams
[pexpect-windows]: https://pexpect.readthedocs.io/en/stable/overview.html#windows

1.1.0a1

"Base Map" support

Add ability to mark layers for exclusion from particular output files.

This adds the ability to list multiple comma-separated output base
filenames for a given overlay.
E.g. A layer with label `"[o|build_notes,base] Build Notes"`
will define an overlay which will generate maps in two separate
output files.

Tagging a layer with `[!`_output-basename_`]` will exclude that
layer from any maps which are directed to the specified output
filename.

Tagging a layer with `[=`_output-basename_`]` will include that layer
from any maps which are directed to the specified output filename, while
excluding all other sibling layers not explicitly tagged to be included
in that output file.

1.0.1

Diagnostics

`Barnhunt pdfs` now issues a warning when generating PDFs from an SVG
file which does not have an explicit random-seed set.

Bugs Fixed

Open SVG files in binary mode in order to let the XML parser figure
out the encoding from the XML declaration.

1.0

Support python 3.10.

Random Seed

The way the random seed (used for generating random rat numbers) for
each SVG layer is computed has been changed in a
**backward-incompatible** way. This was done so that rat numbers can
be kept from changing when an SVG source file is copied or edited in
such a way that the device and/or inode of the file changes.

Now, the file-level random seed (an integer) is read from the
`bh:random-seed` attribute of the root `svg` element of the SVG
file. If no `bh:random-seed` attribute is set, the file-level seed is
computed by hashing the device and inode numbers of the SVG file.

The layer-level seed is formed by hashing the file-level random seed
with the XML *id* of the layer.

(Formerly, the layer-level seed was form by hashing a triple of the
file-level seed (which was always zero), the hash of the SVG files
device and inode, and the id of the layer.)

A new `barnhunt random-seed` sub-command has been implemented to help
with setting the random seed for SVG source files.

Bit-rot

Address `DeprecationWarning: 'contextfunction' is renamed to
'pass_context'` from Jinja2. Require `Jinja2>3`.

OCDisms

Run `pyupgrade --py36-plus` on source.

Page 2 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.