Skip to content

ResourceWarning in test_robotparser #128731

Closed
@serhiy-storchaka

Description

@serhiy-storchaka

Bug report

$ ./python -We -m test -vuall test_robotparser
...
test_read_404 (test.test_robotparser.NetworkTestCase.test_read_404) ... Warning -- Unraisable exception
Exception ignored in: <function _TemporaryFileCloser.__del__ at 0x7ff389434dd0>
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/tempfile.py", line 483, in __del__
    _warnings.warn(self.warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <HTTPError 404: 'Not Found'>
ok
testPasswordProtectedSite (test.test_robotparser.PasswordProtectedSiteTestCase.testPasswordProtectedSite) ... Warning -- Unraisable exception
Exception ignored in: <function _TemporaryFileCloser.__del__ at 0x7ff389434dd0>
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/tempfile.py", line 483, in __del__
    _warnings.warn(self.warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden access'>
ok
...

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions