Skip to content

_distutils.dist.Distribution.parse_command_line() wrongly causes unexpected change to global state #4190

@vsajip

Description

@vsajip

This line in the eponymous method:

logging.getLogger().setLevel(logging.WARN - 10 * self.verbose)

causes a global change to the root logger. This is unexpected and unwanted when being used as a library. Changes to logging configuration must not in general be made by a library, only by application code. Parsing a command line can be done without running it, and this shouldn't change the root logger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions