STINNER Victor <vstin...@redhat.com> added the comment:

> urlcleanup also sets the global variable _opener to None so it does the extra 
> work of uninstalling the global variable opener set by install_opener which 
> is also not documented.

Oh wait, urlopen() also sets this private _opener global variable and so has an 
effect on next calls to urlopen()... This API is really strange, I dislike it 
:-(

I modified my PR 14529 to call urlcleanup() is way more tests, but I also 
modified regrtest to test that urllib.requests._url_tempfiles and 
urllib.requests._opener are not modified.

----------

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

Reply via email to