Skip to content

Commit

Permalink
Removed python 3.6 specific (linked to #328) as logger kwarg is not i…
Browse files Browse the repository at this point in the history
…n use anymore
  • Loading branch information
euri10 committed Apr 12, 2020
1 parent df4d69b commit 32b2c72
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions uvicorn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,6 @@ def is_ssl(self) -> bool:
def configure_logging(self):
logging.addLevelName(TRACE_LOG_LEVEL, "TRACE")

if sys.version_info < (3, 7):
# https://bugs.python.org/issue30520
import pickle

def __reduce__(self):
if isinstance(self, logging.RootLogger):
return logging.getLogger, ()

if logging.getLogger(self.name) is not self:
raise pickle.PicklingError("logger cannot be pickled")
return logging.getLogger, (self.name,)

logging.Logger.__reduce__ = __reduce__

if self.log_config is not None:
if isinstance(self.log_config, dict):
if self.use_colors in (True, False):
Expand Down

0 comments on commit 32b2c72

Please sign in to comment.