Message406382
While you should not do that at home ;-), it's now *technically* possible to change the BytesWarning flag at runtime using a a *private* *internal* API:
$ ./python
Python 3.11.0a2+ (heads/remove_asyncore:010015d2eb, Nov 11 2021,
>>> "unicode" == b"bytes"
False
# Change the internal BytesWarning flag
>>> import _testinternalcapi
>>> config=_testinternalcapi.get_config()
>>> config['bytes_warning']=1
>>> _testinternalcapi.set_config(config)
>>> "unicode" == b"bytes"
<stdin>:1: BytesWarning: Comparison between bytes and string
False |
|
Date |
User |
Action |
Args |
2021-11-16 00:54:27 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, methane, xmorel, serhiy.storchaka |
2021-11-16 00:54:27 | vstinner | set | messageid: <1637024067.36.0.989642400667.issue43526@roundup.psfhosted.org> |
2021-11-16 00:54:27 | vstinner | link | issue43526 messages |
2021-11-16 00:54:27 | vstinner | create | |
|