Skip to content

Releases: fredrikaverpil/creosote

v3.0.2

28 Jun 20:59
Compare
Choose a tag to compare

Fixes

  • Support non-UTF8 files and show warnings when parsing Python 2.x code. #209
  • Fail fast when dependencies file (e.g. pyproject.toml) is not found. #212

v3.0.1

01 Jun 14:33
8394a00
Compare
Choose a tag to compare

Fixes

  • ruamel.yaml not properly detected due to lack of support of period signs in dependency name #206

v3.0.0

05 Oct 14:15
Compare
Choose a tag to compare

㊗️ Major (backwards-compat breaking changes)

  • Dropped Python 3.7 support.
  • Some CLI arguments have been renamed.
  • Certain CLI arguments must now be repeated rather than having multiple values supplied to one and the same argument.

For exact details on the CLI argument changes, see the migration guide (attached at the bottom of these release notes and in the README).

🐸 Minor (new features)

  • The ability to configure creosote using pyproject.toml (❤️🙏 @BrianPugh #183 hacktoberfest-accepted). See the README for more details.
  • Python 3.12 support.

🐞 Patch (bug fixes)

  • When excluding dependencies, there could be a falsy warning shown because the dependency name entered on the command line was not "canonicalized" (dashes and periods in package names are made into underscores internally).

🫁 Internal (test suite)

  • Overhauled test suite with better integration tests and better pytest fixtures. Hopefully the whole setup is a lot more approachable now.

🌀 Migration guide: creosote 2.x to 3.x

Creosote was updated to 3.0.0 because the way arguments were supplied has now changed. This also brings pyproject.toml configuration support.

Argument name change

The argument naming has changed:

2.x argument name 3.x argument name
--exclude-deps --exclude-dep
--paths --path
--sections --section

Multiple argument values

With creosote 2.x, you were able to provide multiple values following some arguments, example:

creosote -p file1.py file2.py

With creosote 3.x, you must now provide multiple arguments as a key/value pair:

creosote -p file1.py -p file2.py

This new creosote 3.x behavior applies to the following 3.x CLI arguments:

  • --venv
  • --exclude-dep
  • -p or --path
  • -s or --section

v2.6.3

11 Jul 09:24
1cf5550
Compare
Choose a tag to compare

Fixes

  • Bugfix for when using Pipfile #174
  • Bugfix for when using PEP621 optional dependencies #175

v2.6.2

18 Jun 16:29
942f780
Compare
Choose a tag to compare

Fixes

  • Fixes a problem for PEP-582 / PDM users, who would like to point their venv to the __pypackages__ folder. Although PEP-582 was rejected, this is very easy to support right now. As long as this is easy to support, I see no issue with supporting PEP-582 and __pypackages__. #171

v2.6.1

29 Apr 21:08
6b52ecf
Compare
Choose a tag to compare

Fixes (should maybe have been features)

v2.6.0

11 Apr 18:07
f9398ea
Compare
Choose a tag to compare

Features

  • The venv's RECORD file was read only if no top_level.txt file was found in the venv. This behavior has changed, so that both the top_level.txt and RECORD files are always read now. This is done to simply increase the chance to find a correlation between the dependency name and its import name.
  • Before version 2.6.0, creosote used distlib.database to read the RECORD file. This code was cleaned up and the dependency on distlib has been removed.

v2.6.0rc1

11 Apr 12:59
09d62fc
Compare
Choose a tag to compare
v2.6.0rc1 Pre-release
Pre-release

Install

pip install --pre creosote==2.6.0rc1

Features

  • In addition to checking the venv's top_level.txt file for the dependency's import name, creosote used to check the venv's RECORD file, using distlib.database. This code was cleaned up a bit, and the dependency of distlib was removed.
  • If the venv's top_level.txt file (for the given dependency) was found, the RECORD file check was not performed in Creosote 2.5.0. In this release this behavior is changed and the RECORD file check is always being performed. The reason for doing this is simply to increase the chances of finding the dependency's import name.
  • The dependency on distlib was removed.

v2.5.0

01 Apr 15:01
aefd738
Compare
Choose a tag to compare

Features

  • Previous to (and including) this release, you could specify --venv . which will then attempt to scan through any virtual environments (or actually site-packages) locations you might have in the current directory. But with this release you can also specify the --venv argument multiple times, so to specify virtual environments in different locations. This should also support containerized installations, where you point --venv to a site-packages location.
creosote -v .venv -v other-venv

Experimental feature

  • The optional feature v3-args is introduced. This is an experimental feature which entails backwards compatibility breaking functionality and might or might not make it into Creosote v3.0.0. This particular feature changes the arguments definitions, so that instead of defining e.g. --paths <path1> <path2>, you will now define this using multiple declarations of --path, like so:
--path <path1> --path <path2>

Enable with --use-feature v3-args to try it out. Please give feedback if you have any thoughts around this!

v2.4.1

01 Apr 11:54
8cba8c5
Compare
Choose a tag to compare

Features

  • Added the optional command line argument --use-feature, which can be used to enable experimental features. Specify --use-feature fail-excluded-and-not-installed to have Creosote exit with error code 1 if an excluded dependency is not found in the dependency specification file (e.g. pyproject.toml).

Fixes

  • Fixes an issue where an excluded-and-not-installed dependency was counted towards the list of unused dependencies. A side-effect of this made creosote exit with error code 1 even if no unused dependencies were found. #153 #161