This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Catherine.Devlin
Recipients Catherine.Devlin, inducer, r.david.murray
Date 2021-05-18.14:00:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621346444.8.0.721365060776.issue20131@roundup.psfhosted.org>
In-reply-to
Content
I think that it's possible to get the desired behavior by setting a filter to "always".

```
    > cat warnme.py 
    import warnings

    for i in range(3):
        warnings.warn("oh noes!")

    > python warnme.py 
    warnme.py:4: UserWarning: oh noes!
    warnings.warn("oh noes!")
    
    > cat warnme2.py 
    import warnings

    warnings.simplefilter("always")
    for i in range(3):
        warnings.warn("oh noes!")

    > python warnme2.py 
    warnme2.py:5: UserWarning: oh noes!
    warnings.warn("oh noes!")
    warnme2.py:5: UserWarning: oh noes!
    warnings.warn("oh noes!")
    warnme2.py:5: UserWarning: oh noes!
    warnings.warn("oh noes!")
```

Does that meet the need?
History
Date User Action Args
2021-05-18 14:00:44Catherine.Devlinsetrecipients: + Catherine.Devlin, inducer, r.david.murray
2021-05-18 14:00:44Catherine.Devlinsetmessageid: <1621346444.8.0.721365060776.issue20131@roundup.psfhosted.org>
2021-05-18 14:00:44Catherine.Devlinlinkissue20131 messages
2021-05-18 14:00:44Catherine.Devlincreate