New submission from P.C. Kroon <p.c.kr...@rug.nl>:

Hi all!

This concerns commit 18fb1fb943b7dbd7f8a76017ee2a67ef13effb85 (also known as 
bpo-34844 or GH-9703).

For testing purposes I made something that transparently ducktypes being a 
string, except that it counts how often its `format` and `__mod__` methods are 
called. The validation mechanic now tries to pass my object to 
`self.validation_pattern.search` (line 441), which (of course) doesn't work. 
Due to backwards compatability I can't pass a validate keyword.
To resolve this, I'd like the default `validate` option to be set to `False` 
instead of `True`.

If the judgement is that I'm doing really weird things and should make an 
actual string subclass I'll also accept that and/or find an alternative 
solution.

Cheers, Peter

----------
messages: 327837
nosy: P.C. Kroon
priority: normal
severity: normal
status: open
title: Logging formatter validation breaks backward ducktyping
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to