Python-bugger

Latest version: v0.3.0

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

Scan your dependencies

Page 1 of 2

0.3

Can request more than one type of exception to be induced.

0.3.0

External changes

- Support for `--exception-type AttributeError`.

0.2.1

External changes

- Filters out .py files from dirs named `test_code/`.

0.2

---

Still only results in a `ModuleNotFoundError`, but creates a much wider range of bugs to induce that error. Also, much better overall structure for continued development.

0.2.0

External changes

- Require `click`.
- Includes a `--num-bugs` arg.
- Modifies specified number of import nodes.
- Randomly selects which relevant node to modify.
- Reports level of success.
- Supports `--target-file` arg.
- Better messaging when not including `--exception-type`.

Internal changes

- CLI is built on `click`, rather than `argparse`.
- Uses a random seed when `PY_BUGGER_RANDOM_SEED` env var is set, for testing.
- Utils dir, with initial `file_utils.py` module.
- Finds all .py files we can consider changing.
- If using Git, returns all tracked .py files not related to testing.
- If not using Git, returns all .py files not in venv, dist, build, or tests.
- Catches `TypeError` if unable to make desired change; we can focus on these kinds of changes as the project evolves.

0.1

---

This series of releases will serve as a proof of concept for the project. If it continues to be interesting and useful to people, particularly people teaching Python, I'll continue to develop it.

I'm aiming for a stable API, but that is not guaranteed until the 1.0 release. If you have feedback about usage, please open a [discussion](https://github.com/ehmatthes/py-bugger/discussions/new/choose) or an [issue](https://github.com/ehmatthes/py-bugger/issues/new/choose).

Page 1 of 2

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.