New submission from Chih-Hsuan Yen <[email protected]>:
The following script runs fine on Python 3.7.1 but not on master (f5107dfd42).
import logging
class Foo(logging.Formatter):
def __init__(self):
super().__init__(self)
Foo()
The output is:
Traceback (most recent call last):
File "t.py", line 9, in <module>
Foo()
File "t.py", line 6, in __init__
super().__init__(self)
File "/usr/lib/python3.8/logging/__init__.py", line 589, in __init__
self._style.validate()
File "/usr/lib/python3.8/logging/__init__.py", line 441, in validate
if not self.validation_pattern.search(self._fmt):
TypeError: expected string or bytes-like object
Most likely there's something wrong in the newly-added validation step
(issue34844).
/cc the primary reviewer of the aforementioned patch.
----------
components: Library (Lib)
messages: 331900
nosy: vinay.sajip, yan12125
priority: normal
severity: normal
status: open
title: Unable to inherit from logging.Formatter
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35509>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com