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 sobolevn
Recipients sobolevn
Date 2022-01-27.10:25:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643279113.63.0.318517271456.issue46544@roundup.psfhosted.org>
In-reply-to
Content
Right now this works:

```
>>> import textwrap
>>> textwrap.TextWrapper.x
' '
>>> textwrap.TextWrapper.uspace
32
```

This happens because of these lines: https://github.com/python/cpython/blame/606e496dd6e2ace298532da200169124c26ae0f2/Lib/textwrap.py#L66-L69

Notice that `uspace` and `x` are both undocumented, untested, and unused in our code.

Similar variables in the same class body are then deleted from the scope:

```
    wordsep_simple_re = re.compile(r'(%s+)' % whitespace)
    del whitespace
```

1. https://github.com/python/cpython/blame/606e496dd6e2ace298532da200169124c26ae0f2/Lib/textwrap.py#L99
2. https://github.com/python/cpython/blame/606e496dd6e2ace298532da200169124c26ae0f2/Lib/textwrap.py#L106

I propose to add `del x, uspace` as well. These two probably should not be leaking and should not be exposed.
History
Date User Action Args
2022-01-27 10:25:13sobolevnsetrecipients: + sobolevn
2022-01-27 10:25:13sobolevnsetmessageid: <1643279113.63.0.318517271456.issue46544@roundup.psfhosted.org>
2022-01-27 10:25:13sobolevnlinkissue46544 messages
2022-01-27 10:25:13sobolevncreate