New(ish) Release: sphobjinv v2.1
[ ]sphobjinv v2.1 is out!
(Well, it’s actually been out for a few months, but I’m only just now getting around to writing this post about it.)
Per SemVer, since this release bumps the minor version number, no backward-incompatible changes to the API should have occurred. If you find any, please file a bug report. No guarantees about the CLI, however.
Python Version Support
First, v2.1 officially drops Python 3.5 support, which went end-of-life in September 2020. Given that major ecosystem tools such as pip have done the same, I’m pretty comfortable with the decision.
(Plus, moving to 3.6+ allowed me to roll out f-strings throughout the codebase, which was NICE.)
In parallel, v2.1 adds Python 3.10 support, in anticipation of the 4 Oct 2021 release date for 3.10.0 final.
New Features
- API
- Function/method arguments referring to files on disk now can be type
strorpathlib.Path(previously they had to bestr). See #176.
- Function/method arguments referring to files on disk now can be type
- CLI
Bug/Behavior Fixes
- More-intutive equality comparisons are now implemented for
InventoryandDataObjStr/DataObjBytesinstances.- Two
DataObjStr(orDataObjBytes) instances compare equal if all ofname,domain,role,priority,urianddispnameare equal. - Two
Inventoryinstances compare equal if.projectand.versionare equal, and the contents of.objectsare identical in each.
- Two
- Multiple situations with incorrect inventory loading behavior were fixed:
- Objects with
namevalues that contain spaces are now imported correctly, instead of being skipped (see #181 – thanks to Hynek Schlawack
for the bug report!). - In certain cases, objects can have a zero-length
uri; such objects are now correctly imported (see #183). - These issues prompted a detailed review of Sphinx’s actual object import behavior, with a subsequent expansion of the test suite to closely probe that behavior (see
test_valid_objects.py).
- Objects with
- The
User-Agentheader for URL-based CLI and API invocations was de-anonymized, so thatobjects.invdownload requests will now be attributed tosphobjinv(see #162).
Administrative
- A
[speedup]extra was added, for more convenient co-installation of the optionalpython-Levenshteindependency on POSIX/MacOS (see #175).
