Lethargy

Latest version: v3.1.0

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

Scan your dependencies

Page 1 of 2

3.1.0

This release adds no new features, but completely refactors the internals.

Changes

* Added warnings for incorrect arguments to `take_opt`
* Slightly changed wording in some exceptions

3.0.0

Version 3.0 cleans up the remaining cruft from 1.0 and before. Code from <2.1 will not work, code from 2.1 will work marginally faster. The actual code is now ~8 kilobytes.

Breaking changes

- Removed `eprint`
- Removed `Opt`
- Removed `take_debug` and `take_verbose`
- Removed `print_if`

2.1.0

Version 2.1 introduces a new, simpler, documented API, while keeping compatibility with existing code. Version 3.0 will deprecate that code, so all usage should be updated to use the new style.

What's new?

* Added `lethargy.take_opt`, a simpler way to take options.
* Added simple context managers for handling errors.
* Error messages have improved grammar and wording.
* Better logic for default values, using native Python syntax.
* Removed documentation for old-style code.
* Rewrote README to be an introduction, tutorial *and* documentation.

2.0.1

Fixing some minor things that have bugged me since releasing 2.0.0.

Changes

* README.md now shows correct examples of `repr`.
* Slightly improved `str` logic for option name sorting.
* Fixed incorrect pluralisation in an exception.
* Slightly improved the comments!

2.0.0

Version 2 is out. It simplifies the internals significantly and removes barely-used functions from the public interface, making the library easier to learn and use.

**Most code should still work, but some might require changing.** Expect bugs too — the internals have changed significantly.

Breaking changes

* Renamed `Opt.take_args` keyword arg `default` to `d`
* Removed `Opt.is_long()` classmethod
* Removed `Opt.is_short()` classmethod
* Removed `Opt.find_in()` method (private)
* Removed `Opt.converter` attribute (private)
* Removed `Opt.arg_amt` attribute (private)
* Removed `Opt.names` attribute (private)
* Removed `Argv` class
* Removed `_ListSubclass` class

Non-breaking changes

* Removed type annotations
* `Opt`'s string form always sorts option names by length.

1.2.0

Only very small changes, but technically they aren't directly compatible with 1.1.0, so here we are.

Changes

- `take_args` and `take_debug` mutate by default (again)
Why? In most actual uses, these are intended to strip the argument from the argument list, and that default behaviour required passing a keyword argument in 1.1.0.

- Fixed internal `dashed` function producing incorrect output

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.