Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #9218 > unrolled thread

Bug#854249: RFS: coloredlogs/5.2-1 [ITP]

Started byGaurav Juvekar <gauravjuvekar@gmail.com>
First post2017-02-05 14:00 +0100
Last post2017-07-28 13:30 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Bug#854249: RFS: coloredlogs/5.2-1 [ITP] Gaurav Juvekar <gauravjuvekar@gmail.com> - 2017-02-05 14:00 +0100
    Bug#854249: RFS: coloredlogs/5.2-1 [ITP] Adam Borowski <kilobyte@angband.pl> - 2017-02-05 18:30 +0100
      Bug#854249: RFS: coloredlogs/5.2-1 [ITP] Gaurav Juvekar <gauravjuvekar@gmail.com> - 2017-02-05 19:30 +0100
        Bug#854249: News regarding the ITP for python-coloredlogs Ghislain Vaillant <ghisvail@gmail.com> - 2017-07-24 16:10 +0200
          Bug#854249: News regarding the ITP for python-coloredlogs Gaurav Juvekar <gauravjuvekar@gmail.com> - 2017-07-28 13:30 +0200

#9218 — Bug#854249: RFS: coloredlogs/5.2-1 [ITP]

FromGaurav Juvekar <gauravjuvekar@gmail.com>
Date2017-02-05 14:00 +0100
SubjectBug#854249: RFS: coloredlogs/5.2-1 [ITP]
Message-ID<t7uAa-7s1-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Package: sponsorship-requests
Severity: wishlist

Dear mentors,

I am looking for a sponsor for my package "coloredlogs"

* Package name    : coloredlogs
  Version         : 5.2-1
  Upstream Author : Peter Odding <peter@peterodding.com>
* URL             : https://coloredlogs.readthedocs.io
* License         : Expat
  Section         : python

It builds these binary packages:

coloredlogs - Convert colored logs with ANSI escape sequences to HTML files.
python-coloredlogs - Colored terminal output for the logging module in Python2
python3-coloredlogs - Colored terminal output for the logging module in Python3

To access further information about this package, please visit the following URL:

https://mentors.debian.net/package/coloredlogs


Alternatively, one can download the package with dget using this command:

   dget -x https://mentors.debian.net/debian/pool/main/c/coloredlogs/coloredlogs_5.2-1.dsc

This is the initial packaging for the original RFS.
The dependencies also have open RFS at #852233 and #854115.

The source is tracked at
https://github.com/gauravjuvekar/debian-python-coloredlogs.git

--
Regards,
Gaurav Juvekar

[toc] | [next] | [standalone]


#9219

FromAdam Borowski <kilobyte@angband.pl>
Date2017-02-05 18:30 +0100
Message-ID<t7yNs-1OQ-1@gated-at.bofh.it>
In reply to#9218
Control: tags -1 +moreinfo

On Sun, Feb 05, 2017 at 06:20:50PM +0530, Gaurav Juvekar wrote:
> I am looking for a sponsor for my package "coloredlogs"
> 
> * URL             : https://coloredlogs.readthedocs.io
> 
> It builds these binary packages:
> 
> coloredlogs - Convert colored logs with ANSI escape sequences to HTML files.
> python-coloredlogs - Colored terminal output for the logging module in Python2
> python3-coloredlogs - Colored terminal output for the logging module in Python3
> 
>    dget -x https://mentors.debian.net/debian/pool/main/c/coloredlogs/coloredlogs_5.2-1.dsc
> 
> This is the initial packaging for the original RFS.
> The dependencies also have open RFS at #852233 and #854115.

Hi!
I see your package provides two nearly completely independent pieces of
functionality:

* (as solely mentioned in the ITP): formatting Python logs and routing them
  either to syslog or a terminal, in the second case there's some very
  minimal coloring -- a whole line gets a color applied based on log level.
* (the actual main package): takes an arbitrary ANSI-colored log and
  converts it to HTML

I have no issues with the first part (aka python{,3}-coloredlogs) --
marking up important pieces of a log greatly improves readability.

However, the second part, converting logs to HTML, is not only redundant
with ansi2html (package colorized-logs, split out from kbtin) and aha, but
also too simplicistic and buggy to do its job.

Your implementation supports only a very minor portion of possible SGR
codes.  That's good on output (works on even crappiest terminals), but not
when it's you who's supposed to accept arbitrary input, especially
considering that the conversion target can render everything except for
<blink>/text-decoration:blink (removed from every browser).  And, even for
that limited subset, your parsing is buggy.


