Skip to content

next release v4.62.1#1222

Merged
casperdcl merged 8 commits intomasterfrom
devel
Aug 14, 2021
Merged

next release v4.62.1#1222
casperdcl merged 8 commits intomasterfrom
devel

Conversation

@casperdcl casperdcl added p0-bug-critical ☢ Exception rasing submodule ⊂ Periphery/subclasses to-merge ↰ Imminent labels Aug 4, 2021
@casperdcl casperdcl added this to the Non-breaking milestone Aug 4, 2021
@casperdcl casperdcl self-assigned this Aug 4, 2021
@casperdcl casperdcl marked this pull request as ready for review August 4, 2021 12:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 4, 2021

Codecov Report

Merging #1222 (09cf8bc) into master (ef42425) will decrease coverage by 0.22%.
The diff coverage is 73.91%.

@@            Coverage Diff             @@
##           master    #1222      +/-   ##
==========================================
- Coverage   89.88%   89.66%   -0.23%     
==========================================
  Files          26       26              
  Lines        1721     1732      +11     
  Branches      286      287       +1     
==========================================
+ Hits         1547     1553       +6     
- Misses        128      133       +5     
  Partials       46       46              

casperdcl and others added 5 commits August 14, 2021 17:08
When using the logging redirection, logs will currently always be printed
to stdout, while the logging module default is to print to stderr.

Fix this by trying to inherit the stream from the existing handler, like
the code already does for the formatter.

Consider the following example:

    import logging
    import time

    from tqdm.contrib.logging import tqdm_logging_redirect

    log = logging.getLogger()
    log.warning("start")

    with tqdm_logging_redirect(range(int(4))) as pbar:
        for i in pbar:
            time.sleep(0.1)
            log.warning(f"Step {i}")

    log.warning("done")

Running this while redirecting stdout (`$ python3 log.py > /dev/null`)
without this patch will print:

    $ venv/bin/python log.py > /dev/null
    start
    100%|████████████████████████████████████████████| 4/4 [00:00<00:00,  9.87it/s]
    done

After this patch:

    $ venv/bin/python log.py > /dev/null
    start
    Step 0
    Step 1
    Step 2
    Step 3
    100%|████████████████████████████████████████████| 4/4 [00:00<00:00,  9.83it/s]
    done

Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
@casperdcl casperdcl added the p3-enhancement 🔥 Much new such feature label Aug 14, 2021
@casperdcl casperdcl merged commit 1ac732c into master Aug 14, 2021
@casperdcl
Copy link
Copy Markdown
Member Author

/tag v4.62.1 1ac732c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p0-bug-critical ☢ Exception rasing p3-enhancement 🔥 Much new such feature submodule ⊂ Periphery/subclasses to-merge ↰ Imminent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram "Too Many Requests" Error tqdm_telegram exhausts message quota because of frequent updates

3 participants