Loguru: Reduce dependencies

Created on 18 May 2019  路  4Comments  路  Source: Delgan/loguru

~
$ johnnydep loguru --output-format pinned
loguru==0.2.5
ansimarkup==1.4.0
better-exceptions-fork==0.2.1.post6
colorama==0.4.1
Pygments==2.4.0
~

compare with:

~
$ johnnydep logzero --output-format pinned
logzero==1.5.0
~

enhancement

Most helpful comment

Yeah, I first thought dependencies was ok (why would I reinvent the wheel if someone else already implemented some utility I need?), but I later realized this was leading to different problems (it's harder to update an external library, there is more code to maintain that I actually need, this may lead to conflicts with other libraries, it makes Loguru heavier and slower to install, etc.).

A already removed better-exceptions-fork (which depends on Pygments) and ansimarkup.

Starting from v0.3.0, the solely dependency should be colorama which is needed to colorize logs on Windows and to detect tty terminal on all platforms.

All 4 comments

Yeah, I first thought dependencies was ok (why would I reinvent the wheel if someone else already implemented some utility I need?), but I later realized this was leading to different problems (it's harder to update an external library, there is more code to maintain that I actually need, this may lead to conflicts with other libraries, it makes Loguru heavier and slower to install, etc.).

A already removed better-exceptions-fork (which depends on Pygments) and ansimarkup.

Starting from v0.3.0, the solely dependency should be colorama which is needed to colorize logs on Windows and to detect tty terminal on all platforms.

@Delgan nice! thanks for the info

The 0.3.0 release has just been published.

On Linux / OSX systems, there is now zero dependency.

On Windows, colorama (to colorize terminal's output) and win32-setctime (to properly rotate log files) are still needed.

confirmed - thanks again!

Was this page helpful?
0 / 5 - 0 ratings