Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circle back on pytest.PytestUnraisableExceptionWarning #237

Open
schuylermartin45 opened this issue Nov 8, 2024 · 0 comments
Open

Circle back on pytest.PytestUnraisableExceptionWarning #237

schuylermartin45 opened this issue Nov 8, 2024 · 0 comments
Labels
bug Something isn't working to sort Needs additional investigation

Comments

@schuylermartin45
Copy link
Collaborator

schuylermartin45 commented Nov 8, 2024

We currently suppress some pytest.PytestUnraisableExceptionWarning warnings in the .pytest.ini file.

We should do a deeper dive to ensure this will not impact users. This seems to show up in both the Python 3.11 and 3.12 tests.

Logs

In the GitHub Action CI containers (Linux):

Traceback (most recent call last):
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/tempfile.py", line 934, in _cleanup
    _warnings.warn(warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/crm_artifact_fetcher_ohazv3ax_dummy_project_failure'>
...Exception ignored in: <finalize object at 0x7f90195b0b80; dead>
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/tempfile.py", line 934, in _cleanup
    _warnings.warn(warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/crm_artifact_fetcher_jcfnl6of_dummy_project_failure'>
.Exception ignored in: <finalize object at 0x7f90195b11c0; dead>
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/tempfile.py", line 934, in _cleanup
    _warnings.warn(warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/crm_artifact_fetcher_r8qs6r9e_dummy_project_failure'>
...Exception ignored in: <finalize object at 0x7f9019a59840; dead>
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/tempfile.py", line 934, in _cleanup
    _warnings.warn(warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/crm_artifact_fetcher_q6gxo6db_dummy_project_failure'>
...Exception ignored in: <finalize object at 0x7f90195b1cc0; dead>
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/tempfile.py", line 934, in _cleanup
    _warnings.warn(warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/crm_artifact_fetcher_uvbn7eq7_dummy_project_failure'>
...Exception ignored in: <finalize object at 0x7f90195b2e80; dead>
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/conda-recipe-manager/lib/python3.11/tempfile.py", line 934, in _cleanup
    _warnings.warn(warn_message, ResourceWarning)
ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/crm_artifact_fetcher_[79](https://github.com/conda-incubator/conda-recipe-manager/actions/runs/11748711758/job/32733387234?pr=235#step:4:80)bk26ao_dummy_project_failure'>

In MacOS (ARM):

Exception ignored in: <function MockHttpStreamResponse.__del__ at 0x116f6eac0>
Traceback (most recent call last):
  File "/Users/smartin/work/conda-recipe-manager/tests/http_mocking.py", line 135, in __del__
    self._file_obj.close()
  File "/Users/smartin/miniconda3/envs/conda-recipe-manager/lib/python3.12/site-packages/pyfakefs/fake_file.py", line 853, in close
    self.close_fd(self.filedes)
  File "/Users/smartin/miniconda3/envs/conda-recipe-manager/lib/python3.12/site-packages/pyfakefs/fake_file.py", line 865, in close_fd
    self.flush()
  File "/Users/smartin/miniconda3/envs/conda-recipe-manager/lib/python3.12/site-packages/pyfakefs/fake_file.py", line 935, in flush
    buf_length = len(self._io.getvalue())
                     ^^^^^^^^^^^^^^^^^^^
ValueError: I/O operation on closed file.

NOTES

@schuylermartin45 schuylermartin45 added bug Something isn't working to sort Needs additional investigation labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to sort Needs additional investigation
Projects
Status: Backlog
Development

No branches or pull requests

1 participant