Here's a primer on the syntax:
SGR, and most other ANSI sequences, have the form of:
    \e [ PARAMETERS C
where C is a command type ("m" for SGR), and PARAMETERS is a semicolon
separated series of one or more positive integers.  These integers can be
prefixed by an arbitrary number of zeroes (old versions of curses for
example liked "00" and "01"); an empty string means 0.

For SGR, commands are independent, thus \e[1;2m is a shorthand for
\e[1m\e[2m -- except for poorly-designed 256/24-bit color codes that take a
series of 3-6 numbers, so you need to understand them to be able even to
properly ignore.  If you don't, they'll turn on blink (256-color) or dim
(24-bit) then issue a random unrelated command.

I won't list the commands here, Wikipedia has a good list, although it lists
rare xtermese "double underline" for 21 rather than "turn off bold/bright"
that most terminals implement.

Almost no sequences other than SGR make sense in a hardcopy text such as a
log; I've seen \e[C in the wild to compress a string of spaces.


I think it'd be best if you dropped the "coloredlogs" binary and left just
the python logging libraries; the alternative would involve reimplementing
it basically from scratch.


Meow!
-- 
Autotools hint: to do a zx-spectrum build on a pdp11 host, type:
  ./configure --host=zx-spectrum --build=pdp11

[toc] | [prev] | [next] | [standalone]


#9220

FromGaurav Juvekar <gauravjuvekar@gmail.com>
Date2017-02-05 19:30 +0100
Message-ID<t7zJv-2r7-1@gated-at.bofh.it>
In reply to#9219

[Multipart message — attachments visible in raw view] — view raw

On Sun, 5 Feb 2017 18:24:27 +0100 Adam Borowski <kilobyte@angband.pl> wrote:
> However, the second part, converting logs to HTML, is not only redundant
> with ansi2html (package colorized-logs, split out from kbtin) and aha, but
> also too simplicistic and buggy to do its job.

> I think it'd be best if you dropped the "coloredlogs" binary and left just
> the python logging libraries; the alternative would involve reimplementing
> it basically from scratch.

Hi,

I agree with you. I have removed the binary package, and renamed the source package to python-coloredlogs from coloredlogs.

I have re-uploaded the package at https://mentors.debian.net/package/python-coloredlogs
You can download it with dget as 
   dget -x https://mentors.debian.net/debian/pool/main/p/python-coloredlogs/python-coloredlogs_5.2-1.dsc


-- 
Regards,
Gaurav Juvekar

[toc] | [prev] | [next] | [standalone]


#9637 — Bug#854249: News regarding the ITP for python-coloredlogs

FromGhislain Vaillant <ghisvail@gmail.com>
Date2017-07-24 16:10 +0200
SubjectBug#854249: News regarding the ITP for python-coloredlogs
Message-ID<u6MdA-5Wc-25@gated-at.bofh.it>
In reply to#9220
On Sun, 5 Feb 2017 23:51:57 +0530 Gaurav Juvekar <gauravjuvekar@gmail.c
om> wrote:
> On Sun, 5 Feb 2017 18:24:27 +0100 Adam Borowski <kilobyte@angband.pl>
wrote:
> > However, the second part, converting logs to HTML, is not only
redundant
> > with ansi2html (package colorized-logs, split out from kbtin) and
aha, but
> > also too simplicistic and buggy to do its job.
> 
> > I think it'd be best if you dropped the "coloredlogs" binary and
left just
> > the python logging libraries; the alternative would involve
reimplementing
> > it basically from scratch.
> 
> Hi,
> 
> I agree with you. I have removed the binary package, and renamed the
source package to python-coloredlogs from coloredlogs.
> 
> I have re-uploaded the package at https://mentors.debian.net/package/
python-coloredlogs
> You can download it with dget as 
>    dget -x https://mentors.debian.net/debian/pool/main/p/python-color
edlogs/python-coloredlogs_5.2-1.dsc

This issue is currently blocking my work on the spyder-terminal plugin,
for which coloredlogs is a dependency. Could you guys keep me updated
on the progress.

I'd be happy to take over if the motivation is gone.

Cheers,
Ghis

[toc] | [prev] | [next] | [standalone]


#9643 — Bug#854249: News regarding the ITP for python-coloredlogs

FromGaurav Juvekar <gauravjuvekar@gmail.com>
Date2017-07-28 13:30 +0200
SubjectBug#854249: News regarding the ITP for python-coloredlogs
Message-ID<u8bCV-335-15@gated-at.bofh.it>
In reply to#9637
Hi,

> This issue is currently blocking my work on the spyder-terminal plugin,
> for which coloredlogs is a dependency. Could you guys keep me updated
> on the progress.
> 
> I'd be happy to take over if the motivation is gone.


It would be better if you take over the package. You can start from the last push to alioth.

-- 
Regards,
Gaurav Juvekar

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web